ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
29 марта
992490 Топик полностью
Andreas (07.04.2020 09:55, просмотров: 738) ответил VLLV на У меня не gcc, а IAR, а там грабли еще те ... The #pragma pack directive affects declarations of structures following the pragma directive to the next #pragma pack or the end of the compilation unit.
Например в BLE стеке от NXP, который только для IAR полно подобного 

#define PACKED_STRUCT __packed struct

typedef PACKED_STRUCT
{
uint16_t handle :12;
uint16_t pbFlag :2;
uint16_t bcFlag :2;
uint16_t dataTotalLength;
uint8_t aData[1];
}hciAclDataPacket_t;


и бинарник там под М0 и больше 100к