This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS3137: Using XDS110 with gdb/openocd

Part Number: TMS570LS3137

TMS570

Hi All,

I'm using the latest version of OpenOCD and want to interface to my custom board with the XDS110 external debugger hardware.  I have the cmsis.cfg  and the ti_tms570ls3137.cfg (uses ti_tms570.cfg) files.  I can't find documentation on how to set DAP_TAPID and JRC_TAPID addresses.  Also I get the following error when trying to make the connection.

COMMAND:

openocd -f ./tms570.cfg

RESPONSE:

Open On-Chip Debugger 0.9.0-dev-snapshot (2017-09-28-18:48)
Licensed under GNU GPL v2
For bug reports, read
    openocd.sourceforge.net/.../bugs.html
Info : only one transport option; autoselect 'cmsis-dap'
adapter speed: 1500 kHz
adapter speed: 5 kHz
Runtime Error: embedded:startup.tcl:160: session transport is "cmsis-dap" but your config requires JTAG
in procedure 'script'
at file "embedded:startup.tcl", line 58
at file "./tms570.cfg", line 6
at file "/home/pollack/openocd-binOLD/target/ti_tms570ls3137.cfg", line 9
in procedure 'jtag' called at file "/home/pollack/openocd-binOLD/target/ti_tms570.cfg", line 24
in procedure 'default_to_jtag' called at file "embedded:startup.tcl", line 165
at file "embedded:startup.tcl", line 160

I understand that there is a miss match in transport but I don't know how to fix the standard ti_tms570.cfg file

FILE:

adapter_khz 1500
adapter_khz 5

if { [info exists CHIPNAME] } {
    set _CHIPNAME $CHIPNAME
} else {
    set _CHIPNAME tms570
}

if { [info exists ENDIAN] } {
    set _ENDIAN $ENDIAN
} else {
    set _ENDIAN big
}

# TMS570 has an ICEpick-C on which we need the router commands.
source [find target/icepick.cfg]

# Main DAP
#DAP_TAPID should be set before source-ing this file
if { [info exists DAP_TAPID] } {
    set _DAP_TAPID $DAP_TAPID
}
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)
#JRC_TAPID should be set before source-ing this file
if { [info exists JRC_TAPID] } {
    set _JRC_TAPID $JRC_TAPID
}

set _JRC_TAPID2 0x0B7B302F
set _JRC_TAPID3 0x0B95502F
set _JRC_TAPID4 0x0B97102F
set _JRC_TAPID5 0x0D8A002F
set _JRC_TAPID6 0x2B8A002F
set _JRC_TAPID7 0x2D8A002F
set _JRC_TAPID8 0x3B8A002F
set _JRC_TAPID9 0x3D8A002F


jtag newtap $_CHIPNAME jrc -irlen 6 -ircapture 0x1 -irmask 0x3f \
    -expected-id $_JRC_TAPID \
    -expected-id $_JRC_TAPID2 \
    -expected-id $_JRC_TAPID3 \
    -expected-id $_JRC_TAPID4 \
    -expected-id $_JRC_TAPID5 \
    -expected-id $_JRC_TAPID6 \
    -expected-id $_JRC_TAPID7 \
    -expected-id $_JRC_TAPID8 \
    -expected-id $_JRC_TAPID9 \
    -ignore-version
jtag configure $_CHIPNAME.jrc -event setup "jtag tapenable $_CHIPNAME.dap"
jtag configure $_CHIPNAME.jrc -event post-reset "runtest 100"

# Cortex-R4 target
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_r4 -endian $_ENDIAN \
    -chain-position $_CHIPNAME.dap -coreid 0 -dbgbase 0x00001003

# TMS570 uses quirky BE-32 mode
$_TARGETNAME dap ti_be_32_quirks 1

$_TARGETNAME configure -event gdb-attach {
    cortex_r4 dbginit
    halt
}

$_TARGETNAME configure -event "reset-assert" {
    global _CHIPNAME

    # assert warm system reset through ICEPick
    icepick_c_wreset $_CHIPNAME.jrc
}

Any help or pointers would be great!  My development environment is Ubuntu running Eclipse. 

Thanks,

Jon

  • Hi Jon,

    I am going to move your post to our CCS E2E. They would have better resources to address the IDE/emulator driver related questions.
  • Jon,

    I was unable to put the openocd 0.10.0 running on my Ubuntu box, but on Windows I was able to connect by modifying the existing configuration scripts/board/ti_tmdx570ls31usb.cfg with the following:

    ti_tmdx570ls31_xds110.cfg said:

    adapter_khz 1500

    source [find interface/cmsis-dap.cfg]
    transport select jtag
    #source [find target/ti_tms570.cfg]
    source [find target/ti_tms570ls3137.cfg]

    reset_config trst_only

    #init; ftdi_set_signal PWR_RST 1; jtag arp_init

    I noticed from your procedure that you are leaving the default transport type and is configuring a very slow adapter_khz speed.

    Please give this a try and see if it works for you. 

    Hope this helps,

    Rafael