Enable floating-point coprocessor on reset.
Always enable the floating-point coprocessor with full access on reset, allowing usage of hard-fp toolchains.
This commit is contained in:
parent
584052c28c
commit
e4819d3cd2
@ -18,6 +18,8 @@
|
|||||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <libopencm3/stm32/f4/scb.h>
|
||||||
|
|
||||||
#define WEAK __attribute__ ((weak))
|
#define WEAK __attribute__ ((weak))
|
||||||
|
|
||||||
/* Symbols exported by the linker script(s): */
|
/* Symbols exported by the linker script(s): */
|
||||||
@ -224,6 +226,9 @@ void reset_handler(void)
|
|||||||
|
|
||||||
__asm__("MSR msp, %0" : : "r"(&_stack));
|
__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++)
|
for (src = &_data_loadaddr, dest = &_data; dest < &_edata; src++, dest++)
|
||||||
*dest = *src;
|
*dest = *src;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user