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.

LAUNCHXL-CC1310: Make Openocd and bootloader work together

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310

Hi Experts,

I'm able to make software for the CC1310 using CCS and the ccfg.c file so it can be flashed using the CCS or the bootloader using the uart,

I've discovered that openocd won't work when the launchpad is flashed with a program intended for use with the bootloader and will report different errors like 

Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: cc13x0.jrc: IR capture error; saw 0x00 not 0x01

Error: Target not examined yet
Error executing event gdb-attach on target cc13x0.cpu

Examining the cfcg memery area reveals some changes as expected and I guess it has something to do with some of the values but can I make a configuration with the bootloader active that will allow openocd to work?

Regards Peter

  • Hi Peter,

    I will look into this, but wanted to know if open ocd works without the bootloader?

    Regards,

    Sid

  • Hi Sid,

    Thank you for answering. Yes, openocd works fine when the bootloader isn't enabled.

    The only change in the ccfg area is the bootloader option at 0x1FFD8 from 00FFFFFF to C5FE02C2 everything else is unchanged.

    but something else might be involved, because changing the longword back isn't enough. The project needs to be flashed by CCS for openocd to work again. 

    Regards Peter

  • Hi Sid,

    I just made another test and discovered it isn't related to the ccfg area.

    If I use our main project with the bootloader activated openocd will work, but if I use the 'empty TI-RTOS' example for the CC1310 Launchpad openocd won't work at all.

    I can't find any configuration differences.

    Regards Peter

  • Hi Peter,

    I am assuming you are using gdb along with openocd. What are the commands that cause the error? What is your exact procedure and what is causing the issue?

    Regards,

    Sid

  • Hi Sid,

    I'll use GDB when it works but the problems actually starts when I try to connect with openocd using:

    openocd -s tcl/ -f interface/xds110.cfg -c "adapter speed 1500" -c "transport select jtag" -f target/ti_cc13x0.cfg

    and then using

    telnet localhost 4444

    to issue commands (init ; reset halt). It won't work on the empty example project, but works fine on our old project.

    I've realized that our old project is using GCC and I would like to do that in the example project as well but can't make it run. It compiles but ends in a FaultISR before main. When I use the GCC conpiler it runs fine, is there a guide or some changes needed when the GCC example is imported?

    Regards Peter

  • Hi Peter,

    I see that with CCS 12.5 it is not working for me either. I checked that the SDK was tested with CCS 9.1

      

    I built and flashed the empty example, that seems to work. The main difference I see is the default GCC compiler versions between the two.

    So you could try following the "outside section" in this guide to install an older gcc compiler version with the latest CCS. The GCC version used in CCS 9.1 is GNU v7.2.1(Linaro). 

    software-dl.ti.com/.../ccs_compiler-installation-selection.html

    Or try with the 9.1 version of CCS.

     

    click on view all version to download and older version of ccs.

    Regards,

    Sid

  • Hi Sid,

    Thank you for answering. Compiling and launching using CCS 10 and GCC is working v7.2.1 but using OpenOcd is still not working.

    It gives the error below:

    Error: JTAG scan chain interrogation failed: all zeroes
    Error: Check JTAG interface, timings, target power, etc.
    Error: Trying to use configured scan chain anyway...
    Error: cc13x0.jrc: IR capture error; saw 0x00 not 0x01

    and it isn't possible to use a telnet session to 'reset halt'.

    Regards Peter

  • Hi Peter,

    Some search across other forums, I see that JTAG clock speed could be an issue. Could you try a slower JTAG clock frequency and check if that helps fix the issue? And when you are trying the empty vs your custom software, are there any other diffs between the setup with respect to hardware?

    openocd.org/.../Debug-Adapter-Configuration.html

    Regards,

    Sid

  • Hi Sid,

    Changing the clock doesn't make any difference and I'm only using the cc1310 Launchpad as hardware platform.

    I'm convinced that it is something related to the startup code (setting vectors, clock, IO configuration, ...) but can't pinpoint the difference.

    The Empty project can't read the GPIO in CCS registers when debugging but the other software can.

    It might be related.

    Regards Peter

  • Hi Sid,

    The attached simple and modified 'sniffer' application works with OpenOcd, but the attached Empyt/Blinky' application don't. They are bot made with CCS 10.4.

    I still can't figure out why, but the difference here is that blinky is using pthread.

    Regards Peter 

    workspace_ti_sniffer_test.zip   workspace_tst.zip

  • Thanks for the projects. I will try them out

  • Hello Sid,

    I hope you enjoyed some time off during Christmas. Are there any updates on this issue?

    Regards Peter