I have a function:
void testfunction() {
static char_t theChar1 = 1;
static unsigned char smallArray[1];
static unsigned char largeArray[135];
...
}
and a linker file:
. = ALIGN(4);
_edata = . ;
PROVIDE (edata = .);
.bss (NOLOAD) :
{
__bss_start = . ;
__bss_start__ = . ;
*(.bss)
*(.bss.*)
*(COMMON)
. = ALIGN(4);
} > ramEXT
. = ALIGN(4);
__bss_end__ = . ;
PROVIDE (__bss_end = .);
I need static arrays (.bss data) to align on 4 byte boundaries, but it seems arrays refuse to do so. Structures and primitive types align fine (see the fill lines), but the arrays are all over. Here's my map file:
.data.firstTimeFlag.7295
0xa000098c 0x4 output/file1.o
.data.theChar1.5869
0xa0000990 0x1 output/file2.o
*fill* 0xa0000991 0x3 00
.data.debounce
0xa0000994 0x270 output/file3.o
...
.bss.initialized.5826
0xa000812c 0x1 output/file2.o
*fill* 0xa000812d 0x3 00
.bss.allocator.5825
0xa0008130 0x34 output/file2.o
.bss.largeArray.5869
0xa0008164 0x87 output/file2.o
.bss.smallArray.5868
0xa00081eb 0x1 output/file2.o
.bss.initialized.5897
0xa00081ec 0x1 output/file2.o
*fill* 0xa00081ed 0x3 00
.bss.allocator.5896
Anyone know how to align arrays?