Awesome
@fpiSTM . Thanks so much. Haven't really had time to do anything with the stm32duino and my stm32wl55 board until today. Right now I am looking at getting it included in Platformio . I know you're not the one making the Platformio packages/framework definition, but I am running into an issue which you might now better how to fix because its probably MCU specific.
I am starting to get close with these changes:
https://github.com/platformio/platform- ... t?expand=1
But when I try to compile a very simple sketch using platformio, the compiler complains that there is no FPU present. Is this because of the dual M0/M4 MCU? In misc/svd/STM32WL5x_CM4.svd I do see
while in system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl55xx.h I see
Code: Select all
#define __FPU_PRESENT 0U /*!< FPU not present
So is or is there no FPU present? I would guess there would be one in the cortex M4 ? But in your the stm32duino CMSIS drivers you define it as not being present.
In tools/platformio-build.py I also see
Code: Select all
if any(mcu in board_config.get("build.cpu")
for mcu in ("cortex-m4", "cortex-m7")):
env.Append(
CCFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"],
LINKFLAGS=["-mfpu=fpv4-sp-d16", "-mfloat-abi=hard"],
)
and in my build.cpu is indeed set to cortex-m4. I guess this includes the fpu options to gcc. So what option would make sense here to exclude the fpu math?
Any ideas how resolve this issue?
The error I get is:
Code: Select all
Processing stm32wl55 (platform: ststm32; board: nucleo_wl55jc; framework: arduino; extra_scripts: post:extra_script.py)
--------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/nucleo_wl55jc.html
PLATFORM: ST STM32 (14.1.0) > ST Nucleo WL55JC
HARDWARE: STM32WL55JC 48MHz, 64KB RAM, 256KB Flash
DEBUG: Current (stlink) On-board (stlink) External (cmsis-dap, jlink)
PACKAGES:
- framework-arduinoststm32 4.30000.210815 (3.0.0)
- framework-cmsis 2.50700.210515 (5.7.0)
- toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
-----------------
GOING FOR M4 MATH
-----------------
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 11 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
arm-none-eabi-gcc -o .pio/build/stm32wl55/FrameworkArduinoVariant/PeripheralPins.c.o -c -std=gnu11 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -Os -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 "-I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I" -DPLATFORMIO=50101 -DSTM32WL55JC1 -DSTM32WLxx -DARDUINO=10808 -DARDUINO_ARCH_STM32 -DARDUINO_NUCLEO_WL55JC -DBOARD_NAME=\"NUCLEO_WL55JC\" -DHAL_UART_MODULE_ENABLED -DUSE_FULL_LL_DRIVER -DVARIANT_H=\"variant_NUCLEO_WL55JC1.h\" -DSTM32WL55xx -DUSE_CM4_STARTUP_FILE -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/avr -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32 -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/LL -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/OpenAMP -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb/hid -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb/cdc -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32WLxx_HAL_Driver/Inc -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32WLxx_HAL_Driver/Src -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/STM32WLxx -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/open-amp/lib/include -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/libmetal/lib/include -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/virtual_driver -I/home/dolfandringa/.platformio/packages/framework-cmsis/CMSIS/Core/Include -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32WLxx/Include -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32WLxx/Source/Templates/gcc -I/home/dolfandringa/.platformio/packages/framework-cmsis/CMSIS/DSP/Include -I/home/dolfandringa/.platformio/packages/framework-cmsis/CMSIS/DSP/PrivateInclude -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino /home/dolfandringa/.platformio/packages/framework-arduinoststm32/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/PeripheralPins.c
arm-none-eabi-gcc -o .pio/build/stm32wl55/SrcWrapper/src/HAL/stm32yyxx_hal.c.o -c -std=gnu11 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -Os -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 "-I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I" -DPLATFORMIO=50101 -DSTM32WL55JC1 -DSTM32WLxx -DARDUINO=10808 -DARDUINO_ARCH_STM32 -DARDUINO_NUCLEO_WL55JC -DBOARD_NAME=\"NUCLEO_WL55JC\" -DHAL_UART_MODULE_ENABLED -DUSE_FULL_LL_DRIVER -DVARIANT_H=\"variant_NUCLEO_WL55JC1.h\" -DSTM32WL55xx -DUSE_CM4_STARTUP_FILE -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/avr -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32 -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/LL -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/OpenAMP -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb/hid -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/usb/cdc -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32WLxx_HAL_Driver/Inc -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32WLxx_HAL_Driver/Src -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/STM32WLxx -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/open-amp/lib/include -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/libmetal/lib/include -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/virtual_driver -I/home/dolfandringa/.platformio/packages/framework-cmsis/CMSIS/Core/Include -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32WLxx/Include -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32WLxx/Source/Templates/gcc -I/home/dolfandringa/.platformio/packages/framework-cmsis/CMSIS/DSP/Include -I/home/dolfandringa/.platformio/packages/framework-cmsis/CMSIS/DSP/PrivateInclude -I/home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino /home/dolfandringa/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src/HAL/stm32yyxx_hal.c
In file included from /home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl55xx.h:210,
from /home/dolfandringa/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wlxx.h:99,
from /home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/stm32_def.h:56,
from /home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32/clock.h:19,
from /home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/wiring_time.h:23,
from /home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/wiring.h:38,
from /home/dolfandringa/.platformio/packages/framework-arduinoststm32/cores/arduino/Arduino.h:36,
from /home/dolfandringa/.platformio/packages/framework-arduinoststm32/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/PeripheralPins.c:21:
/home/dolfandringa/.platformio/packages/framework-cmsis/CMSIS/Core/Include/core_cm4.h:105:8: error: #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
105 | #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"