Hi,
I'm using Keil IDE V4.23.00.00.0.
If I declare some static array in module A like: volatile static unsigned char MyArray[9] then all works fine.
If I declare it like: volatile static unsigned char MyArray[8] then another module B generates a HARD FAULT interrupt.
Module B does not use or has any connection with module A.
If I look in the .map file I see:
MyArray[9] .bss 0x20003a40 Section 500 f991_dma1forusart2.o(.bss) .bss 0x20003c34 Section 9 fa30_pccommunicator.o(.bss) MyArray 0x20003c34 Data 9 fa30_pccommunicator.o(.bss) .bss 0x20003c40 Section 96 libspace.o(.bss) HEAP 0x20003ca0 Section 512 startup_stm32f10x_xl.o(HEAP) MyArray[8] l_fpComShtRcvStsRepOptSkt 0x20000224 Data 4 fa30_pccommunicator.o(.data) MyArray 0x20000228 Data 8 fa30_pccommunicator.o(.data) .data 0x20000230 Section 351 fa40_comsheet.o(.data)
so there definitely seems to be a difference in interpretation as with the faulty [8] no '.bss' is used which according Wikipedia has to too with static declarations.
Who can help me out?
Thanks,
Henk