How to import DSP library

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to import DSP library

634 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0074331 on Thu Oct 11 04:44:07 MST 2012
Hello,

I am a newbie to LPC and the baseboard. I am doing a project that needs DSP, and I get this library (attached in DSP.zip) online. I then copy the whole library with a bunch of .h and .s files into the project folder, and do the following steps:

properties-->c/c++ build--> MCU settings-->Include--> add path to the dsp folder inside my project.

However, when compiling I got the error :"cs_dsplib.h" no such file or directory.

Would you please showing me how to resolve this?
0 Kudos
7 Replies

533 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0074331 on Mon Oct 15 20:59:52 MST 2012
daniel.widyanto, thank you greatly! I have just figured out that when I added the library name, I didn't omit ".a" at the end, so it kept reporting the error can not find the exact library! Thank you again.
0 Kudos

533 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.widyanto on Sun Oct 14 21:24:26 MST 2012
Hi,

I've no idea what library that you're talking about, but like what Zero said:

[LIST=1]
[1] Copy the library's header file (*.h) to your project directory (eg. ${workspace_loc:/${ProjName}/dsp/inc} )

[2] Set the C/C++ compiler to look at that directory for any header files. Right click->Properties->Settings->MCU C Compiler->Includes. Make sure you select the directory that contains the header files (eg. ${workspace_loc:/${ProjName}/dsp/inc} instead of the upper dir that contains the whole library).

[3]Copy the library file (*.lib) to your project directory (eg. {${workspace_loc:/${ProjName}/dsp/lib} ).

[4] Tell the linker the path to find the library file: Right click->Properties->Settings->MCU C Linker->Libraries->'Library Search Path (-L)'. Set to the directory where the lib file is, not the top dir  {eg. ${workspace_loc:/${ProjName}/dsp/lib} )

[5] Tell the linker the name of the library: Right click->Properties->Settings->MCU C Linker->Libraries->libraries (-l). If your library filename is 'libdsp.a', insert 'dsp' as the name. If your library filename is 'libcr_dsplipFFTbin_cm3.a', insert 'cr_dsplipFFTbin_cm3' as the name. If your library filename doesn't start with 'lib*.a', then rename it as 'lib<something>.a'. Otherwise, the GCC won't recognize the library.
[/LIST]
0 Kudos

533 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0074331 on Thu Oct 11 08:22:35 MST 2012
I am trying through MCU linker-->library--add the path, but keep receiving the error
cannot find libcr_dsplibfft_cm3.a(the file in the library I mentioned above).

Please help me :(
0 Kudos

533 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0074331 on Thu Oct 11 06:28:57 MST 2012
Zero,

Thank you for noticing me that's it's not code red library.

I have downloaded the code red one, and did as you told me (import/compile/include cr_dsplib_cm3). Everything worked perfectly , except the fact that I am using a function for FFT (vF_dspl_fftR4b16N1024), which in turn needs to read from a static library cr_dsplipFFTbin_cm3 (which contains a .a file).

Please show me how to do that. Thank you so much :)

Best Regards,
0 Kudos

533 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Oct 11 06:11:33 MST 2012
I'm confused  :confused:

What are we talking about here :eek:

Disclaimer.rtf:

Quote:

Simplecortex and by using information from this website you agree with this disclaimer and that you have seen and read this disclaimer. IF you have any questions about this disclaimer email us at [EMAIL=webmaster@brc-electronics.nl]webmaster@brc-electronics.nl[/EMAIL].

Info.txt:

Quote:

5 examples are included, 4 of them are the NXP examples ported to CoIDE and 1 example is made by us.

#1 This is not Code Red DSP as described here: http://www.support.code-red-tech.com/CodeRedWiki/cmsis_dsp

#2 This library seems to be compiled already, it's including a header file (*.h) and a library (*.a) which should work, if included.

#3 If you want to compile this library yourself just create a new LPCXpresso library project and compile it there :)
0 Kudos

533 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a0074331 on Thu Oct 11 05:42:46 MST 2012
Zero,

I have tried, but when I imported the  attached above library (just the library, not the examples project), I can't find anything  to compile, unlike the case of CMSIS.

Any ideas?
0 Kudos

533 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Oct 11 04:58:01 MST 2012
How libraries are included is described in #4 of http://knowledgebase.nxp.com/showthread.php?t=3376 :)
0 Kudos