Hi,
Is the stack allowed to have 8 byte alignment on the MPC5777M? I see the linker script sets main's stack aligned to 16 bytes, but our OS vendor set the OS thread stacks to 8. It looks like NXP's published FreeRTOS port uses 32 byte alignment.
Using the GNU Compiler Collection (GCC): RS/6000 and PowerPC Options makes it sound like it depends if the program is built in -meabi or -mno-eabi mode, but looking through some build settings I can't see if we are building in full EABI mode.
Are we ok with 8 byte aligned stacks, or is there a reason to go wider?
Hello Jacob,
this is really interesting question. According to Power Architecture 32-bit EABI standard, it is required to align stack to 16 bytes.
I have not found anywhere, what is the impact of 8 byte alignment but I had consulted this topic with my colleague who is application engineer for S32 Design Studio and he told me it is very recommended to follow EABI standard especially when it is related to operating system development.
So, this is what EABI defines, but as I wrote you above, I cannot judge the risk, when you will not follow this standard.
Hope this helps a little bit.
Regards,
Martin
Thanks, we'll change it to 16 bytes then.