str730.cfg 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. #STR730 CPU
  3. adapter speed 3000
  4. if { [info exists CHIPNAME] } {
  5. set _CHIPNAME $CHIPNAME
  6. } else {
  7. set _CHIPNAME str730
  8. }
  9. if { [info exists ENDIAN] } {
  10. set _ENDIAN $ENDIAN
  11. } else {
  12. set _ENDIAN little
  13. }
  14. if { [info exists CPUTAPID] } {
  15. set _CPUTAPID $CPUTAPID
  16. } else {
  17. set _CPUTAPID 0x3f0f0f0f
  18. }
  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 srst delay 500
  25. jtag_ntrst_delay 500
  26. set _TARGETNAME $_CHIPNAME.cpu
  27. target create $_TARGETNAME arm7tdmi -endian little -chain-position 0
  28. $_TARGETNAME configure -event reset-start { adapter speed 10 }
  29. $_TARGETNAME configure -event reset-init {
  30. adapter speed 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. }
  36. $_TARGETNAME configure -event gdb-flash-erase-start {
  37. flash protect 0 0 7 off
  38. }
  39. $_TARGETNAME configure -work-area-phys 0xA0000000 -work-area-size 0x4000 -work-area-backup 0
  40. #flash bank <driver> <base> <size> <chip_width> <bus_width>
  41. set _FLASHNAME $_CHIPNAME.flash
  42. flash bank $_FLASHNAME str7x 0x80000000 0x00040000 0 0 $_TARGETNAME STR73x