I'm facing an alignment problem with problem with gcc 7 (the one contained in ChibiStudio preview 21) compiling code for ST NUCLEO-F466RE board.
In fact with this code:
Code: Select all
static GUARDEDMEMORYPOOL_DECL(memoryPool, TELEGRAM_SIZE, sizeof (stkalign_t));
static telegram_t mpTelegramWa[TELEGRAM_POOL_SIZE] __attribute__((aligned(sizeof(stkalign_t))));
gcc produces an array of telegram_t structs aligned on a 4 byte boundary:
- element #0 address is 0x20001850
- element #1 address is 0x20001864
even if sizeof (stkalign_t) correctly resovles to 8.
What am I missing?
Thanks.
Alberto