NIOS II常见编译问题解…

来源:互联网 发布:酷派手机移动数据开关 编辑:程序博客网 时间:2024/06/06 23:52
原文地址:II常见编译问题解答win7下的兼容性问题">NIOS II常见编译问题解答win7下的兼容性问题作者:SUN_403

cygdrive/f/altera/10.0/nios2eds/components/altera_hal/build/system_rules.mk:120:/components/altera_hal/build/gnu_rules.mk: No such file ordirectory
/cygdrive/f/altera/10.0/nios2eds/components/altera_hal/build/system_rules.mk:124:/components/altera_hal/build/gtf_rules.mk: No such file ordirectory
make[1]: *** No rule to make target`/components/altera_hal/build/gtf_rules.mk'. Stop.
make: *** [system_project] Error 2
Build completed in 11.068 seconds

解决办法:因为在win7下的权限问题.具体解决方法参考下面的方法:
Under your Quartus II folder, go tobin->cygwin->bin folder, select thefollowing files in the list below and then right-click and chooseProperties. Under the Compatibility tab, check “Run this program incompatibility mode for:” and choose “Windows XP (Service Pack 2)”.Check “Run this program as an administrator”, as well.
Here is the list of files that you can select to change theircompatibility mode under the QuartusII->bin->cygwin->binfolder:
1. Make.exe
2. Sh.exe
3. Echo.exe
4. Cygstart.exe
5. MakeInfo.exe
6. Perl.exe
7.Collect2.exe(undernios2edsbinnios2-gnutoolsH-i686-pc-cygwinlibexecgccnios2-elf3.4.6)
8. Nios2-elf-g++.exe (under nios2edsbinnios2-gnutoolsH-i686-pc-cygwinbin)
在英文网上查到的,这几个不同的exe文件在不同的bin文件夹之间,依次右击改掉属性,把允许管理员使用权限前面打上勾即可.

 

 

5.如果runNiosii时经常出现到2%后N久也不动,也不报错,甚至进度条也在滚,当然没有前进了。这时随便你等多久,他就呆在那里,很烦。后面发现是杀毒软件的作用,我只有用360安全卫士,而是关掉了它15分钟,在此期间,run就ok了,估计其他的杀毒软件更猛,所以大家在run的时候最好关上杀毒软件。

6.如果出现错误提示:There are no Nios IICPUs with debug modules available which match the values specified.Please check that your PLD is correctly configured, downloading anew SOF file if necessary.

则在niosIDE下,tools->Flash Programmer选项中的下图打勾即可(条形框要下拉)。

7.在编译niosii时如果出现了报错make: ***[system_description/../obj/system.h-t] Error1。网上的一些解法:1.如果系统跑了uc/os系统,则必须加入timer,如果没有跑系统可以不加,但是我没有跑系统,并且我加了个timer试了下也不行。2.还有一种说法是右击工程名在属性栏中把ram选项改为on-chipmomery,但是我不知道他说的哪个,反正没有找到这个选项的地方。3.有人说是软件或者操作系统问题,建议重装软件或系统,可是今天还能用,估计不是,重启了下软件,未果。4.后面的google中搜了下,网上人说在构建niosiicpu时,把设置页面的MPU(内存保护单元)去掉即可。终于解决掉了这个可恶的问题。

8. 关于Nios II中Verifyfailed between address 0xxxx and 0xxxx错误的解决,错误一般的提示为:Verifying000xxxxx ( 0%)% C; Q0 H2 R J7 W* Z9 O R* r
Verify failed between address 0xxxxxxand 0xxxxxx( O" ^0 u; e9 E: E7 X
Leaving target processorpaused

网上的人总结的解决方法如下:1.首先要根据address后面的两个地址判断出错的到底是什么器件。一般情况出现错误的大多是存储器。
l1 _5 y: {+ r& Q2 e!}- G 判断的方法是根据sopc中的地址,或者是system.h中的地址,查找相应出错的器件。9 v$ ~- X5 h( r# T4f" I$ D3 T
c0 `, z; n6 V2. 检查硬件焊接是否正常。- O( Z" V/W4 h! L
很多时候有些问题是硬件焊接造成的,这个主要针对的是自己焊接的板子,一旦地址数据总线有任何焊接问题,都会出现verifyfailed错误。 N. B/ E# m1 b& ?5 N4 B5 W* B
) q- d$ E0 t: r& M8A! o& K3. 检查sopc中的componet是否正常。
( }& i, H) L. E如果是自己加入的接口逻辑,这个部分要确认其正常与否。' a# |, E9 U1 [& P3z
$ F- x7 t' u) L! Z( w4.检查Quartus中的设计:
- H$ O& j; |5 e$ Q+ ?_* M 检查引脚锁定是否正确,必须一一对应,不能有一个错误;
! k1 `% e6 [* b/ [' @6 P$ s(q& {% R地址对齐问题:针对8、16、32位的外部存储器,对应地址最低位的应该是0、1、2。也就是说如果用16位的外部存储器,那么它的最低位是ADD[1],而ADD[0]是不用的,其他同理。
2 i1 `& b2 w. k8 v8i, E 数据总线必须是双向IO口,这点很容易忽略。
* c$ G% $ G% {* }) W- i如果是SDRAM,需要计算并设定PLL的相移。
9 q+ O( F! H+ 5. NiosIDE中检查项目设计是否正确。

6. 就是.bdf文件中的symbol在运用“GeneratPins for SymbolPorts”自动生成引脚的时候,生成的引脚表面上是与symbol连接在一起的,可实际上没有,只要手动把Ports与Pins连一下,问题便可以解决了

而我碰到的就是Sdram的问题,因为我的sdram忘了接clk时钟脚了,那时候用的niosii核,核外是没有与sdram的clk连接的引脚的,因为它的时钟不是cpu产生,是由外部或者pll产生。

9.在用quartusII编译时,包含了sopc系统,出现如下错误:

Error: Can't name logic functionTftTest of instance "TftTest" -- function has same name as currentdesign file,未解决!

10.在 nios 里下载软件程序时,会出现 assertion"m_state == STATE_DEBUG" failed: file
"nios2oci.cpp", line157 Usingcable
"USB-Blaster [USB-0]", device 1, instance 0x00 Pausing targetprocessor: not
responding. Resetting and trying again:D:altera81nios2edsbinnios2-download:line 594: 6300Hangup
nios2-gdb-server --instance 0 --tcpport none --wri te-pid
./Debug/nios2-download.pid ./Debug/GigaCard.elf.srec
这个问题在我调试的过程中偶尔会出现,而且是没有规律的,也正是这个问 题,总是阻碍着我们前进的脚步,后来我们发现一个程序本来是可以下到onchi
p-memory 中的,后来同样的程序无论如何都下不进去了,于是我们基本可以确定问题出在了硬件。对于有控制器的系统,晶振肯定是非常重要的,于是我们测
晶振的输出是不是正常的,结果是有时正常有时不正常,这说明晶振虚焊了,经 过我们小宝同学精心补焊,上面那个问题就再也没有出现过了。 在nios
里下载软件程序时,出现 Using cable "USB-Blaster [USB-0]", device 1, instance0x00 Pausing
target processor: not responding. Resetting and trying again:FAILED Leaving
target processor paused 这个错误在可编程部分的原因大多是引脚分配错误。网上有人说要在 quart us将没有用到的 FPGA
的引脚设为“input tri-state”,但是我并没有发现这是必 须的,可能只是一些特定地器件需要这样设置。


一、工程设置和环境导致的问题

Severityand 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 ordirectory  hello_world_syslibline 120 1282146083549 16

解答:

(1)      这个一般是环境的问题,环境没有装对,或者你的工程文件建的有问题,建议重新建工程。

(2)      如果重建工程仍不行,可能是环境的问题,说明NIOS软件与别的软件发生冲突,实验中发现,这类错误在重复编译多次后会消失,所以可以耐心地多编译几次。

二、选择工作空间或文件时文件和文件夹中不能有空格字符,不能有汉字。

此类问题额常见报错:

(1)      make: *** No ruleto make target `C:/Documents', needed by ...

(2)      Illegal projectlocation. Directory is not writable: C:Documents andSettingssomeusernameMy 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. Continuelaunch?

解答:当出现此类情况,总是点击“No”,因为程序编译便报错,无法生成链接文件,所以没法下载到芯片中运行,点击“Yes”也无法运行。只能检查代码的错误并改正,重新编译运行。

四、硬件连接问题,需重新检查实验板的下载线是否连接上。

1nios2-terminal: can't open uart: Permissiondenied

2"Terminal process failed"

五、可能选择了串口做为调试设备,应该为jtag_uart

[转载]NIOS <wbr>II常见编译问题解答win7下的兼容性问题

报错

Unable tolaunch C:/altera/72/nios2eds/bin/nios2-terminal.sh

exit(1):Nios II Terminal Window ...

解答:

Thismessage should only appear under the following conditions: you areusing uart_0 for input/output instead of the JTAG UART (labnios2int), and you use a USB-to serial converter since your PC doesnot have a serial port. If these conditions are true, you cansafely ignore the message and use Hyperterminal forinput/output.

If you areusing uart_0, but not a USB-to-serial converter, there may be aconflict between Hyperterminal and the Nios II IDE. On a PC with aserial port, Nios II IDE will connect port COM1 to the consolewindow if uart_0 is specified as the stdin/stdout/stderr device inthe System Library Properties window. In this case, usingHyperterminal will cause an unnecessary conflict. CloseHyperterminal and the Nios II IDE, and then restart the Nios II IDEalone.

六、代码的末行非空行

1Warning: end of file in comment; newlineinserted

2Warning: end of file not at end of a line; newlineinserted

3warning: 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 theend of your file.

Step 3:press the Home key to move the cursor to the very beginning of thelast line.

Step 4:press and hold the Delete key, to delete the whitespace charactersthat are usually auto-inserted by the Nios II IDE editor wheneveryou create a blank line.

即每个文件的最后一行一定要是空行,不包含空格和任何字符。虽然这种警告不会影响编译和运行,但我们最好遵循编程规范,努力消除所有的警告。

七、其他

1make: *** [system_project ] error 2

a.首先试着看代码是否有问题,如果没有问题,可能是工程设置的问题。

b.此类错误有时多编译几遍就可消除,可以试试多编译几遍。

c.编译是选择Project下的Clean试试。

[转载]NIOS <wbr>II常见编译问题解答win7下的兼容性问题

d.重建一个NIOS工程,把原工程中的源程序复制到该新工程下,build新工程发现没有了上述错误。重装NIOS系统后并更改了安装路径后,NIOS的一些头文件会发生变化,所以会有上述错误的发生,解决方法就是新建一个工程,复制原工程的源程序到新工程下就可以了。

2make[1]: *** [obj/altera_avalon_sysid.o] Error 1make: *** [system_project] Error 2

Quartus不是正版的话,需要在SOPC Builder中删掉对应CPUsysid控件。

SystemID就是一种标示符,类似校验和的这么个东西,在你下载程序之前或者重启之后,都会对它进行检验,以防止QuartusNIOS程序版本不一致的错误发生。

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 ordirectory

0 0