ARM architecture v6-M

This is an overview of the compilation tools support for ARMv6-M (ARMv6 architecture targeted at the microcontroller profile). Microcontroller profiles implement a programmers' model designed for fast interrupt processing, with hardware stacking of registers and support for writing interrupt handlers in high-level languages. The processor is designed for integration into an FPGA and is ideal for use in very low power applications. It supports the 16-bit Thumb instruction set and a small number of 32-bit Thumb instructions. The following table shows useful command-line options.

Table 6. Useful command-line options

Command-line optionDescription
--cpu=6-MARMv6 microcontroller profile with Thumb only (no ARM instructions), and processor state instructions
--cpu=6S-MARMv6 microcontroller profile with Thumb only (no ARM instructions), plus processor state instructions and OS extensions
--cpu=name

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.


Show/hideKey features

Key features for ARMv6-M:

  • The compiler supports the 16-bit Thumb instruction set and a small number of 32-bit Thumb instructions. The 32-bit instructions are BL, DMB, DSB, ISB, MRS, and MSR.

Show/hideAlignment 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.

Show/hideEndian 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:

LE

little-endian format

BE-8

big-endian format.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0471G
Non-ConfidentialID021412