Brian Silverman | 44311d6 | 2013-12-06 22:03:29 -0800 | [diff] [blame^] | 1 | #include <STM32F2XX.h> |
| 2 | |
| 3 | #include "cape/bootloader_handoff.h" |
| 4 | |
| 5 | // The startup asm code defines this to the start of our exception vector table. |
| 6 | extern uint32_t _vectors; |
| 7 | |
Brian Silverman | 5020be6 | 2013-12-06 19:09:07 -0800 | [diff] [blame] | 8 | void _start(void) { |
Brian Silverman | 44311d6 | 2013-12-06 22:03:29 -0800 | [diff] [blame^] | 9 | // Change the vector table offset to use our vector table instead of the |
| 10 | // bootloader's. |
| 11 | SCB->VTOR = (uint32_t)&_vectors; |
Brian Silverman | 5020be6 | 2013-12-06 19:09:07 -0800 | [diff] [blame] | 12 | } |