[mbed][MTS_DRAGONFLY_F411RE] fix NVIC_FLASH_VECTOR_ADDRESS with custom VECT_TAB_OFFSET, allow for override of VECT_TAB_OFFSET

pull/1001/head
Mike Fiore 2015-02-16 12:18:04 -06:00
parent 506ead1387
commit 6b1bf31865
2 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,7 @@
#include "cmsis_nvic.h"
#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Vectors positioned at start of RAM
#define NVIC_FLASH_VECTOR_ADDRESS (0x08000000) // Initial vector position in flash
#define NVIC_FLASH_VECTOR_ADDRESS (FLASH_BASE | VECT_TAB_OFFSET) // Initial vector position in flash
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
uint32_t *vectors = (uint32_t *)SCB->VTOR;

View File

@ -124,8 +124,10 @@
/*!< Uncomment the following line if you need to relocate your vector Table in
Internal SRAM. */
/* #define VECT_TAB_SRAM */
#ifndef VECT_TAB_OFFSET
#define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
This value must be a multiple of 0x200. */
#endif
/******************************************************************************/
/**