This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Memory sections in MDK-ARM

Hello all,

How does the MDK-ARM decide where to put a variable? Let me put an example:

Variables such as

unsigned short s;
unsigned int a[2];

are located in .data, but a bigger array such as

unsigned int b[32];

is located in .bss.

If .data is the same as RW data (not initialized) and .bss is ZI data (zero initialized), why arrays are located in one section or another depending on the size?

Regards,

Jose

0