Skip to content

Commit

Permalink
[BEETLE] Add CMSIS 5 virtual NVIC compliancy
Browse files Browse the repository at this point in the history
This patch adds CMSIS 5 virtual NVIC compliancy in order to support
uvisor.

Signed-off-by: Vincenzo Frascino <[email protected]>
  • Loading branch information
fvincenzo committed Sep 12, 2016
1 parent 309fd89 commit b4d1cfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hal/targets/cmsis/TARGET_ARM_SSG/TARGET_BEETLE/cmsis_nvic.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) //Location of vectors in RAM
#define NVIC_FLASH_VECTOR_ADDRESS (0x00000000) //Initial vector position in flash

void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
uint32_t *vectors = (uint32_t*)SCB->VTOR;
uint32_t i;

Expand All @@ -37,7 +37,7 @@ void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
vectors[IRQn + NVIC_USER_IRQ_OFFSET] = vector;
}

uint32_t NVIC_GetVector(IRQn_Type IRQn) {
uint32_t __NVIC_GetVector(IRQn_Type IRQn) {
uint32_t *vectors = (uint32_t*)SCB->VTOR;
return vectors[IRQn + NVIC_USER_IRQ_OFFSET];
}
4 changes: 2 additions & 2 deletions hal/targets/cmsis/TARGET_ARM_SSG/TARGET_BEETLE/cmsis_nvic.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
extern "C" {
#endif

void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
uint32_t NVIC_GetVector(IRQn_Type IRQn);
void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
uint32_t __NVIC_GetVector(IRQn_Type IRQn);

#ifdef __cplusplus
}
Expand Down

0 comments on commit b4d1cfe

Please sign in to comment.