The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: TARGET_TB_SENSE_12/TARGET_Silicon_Labs/TARGET_EFM32/common/cmsis_nvic.h
- Revision:
- 145:64910690c574
- Parent:
- 142:4eea097334d6
- Child:
- 152:235179ab3f27
--- a/TARGET_TB_SENSE_12/TARGET_Silicon_Labs/TARGET_EFM32/common/cmsis_nvic.h Thu Jun 08 14:53:05 2017 +0100 +++ b/TARGET_TB_SENSE_12/TARGET_Silicon_Labs/TARGET_EFM32/common/cmsis_nvic.h Wed Jun 21 17:31:38 2017 +0100 @@ -1,31 +1,18 @@ /* mbed Microcontroller Library - cmsis_nvic * Copyright (c) 2009-2011 ARM Limited. All rights reserved. - * - * CMSIS-style functionality to support dynamic vectors - */ + */ #ifndef MBED_CMSIS_NVIC_H #define MBED_CMSIS_NVIC_H -#include "cmsis.h" +#define NVIC_NUM_VECTORS (16 + EXT_IRQ_COUNT) // CORE + MCU Peripherals -#define NVIC_NUM_VECTORS (16 + EXT_IRQ_COUNT) // CORE + MCU Peripherals -#define NVIC_USER_IRQ_OFFSET 16 - -#if __CORTEX_M == 0 -#define __NVIC_SetVector NVIC_SetVector -#define __NVIC_GetVector NVIC_GetVector +/* For GCC, use dynamic vector table placement since otherwise we run into an alignment conflict */ +#if (defined (__GNUC__) && (!defined(__CC_ARM))) +extern uint32_t __start_vector_table__; // Dynamic vector positioning in GCC +#define NVIC_RAM_VECTOR_ADDRESS (&__start_vector_table__) +#else +#define NVIC_RAM_VECTOR_ADDRESS 0x20000000 // Vectors positioned at start of RAM #endif -#ifdef __cplusplus -extern "C" { -#endif - -void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector); -uint32_t __NVIC_GetVector(IRQn_Type IRQn); - -#ifdef __cplusplus -} -#endif - -#endif +#endif /* MBED_CMSIS_NVIC_H */