Altera_Forum
Honored Contributor
20 years agoheadfile problems of Nios2,tks!
dearall:
i created a Nios2 project,add a c file and a head file to the project: //altera_avalon_usb.h// # ifndef __ALTERA_AVALON_USB_REGS_H__# define __ALTERA_AVALON_USB_REGS_H__ # include <io.h> # define IORD_ALTERA_AVALON_USB_DATA(base) IORD(base, 0) # define IOWR_ALTERA_AVALON_USB_ADDR(base, data) IOWR(base, 0, data)# endif /////////////////////////////////////////////////////////////////////////////////////////////////////////// //usbtest.c// # include <stdio.h># include "altera_avalon_pio_regs.h"# include "altera_avalon_usb.h" ------------------------1# include "system.h" # include "excalibur.h" --------------------------------------2 main(void) { unsigned char i=0x46,j; IOWR_ALTERA_AVALON_USB_ADDR(USB_BASE,i); j=IORD_ALTERA_AVALON_USB_DATA(USB_BASE); printf("the result is:"); printf("%c",j); return(0); } when i compile the project , there are 2 errors :1 . 2 Kind Status Priority Description Resource In Folder Location Error *** [obj/usbtest.o] Error 1 nios2_usb3 Kind Status Priority Description Resource In Folder Location Error excalibur.h: No such file or directory usbtest.c nios2_usb3 line 5 i use altera cyclone board, and want to add usb(sl811hs) as user logic. it's very diffcult. Now i plan to add usb as PIO . Can I do that ??