omap4430.cfg 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # OMAP4430
  3. if { [info exists CHIPNAME] } {
  4. set _CHIPNAME $CHIPNAME
  5. } else {
  6. set _CHIPNAME omap4430
  7. }
  8. # Although the OMAP4430 supposedly has an ICEpick-D, only the
  9. # ICEpick-C router commands seem to work.
  10. # See http://processors.wiki.ti.com/index.php/ICEPICK
  11. source [find target/icepick.cfg]
  12. #
  13. # A9 DAP
  14. #
  15. if { [info exists DAP_TAPID] } {
  16. set _DAP_TAPID $DAP_TAPID
  17. } else {
  18. set _DAP_TAPID 0x3BA00477
  19. }
  20. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf \
  21. -expected-id $_DAP_TAPID -disable
  22. jtag configure $_CHIPNAME.cpu -event tap-enable \
  23. "icepick_c_tapenable $_CHIPNAME.jrc 9"
  24. #
  25. # M3 DAPs, one per core
  26. #
  27. if { [info exists M3_DAP_TAPID] } {
  28. set _M3_DAP_TAPID $M3_DAP_TAPID
  29. } else {
  30. set _M3_DAP_TAPID 0x4BA00477
  31. }
  32. jtag newtap $_CHIPNAME m31 -irlen 4 -ircapture 0x1 -irmask 0xf \
  33. -expected-id $_M3_DAP_TAPID -disable
  34. jtag configure $_CHIPNAME.m31 -event tap-enable \
  35. "icepick_c_tapenable $_CHIPNAME.jrc 5"
  36. jtag newtap $_CHIPNAME m30 -irlen 4 -ircapture 0x1 -irmask 0xf \
  37. -expected-id $_M3_DAP_TAPID -disable
  38. jtag configure $_CHIPNAME.m30 -event tap-enable \
  39. "icepick_c_tapenable $_CHIPNAME.jrc 4"
  40. #
  41. # ICEpick-D JRC (JTAG route controller)
  42. #
  43. if { [info exists JRC_TAPID] } {
  44. set _JRC_TAPID $JRC_TAPID
  45. } else {
  46. set _JRC_TAPID 0x3b95c02f
  47. set _JRC_TAPID2 0x1b85202f
  48. }
  49. # PandaBoard REV EA1 (PEAP platforms)
  50. if { [info exists JRC_TAPID2] } {
  51. set _JRC_TAPID2 $JRC_TAPID2
  52. } else {
  53. set _JRC_TAPID2 0x1b85202f
  54. }
  55. jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \
  56. -expected-id $_JRC_TAPID -expected-id $_JRC_TAPID2
  57. # Required by ICEpick to power-up the debug domain
  58. jtag configure $_CHIPNAME.jrc -event post-reset "runtest 200"
  59. #
  60. # GDB target: Cortex-A9, using DAP
  61. #
  62. # The debugger can connect to either core of the A9, but currently
  63. # not both simultaneously. Change -coreid to 1 to connect to the
  64. # second core.
  65. #
  66. set _TARGETNAME $_CHIPNAME.cpu
  67. # APB DBGBASE reads 0x80040000, but this points to an empty ROM table.
  68. # 0x80000000 is cpu0 coresight region
  69. #
  70. #
  71. # CORTEX_A8_PADDRDBG_CPU_SHIFT 13
  72. # 0x80000000 | (coreid << CORTEX_A8_PADDRDBG_CPU_SHIFT)
  73. set _coreid 0
  74. set _dbgbase [expr {0x80000000 | ($_coreid << 13)}]
  75. echo "Using dbgbase = [format 0x%x $_dbgbase]"
  76. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  77. target create $_TARGETNAME cortex_a -dap $_CHIPNAME.dap \
  78. -coreid 0 -dbgbase $_dbgbase
  79. # SRAM: 56KiB at 0x4030.0000
  80. $_TARGETNAME configure -work-area-phys 0x40300000 -work-area-size 0x1000
  81. #
  82. # M3 targets, separate TAP/DAP for each core
  83. #
  84. dap create $_CHIPNAME.m30_dap -chain-position $_CHIPNAME.m30
  85. dap create $_CHIPNAME.m31_dap -chain-position $_CHIPNAME.m31
  86. target create $_CHIPNAME.m30 cortex_m -dap $_CHIPNAME.m30_dap
  87. target create $_CHIPNAME.m31 cortex_m -dap $_CHIPNAME.m31_dap
  88. # Once the JRC is up, enable our TAPs
  89. jtag configure $_CHIPNAME.jrc -event setup "
  90. jtag tapenable $_CHIPNAME.cpu
  91. jtag tapenable $_CHIPNAME.m30
  92. jtag tapenable $_CHIPNAME.m31
  93. "
  94. # Assume SRST is unavailable (e.g. TI-14 JTAG), so we must assert reset
  95. # ourselves using PRM_RSTCTRL. 1 is a warm reset, 2 a cold reset.
  96. set PRM_RSTCTRL 0x4A307B00
  97. $_TARGETNAME configure -event reset-assert "$_TARGETNAME mww phys $PRM_RSTCTRL 0x1"
  98. $_CHIPNAME.m30 configure -event reset-assert { }
  99. $_CHIPNAME.m31 configure -event reset-assert { }
  100. # Soft breakpoints don't currently work due to broken cache handling
  101. gdb_breakpoint_override hard