Topic : How to interpret memory usage in RIDE IDE projecexplorer and lst files

Forum : Ride IDE

Original Post
Post Information Post
October 28, 2009 - 11:59pm
Guest

I have a project with a few 'c' modules and a few really small asm modules. This is for msc1210.

In the top project explorer, I see...
code=11314 external data=16978 internal data=21.0

In my biggest module, I see...
code=4352 const=0 xdata=116 pdata=0 data=3 idata=0 bit=0

The other modules 'code=' are 0, 2, 220, 378, 1515, 2415 respectively. If I add all this to 4352, I only get 8882.

First, why do I see 11314 in the top level?

Now, the hex file to download is 33 KB. I would think most of this goes into program memory, but this is even much larger than the 11314. Why? And what does the external data = 16978 mean?

I am using the Y5 part and splitting the flash 16 KB program, 16 KB data.

Maybe you can just tell me where to look to find out what the exploring is telling me about code and memory usage?

Mark

Replies
Post Information Post
+1
0
-1
October 29, 2009 - 10:03am
Guest

Hi

To find the size of the code you have to take in account the code from the library.
In the mapfile you should find the details of memory spaces (starting address and length of sections).

Regards,
Matloub

+1
0
-1
October 29, 2009 - 12:37pm
Guest

Thanks, Matloub - a few follow-ups,

Are the reported values in the project explorer panel correct? For instance, do the total values (shown on the top level of the tree) include the libraries? And, for the values shown for the individual modules, are these relatively correct? Can you use these to help figure out where you may need to trim to reduce code or data use?

Also, why does the top level on my project show external data = 16978? I am definitely using this. Does this include the hcr configuration in which I set 16K of the flash as data memory?

Mark

+1
0
-1
October 29, 2009 - 5:49pm
Guest

Hi

The total value in the first node is the one to trust.
It does not match the sum of the one in the project node which are also true
because of library run time calls.
To be sure about what can be performed to reduce size it is better to have a look
into the .m51 file where everything is detailed.
For instance the 16978 of external data comes from the space you have reserved for og_flash
in external data at 480h and other xdata you have been used.
The HCR configuration does not influence this.

Regards,
Matloub

+1
0
-1
November 4, 2009 - 3:22pm
Guest

Thanks, Matloub,

You answered all my questions. Now I have a very good understanding of memory allocation and reporting.

Mark