Change allows to fill initial values for interrupt service
functions by override functions for global weak symbols.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
// Mod by nio for the .fastcode part
+#include "cpu_def.h"
#include "LPC17xx.h"
#define WEAK __attribute__ ((weak))
*(pulDest++) = 0;
}
-
- // set irq table
- SCB->VTOR=0x10000000;
+ // copy initial values and set irq table
+ if(irq_handler_table && irq_table_size) {
+ int i;
+ pulSrc = (unsigned long*)g_pfnVectors;
+ pulDest = (unsigned long*)irq_handler_table;
+ for(i = irq_table_size; i--; ) {
+ *(pulDest++) = *(pulSrc++);
+ }
+ /*SCB->VTOR=0x10000000;*/
+ SCB->VTOR=(uint32_t)irq_handler_table;
+ }
//if (_setup_board!=0)
_setup_board();