I have the following
/* Size 16 bytes */
typedef struct __attribute__((packed)) {
uint16_t v1; // 2
uint16_t v2; // 2
uint16_t v3; // 2
uint16_t v4; // 2
uint8_t rsvd[6];
uint16_t crc; // 2
} heCell_t;
typedef struct __attribute__((packed)) {
heCell_t c0;
heCell_t c1;
heCell_t c2;
heCell_t c3;
} hePag_t;
typedef union {
hePag_t Page[32];
heCell_t Cell[128];
} heData_t;
Due to gcc warning: "setting incorrect section attributes for .rodata.$Flash3"
for this line
const heData_t heData __RODATA(Flash3);
I have to initialize heData with something, which is fine by me, as long as all values will be all 0xFF (default flash erased)
const heData_t heData __RODATA(Flash3) = { 0xFF };
But there are some warnings
(near initialization for 'heData.Page[0]') [-Wmissing-braces]