This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

'Packed' attribute support for STM32F4 (Cortex-M4)

Hi.

My target is a STM32 MCU with a Cortex-M4.

I have downloaded the arm-none-eabi toolchain for Windows 10 (gcc-arm-none-eabi-8-2018-q4-major).

I am compiling using Makefile and Cygwin.

In my software I need to use packed structures but when I compile my source code I have this warning message:

To be sure I tested the feature with this code

The expected result is 5 but the output is 8.

I found that '__packed' is defined in "gcc-arm-none-eabi-8-2018\arm-none-eabi\include\sys".

I have included these paths to compile command:

Is the 'packed' attribute supported/working? Am I missing something or doing something wrong?

Thanks.

0