You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.3 KiB

  1. #STR750 CPU
  2. if { [info exists CHIPNAME] } {
  3. set _CHIPNAME $CHIPNAME
  4. } else {
  5. set _CHIPNAME str750
  6. }
  7. if { [info exists ENDIAN] } {
  8. set _ENDIAN $ENDIAN
  9. } else {
  10. set _ENDIAN little
  11. }
  12. if { [info exists CPUTAPID] } {
  13. set _CPUTAPID $CPUTAPID
  14. } else {
  15. set _CPUTAPID 0x4f1f0041
  16. }
  17. # jtag speed
  18. jtag_khz 10
  19. #use combined on interfaces or targets that can't set TRST/SRST separately
  20. #reset_config trst_and_srst srst_pulls_trst
  21. reset_config trst_and_srst srst_pulls_trst
  22. #jtag scan chain
  23. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID
  24. #jtag nTRST and nSRST delay
  25. jtag_nsrst_delay 500
  26. jtag_ntrst_delay 500
  27. set _TARGETNAME $_CHIPNAME.cpu
  28. target create $_TARGETNAME arm7tdmi -endian little -chain-position 0 -variant arm7tdmi
  29. $_TARGETNAME configure -event reset-start { jtag_khz 10 }
  30. $_TARGETNAME configure -event reset-init { jtag_khz 3000 }
  31. $_TARGETNAME configure -event gdb-flash-erase-start {
  32. flash protect 0 0 7 off
  33. flash protect 1 0 1 off
  34. }
  35. $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
  36. #flash bank <driver> <base> <size> <chip_width> <bus_width>
  37. flash bank str7x 0x20000000 0x00040000 0 0 0 STR75x
  38. flash bank str7x 0x200C0000 0x00004000 0 0 0 STR75x