Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Error: undefined reference to `__errno'

Hello all,

I am currently using a STM32L4.When I simply want to call the function log() or log10() like this:
Value = log10((double) Value));

The issue is that if I do this call I get the following error when I am compiling the project:

’’‘Building target: Project.elf’
‘Invoking: MCU GCC Linker’
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -T”../STM32L486VGTx_FLASH.ld” -Wl,-Map=output.map -Wl,- -gc-sections -lm -o “Project.elf” @”objects.list” --
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.7.0.201602121829/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7e-m/fpu\libm.a(lib_a-w_log10.o): In function `log10’:
w_log10.c:(.text.log10+0x8a): undefined reference to `__errno’
w_log10.c:(.text.log10+0xb2): undefined reference to `__errno’
w_log10.c:(.text.log10+0xee): undefined reference to `__errno’
collect2.exe: error: ld returned 1 exit status
make: *** Project.elf Error 1’’


This problem doesn’t appear when I am using other Math functions like cos() or pow()... What did I do wrong ?


Best regards,

Florian

Tunisia

Hello Florian,

I ve tried to reproduce this problem but in vain.

Could you attach a a minimal project with this issue.

Regards,
Tarek


Hello Tarek,

I’ve just solved this problem by adding m and c librairies in the project properties : Project > Properties > C/C++ Build > Settings > GCC C Linker > Libraries.

Thank you for your answer,

Best regards,

Florian