在Nios ii eds 9.0那里build 一个小的 project,弄了几天,老是出现这个错误:the trampolines not yet implemented! 不知道有哪位高人知道错在哪里了!我写的程序如下:错误标在main函数的大括号上:
#include <stdio.h>
#include "system.h"
#include "altera_avalon_uart_regs.h"
#include "altera_avalon_dma_regs.h"
#include "sys/alt_dma.h"
#include "alt_types.h"
int main()
{
static alt_u8 tx_done;
char txdata[]="I'm coming!";
alt_dma_txchan tx;
void done(void* handle,void*data)
{
tx_done++;
}
IOWR_ALTERA_AVALON_UART_CONTROL(UART_BASE,0X10000);
IOWR_ALTERA_AVALON_UART_EOP(UART_BASE,'\0');
tx = alt_dma_txchan_open ("/dev/dma_0");
if (tx == NULL)
{
printf("failure in dma_open!");
}
else
{
if(alt_dma_txchan_ioctl(tx,ALT_DMA_SET_MODE_8,NULL))
{
if(alt_dma_txchan_ioctl(tx,ALT_DMA_RX_ONLY_ON ,(void*)(UART_BASE+1)))
{
if(alt_dma_txchan_send(tx,txdata,20,done,NULL))
printf("sucessful!");
else
printf("failure!");
}
}
while(!tx_done);
}
return 0;
}(错误标在这里,就这个括号)!
求救啊!