Page 1 of 1

possible bug using 2 ADC - solved

Posted: Mon Apr 06, 2009 10:31 am
by MHuy
Hello Lubin,

I try to compile this model but it doesn't work.

It writes the following message in the command window.

Code: Select all

dsPIC_DMA_Buffers.c:3: error: syntax error before 'ADCBuffChannelDMA' 
dsPIC_DMA_Buffers.c:3: warning: data definition has no type or storage class 
gmake: *** [dsPIC_DMA_Buffers.o] Error 255 
In the file "dsPIC_DMA_Buffers.c", there is no include of "test_ADC_private.h" (NameOfTheModel_private.h) where the variable ADCBuffChannelDMA as the type extern.

Code: Select all

//dsPIC_DMA_Buffers.c
#include "p33fxxxx.h"

volatile uint16_T ADCBuffChannelDMA[(2)] __attribute__((space(dma),aligned(256)));

Code: Select all

//test_ADC_private.h
extern volatile uint16_T ADCBuffChannelDMA[(2)] __attribute__((space(dma),aligned(256)));
Does the compilation error come from that problem? or do you have an other idea?

Thanks for your help!

Michael

PS : I use the dsPIC33FJ128GP802 chip.

Re: possible bug using 2 ADC

Posted: Tue Apr 07, 2009 9:32 am
by LubinKerhuel
Which blockset version are you working with ? (0.99c ?)

Lubin

Re: possible bug using 2 ADC

Posted: Tue Apr 07, 2009 10:32 am
by MHuy
I use the 0.99b, is it working with the 0.99c?

Re: possible bug using 2 ADC

Posted: Tue Apr 07, 2009 11:54 pm
by LubinKerhuel
I corrected a bug similar to this one just before publishing the 0.99c version.
I thought that this bug was not present yet in the 0.99b, but it may be the same.

Anyway, could you test your model using the 0.99c version ?
(Note that the 0.99c version on the website is depicted as 0.99b+ at the matlab command "ver". That is the last bug I found ! not really important...)

Let me know if you still have this bug...

Lubin

Re: possible bug using 2 ADC

Posted: Thu Apr 09, 2009 9:56 am
by MHuy
There is no more bug with the v0.99c!

Thanks for your help Lubin

Michael