Debugging a multi-core target

I'm evaluating CLion for developing Raspberry Pi pico (RP2040) projects using FreeRTOS-SMP. I believe that I have set up the Embedded GDB Server configuration properly, but maybe I missed something.

Debugger: Bundled GDB

Download executable: Always

target remote args: tcp::36499, 

GDB Server: C:\Program Files\SEGGER\JLink_V784d\JLinkGDBServerCL.exe

GDB Server args: -device RP2040_M0_0 -if swd -speed 4000 -port 36499 -nogui -singlerun.

When my program starts under debug control, I can set breakpoints, single step, etc; but as soon as I start the FreeRTOS scheduler, the debugger seems to no longer control the program. It does not hit any breakpoints set in the FreeRTOS tasks. It still appears to be running in debug mode, but the RTOS-aware FreeRTOS heap, queues & task show nothing while it is running. If I hit pause, or stop, the program just continues to run.  

If I disable the second core in the FreeRTOSConfig file, and just run as a single core, everything works great; The FreeRTOS task, queues, & heap show up in the debug window, breakpoints are hit, etc.

As an experiment, I also tried a dual-core application that was not FreeRTOS.  Breakpoints in the function that's run on core 1 were never hit, and also the program continued to run when I press pause or stop, as with the FreeRTOS-SMP app.

The CLion web page says it supports FreeRTOS-SMP, so I wonder if there is some setting that I haven't yet discovered to make this work for me.




Please sign in to leave a comment.