Code build memory consumption

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

Code build memory consumption

794 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karthik.s on Wed Jul 28 00:17:04 MST 2010
After a code is built,how and where can i find out the amount of Flash memory occupied by Stack and Program code?

How to identify the amount of heap memory available?
0 Kudos
Reply
4 Replies

785 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karthik.s on Mon Aug 02 00:26:36 MST 2010
Thanks Jesse.
0 Kudos
Reply

785 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Jesse.Rosenberg on Fri Jul 30 10:18:12 MST 2010
You may find the example

[LIST]
[*]Monitor Stack Usage Example V1.1 (Jul 14, 2010)
[/LIST]
at ( http://ics.nxp.com/support/lpcxpresso/ ) useful in measuring Stack/Heap usage.
0 Kudos
Reply

785 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karthik.s on Wed Jul 28 01:18:15 MST 2010
thanks for the info.
0 Kudos
Reply

785 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Jul 28 01:10:40 MST 2010
At the end of a build, the size of code, data and bss is displayed.
Flash = code+data
RAM = data+ bss

There is no way to determine the amount of stack used. The stack used depends on:
- how many nested functions are called
- how much recursion you use
- how many nested interrupts can occur
- how any locals you use in each function
- etc

Sorry, but this is not something that we can tell you - you have to work it out yourself. Did you try the example provided by NXP? That will give you an *ESTIMATE* of your stack usage.
0 Kudos
Reply