diff --git a/lib/stm32/f4/vector.c b/lib/stm32/f4/vector.c index 3429bfb0..01b5e646 100644 --- a/lib/stm32/f4/vector.c +++ b/lib/stm32/f4/vector.c @@ -18,6 +18,8 @@ * along with this library. If not, see . */ +#include + #define WEAK __attribute__ ((weak)) /* Symbols exported by the linker script(s): */ @@ -224,6 +226,9 @@ void reset_handler(void) __asm__("MSR msp, %0" : : "r"(&_stack)); + /* Enable access to Floating-Point coprocessor. */ + SCB_CPACR |= SCB_CPACR_FULL * (SCB_CPACR_CP10 | SCB_CPACR_CP11); + for (src = &_data_loadaddr, dest = &_data; dest < &_edata; src++, dest++) *dest = *src;