I'm using the ARM DS-5 with the ARM 5 Compiler Toolchain. I'm attempting to use the "mavlink_types.h" (link: https://github.com/mavlink/c_library_v1). However, I've got an error said that: Definition of nested anonymous union in packed "param_union" must be __packed. Does anyone know how to fix this ??
Asked
Active
Viewed 244 times
1 Answers
2
The source code uses compiler specific features, specifically struct packing, and it has no detection mechanism how to enable structure packing on your compiler, and then your compiler fails to compile it because it knows the structures must be packed but they are not.
Fix this by changing to a compiler which is supported by the source code, or edit the source code to support your compiler regarding how to pack structures on your compiler.

Justme
- 127,425
- 3
- 97
- 261
-
Thanks, I've already changed my compiler from ARM 5 to ARM 6 compiler which allows GNU built-in functions and it works. – LowK Sep 11 '21 at 15:09