Greetings!
I’m trying to use the FPU unit of my ST Nucleo L432KC development board in one of my projects, unfortunately without any success so far.
The following community topics were the basics of the additional script creation and platformio.ini file setup:
https://community.platformio.org/t/changing-mfloat-abi-build-option-not-working/26306/2
https://community.platformio.org/t/building-stm32f4-with-hard-floating-point/5338
here is my additional script:
Import("env")
Import("projenv")
for e in [env, projenv, DefaultEnvironment()]:
e.Append(
CCFLAGS=[
"-mfloat-abi=hard",
"-mfpu=fpv4-sp-d16"
],
LINKFLAGS=[
"-mfloat-abi=hard",
"-mfpu=fpv4-sp-d16"
]
)
here is my platformio.ini file:
[env]
platform = ststm32
board = nucleo_l432kc
framework = cmsis
extra_scripts = post:link_hardfloat.py
[env:testing_debug]
build_type = debug
build_flags = -D WAVE_TRIG
[env:RGB_led_test]
build_type = debug
build_flags = -D LED_TEST
[env:release_version]
build_type = release
this is the arrangement of my project files:
and here is the error message that I’m getting:
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\libfa1\libADC.a(adc.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\libfa1\libADC.a(adc.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\lib4fa\libclocks.a(clocks.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\lib4fa\libclocks.a(clocks.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\lib3b4\libcontroller.a(controller.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\lib3b4\libcontroller.a(controller.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\lib5c1\libGPIO.a(gpio.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\lib5c1\libGPIO.a(gpio.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\libdf7\libHW_Interrupt.a(hw_interrupt.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\libdf7\libHW_Interrupt.a(hw_interrupt.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\lib0f6\libpwm.a(pwm.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\lib0f6\libpwm.a(pwm.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\lib643\libserial.a(serial.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\lib643\libserial.a(serial.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\lib55c\libsystick.a(systick.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\lib55c\libsystick.a(systick.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\lib37b\libtimer.a(timer.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\lib37b\libtimer.a(timer.o)
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: error: .pio\build\testing_debug\firmware.elf uses VFP register arguments, .pio\build\testing_debug\lib519\libwave_data.a(wave_data.o) does not
c:/users/marto/.platformio/packages/toolchain-gccarmnoneeabi@1.70201.0/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file .pio\build\testing_debug\lib519\libwave_data.a(wave_data.o)
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\testing_debug\firmware.elf] Error 1
The libraries that I’ve written only using the device header, as far as I know none of them has a strict soft floating point library requirement.
Can somebody help me what I’m missing to make this work?