30 #include <stm32f30x.h>
51 typedef const
void (
vector)(
void);
68 asm volatile (
"mov r10, %0" : :
"r" (&irq_stack[0]) : );
74 SCB->SHCSR |= SCB_SHCSR_USGFAULTENA_Msk | SCB_SHCSR_BUSFAULTENA_Msk | SCB_SHCSR_MEMFAULTENA_Msk;
77 FPU->FPCCR |= FPU_FPCCR_ASPEN_Msk | FPU_FPCCR_LSPEN_Msk;
80 FPU->FPDSCR |= FPU_FPDSCR_DN_Msk;
81 FPU->FPDSCR |= FPU_FPDSCR_FZ_Msk;
85 SCB->CPACR |= (0xf << 20);
94 memset(&_sfast, 0, &_efast - &_sfast);
98 memset(&irq_stack, 0xa5,
sizeof(irq_stack) - 64);
114 #define HANDLER(_name) extern vector _name __attribute__((weak, alias("default_cpu_handler")))
125 struct cm3_vectors cpu_vectors
__attribute((section(".cpu_vectors"))) = {
126 .initial_stack = &irq_stack[
sizeof(irq_stack)],
const void( vector)(void)
const void *_vectors[] __attribute((section(".vectors")))
static void default_cpu_handler(void)