Hello,
Has anyone already seen those errors, when building a project:
*** [obj/alt_sys_init.o] Error 1
*** [system_project] Error 2
error: 'ALT_IRQ_NOT_CONNECTED' undeclared (first use in this function)[system_description/alt_sys_init.c]
error: (Each undeclared identifier is reported only once[system_description/alt_sys_init.c]
It appears when I compile this code:
#include <stddef.h># include “sys/alt_dma.h”# include <stdio.h># include <stdlib.h># include “alt_types.h”
/* flag used to indicate the transaction is complete */
volatile int dma_complete = 0;
/* function that is called when the transaction completes */
void dma_done (void* handle, void* data)
{
dma_complete = 1;
}
int main (void)
{
alt_u8 buffer;
alt_dma_rxchan rx;
/* Obtain a handle for the device */
if ((rx = alt_dma_rxchan_open (“/dev/dma”)) == NULL)
{
printf (“Error: failed to open device\n”);
exit (1);
}
else
{
/* Post the receive request */
if (alt_dma_rxchan_prepare (rx, buffer, 326688, dma_done, NULL)< 0)
{
printf (“Error: failed to post receive request\n”);
exit (1);
}
alt_dma_rxchan_ioctl(rx, ALT_DMA_SET_MODE_8, NULL);
alt_dma_rxchan_ioctl(rx, ALT_DMA_RX_STREAM_ON, (void*) INTERFACE_BASE);
dma_complete = 0;
/* Wait for the transaction to complete */
while (!dma_complete);
printf (“Transaction complete\n”);
alt_dma_rxchan_close (rx);
}
return 0;
}