str710.cfg 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. #start slow, speed up after reset
  3. adapter speed 10
  4. if { [info exists CHIPNAME] } {
  5. set _CHIPNAME $CHIPNAME
  6. } else {
  7. set _CHIPNAME str710
  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. set _TARGETNAME $_CHIPNAME.cpu
  24. target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME
  25. $_TARGETNAME configure -event reset-start { adapter speed 10 }
  26. $_TARGETNAME configure -event reset-init {
  27. adapter speed 6000
  28. # Because the hardware cannot be interrogated for the protection state
  29. # of sectors, initialize all the sectors to be unprotected. The initial
  30. # state is reflected by the driver, too.
  31. flash protect 0 0 last off
  32. flash protect 1 0 last off
  33. }
  34. $_TARGETNAME configure -event gdb-flash-erase-start {
  35. flash protect 0 0 7 off
  36. flash protect 1 0 1 off
  37. }
  38. $_TARGETNAME configure -work-area-phys 0x2000C000 -work-area-size 0x4000 -work-area-backup 0
  39. #flash bank str7x <base> <size> 0 0 <target#> <variant>
  40. set _FLASHNAME $_CHIPNAME.flash0
  41. flash bank $_FLASHNAME str7x 0x40000000 0x00040000 0 0 $_TARGETNAME STR71x
  42. set _FLASHNAME $_CHIPNAME.flash1
  43. flash bank $_FLASHNAME str7x 0x400C0000 0x00004000 0 0 $_TARGETNAME STR71x