一、工程设置和环境导致的问题
Severity and Description Path Resource Location Creation Time Id D:/altera/90/nios2eds/components/altera_hal/build/system_rules.mk
/components/altera_hal/build/gnu_rules.mk: No such file or directory hello_world_syslib line 120 1282146083549 16
解答:
(1) 这个一般是环境的问题,环境没有装对,或者你的工程文件建的有问题,建议重新建工程。
(2) 如果重建工程仍不行,可能是环境的问题,说明NIOS软件与别的软件发生冲突,实
验中发现,这类错误在重复编译多次后会消失,所以可以耐心地多编译几次。
二、选择工作空间或文件时文件和文件夹中不能有空格字符,不能有汉字。
此类问题额常见报错:
(1) make: *** No rule to make target `C:/Documents', needed by ...
(2) Illegal project location. Directory is not writable: C:\\Documents and Settings\\someusername\\My Documents
(3) /cygdrive/c/altera/72/nios2eds/components/altera_hal/build/gtf_rules.mk:81: *** multiple target patterns. Stop.
三、运行时出现:Errors exist in a required project. Continue launch? 解答:当出现此类情况,总是点击“No”,因为程序编译便报错,无法生成链接文件,所以没法下载到芯片中运行,点击“Yes”也无法运行。只能检查代码的错误并改正,重新编译运行。
四、硬件连接问题,需重新检查实验板的下载线是否连接上。 (1)nios2-terminal: can't open uart: Permission denied (2)\
五、可能选择了串口做为调试设备,应该为jtag_uart。
报错
Unable to launch C:/altera/72/nios2eds/bin/nios2-terminal.sh
exit(1): Nios II Terminal Window ... 解答:
This message should only appear under the following conditions: you are using uart_0 for
input/output instead of the JTAG UART (lab nios2int), and you use a USB-to serial converter since your PC does not have a serial port. If these conditions are true, you can safely ignore the message and use Hyperterminal for input/output.
If you are using uart_0, but not a USB-to-serial converter, there may be a conflict between Hyperterminal and the Nios II IDE. On a PC with a serial port, Nios II IDE will connect port COM1 to the console window if uart_0 is specified as the stdin/stdout/stderr device in the System Library Properties window. In this case, using Hyperterminal will cause an unnecessary conflict. Close Hyperterminal and the Nios II IDE, and then restart the Nios II IDE alone. 六、代码的末行非空行
(1)Warning: end of file in comment; newline inserted (2)Warning: end of file not at end of a line; newline inserted (3)warning: no newline at end of file
解决:
Step 1: place the cursor at the very end of your program file.
Step 2: press Enter (or the Return key) to create a new blank line at the end of your file. Step 3: press the Home key to move the cursor to the very beginning of the last line.
Step 4: press and hold the Delete key, to delete the whitespace characters that are usually auto-inserted by the Nios II IDE editor whenever you create a blank line. 即每个文件的最后一行一定要是空行,不包含空格和任何字符。虽然这种警告不会影响编译和运行,但我们最好遵循编程规范,努力消除所有的警告。 七、其他
(1)make: *** [system_project ] error 2
a.首先试着看代码是否有问题,如果没有问题,可能是工程设置的问题。 b.此类错误有时多编译几遍就可消除,可以试试多编译几遍。 c.编译是选择Project下的Clean试试。
d.重建一个NIOS工程,把原工程中的源程序复制到该新工程下,build新工程发现没有了上述错误。重装NIOS系统后并更改了安装路径后,NIOS的一些头文件会发生变化,所以会有上述错误的发生,解决方法就是新建一个工程,复制原工程的源程序到新工程下就可以了。 (2)make[1]: *** [obj/altera_avalon_sysid.o] Error 1 make: *** [system_project] Error 2 Quartus不是正版的话,需要在SOPC Builder中删掉对应CPU的sysid控件。
System ID就是一种标示符,类似校验和的这么个东西,在你下载程序之前或者重启之后,都会对它进行检验,以防止Quartus和NIOS程序版本不一致的错误发生。
make: E:/FPGA/NoisII/nios2eds/components/altera_hal/build/common.mk fork: Resource temporarily unavailable
E:/FPGA/NoisII/nios2eds/components/altera_hal/build/system_rules.mk /components/altera_hal/build/gtf_rules.mk: No such file or directory
相关推荐: