Cortex-M interrupt vector in C++

Technical Note 85872

Arkitekturer:

ARM

Komponent:

compiler

Uppdaterad:

2015-11-06 13:04

Introduction

This Technical Note describes how to create an interrupt vector completely in C++ for use with a Cortex-M device.

Example

Download and open the example project: C++ interrupt vector project for IAR Embedded Workbench for ARM 6.21.zip.

Description

In the example project, the file called "cstartup_M_cpp.cpp" contains the interrupt vector for Cortex-M written in C++.

The main difference between this file and <installation directory>\arm\src\lib\thumb\cstartup_M.c (interrupt vector written in C), is that the interrupt handlers are written and compiled as C++ code, and that the startup functions (__iar_program_start, __cmain) have C linkage.

The example project is debuggable in the Simulator, but should easily be built and debugged on a specific Cortex-M3 hardware device.


All product names are trademarks or registered trademarks of their respective owners.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.