Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Link error passing double variable to sqrt function

Hi

I’m working on Linux and get the same linker error when math.h is included and a function of libmath is used.
Not all functions from libmath trigger the linker error but sqrt() in any case. I’m using plain C.

EDIT Like in this example the error was only triggered if the value of the argument was not known at compile time.

The IDE automatically sets Project->Properties->C/C++ Build->Settings->MCU GCC Linker->Libraries button “Use C math library (-lm) checked

My solution found elswere is:

Goto Project->Properties->C/C++ Build->Settings->MCU GCC Linker->Libraries and uncheck this button “Use C math library (-lm)
Then click on add and type “m”.
The explanation for this found elsewere shall be: the order of linking libc and libmath is is reversed with default setting.

Dieter