You copied the Doc URL to your clipboard.

ARM architecture v6-M

ARMv6-M is a variant of the ARMv6 architecture targeted at the microcontroller profile. It supports the Thumb instruction set only.

The following table shows useful command-line options.

Table 1-6 Useful command-line options for ARMv6-M

Command-line option Description
--cpu=6-M ARMv6 microcontroller profile with Thumb only (no ARM instructions), and processor state instructions
--cpu=6S-M ARMv6 microcontroller profile with Thumb only (no ARM instructions), plus processor state instructions and OS extensions

Where name is a specific ARM processor. For example:

  • Cortex-M1 for ARMv6 with Thumb only, plus processor state instructions, OS extensions and BE-8 and LE data endianness support.

Key features

Key features for ARMv6-M:

  • The compiler can generate instructions available on this architecture.

Alignment support

By default, the compiler uses ARMv6 unaligned access support to speed up access to packed structures, by allowing LDR and STR instructions to load from and store to words that are not aligned on natural word boundaries.

Unaligned data accesses are converted into two or three aligned accesses, depending on the size and alignment of the unaligned access. This stalls any subsequent accesses until the unaligned access has completed. You can control alignment by using the DCode and System bus interfaces.

Endian support

You can produce either little-endian or big-endian code using the compiler command-line options --littleend and --bigend respectively.

ARMv6-M supports the following endian modes:


little-endian format


big-endian format.

Was this page helpful? Yes No