I am trying to use the DSP library for my XCORE-200 MC Audio. I am using the DSP library which I obtained from here: https://github.com/xmos/lib_dsp/tree/master
My method of importing the library to my workspace is as follows: download the Zip from GitHub, extract the zip to the workspace location, and use xTimeComposer to import an existing project into the workspace.
The Zip I downloaded comes with many examples that use lib_dsp. I am able to successfully run several of these examples (i.e. app_adaptive). However, when I #include <dsp.h> in my project and build it, I receive errors:
Code: Select all
xmake CONFIG=Default all
Checking build modules
WARNING: Required version of lib_i2c is >=4.0.0 and actual version has greater major version: 5.0.0. There could be API incompatibilities.
WARNING: Required version of lib_i2s is >=2.2.0 and actual version has greater major version: 3.0.0. There could be API incompatibilities.
WARNING: Required version of lib_logging is >=2.1.0 and actual version has greater major version: 3.1.0. There could be API incompatibilities.
Using build modules: lib_dsp(6.2.0) lib_gpio(1.1.0) lib_i2c(5.0.0) lib_i2s(3.0.0) lib_logging(3.1.0) lib_xassert(3.0.0)
Analyzing dsp_adaptive.c
"C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.4.1\build\xcommon\module_xcommon/build/mkdir.bat" .build _l_dsp src > nul 2>&1
cd .build && xcc -pre-compilation-analysis -O2 -report -g -DCONFIG=Default @_iflag.rsp "C:/Users/user/Documents/Research/Active Noise Canceling/xTime Workspace/lib_dsp-6.2.0/lib_dsp-6.2.0/lib_dsp/src/dsp_adaptive.c" -x none ".././src/XR-AUDIO-216-MC.xn" "..\.\config.xscope" -o "../.build/_l_dsp/src/dsp_adaptive.c.pca.xml.decouple" > nul
C:/Users/user/Documents/Research/Active Noise Canceling/xTime Workspace/lib_dsp-6.2.0/lib_dsp-6.2.0/lib_dsp/src/dsp_adaptive.c:5:10: fatal error: 'dsp_qformat.h' file not found
#include "dsp_qformat.h"
^
1 error generated.
xmake[1]: *** [.build/_l_dsp/src/dsp_adaptive.c.pca.xml.decouple] Error 1
xmake: *** [analyze] Error 2
13:34:31 Build Finished (took 5s.983ms)
What I have tried:
As a temporary fix to this problem, I can modify dsp_adaptive.c and change the line from "#include dsp_qformat.h" to "#include "../api/dsp_qformat.h". Then the error will go away, but the next header file (dsp_math.h) in dsp_adaptive will give a similar issue. So I can prefix the ../app/ path to every header include statement, but then a different file than dsp_adaptive gives me problems. So I do not think this is an appropriate fix.
I have also examined my projects properties -> C/C++ General -> Paths and Symbols -> Include directories and verified that /lib_dsp and /lib_dsp/src and /lib_dsp/api are all present.
How can I successfully build my project with this library and use the header files? Thank you.