打开NIOS II IDE,新建一个hello world工程,编译出错:
**** Build of configuration Debug for project VGA ****
make -s all includes
Creating generated_app.mk...
Compiling alt_sys_init.c...
system_description/alt_sys_init.c:79: error: `VGA_0_NAME' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.dev.name')
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.dev')
system_description/alt_sys_init.c:79: error: `VGA_0_BASE' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.pixel_base')
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.char_base')
system_description/alt_sys_init.c:79: error: `VGA_0_SPAN' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.pixel_slave_span')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_PIX_X_RESOLUTION' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_PIX_X_RESOLUTION')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_PIX_Y_RESOLUTION' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_PIX_Y_RESOLUTION')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_CHAR_X_RESOLUTION' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_CHAR_X_RESOLUTION')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_CHAR_Y_RESOLUTION' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_CHAR_Y_RESOLUTION')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_PIX_X_COORD_OFST' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_PIX_X_COORD_OFST')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_PIX_X_COORD_MSK' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_PIX_X_COORD_MSK')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_PIX_Y_COORD_OFST' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_PIX_Y_COORD_OFST')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_PIX_Y_COORD_MSK' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_PIX_Y_COORD_MSK')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_CHAR_X_COORD_OFST' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_CHAR_X_COORD_OFST')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_CHAR_X_COORD_MSK' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_CHAR_X_COORD_MSK')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_CHAR_Y_COORD_OFST' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_CHAR_Y_COORD_OFST')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_CHAR_Y_COORD_MSK' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_CHAR_Y_COORD_MSK')
system_description/alt_sys_init.c:79: error: `VGA_0_ALT_UP_VGA_PIX_COLOR_MASK' undeclared here (not in a function)
system_description/alt_sys_init.c:79: error: initializer element is not constant
system_description/alt_sys_init.c:79: error: (near initialization for `vga_0.ALT_UP_VGA_PIX_COLOR_MSK')
make[1]: *** [obj/alt_sys_init.o] Error 1
make: *** [system_project] Error 2
Build completed in 20.937 seconds