Ensure the NVIC table gets copied to RAM even when it is not located at 0x00.

This is useful in case you're using a secondary bootloader to load application code that is using the mbed libraries on a bare metal controller.
pull/293/head
Lieven Hollevoet 2014-05-05 14:39:01 +02:00
parent 044b5131cb
commit 44b0aa9b73
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
uint32_t i;
// Copy and switch to dynamic vectors if the first time called
if (SCB->VTOR == NVIC_FLASH_VECTOR_ADDRESS) {
if (SCB->VTOR < NVIC_RAM_VECTOR_ADDRESS) {
uint32_t *old_vectors = vectors;
vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
for (i=0; i<NVIC_NUM_VECTORS; i++) {