How to view freeRTOS Statistics (Trace) on Kiel uVision?

Hi,
I use Keil uVision to develop Microcontroller Softwares. I use freeRTOS as default RTOS and I wanted to know if there is a way to view freeRTOS statistics like current threads, memory usage, etc…

I know that using the default Keil RTOS ( RTX ), stats view is possible, but I dont want to leave freeRTOS.

Thanks

1 Like

Some self-promotion here, but have you tried Percepio Tracealyzer? There is a guide for real-time trace streaming using uVision at https://percepio.com/wp-content/uploads/2022/07/PA021-Streaming-over-Arm-ITM-ULINKpro.pdf.

Thanks, I’ll give a look in a couple of days

Hey @botta, Welcome to the FreeRTOS Community.

FreeRTOS provides a number of APIs that you can use for analysing system statistics.

  1. For the number of tasks under the control of FreeRTOS you can use uxTaskGetNumberOfTasks.
  2. For heap related statistics you can use the xPortGetFreeHeapSize(), xPortGetMinimumEverFreeHeapSize() and vPortGetHeapStats().
  3. For per-task statistics like the task stack high-watermark, current state of the task, current priority of the task, total runtime that is allocated to the task so far etc., you can use uxTaskGetSystemState() and vTaskGetInfo().
  4. For getting the runtime statistics you can use vTaskGetRunTimeStats()