ti_cc26x0.cfg 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. #
  3. # Texas Instruments CC26x0 - ARM Cortex-M3
  4. #
  5. # http://www.ti.com
  6. #
  7. source [find target/icepick.cfg]
  8. source [find target/ti-cjtag.cfg]
  9. if { [info exists CHIPNAME] } {
  10. set _CHIPNAME $CHIPNAME
  11. } else {
  12. set _CHIPNAME cc26x0
  13. }
  14. #
  15. # Main DAP
  16. #
  17. if { [info exists DAP_TAPID] } {
  18. set _DAP_TAPID $DAP_TAPID
  19. } else {
  20. set _DAP_TAPID 0x4BA00477
  21. }
  22. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -disable
  23. jtag configure $_CHIPNAME.cpu -event tap-enable "icepick_c_tapenable $_CHIPNAME.jrc 0"
  24. #
  25. # ICEpick-C (JTAG route controller)
  26. #
  27. if { [info exists JRC_TAPID] } {
  28. set _JRC_TAPID $JRC_TAPID
  29. } else {
  30. set _JRC_TAPID 0x0B99A02F
  31. }
  32. jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f -expected-id $_JRC_TAPID -ignore-version
  33. jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.cpu"
  34. # A start sequence is needed to change from 2-pin cJTAG to 4-pin JTAG
  35. jtag configure $_CHIPNAME.jrc -event post-reset "ti_cjtag_to_4pin_jtag $_CHIPNAME.jrc"
  36. set _TARGETNAME $_CHIPNAME.cpu
  37. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  38. target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
  39. if { [info exists WORKAREASIZE] } {
  40. set _WORKAREASIZE $WORKAREASIZE
  41. } else {
  42. set _WORKAREASIZE 0x4000
  43. }
  44. $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
  45. set _FLASHNAME $_CHIPNAME.flash
  46. flash bank $_FLASHNAME cc26xx 0 0 0 0 $_TARGETNAME
  47. cortex_m reset_config vectreset