CLion 2021.2 Help

FreeRTOS thread view

For the case of debugging with FreeRTOS, CLion provides a view of FreeRTOS tasks (threads) with their names and current statuses in the debug tool window.

Enable FreeRTOS thread view

  1. Go to Settings / Preferences | Build, Execution, Deployment | Embedded Development | RTOS Integration.

  2. Select the Enable RTOS Integration checkbox.

    Enabling RTOS Integration

    Both Auto and FreeRTOS options are applicable. Auto is a more general option for RTOS-s other than FreeRTOS (not supported currently).

RTOS integration is intended to work for any relevant run/debug configuration, such as Embedded GDB Server or OpenOCD Download & Run.

For example, here is how an Embedded GDB Server configuration can be set up using the QEMU emulator:

Embedded GDB Server configuration example

Now if we place breakpoints and launch this configuration, the FreeRTOS tasks will be listed in the Frames pane of the debug tool window. We can switch between them and explore task variables in the Variables pane:

FreeRTOS thread view

More FreeRTOS objects like queues, semaphores, mutexes, and timers are planned to be added later (see CPP-17219).

Last modified: 29 October 2021