Hi all,
I was trying to use CMSIS DSP library on the DUE.
this library is the file libarm_cortexM3l_math.a (instead of in .cpp source code, like the
run-of-the-mill arduino (user)libraries)
the headers for this library are available by including
#define ARM_MATH_CM3
#include <arm_math.h>
in your sketch.
this gives the error (in an example sketch, seen here : DUE's more advanced FFT capabilities - #8 by system - Arduino Due - Arduino Forum)
dsptest_due.cpp.o: In function `loop':
/home/raalst/arduino-1.5.1/dsptest_due.ino:51: warning: undefined reference to `arm_cfft_radix4_init_q31'
/home/raalst/arduino-1.5.1/dsptest_due.ino:54: warning: undefined reference to `arm_cfft_radix4_q31'
/home/raalst/arduino-1.5.1/dsptest_due.ino:59: warning: undefined reference to `arm_cmplx_mag_q31'
/home/raalst/arduino-1.5.1/dsptest_due.ino:62: warning: undefined reference to `arm_max_q31'
So i conclude I must now tweak the IDE to also use library libarm_cortexM3l_math.a when linking.
I found this file in the arduino 1.5.1 IDE distribution
Can somebody tell me how to achieve that ? I'm not much at home in gcc.
I did check with nm --print-armap that the function names
of the DSP lib are indeed in this library, so I think I have the right one.
I put the .a file in a lot of directories where .a files were already present (like .....arduino-1.5.1/hardware/arduino/sam/variants, where the library libsam_sam3x8e_gcc_rel.a lives).
I also added -larm_cortexM3l_math in boards.txt :
arduino_due_x_dbg.build.extra_flags=-D__SAM3X8E__ -mthumb -DUSB_PID={build.pid} -DUSB_VID={build.vid} -DUSBCON -larm_cortexM3l_math
but no luck yet....
I would be very grateful for a bit of explanation of what goes where and how to add this DSPlib library when linking the sketch.
Or the confirmation that this "should just work" and I have hit a little bugette 8)