possible bug using 2 ADC - solved

Post Reply
MHuy
Posts: 6
Joined: Sat Oct 04, 2008 12:28 am

possible bug using 2 ADC - solved

Post by MHuy » Mon Apr 06, 2009 10:31 am

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.
Attachments
test_ADC.mdl
(29.13 KiB) Downloaded 525 times
Last edited by MHuy on Thu Apr 09, 2009 9:56 am, edited 1 time in total.

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: possible bug using 2 ADC

Post by LubinKerhuel » Tue Apr 07, 2009 9:32 am

Which blockset version are you working with ? (0.99c ?)

Lubin

MHuy
Posts: 6
Joined: Sat Oct 04, 2008 12:28 am

Re: possible bug using 2 ADC

Post by MHuy » Tue Apr 07, 2009 10:32 am

I use the 0.99b, is it working with the 0.99c?

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: possible bug using 2 ADC

Post by LubinKerhuel » Tue Apr 07, 2009 11:54 pm

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

MHuy
Posts: 6
Joined: Sat Oct 04, 2008 12:28 am

Re: possible bug using 2 ADC

Post by MHuy » Thu Apr 09, 2009 9:56 am

There is no more bug with the v0.99c!

Thanks for your help Lubin

Michael

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests