OpenOCD ESP-IDF FreeRTOS support

Sysprogs forums Forums VisualGDB OpenOCD ESP-IDF FreeRTOS support

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11206
    EndlessDelirium
    Participant

    Hi there

    Espressif’s OpenOCD port claims to have FreeRTOS support. GDB should see FreeRTOS tasks as threads. VisualGDB however just shows the two cores in Visual Studio’s Thread window. Is there any way to see/change between FreeRTOS tasks in VisualGDB?

     

    #11207
    support
    Keymaster

    Hi,

    We have managed to get it working, but it currently interferes with our FLASH programming logic, so using this mode is somewhat hacky:

    1. First add “-Wl,–undefined=uxTopUsedPriority” to your linker command line in order to include the symbols necessary for OpenOCD to detect FreeRTOS.
    2. Then start debugging and load your firmware to FLASH as usual.
    3. Once the firmware is loaded, edit the <sysgcc>\esp32\esp32-bsp\OpenOCD\share\openocd\scripts\target\esp32.cfg file as follows:
      set ESP32_RTOS FreeRTOS
      ...
      #target smp $_TARGETNAME1 $_TARGETNAME2 <==== Comment this line at the end of esp32.cfg
    4. Now disable FLASH programming on the Debug Settings page of VisualGDB Project Properties and run debugging.

    Next time you modify your program, you would need to change the esp32.cfg back and re-program the FLASH (or use esptool.py to program the FLASH over the serial port).

    #11209
    EndlessDelirium
    Participant

    Thanks for the speedy reply!

    Is there any plan for proper integration?

    #11210
    support
    Keymaster

    Hi,

    Not in the next 2-3 months, sorry.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.