blob: 02f8223bdba211d796af3f1f324377400474e259 [file] [log] [blame]
Brian Silverman44311d62013-12-06 22:03:29 -08001#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.
6extern uint32_t _vectors;
7
Brian Silverman5020be62013-12-06 19:09:07 -08008void _start(void) {
Brian Silverman44311d62013-12-06 22:03:29 -08009 // Change the vector table offset to use our vector table instead of the
10 // bootloader's.
11 SCB->VTOR = (uint32_t)&_vectors;
Brian Silverman5020be62013-12-06 19:09:07 -080012}