#include < stdint.h > #pragma pack(push,1) struct my_struct { uint8_t start ; uint8_t address ; uint8_t len ; uint8_t check_sum ; } ; #pragma pack (pop)