SPRU514Z July 2001 – October 2023 SM320F28335-EP
A unique space is allocated for all static variables declared in a C/C++ program. The linker determines the address of the space. The compiler ensures that space for these variables is allocated in multiples of words so that each variable is aligned on a word boundary.
The compiler expects global variables to be allocated into data memory. (For COFF it reserves space for such variables in .ebss. For EABI, it reserves space in .data or in sections named with the DATA_SECTION pragma, which is described in Section 6.9.6.) Variables declared in the same module are allocated into a single block of memory. The block is likely to be contiguous, but this is not guaranteed.