diff --git a/boards/cc2650stk/Makefile.include b/boards/cc2650stk/Makefile.include index f6cca7a73..aecba3b4f 100644 --- a/boards/cc2650stk/Makefile.include +++ b/boards/cc2650stk/Makefile.include @@ -1,5 +1,6 @@ export CPU = cc26x0 export CPU_MODEL = cc26x0f128 +export XDEBUGGER = XDS110 # set default port depending on operating system PORT_LINUX ?= /dev/ttyACM0 @@ -11,4 +12,16 @@ include $(RIOTBOARD)/Makefile.include.serial # configure the flash tool export UNIFLASH_PATH ?= "UNIFLASH_PATH unconfigured" export FLASHER = $(UNIFLASH_PATH)/uniflash.sh -export FFLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/cc26x0stk.ccxml -program $(ELFFILE) +export FFLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -program $(ELFFILE) + +# configure the debug server +export DEBUGSERVER = $(UNIFLASH_PATH)/ccs_base/common/uscif/gdb_agent_console +export DEBUGSERVER_FLAGS = -p 3333 $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).dat + +# configure the debugging tool +export DEBUGGER = $(PREFIX)gdb +export DEBUGGER_FLAGS = -x $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_gdb.conf $(ELFFILE) + +# configure uniflash for resetting target +export RESET = $(UNIFLASH_PATH)/uniflash.sh +export RESET_FLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -reset diff --git a/boards/cc2650stk/dist/cc26x0f128_XDS100v3.ccxml b/boards/cc2650stk/dist/cc26x0f128_XDS100v3.ccxml new file mode 100644 index 000000000..c44e54799 --- /dev/null +++ b/boards/cc2650stk/dist/cc26x0f128_XDS100v3.ccxml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/boards/cc2650stk/dist/cc26x0f128_XDS100v3.dat b/boards/cc2650stk/dist/cc26x0f128_XDS100v3.dat new file mode 100644 index 000000000..9285857cb --- /dev/null +++ b/boards/cc2650stk/dist/cc26x0f128_XDS100v3.dat @@ -0,0 +1,68 @@ +# config version=3.5 +$ sepk + pod_drvr=libjioserdesusbv3.so + pod_port=0 +$ / +$ product + title="Texas Instruments XDS100v3 USB" + alias=TI_XDS100v3_USB + name=FTDI_FT2232 +$ / +$ ftdi_ft2232 + usb_vid=0x0403 + usb_pid=0xa6d1 + gpio_l0="TRSTn,Active_Low" + gpio_l1="EMU_Pin_Enable,Active_Low" + gpio_l2="EMU_Pin_0,Active_Low" + gpio_l3="Adaptive_Clock,Active_High" + gpio_h0="SRSTn,Active_High" + gpio_h1="Clock_Fail_Detect,Active_High" + gpio_h2="Power_Loss_Detect,Active_Low" + gpio_h3="Power_Loss_Reset,Active_High" + gpio_h4="EMU_Pin_1,Active_Low" + gpio_h5="Cable_Disconnect,Active_High" + gpio_h6="Dot7_Bypass,Active_Low" + gpio_h7="Alternate_Io,Active_Low" + apio_l0=Unused + apio_l1="Jtag_Isolate,Active_High" + apio_l2="Clock_Fail_Enable,Active_High" + apio_l3=Unused + apio_h0=Unused + apio_h1="Status_0,Active_High" + apio_h2="Status_2,Active_High" + apio_h3=Unused + apio_h4="Jtag_Loopback,Active_High" + apio_h5="Status_1,Active_High" + apio_h6=Unused + apio_h7=Unused +$ / +$ uscif + tdoedge=FALL + jtagboot_mode=disable + jtagboot_value=hiz + powerboot_mode=disable + powerboot_value=hiz + jtag_isolate=disable +$ / +$ dot7 + dts_usage=enable + dts_type=xds100v3 + ts_pin_width=all_four +$ / +$ uscif + tclk_program=adaptive + tclk_frequency=3.0 +$ / +$ dot7 + dts_program=emulator + dts_frequency=16.7MHz + ts_format=jscan0 +$ / +@ icepick_c family=icepick_c irbits=6 drbits=1 subpaths=1 + & subpath_0 address=16 default=no custom=yes force=yes pseudo=no + @ cs_dap_0 family=cs_dap irbits=4 drbits=1 subpaths=1 identify=0x4BA00477 + & subpath_1 type=debug address=0 default=no custom=yes force=yes pseudo=no + @ cortex_m3_0 family=cortex_mxx irbits=0 drbits=0 identify=0x02000000 traceid=0x0 + & / + & / +# / diff --git a/boards/cc2650stk/dist/cc26x0stk.ccxml b/boards/cc2650stk/dist/cc26x0f128_XDS110.ccxml similarity index 100% rename from boards/cc2650stk/dist/cc26x0stk.ccxml rename to boards/cc2650stk/dist/cc26x0f128_XDS110.ccxml diff --git a/boards/cc2650stk/dist/cc26x0f128_XDS110.dat b/boards/cc2650stk/dist/cc26x0f128_XDS110.dat new file mode 100644 index 000000000..62375c31a --- /dev/null +++ b/boards/cc2650stk/dist/cc26x0f128_XDS110.dat @@ -0,0 +1,31 @@ +# config version=3.5 +$ sepk + pod_drvr=libjioxds110.so + pod_port=0 +$ / +$ product + title="Texas Instruments XDS110 USB" + alias=TI_XDS110_USB + name=XDS110 +$ / +$ uscif + tdoedge=FALL + tclk_program=DEFAULT + tclk_frequency=2.5MHz + jtag_isolate=enable +$ / +$ dot7 + dts_usage=nothing +$ / +$ swd + swd_debug=disabled + swo_data=aux_uart +$ / +@ icepick_c family=icepick_c irbits=6 drbits=1 subpaths=1 + & subpath_0 address=16 default=no custom=yes force=yes pseudo=no + @ cs_dap_0 family=cs_dap irbits=4 drbits=1 subpaths=1 identify=0x4BA00477 + & subpath_1 type=debug address=0 default=no custom=yes force=yes pseudo=no + @ cortex_m3_0 family=cortex_mxx irbits=0 drbits=0 identify=0x02000000 traceid=0x0 + & / + & / +# / diff --git a/boards/cc2650stk/dist/cc26x0f128_gdb.conf b/boards/cc2650stk/dist/cc26x0f128_gdb.conf new file mode 100644 index 000000000..7fc681f26 --- /dev/null +++ b/boards/cc2650stk/dist/cc26x0f128_gdb.conf @@ -0,0 +1,6 @@ +mem 0x00 0x20000 ro 32 nocache +mem 0x10000000 0x10020000 ro 32 nocache +mem 0x20000000 0x20005000 rw 32 nocache +mem 0x40000000 0x400E1028 rw 32 nocache +mem 0xE000E000 0xE000F000 rw 32 nocache +target remote localhost:3333 diff --git a/boards/cc2650stk/dist/openocd.cfg b/boards/cc2650stk/dist/openocd.cfg new file mode 100644 index 000000000..0fa460035 --- /dev/null +++ b/boards/cc2650stk/dist/openocd.cfg @@ -0,0 +1,43 @@ +# Config for Texas Instruments low power SoC CC26xx family + +adapter_khz 100 + +source [find target/icepick.cfg] +source [find target/ti-cjtag.cfg] + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME cc26xx +} + +# +# Main DAP +# +if { [info exists DAP_TAPID] } { + set _DAP_TAPID $DAP_TAPID +} else { + set _DAP_TAPID 0x4BA00477 +} +jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -disable +jtag configure $_CHIPNAME.dap -event tap-enable "icepick_c_tapenable $_CHIPNAME.jrc 0" + +# +# ICEpick-C (JTAG route controller) +# +if { [info exists JRC_TAPID] } { + set _JRC_TAPID $JRC_TAPID +} else { + set _JRC_TAPID 0x1B99A02F +} +jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f -expected-id $_JRC_TAPID -ignore-version +# A start sequence is needed to change from cJTAG (Compact JTAG) to +# 4-pin JTAG before talking via JTAG commands +jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap" +jtag configure $_CHIPNAME.jrc -event post-reset "ti_cjtag_to_4pin_jtag $_CHIPNAME.jrc" + +# +# Cortex M3 target +# +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME cortex_m -chain-position $_CHIPNAME.dap