# PlatformIO building errors when compiling port.c

**URL:** <https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448>\
**Category:** Kernel\
**Created:** [September 13, 2021, 6:21pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448 "2021-09-13T18:21:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![EduardoGoncalves1966](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/eduardogoncalves1966/32/1686_2.png) [@EduardoGoncalves1966](https://forums.freertos.org/u/EduardoGoncalves1966)\
**Post date:** [September 13, 2021, 6:21pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/1 "2021-09-13T18:21:57Z")

</div>

Hi

I’m trying to use PlatformIO with a STM32F723ZG and FreeRTOS.

When compiling port.c I get these errors:

/tmp/ccN7NtDU.s:330: Error: selected processor does not support `vstmdbeq r0!,{s16-s31}' in Thumb mode /tmp/ccN7NtDU.s:332: Error: instruction not allowed in IT block -- `stmdb r0!,{r4-r11,r14}’  
/tmp/ccN7NtDU.s:352: Error: selected processor does not support `vldmiaeq r0!,{s16-s31}' in Thumb mode /tmp/ccN7NtDU.s:354: Error: instruction not allowed in IT block -- `msr psp,r0’  
\*\*\* [.pio/build/env\_nucleo\_h723zg/src/Middlewares/Third\_Party/FreeRTOS/Source/portable/GCC/ARM\_CM4F/port.o] Error 1

It seems that the MCU is not properly defined…  
However I’m using -DSTM32H723xx in the build\_flags of PlatformIO.ini.

Any help?  
thanks

=======================  
This my PlatformIO.ini file.

[platformio]  
default\_envs = env\_nucleo\_h723zg

[env]  
check\_tool = cppcheck  
check\_flags =  
cppcheck: --std=c11 --inline-suppr --inconclusive -j4 --addon=…/…/scripts/misra/misra.json

[env:env\_nucleo\_h723zg]  
platform = ststm32  
board = nucleo\_h723zg  
framework = stm32cube  
src\_filter = +\<\*\> -\<.git/\> - -  
build\_flags =  
-DEVAL  
-DSTM32H723xx  
-I include  
-I src  
-I src/Core/Inc  
-I src/Drivers/CMSIS/Include/  
-I src/Drivers/CMSIS/Device/ST/STM32H7xx/Include/  
-I src/Drivers/STM32H7xx\_HAL\_Driver/Inc/  
-I src/Middlewares/Third\_Party/FreeRTOS/Source/include/  
-I src/Middlewares/Third\_Party/FreeRTOS/Source/portable/GCC/ARM\_CM4F/  
-I src/Middlewares/Third\_Party/FreeRTOS/Source/portable/GCC/ARM\_CM4F/r0p1/  
-I src/Middlewares/Third\_Party/FreeRTOS/Source/CMSIS\_RTOS\_V2/  
-Wl,–whole-archive  
-Wl,–allow-multiple-definition  
upload\_protocol = stlink  
debug\_tool = stlink  
debug\_init\_break = tbreak main

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [September 13, 2021, 6:52pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/2 "2021-09-13T18:52:39Z")

</div>

Which compiler are you using? It should be present in your full logs.

---

<div class="post-metadata">

**Author:** ![EduardoGoncalves1966](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/eduardogoncalves1966/32/1686_2.png) [@EduardoGoncalves1966](https://forums.freertos.org/u/EduardoGoncalves1966)\
**Post date:** [September 13, 2021, 7:42pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/3 "2021-09-13T19:42:16Z")

</div>

It should be GCC for ARM.  
At least I see

- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [September 13, 2021, 8:25pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/4 "2021-09-13T20:25:30Z")

</div>

Then probably you are not passing flags to enable FPU. As mentioned in [this post](https://forums.freertos.org/t/stm32f4-gcc-compilation-problems/3457), you probably need to pass these flags - `-mfpu=fpv4-sp-d16", "-mfloat-abi=hard`.

Thanks.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [September 13, 2021, 8:25pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/5 "2021-09-13T20:25:56Z")

</div>

Looks like you are trying to build floating point instructions but telling the compiler there is no floating point unit. Check your GCC command line matches the part you are targetting.

---

<div class="post-metadata">

**Author:** ![EduardoGoncalves1966](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/eduardogoncalves1966/32/1686_2.png) [@EduardoGoncalves1966](https://forums.freertos.org/u/EduardoGoncalves1966)\
**Post date:** [September 13, 2021, 8:48pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/6 "2021-09-13T20:48:15Z")

</div>

thanks.  
But still I have this:  
/home/wsone/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/7.2.1/…/…/…/…/arm-none-eabi/bin/ld: error: .pio/build/env\_nucleo\_h723zg/FrameworkHALDriver/Src/stm32h7xx\_hal.o uses VFP register arguments, .pio/build/env\_nucleo\_h723zg/firmware.elf does not

Are the “VFP register arguments” still related with the Floating Point?  
I’m trying to get rid of FrameworkHALDriver and use the HAL drivers provided by STM32CudeIDE but so far no success…

---

<div class="post-metadata">

**Author:** ![EduardoGoncalves1966](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/eduardogoncalves1966/32/1686_2.png) [@EduardoGoncalves1966](https://forums.freertos.org/u/EduardoGoncalves1966)\
**Post date:** [September 13, 2021, 8:52pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/7 "2021-09-13T20:52:55Z")

</div>

Now I have changed from  
-mfloat-abi=hard to -mfloat-abi=softfp

and now it compiles. But is this correct? thanks.

Linking .pio/build/env\_nucleo\_h723zg/firmware.elf  
Checking size .pio/build/env\_nucleo\_h723zg/firmware.elf  
Advanced Memory Usage is available via “PlatformIO Home \> Project Inspect”  
RAM: [=] 5.0% (used 22320 bytes from 442368 bytes)  
Flash: [] 2.5% (used 25752 bytes from 1048576 bytes)  
Building .pio/build/env\_nucleo\_h723zg/firmware.bin  
[SUCCESS] Took 11.67 seconds =========================================================

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [September 13, 2021, 8:57pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/8 "2021-09-13T20:57:56Z")

</div>

I typed incorrectly - softfp is good.

---

<div class="post-metadata">

**Author:** ![EduardoGoncalves1966](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/eduardogoncalves1966/32/1686_2.png) [@EduardoGoncalves1966](https://forums.freertos.org/u/EduardoGoncalves1966)\
**Post date:** [September 13, 2021, 9:14pm UTC](https://forums.freertos.org/t/platformio-building-errors-when-compiling-port-c/13448/9 "2021-09-13T21:14:58Z")

</div>

thanks  
Another bug bites the dust… 🙂
