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.
 
 
 
 
 
 

61 lines
1.6 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. adapter_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. #jtag scan chain
  22. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID
  23. #jtag nTRST and nSRST delay
  24. adapter_nsrst_delay 500
  25. jtag_ntrst_delay 500
  26. set _TARGETNAME $_CHIPNAME.cpu
  27. target create $_TARGETNAME arm7tdmi -endian little -chain-position 0 -variant arm7tdmi
  28. $_TARGETNAME configure -event reset-start { adapter_khz 10 }
  29. $_TARGETNAME configure -event reset-init {
  30. adapter_khz 3000
  31. # Because the hardware cannot be interrogated for the protection state
  32. # of sectors, initialize all the sectors to be unprotected. The initial
  33. # state is reflected by the driver, too.
  34. flash protect 0 0 last off
  35. flash protect 1 0 last off
  36. }
  37. $_TARGETNAME configure -event gdb-flash-erase-start {
  38. flash protect 0 0 7 off
  39. flash protect 1 0 1 off
  40. }
  41. $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
  42. #flash bank <driver> <base> <size> <chip_width> <bus_width>
  43. set _FLASHNAME $_CHIPNAME.flash
  44. flash bank $_FLASHNAME str7x 0x20000000 0x00040000 0 0 $_TARGETNAME STR75x
  45. set _FLASHNAME $_CHIPNAME.flash
  46. flash bank $_FLASHNAME str7x 0x200C0000 0x00004000 0 0 $_TARGETNAME STR75x