Hi to all, I\'d like to use the DSP library\'s functions can someone give me a hint? Do I have to insert in the conf.oil the linking to the external library provided by Microchip (the libdsp-coff.a)?
Cheers, MARCO
External library linkage
Moderator: paolo.gai
Re:External library linkage
Yes... exactly that. In particular, You can use the various OIL attributes like CFLAGS, LDFLAGS, and so on to pass specific compiler options.
Ciao,
PJ
Ciao,
PJ
Re:External library linkage
I think probably I can\'t set the .oil file in the right way because I still a missing library error on compile time. I\'m trying to use the math and the dsp library. My .oil file contains the following attributes:
and the source file contains this preprocessor directives
Do I have to use the path of the math.h and of the dsp.h header file? doing in this way I got some errors with others unfound headers used by these libraries (such as yvals.h). I already read the oil specification but I didn\'t find anything more to use. cheers, MARCO
Code: Select all
...
OS myOs {
EE_OPT = \"DEBUG\";
LDFLAGS = \"-LC:/Programmi/Microchip/MPLAB_C30/lib\";
LIBS = \"-llibc-elf.a\";
LIBS = \"-llibdsp-elf.a\";
CPU_DATA = PIC30 {
....
Code: Select all
...
#include \"stdlib.h\"
#include \"math.h\"
...
Re:External library linkage
Hi,
The CFLAGS, LDFLAGS, ... values are put directly into the PIC30 GCC command line.
If you have a working example under MPLAB IDE, then when you compile from MPLAB IDE you can see the command line executed. From these lines, copy the commands you need, and put them back to the OIL file.
Then, in the OIL fila, just add
EE_OPT = \" VERBOSE \";
to get the real commands executed when compiling, and check if they are equal to the ones you had into the MPLAB.
(When done, post the result on the forum, so that we can create a wiki page for the next one who asks it )
PJ
The CFLAGS, LDFLAGS, ... values are put directly into the PIC30 GCC command line.
If you have a working example under MPLAB IDE, then when you compile from MPLAB IDE you can see the command line executed. From these lines, copy the commands you need, and put them back to the OIL file.
Then, in the OIL fila, just add
EE_OPT = \" VERBOSE \";
to get the real commands executed when compiling, and check if they are equal to the ones you had into the MPLAB.
(When done, post the result on the forum, so that we can create a wiki page for the next one who asks it )
PJ
Re:External library linkage
Be careful! If you selected the Microchip compiler inside Eclipse you need to use coff complied libraries.
Nino
Nino