Platformio STM32 and FreeRtos Library

There is no bug. Only configuration issues in the project.

  1. Move the “MiddleWares” folder inside src/ or the files will not be built
  2. Adapt the paths in the build_flags accordingly
build_flags =
  -Isrc/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS
  -Isrc/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F
  -Isrc/Middlewares/Third_Party/FreeRTOS/Source/include
  1. Add an extra_script to properly add the hard-floating point usage into the C/C++ compiler flags, linker flags, and assembler flags by setting
extra_scripts = pre:hardfloat.py

then creating the file hardfloat.py in the same folder as the platformio.ini with content

Import("env")
env.Append(
    LINKFLAGS=["-mfloat-abi=hard", "-mfpu=fpv4-sp-d16"],
    CCFLAGS=["-mfloat-abi=hard", "-mfpu=fpv4-sp-d16"],
    ASFLAGS=["-mfloat-abi=hard", "-mfpu=fpv4-sp-d16"]
)
  1. Hit “Build”
Indexing .pio/build/nucleo_l476rg/libFrameworkCMSISDevice.a
Linking .pio/build/nucleo_l476rg/firmware.elf
Checking size .pio/build/nucleo_l476rg/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   4.4% (used 4344 bytes from 98304 bytes)
Flash: [          ]   0.3% (used 2692 bytes from 1048576 bytes)
Building .pio/build/nucleo_l476rg/firmware.bin
=====================[SUCCESS] Took 3.57 seconds =====================