CCS/LAUNCHXL-CC1310: Cannot debug Contiki-NG Launchpad solution

Prodigy 30 points

Replies: 4

Views: 65

Part Number: LAUNCHXL-CC1310

Tool/software: Code Composer Studio

I have setup a project in Code Composer following the instructions near the end of the page here .

After building, I can launch a debug session using the .elf file for the cc26x0-web-demo found in examples/platform-specific/cc26x0-cc13x0/cc26x0-web-demo/build/cc26x0-cc13x0/launchpad/cc1310 and it runs to main().

But, if I then continue execution, the debugger no longer seems to be able to break the code and the code is not executing properly as the LED on the Launchpad is not blinking.

Pulling the USB connector out of the Launchpad and then re-plugging, the code seems to run fine (LED is blinking), so this seems to be related to the debugging process.

After stepping through the code, it appears that misoperation begins when the interrupts are re-enabled in this call in soc_rtc_init()

/* Re-enable interrupts */
  if(!interrupts_disabled) {

I do not understand why the code appears to run fine when not trying to debug, but misoperates when debugging.

Any help is appreciated.

4 Replies

  • Hey Simon,

    Please allow me some time to find the expert to assist you with this.

    In the meantime, take a look at the following related post as it may provide some insight:



    Please click the "This Resolved My Issue" button on this post if it answers your question

  • Hi Simon,

    Could you try the following and see if this helps:

    After starting the debugger session and halting in main(), do a Board Reset by clicking

    • Run -> Reset -> Board Reset (automatic connect/disconnect)

    Then issue a restart

    • Run -> Restart

    You should now be back in main() again. Try to run a as normal.

    Severin Suveren

  • In reply to Severin Suveren:

    No, sorry, that did not help. After completing your steps, I seemed to be stopped at the ResetISR()

    I then hit the Resume button and then all except the Terminate button became greyed out and the board was not executing (no LED blinking.)

  • In reply to Ammar N:

    Based on this advice, I tried taking the "hello_world" ccs example project and then changing the project .out reference to the .elf file generated by my Contiki build. I also removed the hello_world .c files from the project and referenced the contiki_main.c. Then, I prevented the hello_world project from building and just used it to debug. I encounter the same problem as with my original project. Attempting to step past approximately the end of the soc_rtc_init() function (where it renables interrupts) results in ccs not breaking and hitting break shows the PC at location 0x100035fc. Once again, pulling the USB cable out of the launchpad and replugging, the LED starts blinking indicating the Contiki code is running normally. (Re-starting the debug session in ccs and just hitting resume from the start of main does not result in code operation.)