Details
-
Type: Change
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: V2.13.3.0
-
Component/s: None
-
Labels:None
-
Account:SPC CC-Link Slave (SPCCCLINKSL)
Description
All public headers need to define proper packed structs. The compiler specific needs are defined in the Hilscher definitions.
The header shall follow the following structure
// Start of pragma based packed handling e.g. Microsoft compiler #ifdef __HIL_PRAGMA_PACK_ENABLE #pragma __HIL_PRAGMA_PACK_1(HEADER_FILE_NAME_UNIQU_DEFINE) #endif // A struct/typedef which contains all required defines for attribute based packing, e.g. gcc typedef __HIL_PACKED_PRE struct __HIL_PACKED_POST { uint16_t usValue1; uint32_t ulValue2; } STRUCT_NAME_T; // ... more structs // End of pragma based packed handling #ifdef __HIL_PRAGMA_PACK_ENABLE #pragma __HIL_PRAGMA_UNPACK_1(HEADER_FILE_NAME_UNIQU_DEFINE) #endif