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.
 
 
 
 
 
 

55 lines
1.4 KiB

  1. adapter_khz 1500
  2. if { [info exists CHIPNAME] } {
  3. set _CHIPNAME $CHIPNAME
  4. } else {
  5. set _CHIPNAME tms570
  6. }
  7. if { [info exists ENDIAN] } {
  8. set _ENDIAN $ENDIAN
  9. } else {
  10. set _ENDIAN big
  11. }
  12. # TMS570 has an ICEpick-C on which we need the router commands.
  13. source [find target/icepick.cfg]
  14. # Main DAP
  15. # DAP_TAPID should be set before source-ing this file
  16. if { [info exists DAP_TAPID] } {
  17. set _DAP_TAPID $DAP_TAPID
  18. }
  19. jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -disable
  20. jtag configure $_CHIPNAME.dap -event tap-enable "icepick_c_tapenable $_CHIPNAME.jrc 0"
  21. # ICEpick-C (JTAG route controller)
  22. # JRC_TAPID should be set before source-ing this file
  23. if { [info exists JRC_TAPID] } {
  24. set _JRC_TAPID $JRC_TAPID
  25. }
  26. jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \
  27. -expected-id $_JRC_TAPID -ignore-version
  28. jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap"
  29. jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100"
  30. # Cortex R4 target
  31. set _TARGETNAME $_CHIPNAME.cpu
  32. target create $_TARGETNAME cortex_r4 -endian $_ENDIAN \
  33. -chain-position $_CHIPNAME.dap -coreid 0 -dbgbase 0x00001003
  34. # TMS570 uses quirky BE-32 mode
  35. $_TARGETNAME dap ti_be_32_quirks 1
  36. $_TARGETNAME configure -event gdb-attach {
  37. cortex_r4 dbginit
  38. halt
  39. }
  40. $_TARGETNAME configure -event "reset-assert" {
  41. global _CHIPNAME
  42. # assert warm system reset through ICEPick
  43. icepick_c_wreset $_CHIPNAME.jrc
  44. }