urnuj
Junior Member level 3
- Joined
- Jul 16, 2015
- Messages
- 27
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 3
- Activity points
- 217
Hi all
I am doing up a project that requires PID control and I am trying to use the dsp to achieve the PID control.
i have included the files #include <dsp.h> #include <libq.h> in my source, declared the followings:
and i have the initialization:
However, when i build the project,it failed and the make file could not be created.
The following errors occured:
I am using MPLABX IDE with xc16 compiler. Is dsp PID supported with this or do I have to port over to C30 complier?
Is there a way to get around this problem without having to switch complier?
Thanks a lot for any help from you guys.
Regards
I am doing up a project that requires PID control and I am trying to use the dsp to achieve the PID control.
i have included the files #include <dsp.h> #include <libq.h> in my source, declared the followings:
Code:
tPID fooPID;
fractional abcCoefficient[3] __attribute__ ((section ("xmemory,bss")));
fractional controlHistory[3] __attribute__ ((section ("ymemory,bss")));
fractional kCoeffs[] = {0,0,0};
and i have the initialization:
Code:
fooPID.abcCoefficients = &abcCoefficient[0];
fooPID.controlHistory = &controlHistory[0];
PIDInit(&fooPID);
kCoeffs[0] = Q15(0.7);
kCoeffs[1] = Q15(0.2);
kCoeffs[2] = Q15(0.07);
PIDCoeffCalc(&kCoeffs[0], &fooPID);
However, when i build the project,it failed and the make file could not be created.
The following errors occured:
I have tried to put the libq-dsp-coff.a and the libdsp-coff.a file in the library folder but it still doesn't help.build/default/production/tempControl.o(.text+0x4a4): In function `.LSM164':
: undefined reference to `_PIDInit'
build/default/production/tempControl.o(.text+0x4b6): In function `.LSM168':
: undefined reference to `_PIDCoeffCalc'
make[2]: *** [dist/default/production/thermalControl.X.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
I am using MPLABX IDE with xc16 compiler. Is dsp PID supported with this or do I have to port over to C30 complier?
Is there a way to get around this problem without having to switch complier?
Thanks a lot for any help from you guys.
Regards
Last edited by a moderator: