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.
 
 
 
 
 
 

65 lines
1.6 KiB

  1. # str910-eval eval board
  2. #
  3. # Need reset scripts
  4. reset_config trst_and_srst
  5. # FIXME use some standard target config, maybe create one from this
  6. #
  7. # source [find target/...cfg]
  8. if { [info exists CHIPNAME] } {
  9. set _CHIPNAME $CHIPNAME
  10. } else {
  11. set _CHIPNAME str912
  12. }
  13. if { [info exists ENDIAN] } {
  14. set _ENDIAN $ENDIAN
  15. } else {
  16. set _ENDIAN little
  17. }
  18. if { [info exists FLASHTAPID] } {
  19. set _FLASHTAPID $FLASHTAPID
  20. } else {
  21. set _FLASHTAPID 0x04570041
  22. }
  23. jtag newtap $_CHIPNAME flash -irlen 8 -ircapture 0x1 -irmask 0x1 -expected-id $_FLASHTAPID
  24. if { [info exists CPUTAPID] } {
  25. set _CPUTAPID $CPUTAPID
  26. } else {
  27. set _CPUTAPID 0x25966041
  28. }
  29. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
  30. if { [info exists BSTAPID] } {
  31. set _BSTAPID $BSTAPID
  32. } else {
  33. set _BSTAPID 0x1457f041
  34. }
  35. jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_BSTAPID
  36. set _TARGETNAME $_CHIPNAME.cpu
  37. target create $_TARGETNAME arm966e -endian $_ENDIAN -chain-position $_TARGETNAME
  38. $_TARGETNAME configure -work-area-phys 0x50000000 -work-area-size 16384 -work-area-backup 1
  39. $_TARGETNAME configure -event reset-init {
  40. # We can increase speed now that we know the target is halted.
  41. #jtag_rclk 3000
  42. # -- Enable 96K RAM
  43. # PFQBC enabled / DTCM & AHB wait-states disabled
  44. mww 0x5C002034 0x0191
  45. str9x flash_config 0 4 2 0 0x80000
  46. flash protect 0 0 7 off
  47. }
  48. #flash bank str9x <base> <size> 0 0 <target#> <variant>
  49. set _FLASHNAME $_CHIPNAME.flash0
  50. flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 0
  51. set _FLASHNAME $_CHIPNAME.flash1
  52. flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 0