FreeRTOS + SMP support in OpenOCD #1122
Unanswered
maxgerhardt
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Issue also opened at raspberrypi/openocd#73. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With the current
rp2040.cfg
, both cores are added with-rtos hwthread
to make them appear as individual hardware threads when GDB connects to the GDB server opened by GDB andinfo threads
is executed.E.g. with the test firmware described in https://community.platformio.org/t/raspberry-picoprobe-openocd-freertos-debugging/31508/6?u=maxgerhardt
However, how do we make OpenOCD recognize that we have symmetric multiprocessing and FreeRTOS enabled with the FreeRTOS version used in Arduino-Pico? Like in the ESP32 version, where we can see all FreeRTOS tasks that each CPU is executing?
OpenOCD has the
-rtos FreeRTOS
option, however, that then conflicts with-rtos hwthread
.As an experimentation for an easier case, only looking at Core0 running FreeRTOS, I have commented out the
line with a
#
and changed-rtos hwthread
to-rtos FreeRTOS
.However, when attaching GDB then, OpenOCD complains.
and indeed GDB doesn't see any FreeRTOS tasks (there should be at least the idle task, timer task and a own-created "blink" task, and loop task)
And indeed when I ask GDB to print the symbol pxCurrentTCB, it says no.
looking at the FreeRTOS code however, it seems to have deviated from mainline FreeRTOS
and these symbols do exist
The ESP32-Openocd seems to have some mods for this to recognized pxCurrentTCBs?
https://github.com/espressif/openocd-esp32/blob/master/src/rtos/FreeRTOS.c#L283-L301
Question is, how do we get FreeRTOS-awareness and SMP awareness into OpenOCD or activate it.
Beta Was this translation helpful? Give feedback.
All reactions