AnsweredAssumed Answered

Explain Code Size

Question asked by An Bui on Nov 3, 2016
Latest reply on Nov 3, 2016 by Alice_Yang

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. 

Outcomes