1.4.2. Alignment support

By default the compiler utilizes ARMv6 unaligned access support to speed up access to packed structures, by enabling an LDR (or STR) to load from (or store to) a non-word aligned address (see Example 2 - Packed structures). Structures remain non-packed unless explicitly qualified with __packed.

Note

Code compiled for ARMv6 only runs correctly if you enable unaligned support on the ARM core. You must do this by setting the U bit (bit 22) of CP15 register 1 in your initialization code, or by tying the UBITINIT input to the core HIGH.

Code that uses the pre-ARMv6 unaligned accesses behavior can be generated by using the compiler option:

--no_unaligned_access

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0203G
Non-Confidential