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.

CCS/CC1352P: Debugging application code in RTOS remotely

Part Number: CC1352P

Tool/software: Code Composer Studio

I have succesfully set up Code Composer Studio to use GDB to debug a CC1352 on a Gateworks 5910. I am using OpenOCD to flash images to the chip using the following configuration file and command:

openocd -f ./gw5910.cfg -c "program rfEasyLinkNp_CC1352P1_LAUNCHXL_tirtos_debug_gcc.out verify reset exit"

cat gw5910.cfg
#
# GW5910 CC1352P JTAG Interface mapping
#
# PAD_DISP0_DAT14__GPIO5_IO08 TMS gpio-136
# PAD_DISP0_DAT15__GPIO5_IO09 TCK gpio-137
# PAD_DISP0_DAT16__GPIO5_IO10 TDO gpio-138
# PAD_DISP0_DAT17__GPIO5_IO11 TDI gpio-139
#
# PAD_DISP0_DAT23__GPIO5_IO17 RST# gpio-145
# PAD_EIM_A25__GPIO5__IO02 BOOT gpio-130
bindto 0.0.0.0
interface imx_gpio
transport select jtag
imx_gpio_peripheral_base 0x020ac000
imx_gpio_speed_coeffs 100000 5
imx_gpio_jtag_nums 9 8 11 10
imx_gpio_trst_num 17

adapter_khz 20000
source [find target/ti_cc13x2.cfg]

jtag_ntrst_delay 0
jtag_ntrst_assert_width 0
adapter_nsrst_delay 0
adapter_nsrst_assert_width 0

reset_config trst_only

In Code Composer Studio, I created a new Debug Configuration as a C/C++ remote Application, in the Main Tab selected "Manual Remote Debugging Launcher - Select Other" and selecting Manual, and in the Debugger tab, pointing the Connection Tab Host name to my Gateworks board:port 3333 which is what OpenOCD is listening to.

I have also pointed the rfEasyLinkNp project to use the debug build of the tirtos_cc13x2_cc26x2_debug_gcc project, and with that, I am able to step-debug in rfEasyLinkNp.c down to BIOS_start(); and into the tirtos project source files, however, any breakpoints I set in AtProcess.c such as the AtProcess_processingLoop() function, are never reached, and the program is never paused.

Is it possible to debug this user code using remote GDB debugging? Using the same code deployed to a Launchpad, I am able to step through all portions of the code.

  • I have subsequently learned that if I set the breakpoints in the GDB console of code composer studio, those are hit. Apparently this has to do with the breakpoint type, which when I double click a line, shows up as a S/W BP. I am unable to find any options in the preferences menu to make the breakpoints show up as a C/C++ Line Breakpoint, which is what I get when i do break file:line in the gdb console. Any ideas what I am doing wrong?

  • Derek,

    That is a really interesting setup you have.  So you are using the GW5912 to debug the CC1352? 

    I believe you are correct that the wrong breakpoint type is being set, i.e. a CCS software breakpoint instead of using the CDT breakpoint type.  

    I actually had a really long reply of some things to try when a colleague pointed me to this thread:

    https://e2e.ti.com/support/tools/ccs/f/81/t/831973?CCS-Possible-Solution-Workaround-for-CCS-Enable-C-C-breakpoint-For-GDB-use-

    It looks like if you are using a CCS project that the debugger keeps defaulting to using CCS breakpoints.  You can set C/C++ breakpoints via the console or the breakpoints view but from the editor it will use the default.  In this thread the poster shows how to work around this.

    Regards,

    John

  • Wow! Thank you for that! I looked at several forum posts that referenced using makefile projects instead of ccs projects and various other things. This solution enabled the C/C++ Breakpoint context menu without even restarting the IDE!

    And yes, I am running the radio from the GW5910, but OpenOCD is bound to it's wlan0 interface so I can debug it from my much more powerful host desktop. It seems to be working out fairly well, but I am just learning how to do embedded programming, so it has been a challenge! Step debugging should help me navigate the examples a fair bit easier, I am hoping.

  • Derek,

    Good to hear that you are up and running.

    Regards,

    John