Project window, How to configure Data column to show RAM usage?

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

Project window, How to configure Data column to show RAM usage?

3,433 Views
timotay01
Contributor I
I'm using CW 6.3 for CF. In the project windown there is File, Code, Data columns. After compiling the Data column shows the usage for (I'm assuming) rodata, data and bss. My rodata is in the flash and I would like to have an easy way to see the RAM usage (data + bss) for each of the files (other than go through the map file everytime), is this possible at all to configure this Data column to show what I need?
 
Labels (1)
0 Kudos
Reply
3 Replies

629 Views
CrasyCat
Specialist III

Hello

No these columns cannot be configured or adjusted.

You have to go to the .map file to get more detail around used memory.

CrasyCat

0 Kudos
Reply

629 Views
admin
Specialist II

Does the *.map file total everything anywhere, or do I have to do that by hand?

 

-Tomahawk

0 Kudos
Reply

629 Views
CrasyCat
Specialist III

Hello

When you are using CodeWarrior for Coldfire, the map file provides you information about the total memory used in each of the output sections specified in the .lcf file.

At the end of the .map file you find some text looking as follows:

# Memory map:
  v_addr   p_addr   size     name
  00040000 00040000 00005208 .main_application TEXT
  00045208 00045208 00000608 .main_application_data DATA

If you are using a standard .lcf file  .main_application contains application code and constants and .main_application_data contains application variables.

If you wish to get information about code size and constant size you have to define a separate output section for constants in the .lcf file.
This is done as follows:

 .main_application :
 {
  *(.text)
  .= ALIGN(0x8);
 } > TEXT

 .application_const :
 {
  *(.rodata)
  .= ALIGN(0x8);
 } >> TEXT
 

You will then see the following in the .map file:

  00040000 00040000 00004FA8 .main_application TEXT
  00044FA8 00044FA8 00000260 .application_const TEXT
  00045208 00045208 00000608 .main_application_data DATA

I hope this helps.

CrasyCat

0 Kudos
Reply