Error undefined reference to `__aeabi_uldivmod' when build in VSCode with Zephyr 2.7.0 and stm32l476g_disco

I’ve updated my VSCode + PlatformIO development environment to the Zephyr 2.7.0 just released some days ago. After this change my program cannot be build correctly as before due to a link error:
undefined reference to `__aeabi_dcmpun’
this unresolved comes out using the sqrt() math function. Removing the call to sqrt() my program can be build correctly.

To reproduce the problem compile this program inside VSCode (main.c):

#include <zephyr.h>
#include <math.h>
void main(void)
float a = sqrt(1.23f);

prj.conf contains:


platformio.ini contains:

platform = ststm32
board = disco_l476vg
framework = zephyr

Logs and console output:

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
HARDWARE: STM32L476VGT6 80MHz, 128KB RAM, 1MB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, cmsis-dap, jlink)

framework-zephyr 2.20700.211026 (2.7.0)
tool-cmake 3.21.3
tool-dtc 1.4.7
tool-gperf 3.0.4
tool-ninja 1.7.1
toolchain-gccarmnoneeabi 1.80201.181220 (8.2.1)
Reading CMake configuration...
Parsing system calls...
Generating syscall files
Generating KObject files...
Validating driver...
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/disco_l476vg/offsets/zephyr/arch/arm/core/offsets/offsets.c.o
Compiling .pio/build/disco_l476vg/zephyr_final/zephyr/misc/empty_file.c.o
Archiving .pio/build/disco_l476vg/zephyr/kernel/libkernel.a
Indexing .pio/build/disco_l476vg/zephyr/kernel/libkernel.a
Linking .pio/build/disco_l476vg/zephyr/firmware-pre.elf
/home/alfredo/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.bfd: /home/alfredo/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libm.a(lib_a-w_sqrt.o): in function sqrt':** w_sqrt.c:(.text.sqrt+0x26): **undefined reference to __aeabi_dcmpun'
collect2: error: ld returned 1 exit status
*** [.pio/build/disco_l476vg/zephyr/firmware-pre.elf] Error 1


OS: Linux
Toolchain: gccarmnoneeabi 1.80201.181220 (8.2.1)
Zephyr version: 2.7.0
Development environment: VSCode 1.62.2
PlatformIO: Core 5.2.3 Home 3.4.0
Framework: ST STM32 CMSIS 15.0.0

Compiling the program outside VSCode, using the Zephyr SDK 0.13.0, the link error does not occur.

What is the full configuration file?

Hi maxgerhardt. This is the FULL prj.conf file, at least in this demo program.I’ve kept it at the minimum, compared to the real prj.conf of my program, to have the minimum conditions that trigger the issue.

Please file an issue for a regression in Issues · platformio/platform-ststm32 · GitHub.