Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

XMC™ Forum Discussions

Not applicable

I created Dave project, added PWM App, now trying to impement sine, cosine

when trying to compile I get error:
'Building target: SVM3.elf'
'Invoking: ARM-GCC C Linker'
"C:\DAVE-3.1\ARM-GCC/bin/arm-none-eabi-gcc" -T"../SVM3.ld" -nostartfiles -L"C:\DAVE-3.1\eclipse\/../CMSIS/Infineon/Lib" -L"C:\DAVE-3.1\eclipse\/../Examples/Lib" -L"C:\DAVE-3.1\eclipse\/../emWin/Start/GUI" -Wl,-Map,"SVM3.map" -mcpu=cortex-m4 -mthumb -g -gdwarf-2 -o "SVM3.elf" "@makefile.rsp" -lm
trandq.o: In function `getSincos':
C:\temp\DAVE_CE_WS_v316\SVM3\Debug/../trandq.c:39: undefined reference to `arm_sin_cos_f32'
collect2: ld returned 1 exit status
make: *** [SVM3.elf] Error 1

I added #include "arm_math.h" on the top of the file

I added the directive for preprocessor in active project properties> ARM_MATH_CM4 as suggested in one of the posts.

If I search for declaration it is found void arm_sin_cos_f32(
float32_t theta,
float32_t * pSinVal,
float32_t * pCcosVal);

in C:\DAVE-3.1\Cmsis\Include\arm_math.h

II added -lm and still get get linker error

linker has Included:

What I am missing?

There is missing library:

Thank you
1 Reply
Not applicable
Nevermind, i have found the issue:

One have to add following search path to library C:\DAVE-3.1\CMSIS\Lib\GCC

and files Add libraries (-l) "arm_cortexM4_mathL_1" & "arm_cortexM4_mathL_2"

as posted in


thank you