blob: 32b87da8eba5663b29730abad79fa5e66f47a80f [file] [log] [blame]
Brian Silverman44311d62013-12-06 22:03:29 -08001#include <STM32F2XX.h>
2
Brian Silverman1b6fbd02013-12-12 18:08:47 -08003#include "cape/fill_packet.h"
Brian Silverman44311d62013-12-06 22:03:29 -08004
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 Silverman1b6fbd02013-12-12 18:08:47 -080012
13 fill_packet_start();
Brian Silverman5020be62013-12-06 19:09:07 -080014}