mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
044b5131cb
commit
44b0aa9b73
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue