rm57x.cfg 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. if { [info exists CHIPNAME] } {
  2. set _CHIPNAME $CHIPNAME
  3. } else {
  4. set _CHIPNAME rm57
  5. }
  6. if { [info exists ENDIAN] } {
  7. set _ENDIAN $ENDIAN
  8. } else {
  9. set _ENDIAN little
  10. }
  11. adapter speed 1000
  12. # RM42 has an ICEpick-C on which we need the router commands.
  13. source [find target/icepick.cfg]
  14. # Main DAP
  15. if { [info exists DAP_TAPID] } {
  16. set _DAP_TAPID $DAP_TAPID
  17. } else {
  18. set _DAP_TAPID 0x0b95a02f
  19. }
  20. jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0x1 -expected-id $_DAP_TAPID -disable
  21. jtag configure $_CHIPNAME.dap -event tap-enable "icepick_c_tapenable $_CHIPNAME.jrc 0"
  22. # ICEpick-C (JTAG route controller)
  23. if { [info exists JRC_TAPID] } {
  24. set _JRC_TAPID $JRC_TAPID
  25. } else {
  26. set _JRC_TAPID 0x0b95a02f
  27. }
  28. jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \
  29. -expected-id $_JRC_TAPID -ignore-version
  30. jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100"
  31. jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap"
  32. # Cortex R4 target
  33. set _TARGETNAME $_CHIPNAME.cpu
  34. #target create $_TARGETNAME cortex_r4 -endian $_ENDIAN -chain-position $_CHIPNAME.dap -coreid 0 -dbgbase 0x00001003
  35. target create $_TARGETNAME cortex_r4 -endian $_ENDIAN -chain-position $_CHIPNAME.dap -coreid 0 -dbgbase 0x80001000
  36. gdb_breakpoint_override hard
  37. # RM4x flash... when we are ready
  38. #set _FLASHNAME $_CHIPNAME.flash
  39. #flash bank $_FLASHNAME rm4x 0 0 0 0 $_TARGETNAME
  40. $_TARGETNAME configure -event gdb-attach {
  41. cortex_r4 dbginit
  42. dap apsel 1
  43. halt
  44. }
  45. $_TARGETNAME configure -event "reset-assert" {
  46. global _CHIPNAME
  47. # assert warm system reset through ICEPick
  48. icepick_c_wreset $_CHIPNAME.jrc
  49. }