FreeRTOS Run Time Statistics Not Working

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FreeRTOS Run Time Statistics Not Working

跳至解决方案
1,415 次查看
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 项奖励
1 解答
1,410 次查看
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

在原帖中查看解决方案

3 回复数
1,179 次查看
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 项奖励
1,411 次查看
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,402 次查看
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 项奖励