Information of peak RAM usage during runtime

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

Information of peak RAM usage during runtime

跳至解决方案
827 次查看
arseniivanov
Contributor I

I was wondering if MCUExpresso IDE offers capabilities similar to other IDE's to calculate the Peak RAM usage during executing of code.

I have a situation where I am running a converted .tflite file, and would like to see how big arena needs to be allocated to fit the model. TFLM does not support this, and I am afraid that I am writing outside of the allowed memory as the allocator only seems to consider the input size.

Is there a feature which can tell the peak RAM usage during runtime?

0 项奖励
回复
1 解答
821 次查看
ErichStyger
Senior Contributor V

You can track dynamic memory usage including peak usage at runtime with this:

https://mcuoneclipse.com/2023/04/15/added-heap-memory-tracking-to-freertos-v10-5-1-using-systemview/

And there the 'Image Info' view which can be used for static memory: https://mcuoneclipse.com/2020/01/05/mcuxpresso-ide-v11-1-0/

If you are using FreeRTOS (which I assume), then there you have the stack watermark available: https://mcuoneclipse.com/2018/05/21/understanding-freertos-task-stack-usage-and-kernel-awarness-info...

Last but not least, you can use the following to determine heap and stack usage:

https://mcuoneclipse.com/2023/02/19/avoiding-stack-overflows-application-monitoring-the-stack-usage/

I hope this helps,

Erich

 

在原帖中查看解决方案

2 回复数
822 次查看
ErichStyger
Senior Contributor V

You can track dynamic memory usage including peak usage at runtime with this:

https://mcuoneclipse.com/2023/04/15/added-heap-memory-tracking-to-freertos-v10-5-1-using-systemview/

And there the 'Image Info' view which can be used for static memory: https://mcuoneclipse.com/2020/01/05/mcuxpresso-ide-v11-1-0/

If you are using FreeRTOS (which I assume), then there you have the stack watermark available: https://mcuoneclipse.com/2018/05/21/understanding-freertos-task-stack-usage-and-kernel-awarness-info...

Last but not least, you can use the following to determine heap and stack usage:

https://mcuoneclipse.com/2023/02/19/avoiding-stack-overflows-application-monitoring-the-stack-usage/

I hope this helps,

Erich

 

812 次查看
arseniivanov
Contributor I
This helps I think. Most of the memory is static and is pre-allocated, so the "Image Info" already provides a realistic ballpark for the build it seems, did not find this view before. Thank you.
0 项奖励
回复