Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to find out RAM usage in Embedded Electronic Control Unit (ECU) ?

jani12

Advanced Member level 4
Joined
Oct 30, 2014
Messages
108
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,298
Activity points
2,536
Please consider some professional embedded system with 16-bit microcontroller.

I know embedded software build tools report program flash memory usage. I think they also report RAM usage but do they report maximum RAM usage?

Build tools may not know how much heap will be used during run-time. Are there other RAM usages that build tools aren't aware of?

How to accurately find out how much RAM is being used during run-time?
 
Hi,

The Compiler can just know static RAM usage, but it can't say maximum dynamic RAM usage.
Even without using dedicated dynamic memory control (using malloc) the stack usage is not predictable.
One can easily generate a software that causes stack overflow.

For debugging I sometimes check the stack pointer regularily within the software (usually in a regularily called ISR) to monitor "maximum stack usage".
I can read the "max value" out to compare it with my expectation.

The "expectation" is determined by the "deepest call of function" times (each stacked) variable usage plus ISR stack usage.

Klaus
 
Last edited:

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top