summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
586934e)
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
// Mod by nio for the .fastcode part
#include "LPC17xx.h"
#define WEAK __attribute__ ((weak))
#include "LPC17xx.h"
#define WEAK __attribute__ ((weak))
-
- // 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();
//if (_setup_board!=0)
_setup_board();