Anyone know how to force the C54X C compiler to pack C structures with short and long types? Thanks, John
C54X C structure packing
Started by ●December 10, 2009
Reply by ●December 10, 20092009-12-10
John wrote:> Anyone know how to force the C54X C compiler to pack C structures with > short and long types? > > Thanks, > > JohnSee if is supports this: http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/compiler/ref/rnpgpack.htm -- Les Cargill
Reply by ●December 10, 20092009-12-10
John <sampson164@gmail.com> writes:> Anyone know how to force the C54X C compiler to pack C structures with > short and long types?In gcc there is a -fpack-struct compiler option. Seems like there was something similar in the TI codegen tools - perhaps a PRAGMA? -- Randy Yates % "She has an IQ of 1001, she has a jumpsuit Digital Signal Labs % on, and she's also a telephone." mailto://yates@ieee.org % http://www.digitalsignallabs.com % 'Yours Truly, 2095', *Time*, ELO
Reply by ●December 10, 20092009-12-10
On Dec 10, 7:29�pm, Les Cargill <lcargil...@comcast.net> wrote:> John wrote: > > Anyone know how to force the C54X C compiler to pack C structures with > > short and long types? > > > Thanks, > > > John > > See if is supports this:http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?top... > > -- > Les CargillNope
Reply by ●December 10, 20092009-12-10
On Dec 10, 8:26�pm, Randy Yates <ya...@ieee.org> wrote:> John <sampson...@gmail.com> writes: > > Anyone know how to force the C54X C compiler to pack C structures with > > short and long types? > > In gcc there is a -fpack-struct compiler option. Seems like there was > something similar in the TI codegen tools - perhaps a PRAGMA? > -- > Randy Yates � � � � � � � � � � �% "She has an IQ of 1001, she has a jumpsuit > Digital Signal Labs � � � � � � �% � � � � � �on, and she's also a telephone." > mailto://ya...@ieee.org � � � � �%http://www.digitalsignallabs.com% � � � �'Yours Truly, 2095', *Time*, ELO �I have searched the TI docs for that. John
Reply by ●December 10, 20092009-12-10
John wrote:> On Dec 10, 7:29 pm, Les Cargill <lcargil...@comcast.net> wrote: >> John wrote: >>> Anyone know how to force the C54X C compiler to pack C structures with >>> short and long types? >>> Thanks, >>> John >> See if is supports this:http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?top... >> >> -- >> Les Cargill > > NopeBummer. Check to see what it does - I bet it packs 'em on 16 bit boundaries - iow: typedef struct { unsigned char a; unsigned char b; long c; } magilla; would result in the offset of "c" being two machine words to the right of the start of struct. I simply don't remember any more, it's been too long. Oh, if they'd only defined the behavior of bit fields in 'C', the world would be a much better place. -- Les Cargill
Reply by ●December 10, 20092009-12-10
John <sampson164@gmail.com> writes:> Anyone know how to force the C54X C compiler to pack C structures with > short and long types?John, The minimum addressable unit of the 54x is 16 bits! (Doh!) -- Randy Yates % "Though you ride on the wheels of tomorrow, Digital Signal Labs % you still wander the fields of your mailto://yates@ieee.org % sorrow." http://www.digitalsignallabs.com % '21st Century Man', *Time*, ELO
Reply by ●December 11, 20092009-12-11
Randy Yates <yates@ieee.org> writes:> John <sampson164@gmail.com> writes: > >> Anyone know how to force the C54X C compiler to pack C structures with >> short and long types? > > John, > > The minimum addressable unit of the 54x is 16 bits! (Doh!)Wups. Never mind.... -- Randy Yates % "So now it's getting late, Digital Signal Labs % and those who hesitate mailto://yates@ieee.org % got no one..." http://www.digitalsignallabs.com % 'Waterfall', *Face The Music*, ELO
Reply by ●December 11, 20092009-12-11
Randy Yates <yates@ieee.org> wrote:>The minimum addressable unit of the 54x is 16 bits! (Doh!)Whoa. A clear example of an engineer issuing a spec before 10:00 a.m., and/or without his morning coffee. Steve
Reply by ●December 11, 20092009-12-11






