# This file adds the compiler + linker options to enable floating point on # the STM32. # Drop this file into the base directory of your project (alongside platformio.ini) # and add the line below to platformio.ini: # extra_scripts = pre:configure_linker.py Import("env") # Print out the current build environment (useful for checking what flags were actually set from platformio.ini) #print(env.Dump()) # Use full C standard libary (to get printing of 64-bit variables) #env["LINKFLAGS"].remove("--specs=nano.specs") # Use hard-float ABI flags = [ "-mfloat-abi=hard", "-mfpu=fpv4-sp-d16" ] env.Append(CCFLAGS=flags, LINKFLAGS=flags) # Print the modified build environment (to be sure it worked!) #print(env.Dump())