This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Flash API 1.51 doesn't compile with --unaligned_access=off option even though --gcc option is ON

Hello Support,

We need to compile Flash API Library Header files using --unaligned_access = off option for Version 1.51.
Can you please let us know how to do that?
Because of ATTRIBUTE_PACKED as used within Types.h, TI Compiler is giving error.

Thank you.
Regards
Pashan

 

  • Hello Pashan,

    You could change ATTRIBUTE_PACKED to a null definition.  The v2.0.0 of the API only defines ATTRIBUTE_PACKED if the enable support for gcc extensions (--gcc) is enabled.  With either version,  you need to make sure enums are packed using the compiler option --enum_type=packed (default for EABI) as this is how the API was built.  I have seen issues with code that links in the API library using --enum_type=unpacked (default for legacy COFF) ending up with incorrect values for the enum passed to the API functions.