[En-Nut-Discussion] Question gcc and variable width

Ulrich Prinz ulrich.prinz at googlemail.com
Tue Oct 25 22:25:55 CEST 2011


Hi!

I have a short question:
Cortex claims to be able to address memory unaligned without overhead or
exceptions. So how do I set up gcc to do byte alignment instead of word
one? gcc 4.6.x manuals do not give a hint.

I did some tests with some larger structs that I use in a project by
compiling with out and with __attribute__ ((packed)) statement. The
latter saved a huge amount of RAM but did not really increase code size,
even the struct is addressed a lot.

Any compiler or linker option for this or is the magic in the linker script?

Best regards
Ulrich



More information about the En-Nut-Discussion mailing list