cancel
Showing results for 
Search instead for 
Did you mean: 

Memory alignment(structure Padding)

Bs.1
Associate II

Hi,

I am using STM32CubeIDE 1.6.0.

In my program for EEPROM read/write I have use structure but its takes too much size because of padding.

I tried with #pragma Pack, __attribute__((packed)), even by rearranging the structure member.

but there is no size reduction of structure .

Anyone having the solution to reduce this size??or any setting for compiler?

Any help will be highly appreciated..

Thanks in advance

1 REPLY 1
Radosław
Senior II

Seems you are using this incorrectly. this must work.