HC08: How do you tell how much EEPROM and RAM your code is using

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

HC08: How do you tell how much EEPROM and RAM your code is using

3,519 Views
bespenschied
Contributor III
I can not find any reference that tells where I can look to see how much EEPROM and RAM my program is using. I am using CW5.1 for the HC08. I am sure this information is easily accessed because I can't imagine anyone not needing to know this but I can't seem to locate it. I found the .map file and the following lines:

Summary of section sizes per section type:
READ_ONLY (R): 734 (dec: 1844)
READ_WRITE (R/W): 4D (dec: 77)
NO_INIT (N/I): 27 (dec: 39)

This looks like what I am looking for, but does it include every location used?
I assume READ_ONLY is EEPROM, READ_WRITE is RAM

Is the 39 Bytes in the NO_INIT section included in the totals for EEPROM and/or RAM?
Is there a better place to see this info?

Thanks!

bcde

Message Edited by CrasyCat on 2007-04-13 01:55 PM

Labels (1)
Tags (1)
0 Kudos
7 Replies

1,062 Views
CrasyCat
Specialist III
Hello
 
Just my 10 cents on that one.
 
READ_ONLY (R): 734 (dec: 1844): This includes code, constants and vector table entries.
READ_WRITE (R/W): 4D (dec: 77): This includes global variables and stack
NO_INIT (N/I): 27 (dec: 39): This includes I/O registers and data allocated in segments defined as NO_INIT in the .PRM file.
 
I hope this helps.
 
CrasyCat
0 Kudos

1,062 Views
bespenschied
Contributor III
The problem I am needing solved is:
If I am using a 32K FLASH version of a cpu to develope a project with and I want to downgrade to a CPU with a smaller FLASH and RAM how do I tell what my application is actually using so I can pick the best CPU to fit my RAM/FLASH requirements. There is no sense on using a 32K FLASH device when I only need 2K.

From the report section I included in the original post It appears I need at least 1844 Bytes of FLASH, 77 Bytes of RAM and 39 Bytes of ??

Is there a better way to find out EXACTLY what all resources my application is using?

Brian
0 Kudos

1,062 Views
CrasyCat
Specialist III
Hello
 
I would not care about the N/I.
These are usually just the I/O registers.
 
If you want me to double check, just send me your application .map file.
 
CrasyCat
0 Kudos

1,062 Views
bespenschied
Contributor III
Here is the whole .map file. I attached it.
0 Kudos

1,062 Views
CrasyCat
Specialist III
Hello
In your application you are using 77 bytes of RAM (29 byte of variable and 48 bytes of stack)
and 1844 bytes of Flash (1788 bytes of code, 22 bytes of constants and 34 bytes in vector table).
 
The size for NO_INIT element is related to I/O registers. So you do not have to care about that.
 
CrasyCat
0 Kudos

1,062 Views
Nabla69
Contributor V
Come on Cat, you cost more than 10 cents !!!! :smileywink:
0 Kudos

1,062 Views
Alban
Senior Contributor II
Hi,

The place to see where the NO_INIT is comming from is your .PRM file.
It's possible it is RAM that you want to keep between resets, or it oculd be registers.
The PRM tells you where things are put in memory.

Cheers,
Alban.
0 Kudos