lpc3131.cfg 1.9 KB

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