cancel
Showing results for 
Search instead for 
Did you mean: 

stm32l100 data structure alignment,packing and pading

sundar
Associate II
Posted on March 26, 2014 at 09:09

Hello,

I'm using stm32l100(compile and debug through kiel v4) which is connected to Network processor (Lon ft5000) ,.my firmware consist of structures and nested structures with different size of members ,...

My doubt is does the alignment and packing happen default or should I provide packing(

Do I use __packed or is there a pragma?

) ,..how does this work  .    

#structure-alignment #stm32l100
1 REPLY 1
Posted on March 26, 2014 at 13:14

http://www.keil.com/support/man/docs/armcc/armcc_CJADHEDH.htm

http://www.keil.com/support/man/docs/armccref/armccref_CJAFEEDG.htm

http://www.keil.com/support/man/docs/armccref/armccref_CJAFJHJD.htm

Both methods would likely achieve what you need.

sizeof() and offsetof() might assist in understand structure packing achieved.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..