Hallo,
ich hab Probleme bei der Konfigurierung des DMA in Verbindung meines
dsPIC33FJ. Wenn ich mein Code kompilieren will kommt immer dieser
Fehler.
config.c:178: warning: ignoring space attribute applied to automatic
BufferB
config.c:180: warning: ignoring space attribute applied to automatic
BufferA
config.c:183: error: Argument to __builtin_dmaoffset() is not the
address
of an object in a dma section;
the object must not be qualified with any form of index
config.c:184: error: Argument to __builtin_dmaoffset() is not the
address
of an object in a dma section;
the object must not be qualified with any form of index
die passende Code Zeilen
struct
{
unsigned int Adc1Ch0;
unsigned int Adc1Ch1;
} BufferB __attribute__((space(dma)));
unsigned int BufferA[2] __attribute__((space(dma)));
DMA0STA = __builtin_dmaoffset(BufferA);
DMA0STB = __builtin_dmaoffset(BufferB);
weiß nicht wo der Fehler ist. Hoff es kann mir jemand helfen
danke ;)
Ich habe den DMA z.B. im CAN Modul so gelöst, wie es auch Microchip in seiner Appnote vormacht. Vielleicht hilft es dir irgendwie weiter...
1 | ecan1Drv.h |
2 | ...
|
3 | /* CAN Message Buffer Configuration */
|
4 | #define NUM_OF_CAN_DMA_BUFFERS 8
|
5 | |
6 | typedef int ECANMSGBUF [NUM_OF_CAN_DMA_BUFFERS][8]; |
7 | extern ECANMSGBUF ecanMsgBuffer __attribute__((space(dma))); |
8 | ...
|
9 | |
10 | ecan1Drv.c |
11 | ...
|
12 | // Define ECAN DMA Message Buffers
|
13 | ECANMSGBUF ecanMsgBuffer __attribute__((space(dma))); |
14 | |
15 | ...
|
16 | DMA0STA = __builtin_dmaoffset(ecanMsgBuffer); |
17 | ...
|
Gruß, Steffen
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.