lpc3131.cfg 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. ######################################
  3. # Target: NXP lpc3131
  4. ######################################
  5. if { [info exists CHIPNAME] } {
  6. set _CHIPNAME $CHIPNAME
  7. } else {
  8. set _CHIPNAME lpc3131
  9. }
  10. if { [info exists ENDIAN] } {
  11. set _ENDIAN $ENDIAN
  12. } else {
  13. set _ENDIAN little
  14. }
  15. # ARM926EJS core
  16. if { [info exists CPUTAPID] } {
  17. set _CPUTAPID $CPUTAPID
  18. } else {
  19. set _CPUTAPID 0x07926f0f
  20. }
  21. # Scan Tap
  22. # Wired to separate STDO pin on the lpc3131, externally muxed to TDO on ea3131 module
  23. # JTAGSEL pin must be 0 to activate, which reassigns arm tdo to a pass through.
  24. if { [info exists SJCTAPID] } {
  25. set _SJCTAPID $SJCTAPID
  26. } else {
  27. set _SJCTAPID 0x1541E02B
  28. }
  29. jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
  30. ##################################################################
  31. # various symbol definitions, to avoid hard-wiring addresses
  32. ##################################################################
  33. global lpc313x
  34. set lpc313x [ dict create ]
  35. # Physical addresses for controllers and memory
  36. dict set lpc313x sram0 0x11028000
  37. dict set lpc313x sram1 0x11040000
  38. dict set lpc313x uart 0x15001000
  39. dict set lpc313x cgu 0x13004000
  40. dict set lpc313x ioconfig 0x13003000
  41. dict set lpc313x sysconfig 0x13002800
  42. dict set lpc313x wdt 0x13002400
  43. ##################################################################
  44. # Target configuration
  45. ##################################################################
  46. adapter srst delay 1000
  47. jtag_ntrst_delay 0
  48. set _TARGETNAME $_CHIPNAME.cpu
  49. target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME
  50. $_TARGETNAME invoke-event halted
  51. $_TARGETNAME configure -work-area-phys [dict get $lpc313x sram0] -work-area-size 0x30000 -work-area-backup 0
  52. $_TARGETNAME configure -event reset-init {
  53. echo "\nRunning reset init script for LPC3131\n"
  54. halt
  55. wait_halt
  56. reg cpsr 0xa00000d3 ;#Supervisor mode
  57. reg pc 0x11029000
  58. poll
  59. sleep 500
  60. }
  61. arm7_9 fast_memory_access enable
  62. arm7_9 dcc_downloads enable