FreeRTOS Run Time Statistics Not Working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FreeRTOS Run Time Statistics Not Working

Jump to solution
1,386 Views
D_TTSA
Contributor V

Hi

I am using MCUXpresso v11.4.0 to develop code for an RT1176 processor.

I would like to use the FreeRTOS run time statistics that MCUXpresso provides. Unfortunately, it has only worked a few times, at random (no code change). Most of the time, it shows the message: "RTOS has not been detected".

The debugger console says:
17:09:37.145 ERROR: [VariableReader] Could not read variable expression: “sizeof(pxReadyTasksLists)”.
17:09:37.145 INFO: [FreeRTOS] FreeRTOS has not been detected.

I have not used this pxReadyTasksLists, so I'm not sure what this means.

posted on the FreeRTOS forum, thinking it was a FreeRTOS issue, but they referred me here, because they believe it is an MCUXpresso issue.

0 Kudos
1 Solution
1,381 Views
D_TTSA
Contributor V

For those with the same problem:

  1. Go to Window → Preferences → C/C++ → Debug → GDB
  2. Uncheck the box for “Non-stop mode”

Now it will work each time you debug.
There’s a catch though. You can’t have the “Tasks (FreeRTOS)” tab selected when you start the debug. The tab can be open, but not currently selected, like this:

D_Tram23_0-1631792344146.png

View solution in original post

3 Replies
1,150 Views
capricorn
Contributor I

FreeRTOS uses a user/application specific timer to measure the task execution time. For this, every task descriptor inside the RTOS has a cumulative counter, which adds the timer ticks spent for that task. The current timer tick count is memorized when a task gets the CPU time and, again, when the RTOS switches out that task. That delta time, which corresponds the task execution time, is then added to the task execution time counter capricorn man.

0 Kudos
1,382 Views
D_TTSA
Contributor V

For those with the same problem:

  1. Go to Window → Preferences → C/C++ → Debug → GDB
  2. Uncheck the box for “Non-stop mode”

Now it will work each time you debug.
There’s a catch though. You can’t have the “Tasks (FreeRTOS)” tab selected when you start the debug. The tab can be open, but not currently selected, like this:

D_Tram23_0-1631792344146.png

1,373 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi 

 

Thanks for sharing. Please also refer to below article: FreeRTOS Task Runtime statistics for RT1064

https://mcuoneclipse.com/2020/04/15/freertos-task-runtime-statistics-for-nxp-i-mx-rt1064/

 

Regards

Daniel

0 Kudos