Explain Code Size

Showing results for 
Search instead for 
Did you mean: 

Explain Code Size

Contributor II

The map file of the K02's memory configuration is

Memory Configuration

Name Origin Length Attributes
m_interrupts 0x00000000 0x00000400 xr
m_flash_config 0x00000400 0x00000010 xr
m_text 0x00000410 0x0001fbf0 xr
m_data 0x1fffe000 0x00002000 rw
m_data_2 0x20000000 0x00002000 rw
*default* 0x00000000 0xffffffff


m_text is showing us 130,032 bytes.

m_data is showing 8K

m_data2 is showing 8K

(The K02 has a total of 16K)


When i compile my code i'm sitting at

'Invoking: Cross ARM GNU Print Size'
arm-none-eabi-size --format=berkeley "TrackSafe_K02.elf"
text data bss dec hex filename
72524 348 9220 82092 140ac TrackSafe_K02.elf


When I increase one of my char array by 2Kbyte i get 

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: TrackSafe_K02.elf section `.bss' will not fit in region `m_data'
c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: region `m_data' overflowed by 1324 bytes


We are not close to the 16K data limit. 

Labels (1)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hello An,

1 ) From the error message "TrackSafe_K02.elf section `.bss' will not fit in region `m_data'" ,

and also the .bss size 9220, it overflow the size of 8k .

2) You can refer to the *.map file to check detail memory information. And also you can send your

project to me  , i can help you to check .


Hope it helps


0 Kudos