Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
STM32F4 atan2
#1
I am using STM32F407VGT6 with Embitz.
The board contains an accelerometer, which I have successfully used previously with a STM32F103.
Calculation of the roll and pitch requires the function atan2.
On the STM32F4 I get "undefined reference to `atan2'"
I have included <math.h>
Any help greatly appreciated
Thank you
Johan Smit
Reply
#2
Build options > Linker settings > libraries > Add > just put "libm.a" > OK
Reply
#3
If you need several functions, and there is no need for the rest of the luggage.
https://bitbucket.org/AVI-crak/rtos-cort...t/math_s.h
Reply
#4
(06-08-2018, 10:05 AM)tpek Wrote: Build options > Linker settings > libraries > Add > just put "libm.a" > OK
Thank you, works well.
Best Regards
Johan Smit

Thank you, carefully saved.
One does not always need everything
Best Regards
Johan Smit
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)