ARM Cortex-M: Difference between revisions
→Implementations: Add New Cortex M0 vendors |
→Development tools: CCS supports stellaris |
||
Line 206: | Line 206: | ||
* CrossWorks for ARM by Rowley.<ref>[http://www.rowley.co.uk/arm/index.htm CrossWorks for ARM; Rowley; Development Toolchains.]</ref> |
* CrossWorks for ARM by Rowley.<ref>[http://www.rowley.co.uk/arm/index.htm CrossWorks for ARM; Rowley; Development Toolchains.]</ref> |
||
* Sourcery CodeBench by Mentor Graphics.<ref>[http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/ Sourcery CodeBench; Mentor Graphics; Development Toolchains.]</ref> |
* Sourcery CodeBench by Mentor Graphics.<ref>[http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/ Sourcery CodeBench; Mentor Graphics; Development Toolchains.]</ref> |
||
* Code Composer Studio by Texas Instruments.<ref>http://www.ti.com/tool/ccstudio</ref> |
|||
* YAGARTO (GNU for ARM).<ref>[http://www.yagarto.de/ YAGARTO (GNU for ARM); Development Toolchains.]</ref><ref>[http://kernel.ozandroid.info/?p=125 Building GCC From Scratch; Development Toolchains.]</ref> |
* YAGARTO (GNU for ARM).<ref>[http://www.yagarto.de/ YAGARTO (GNU for ARM); Development Toolchains.]</ref><ref>[http://kernel.ozandroid.info/?p=125 Building GCC From Scratch; Development Toolchains.]</ref> |
||
{{Col-break|width=50%}} |
{{Col-break|width=50%}} |
||
;Debugging tools ([[Joint Test Action Group|JTAG]] / SWD): |
;Debugging tools ([[Joint Test Action Group|JTAG]] / SWD): |
Revision as of 12:01, 20 September 2012
The ARM Cortex-M is a group of 32-bit RISC ARM processor cores licensed by ARM Holdings. The cores are intended for microcontroller applications, and consists of the Cortex-M0, Cortex-M0+, Cortex-M1, Cortex-M3, Cortex-M4.[1][2][3][4][5]
Overview
ARM license
ARM Holdings does not manufacture nor sell CPU devices based on its own designs, but rather, licenses the processor architecture to interested parties. ARM offers a variety of licensing terms, varying in cost and deliverables. To all licensees, ARM provides an integratable hardware description of the ARM core, as well as complete software development toolset, and the right to sell manufactured silicon containing the ARM CPU.
Silicon customization
Integrated device manufacturers (IDM) receive the ARM Processor IP as synthesizable RTL (written in Verilog). In this form, they have the ability to perform architectural level optimizations and extensions. This allows the manufacturer to achieve custom design goals, such as higher clock speed, very low power consumption, instruction set extensions, optimizations for size, debug support, etc.
Instruction sets
The Cortex-M0 / M0+ / M1 implement the ARMv6-M architecture,[6] the Cortex-M3 implements the ARMv7-M architecture,[7] and the Cortex-M4 implements the ARMv7E-M architecture.[7] The architectures are binary instruction upward compatible from ARMv6-M to ARMv7-M to ARMv7E-M. Binary instructions available for the Cortex-M0 / M0+ / M1 can execute without modification on the Cortex-M3 and Cortex-M4. Binary instructions available for the Cortex-M3 can execute without modification on the Cortex-M4.[6][7]
All four Cortex-M cores implement a common instruction subset that consists of: Thumb subset, Thumb-2 subset, and multiply. The Cortex-M0 / M0+ / M1 include all older Thumb instructions, except new instructions (CBZ, CBNZ, IT) which were added in ARMv7-M architecture. The Cortex-M0 / M0+ / M1 include a minor subset of Thumb-2 instructions (BL, DMB, DSB, ISB, MRS, MSR).[6][7]
The Cortex-M0 / M0+ / M1 were designed to be the smallest size possible, thus having the least instructions of the Cortex-M family. The Cortex-M3 adds 3 Thumb instructions and all Thumb-2 instructions, plus a 10-12 cycle hardware divide and saturated math instructions. The Cortex-M4 adds DSP instructions and an optional single-precision floating-point unit.[6][7] If the Cortex-M4 has the floating point unit, then it is known as the Cortex-M4F.
ARM Cortex-M |
Thumb | Thumb-2 | Hardware Multiply |
Hardware Divide |
Saturated Math |
DSP Extensions |
Floating Point |
ARM Architecture |
---|---|---|---|---|---|---|---|---|
No | No | No | No | |||||
No | No | No | No | |||||
No | No | No | No | |||||
Entire | Entire | 1 cycle | Yes | Yes | No | No | ||
Entire | Entire | 1 cycle | Yes | Yes | Yes |
- Note: The Cortex-M0 / M0+ / M1 doesn't include these Thumb instructions: CBZ, CBNZ, IT; nor does it include a divide instruction.[6][7]
- Note: The Cortex-M0 / M0+ / M1 only include these Thumb-2 instructions: BL, DMB, DSB, ISB, MRS, MSR.[6][7]
- Note: If a smaller silicon die size is required, the Cortex-M0 / M0+ / M1 can implement a smaller yet slower multiply instruction.
Optional components
The Integrated Device Manufacturers (IDM) have numerous options to configure the contents of their ARM silicon die. To determine which components have been included in an ARM IC chip, consult its datasheet and manufacturer.
- SysTick Timer. It is a 24-bit system timer that extends the functionality of both the processor and the Nested Vectored Interrupt Controller (NVIC). When present, it also provides an additional configurable priority SysTick interrupt.[6][7][8]
- Bit Banding. It maps a complete word of memory onto a single bit in the bit-band region. For example, writing to an alias word will set or clear the corresponding bit in the bitband region. This allows every individual bit in the bit-banding region to be directly accessible from a word-aligned address, and individual bits to be toggled from C/C++ without performing a read-modify-write sequence of instructions.[6][7][8]
- Memory Protection Unit (MPU). It provides support for protecting regions of memory through enforcing privilege and access rules. It supports up to eight different regions, each of which can be split into a further eight equal-size sub-regions.[6][7][8]
ARM Cortex-M |
SysTick Timer |
Bit Banding |
Memory Protection Unit (MPU) |
---|---|---|---|
No | |||
No | No | ||
Yes | |||
Yes |
- Note: Most Cortex-M3 and M4 chips have Bit-Banding and MPU. The Bit-Banding option can be added to the Cortex-M0 / M0+ using the Cortex-M System Design Kit.[9]
- Note: Software should validate the existence of a feature before attempting to use it.[8]
- External interrupts: 0 to 32.
- Wake-up interrupt controller: Optional.
- Vector Table Offset Register: Optional.
- Data endianness: little-endian or big-endian.
- Instruction fetch width: 16-bit only, or mostly 32-bit.
- User/Privilege support: Optional.
- Reset all registers: Optional.
- Single-cycle I/O port: Optional.
- Debug Access Port (DAP): Optional.
- Halting debug support: Optional.
- Number of watchpoint comparators: 0 to 2.
- Number of breakpoint comparators: 0 to 4.
- Halting debug support: Optional.
Cortex-M0
This section needs expansion. You can help by adding to it. (December 2011) |
Features
Key features of the Cortex-M0 core are:[1]
- ARMv6-M architecture[6]
- Instruction Sets
- Thumb (most), missing CBZ, CBNZ, IT.
- Thumb-2 (subset), only BL, DMB, DSB, ISB, MRS, MSR.
- 32-bit hardware multiply, 1-cycle or 32-cycles (silicon option)
- 3-stage pipeline
Implementations
The following IC vendors have developed microcontrollers based on the Cortex-M0 core:
- Energy Micro EFM32 Zero family
- NXP LPC1100 and LPC1200 families
- Nordic Semiconductor nRF51 Series RF SoC
- nuvoTon NuMicro family
- Sonix SN32F700 Series
- STMicroelectronics STM32 F0 family [10]
Cortex-M0+
This section needs expansion. You can help by adding to it. (March 2012) |
Features
Key features of the Cortex-M0+ core are:[2]
- ARMv6-M architecture[6]
- Instruction Sets
- Thumb (most), missing CBZ, CBNZ, IT.
- Thumb-2 (subset), only BL, DMB, DSB, ISB, MRS, MSR.
- 32-bit hardware multiply, 1-cycle or 32-cycles (silicon option)
- 2-stage pipeline
- 8 region memory protection unit (MPU) (silicon option)
Implementations
The following IC vendors have licenses for the Cortex-M0+ core:
Cortex-M1
This section needs expansion. You can help by adding to it. (December 2011) |
Features
Key features of the Cortex-M1 core are:[3]
- ARMv6-M architecture[6]
- Instruction Sets
- Thumb (most), missing CBZ, CBNZ, IT.
- Thumb-2 (subset), only BL, DMB, DSB, ISB, MRS, MSR.
- 32-bit hardware multiply, 3-cycle or 33-cycles (silicon option)
Implementations
The following FPGA vendors support the Cortex-M1 as soft-cores:
Cortex-M3
Features
Key features of the Cortex-M3 core are:[4][11]
- ARMv7-M architecture[7]
- Instruction Sets
- Thumb (entire)
- Thumb-2 (entire)
- 1-cycle 32-bit hardware multiply, 2-12 cycle 32-bit hardware divide, saturated math support
- 3-stage pipeline with branch speculation
- 1 to 240 physical interrupts, plus NMI
- 12 cycle interrupt latency
- Integrated sleep modes
- 8 region memory protection unit (MPU) (silicon option)
- 1.25 DMIPS/MHz
- 90 nm implementation[12]
- 32 µW/MHz
- 0.12 mm2
Implementations
The following IC vendors have developed microcontrollers based on the Cortex-M3 core:
- Actel SmartFusion family
- Atmel SAM3 family
- Cypress Semiconductor PSoC 5
- Energy Micro EFM32 Tiny, Gecko, Leopard, Giant families
- Fujitsu FM3 family
- NXP LPC1300, LPC1700, LPC1800 families
- Silicon Labs Precision32 SiM3C1xx and SiM3U1xx families
- STMicroelectronics STM32 F2, F1, L1, W families
- Texas Instruments Stellaris, TMS470; OMAP 4470 (two Cortex-M3 coprocessors alongside the main Cortex-A9 dual-core CPU)[13]
- Toshiba TX03 Series
Cortex-M4
Features
Conceptually the Cortex-M4 is a Cortex-M3 plus DSP Instructions, and optional floating-point unit (FPU). If a core contains an FPU, it is known as a Cortex-M4F, otherwise it is a Cortex-M4. Key features of the Cortex-M4 core are:[5]
- ARMv7E-M architecture[7]
- Instruction Sets
- Thumb (entire)
- Thumb-2 (entire)
- 1-cycle 32-bit hardware multiply, 2-12 cycle 32-bit hardware divide, saturated math support
- DSP extension: Single cycle 16/32-bit MAC, single cycle dual 16-bit MAC, 8/16-bit SIMD arithmetic.
- Floating-Point extension (silicon option): Single-precision floating point unit, IEEE-754 compliant. This is called the FPv4-SP extension.
- 3-stage pipeline with branch speculation
- 1 to 240 physical interrupts, plus NMI
- 12 cycle interrupt latency
- Integrated sleep modes
- 8 region memory protection unit (MPU) (silicon option)
- 1.25 DMIPS/MHz
Implementations
The following IC vendors have developed microcontrollers based on the Cortex-M4 core:
- Atmel SAM4 family (Cortex-M4)
- Energy Micro EFM32 Wonder (Cortex-M4F)
- Freescale Kinetis families (Cortex-M4 and Cortex-M4F)
- Infineon Technologies XMC4000 family (Cortex-M4F)
- NXP Semiconductors LPC4300 family (dual core : Cortex-M4F and Cortex-M0)
- STMicroelectronics STM32 F3 and F4 families (Cortex-M4F)
- Texas Instruments Stellaris LM4F family (Cortex-M4F), OMAP 5 (two Cortex-M4 coprocessors along side the main Cortex-A15 dual-core CPU)
Development tools
|
|
|
|
Documentation
The amount of documentation for all ARM chips is daunting, especially for newcomers. The documentation for microcontrollers from past decades would easily be inclusive in a single document, but as chips have evolved so has the documentation grown. The total documentation is especially hard to grasp for all ARM chips since it consists of documents from the IC manufacturer and documents from CPU core vendor (ARM Holdings).
A typical top-down documentation tree is: high-level marketing slides, datasheet for the exact physical chip, a detailed reference manual that describes common peripherals and other aspects of physical chips within the same series, reference manual for the exact ARM core processor within the chip, reference manual for the ARM architecture of the core which includes detailed description of all instruction sets.
- Documentation Tree (top to bottom)
- IC Manufacturer Marketing Slides.
- IC Manufacturer Datasheets.
- IC Manufacturer Reference Manuals.
- ARM Core Reference Manuals.[1][2][3][4][5]
- ARM Architecture Reference Manuals.[6][7]
IC Manufacturers usually have additional documents, including: evaluation board user manuals, application notes, getting started with development software, software library documents, errata, and more.
See also
- ARM architecture, List of ARM microprocessor cores
- Microcontroller, List of common microcontrollers
- Embedded system, Single-board microcontroller
- JTAG, SWD
References
- ^ a b c d e Cortex-M0 r0p0 Technical Reference Manual; ARM Holdings.
- ^ a b c d e Cortex-M0+ r0p0 Technical Reference Manual; ARM Holdings.
- ^ a b c d e Cortex-M1 r1p0 Technical Reference Manual; ARM Holdings.
- ^ a b c d e Cortex-M3 r2p1 Technical Reference Manual; ARM Holdings.
- ^ a b c d e Cortex-M4 r0p1 Technical Reference Manual; ARM Holdings.
- ^ a b c d e f g h i j k l m n o p q r s ARMv6-M Architecture Reference Manual; ARM Holdings.
- ^ a b c d e f g h i j k l m n o p q r ARMv7-M Architecture Reference Manual; ARM Holdings.
- ^ a b c d Cortex-M3 Embedded Software Development; App Note 179; ARM Holdings.
- ^ a b c Cortex-M System Design Kit; ARM Holdings.
- ^ STMicroelectronics STM32F0 Microcontrollers with Cortex-M0 Core
- ^ Sadasivan, Shyam. "An Introduction to the ARM Cortex-M3 Processor" (PDF). ARM Holdings.
- ^ "ARM Cortex-M3 Specifications". ARM Holdings.
- ^ "OMAP 4 Platform : OMAP4470". Texas Instruments. Retrieved 2012-01-31.
- ^ TASKING VX-Toolset; Altium; Development Toolchains.
- ^ Atmel Studio; Atmel; Development Toolchains.
- ^ TrueSTUDIO; Atollic; Development Toolchains.
- ^ GNU Tools for ARM Embedded Processors; Canonical; Development Toolchains.
- ^ LPCXpresso and Red Suite; Code Red; Development Toolchains.
- ^ Embedded Workbench for ARM; IAR; Development Toolchains.
- ^ MDK-ARM; Keil; Development Toolchains.
- ^ Ride and RKit for ARM; Raisonance; Development Toolchains.
- ^ CrossWorks for ARM; Rowley; Development Toolchains.
- ^ Sourcery CodeBench; Mentor Graphics; Development Toolchains.
- ^ http://www.ti.com/tool/ccstudio
- ^ YAGARTO (GNU for ARM); Development Toolchains.
- ^ Building GCC From Scratch; Development Toolchains.
- ^ I-jet; IAR; Debug Tools.
- ^ RLink Standard; Raisonance; Debug Tools.
- ^ RLink Professional; Raisonance; Debug Tools.
- ^ J-Link and J-Trace; Segger; Debug Tools.
- ^ JTAGjet and JTAGjet-Trace; Signum; Debug Tools.
- ^ ST-LINK; STMicroelectronics; Debug Tools.
- ^ ST-LINK/V2; STMicroelectronics; Debug Tools.
- ^ AK-LINK (OpenOCD-compatible); Artekit; Debug Tools.
- ^ OpenOCD; SourceForge; Debug Tools.
- ^ CoOS; Real-Time Operating System.
- ^ OpenRTOS, SafeRTOS; Real-Time Operating System.
- ^ Milos; Real-Time Operating System.
- ^ ScmRTOS; Real-Time Operating System.
- ^ SDPOS; Real-Time Operating System.
- ^ µTasker; Real-Time Operating System.
- ^ Unison; Real-Time Operating System.
- ^ CMSIS; Software Library.
- ^ FatFs; Software Library.
- ^ Petit FatFs; Software Library
Further reading
- The Definitive Guide to the ARM Cortex-M0; 2nd Edition; Joseph Yiu; Newnes; 552 pages; 2011; ISBN 978-0-12-385477-3. (Online Sample)
- The Definitive Guide to the ARM Cortex-M3; 2nd Edition; Joseph Yiu; Newnes; 479 pages; 2009; ISBN 978-1-85617-963-8. (Online Sample)
External links
- Official
- ARM Cortex-M Website, arm.com
- Quick Reference Cards for Instruction Sets: Thumb, ARM and Thumb-2, Vector Floating Point
Cortex-M
SeriesARM
WebsiteARM
CoreARM
ArchitectureM0 M0 M0 r0p0 ARMv6-M M0+ M0+ M0+ r0p0 ARMv6-M M1 M1 M1 r1p0
M1 r0p1ARMv6-M M3 M3 M3 r2p1
M3 r2p0
M3 r1p1ARMv7-M M4 M4 M4 r0p1
M4 r0p0ARMv7E-M
- Other