Flash Down load Size

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

Flash Down load Size

Jump to solution
760 Views
SecondTechCo
Contributor IV

There must be an easier way.  How can I see the number of bytes the final program occupies in the flash memory without downloading it or getting out my calculator and viewing the s19 file.   Right now the only clean way seems to be monitor the progress window when it is downloading.  I am not always connected to my development board so there must be a better /easier way.  Code Warrior 10.2.

Labels (1)
0 Kudos
1 Solution
596 Views
BlackNight
NXP Employee
NXP Employee

How things are presented in the map file depends on the linker/tool chain.

For S08 linker, it is at the end of the map file:

Number of blocks to be downloaded: 7

Total size of all blocks to be downloaded: 338

Which means: 338 bytes of code in Flash. Of course there is more details, but this is what I usually need.

It is reported as well in the Console view:

Generating DWARF data version 2.0

Code Size: 338

For gcc, there is a good additinonal utility to report the code size:

Code Size Information with gcc for ARM/Kinetis

For ColdFire, it shows it in the xMAP:

# Memory map:

  v_addr   p_addr   size     name

  00000000 00000000 00000300 .interrupts interrupts

  00000420 00000420 000008BC .text      code

  20000000 00000CDC 00000004 .data      data

  20000004 20000004 00000004 .bss       data

  20000008 00000CE0 00000018 .romp      data

  00000400 00000400 00000018 .cfmprotect cfmprotrom

  40000000 40000000 00000000 .ipsbar    ipsbar

Here the information is in the .text part which is the code size (plus the other (smaller) parts in ROM.

I know it is different for every compiler. But once I know where to look for it, that works for me.

View solution in original post

0 Kudos
5 Replies
596 Views
Monica
Senior Contributor III

William, was this suggestion helpful?

Let us know! :smileywink:

Regards!

0 Kudos
596 Views
SecondTechCo
Contributor IV

Not really too helpful. I checked the Xmap file which is all i have.  It might be in there somehwere but I cant find it.  With Code warrior 10.2 eclispe IDE, I would expect a nice decimal number dispalyed in a window easy to find.  Its one of the most important pieces of information.  When I click debug and monitor the progress windows its clearly there.  Thats too much work to do especially when you dont have your baord around.   Seems way to difficult for a modern IDE.  Isnt there a simple way  to know ??????

0 Kudos
597 Views
BlackNight
NXP Employee
NXP Employee

How things are presented in the map file depends on the linker/tool chain.

For S08 linker, it is at the end of the map file:

Number of blocks to be downloaded: 7

Total size of all blocks to be downloaded: 338

Which means: 338 bytes of code in Flash. Of course there is more details, but this is what I usually need.

It is reported as well in the Console view:

Generating DWARF data version 2.0

Code Size: 338

For gcc, there is a good additinonal utility to report the code size:

Code Size Information with gcc for ARM/Kinetis

For ColdFire, it shows it in the xMAP:

# Memory map:

  v_addr   p_addr   size     name

  00000000 00000000 00000300 .interrupts interrupts

  00000420 00000420 000008BC .text      code

  20000000 00000CDC 00000004 .data      data

  20000004 20000004 00000004 .bss       data

  20000008 00000CE0 00000018 .romp      data

  00000400 00000400 00000018 .cfmprotect cfmprotrom

  40000000 40000000 00000000 .ipsbar    ipsbar

Here the information is in the .text part which is the code size (plus the other (smaller) parts in ROM.

I know it is different for every compiler. But once I know where to look for it, that works for me.

0 Kudos
596 Views
SecondTechCo
Contributor IV

Thanks.  Still seems like a very odd way to get to the answer but i guess its the only way.    Thats certainly something that should be fixed.  I much prefer the way its done in the progress window

0 Kudos
596 Views
BlackNight
NXP Employee
NXP Employee

The answer might depend on the compiler/linker used. I would check the map file generated by the linker. E.g. for S08 the linker shows that information at the end of the map file.

0 Kudos