From 58286bd3dd404764346b77737ac589189af90e60 Mon Sep 17 00:00:00 2001 From: Lorenzo Cucchi <lorenzo.cucchi@skywarder.eu> Date: Sat, 3 Jun 2023 08:30:13 +0200 Subject: [PATCH] [FPU] Fixed optionscmake with single precision FPU --- .../stm32f756zg_nucleo/interfaces-impl/bsp.cpp | 3 ++- miosix/config/options.cmake | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/miosix/arch/cortexM7_stm32f7/stm32f756zg_nucleo/interfaces-impl/bsp.cpp b/miosix/arch/cortexM7_stm32f7/stm32f756zg_nucleo/interfaces-impl/bsp.cpp index 4255b80d..b9560d6c 100644 --- a/miosix/arch/cortexM7_stm32f7/stm32f756zg_nucleo/interfaces-impl/bsp.cpp +++ b/miosix/arch/cortexM7_stm32f7/stm32f756zg_nucleo/interfaces-impl/bsp.cpp @@ -61,7 +61,7 @@ void IRQbspInit() { RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN | RCC_AHB1ENR_GPIOFEN | - RCC_AHB1ENR_GPIOHEN; + RCC_AHB1ENR_GPIOGEN | RCC_AHB1ENR_GPIOHEN; RCC_SYNC(); GPIOA->OSPEEDR = 0xaaaaaaaa; // Default to 50MHz speed for all GPIOS GPIOB->OSPEEDR = 0xaaaaaaaa; @@ -69,6 +69,7 @@ void IRQbspInit() { GPIOD->OSPEEDR = 0xaaaaaaaa; GPIOE->OSPEEDR = 0xaaaaaaaa; GPIOF->OSPEEDR = 0xaaaaaaaa; + GPIOG->OSPEEDR = 0xaaaaaaaa; GPIOH->OSPEEDR = 0xaaaaaaaa; userLed1::mode(Mode::OUTPUT); diff --git a/miosix/config/options.cmake b/miosix/config/options.cmake index 6ed4c504..a80c0760 100644 --- a/miosix/config/options.cmake +++ b/miosix/config/options.cmake @@ -3127,7 +3127,7 @@ elseif(${ARCH} STREQUAL cortexM7_stm32f7) ## Select appropriate compiler flags for both ASM/C/C++/linker ## Not all stm32f7 have the double precision FPU. Those that only ## support single precision are built as cortex m4 - set(ARCHOPTS -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16) + set(ARCHOPTS -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16) ## Base directory with header files for this board set(BOARD_INC arch/cortexM7_stm32f7/stm32f756zg_nucleo) @@ -3139,10 +3139,7 @@ elseif(${ARCH} STREQUAL cortexM7_stm32f7) ## Select architecture specific files ## These are the files in arch/<arch name>/<board name> - set(ARCH_SRC - ${KPATH}/arch/common/drivers/stm32_hardware_rng.cpp - ${KPATH}/${BOARD_INC}/interfaces-impl/bsp.cpp - ) + set(ARCH_SRC ${KPATH}/${BOARD_INC}/interfaces-impl/bsp.cpp) ## Add a #define to allow querying board name list(APPEND CFLAGS_BASE -D_BOARD_STM32F756ZG_NUCLEO) -- GitLab