Closed cfoucher-laas closed 2 years ago
Hi @cfoucher-laas , thanks for reporting. Should be fixed in the latest Zephyr package. Could you please try to run the pio platform update ststm32
in the IDE terminal?
Thank you for this quick answer @valeros, I confirm that the update did fix the issue.
Thank you very much!
Hello,
We have worked with Zephyr 2.6 on STM32 with PlatformIO for some time now. We tried to migrate our project to STSTM32 V15.0 to make use of Zephyr 2.7, and got a link error with libc nano at compile time. We work on STM32 G474RE µC. The error also happens with V15.2.
Error is as follows:
(multiple such errors)
The error is linked to the FPU support of Zephyr. I tried disabling
CONFIG_FPU
inprj.conf
and it solves the issue, except that we need FPU for our application.After investigating, my understanding is that the linker tries to link the executable with [gcc toolchain]/v7e-m/nofp/libc_nano.a instead of [gcc toolchain]/v7e-m+fp/hard/libc_nano.a
The only change we made to the project was updating the version of STSTM32 platform (14.2 => 15.0).
I've built a minimal example that provokes the bug, it can be found here: https://gitlab.laas.fr/cfoucher/zephyr_2_7_linker_error
Steps to reproduce the behavior:
git clone https://gitlab.laas.fr/cfoucher/zephyr_2_7_linker_error.git test_v15
cd test_v15
code .
Build
button from the pio toolbar. Everything should compile fine.platformio.ini
file, commenting the line 9 and uncommenting the line 10.I first reported this issue to Zephyr, and one of the clue they gave me was that the version of GNU Arm Embedded was fairly obsolete, and that the bug wasn't happening with the 2021.10 version.
I tried bumping the version of the toolchain to 1.9 using:
platform_packages = toolchain-gccarmnoneeabi@1.90201.191206
but it didn't help.I can't find a more recent version in the repository.
Do you have any idea where the bug can come from?