I’m trying to access debugger RTOS functionality within the PIO GUI debugger.
I can get the functionality to work outside of PIO by enabling rtos support within the JLinkGDBServer and using the arm-none-eabi-gdb debugger from the command line.
With these I can execute the “info threads” gdb command and see the various tasks within my app. With the default PIO debugger I only see the currently executing task.
This appears to be due to functionality within both the debugger client and server.
I see how I should be able add the “rtos” support to the JLinkGDBServer via the appropriate platform.py file by adding the following to the server arguments:
“-rtos GDBServer/RTOSPlugin_FreeRTO”,
What I do not see is how I can get PlatformIO to use the “arm-none-eabi-gdb” debugger rather than it’s default.
Is this possible within PlatformIO or is this a VSCode configuration?
arm-none-eabi-gdbis always the GDB client for ARM platforms (and the respective x-gdb for other architectures). PlatformIO does not ever use a different GDB client.
The executable usually resides in <home directory>/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gdb.
Why change it? If you need arm-none-eabi-gdb of a different version you should be using platform_packages to replace the toolchain-gccarmnoneeabi package.
I was looking for arm-none-eabi-gdb in the list of running processes (Linux). I did see piogdb but not the arm debugger and jumped to a bad conclusion. I did run “show version” from the debug view and see you are, of course, correct, should have done that before.
So, the correct debugger is being used. I also failed to notice that my adding the -rtos option to the JLinkGDBServer was not being taken properly.
In the debug view I’m seeing:
SEGGER J-Link GDB Server V7.20
Command Line Version
JLinkARM.dll V7.20 (DLL compiled Apr 28 2021 17:38:26) WARNING: Unknown command line parameter -rtos /home/leroy/.platformio/packages/tool-jlink/GDBServer/RTOSPlugin_FreeRTOS found.
Command line: -singlerun -rtos /home/leroy/.platformio/packages/tool-jlink/GDBServer/RTOSPlugin_FreeRTOS -if SWD -select USB -device nRF52840_xxAA -port 2331
I can copy the output from ps after starting the debug process shown above and all is well, so, I have something else to try to run down.
My command line version: