潇湘賸雁

niosII常见错误集锦
1. 怎样在TCL脚本分配管脚 source .tcl 有点问题:
# source stratix_pin_assign.tcl
couldn't read file "stratix_pin_assign.tcl": no such file or directory

  答: From the Tools menu select Tcl s cripts, and then from the project folder choose the setup s cript for your particular development board, and click Run.

  2.D:TEST ios_sst60下载时出现错误:
Error: Can't configure device. Expected JTAG ID code 0x020010DD for device 1, but found JTAG ID code 0x020B40DD.

  答:SOPC所选器件和开发板上的不一致。

  3.在NOIS II中Bulid例程hello_world都出现了错误,错误提示为:
gdrive/c/altera/kits/NIOS2/components/altera_nios2/HAL/src/alt_busy_sleep.c:68: error: parse error before '/' token等错误全部由alt_busy_sleep.c引起,都是关于括号不匹配的问题,而alt_busy_sleep.c是IDE中的一个默认程序。这个错误同样出现在D:TESTDE2Projectsoftware ios2 ,培训用的一个简单实验。

  答:找到system.h文件,里面有个关于系统时钟频率的设置项,应该是没有赋值,你手动赋值。比如你用50MHZ的时钟,就设成50000000。如果总是出现上述问题,可能和软件有关系,建议重新安装软件。注意quartus和NIOS安装版本一定要相同,不能混装。

  4.这个错误是什么原因引起,把那个sdk_arm删除后,又提示另一个地方出错。

  答:运行NIOS II IDE,点Project->Clear,重新Builde,应该可以解决问题。

  5.在SOPC中Generate出现如下错误是怎么回事? Error: Generator program for module 'epcs_controller' did NOT run successfully. 只要在SOPC中加入epcs_controller就会出现此错误,无法生成一个元件。

  答:可能和软件有关系,建议重新安装软件(这个问题是我刚学NIOS遇到的最头痛的一个问题,问题的原因是Quartus和Nios安装的版本不一致)。

  6.在Nios II IDE中,怎样打开一个已经存在的工程?每次新建工程比较麻烦。

  答:指定一个Nios II IDE的工作目录,就打开了那个目录下存在的工程。另外,在Nios II中是可以建立多个工程的。

  7.在Quartus II 中编译出现如下错误怎么办?
Error: Can't place pins assigned to pin location Pin_AE24 (IOC_X65_Y2_N2)

  答:按F1可以查看帮助,出现这样的错误的原因是:
CAUSE: You assigned two or more pins to the specified location, but the Fitter cannot place all the pins in that location.删除这个管脚即可。有一种比较简便的方法,就是在工程目录中找到一个后缀为QSF的管脚配置文件,查找Pin_AE24删除那行语句就行了。

  8.如何在NIOS II IDE 下跟踪查看变量的定义或者函数的定义?

  答:按住CTRL键,鼠标移动到变量或者函数名的地方,就可以发现这些地方高亮显示,单击就可以进入到变量或者函数定义的地方。

  9. 在count_binary.c有这样一段程序,它是如何操作的? unsigned int data = segments[hex & 15] | (segments[(hex >> 4) & 15] << 8)

  答:segments[hex & 15]显示个位0~F;(segments[(hex >> 4) & 15] << 8)显示十位数0~F,个位0~F,然后十位加一。

10.这个错误是由什么引起?提示LED_ PIO_BASE没有声明

  答:这是因为名字不一致引起的比如,在生成SOPC系统时,双击PIO(Parallel I/O)(在Avalon Modules -> Other 下),为系统添加输出接口,你没有把该组件改名成LED_PIO,而是保留了原始的名字:PIO_0;但你又通过 IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, led);来向该组件写入数据,就会导致上述错误。解决办法:1.可以修改sopc系统,为该PIO改名为LED_PIO ;2.在hello_led.c的前面给LED_PIO_BASE赋值,如#define LED_PIO_BASE 0x00001800,后面的这个地址要与SOPC中的地址对应。

  11. 如何在NIOSII中驱动外部芯片或设备?

  答:在开发过程中,我们经常会使用外接一些芯片,或外接一些实用电路,比如AD芯片、串并转换芯片等等,那么如何在NIOS II中去使用这些芯片呢? 我们在开发中会有多个选择:
1.如果这个芯片是使用数据和地址总线的,并且补线时没有足够的单独引脚,那么这个芯片必须挂接在tri_stat总线上,这种用法和我们以往单片机或 MCU 类似,在SOPC Builder中直接定义用户逻辑,如果有额外的控制引脚,就需要用PIO来驱动,虽然公用数据地址线节省了引脚,但做控制时序费劲了。
2.如果这个芯片单独使用数据和地址,那么我们会直接做成Avalone总线的Slave设备,在Sopc Builder中自己定义component。需要写HDL模块,自己定控制、状态、数据寄存器和控制位定义,这种方式控制灵活,易于实现复杂的控制时序。
3.在Quartus II 工程中画电路模块(或用HDL写电路模块),这种方式是独立于SOPC定义的模块之外的,做一个纯电路的处理模块,有时候会比较容易实现某些灵活的处理。

  12.在SOPC添加Avalon Trisatate Bridge时,提示有如下错误,该如何解决?  Tri state bridge/tristate master requires a slave of type Avalon tristate.Please add a slave of type Avalon tristate.
Generate按钮为灰色,无法Generate

  答:需要一个专门接三台桥的设备, 把flash添加到sopc中就可以了。

  13. 在做count_binary这个例子时,出现一个错误: error: `BUTTON_PIO_IRQ' undeclared (first use in this function) BUTTON_PIO_IRQ的值如何给他定义?

  答:这个错误可能是在sopc builder中定制的pio端口名称是否与程序中用的不一致,要和程序里的一致,把pio组件的名称就改为button_pio。

  14.在Quartus II中编译时出现如下错误:
Error: Node instance "cpu_bht" instantiates undefined entity "cpu_bht_module"
点击错误的地方弹出一个对话框这个错误是怎么回事?怎样解决?

  答:可能是在SOPC中所选的CPU型号不正确,换一个试试。

  15.怎样自动分配管脚?

  答:在Quartus II自动分配管脚有一个方法,点击Assignments->Import Assginments,导入一个管脚分配文件,后缀为.csv .txt等,前提是在顶层原理图中各个输入输出的名称要和这个文件中的名称一致。

  16.在NIOS II中编译时出现如下错误怎么解决?错误是不是由SOPC中的RAM引起?
region ram is full (count_binary.elf section .text). Region needs to be 24672 bytes larger.
address 0x80c1f8 of count_binary.elf section .rwdata is not within region ram
Unable to reach edge_capture (at 0x00800024) from the global pointer (at 0x0081419c) because the offset (-82296) is out of the allowed range, -32678 to 32767.

  答:可能时RAM的大小不够,也有可能是中断地址(exception address) 的偏余量不够,设置大些就可以了。如果还是出现 这个问题,加一个SDRAM试试。

17.在Quartus II中,为什么编译一些样板工程都会出错?
Error: DDR timing cannot be verified until project has been successfully compiled.
Error: Evaluation of Tcl s cript auto_verify_ddr_timing.tcl unsuccessful
Error: Quartus II Shell was unsuccessful. 2 errors, 1 warning

  答:在做样板工程时要注意一个问题:Due to the library paths that are coded into the Quartus settings for this project, if a user wishes to modify the hardware design they must first strip out any old paths from within the project settings file (qsf)
在qsf文件中找到类似语句
set_global_assignment-nameVHDL_FILE C:/MegaCore/ddr_ddr2_sdram-v3.2.0/lib/auk_ddr_tb_functions.vhd"这里的目录是初始的目录,把它改为正确的目录。

  18.在NIOSII IDE编译时出现如下错误是怎么回事?
system_des cription/alt_sys_init.c:75: error: `ONCHIP_MEMORY_BASE' undeclared here (not in a function)
system_des cription/alt_sys_init.c:75: error: initializer element is not constant
system_des cription/alt_sys_init.c:75: error: (near initialization for `ext_flash.dev.write')
system_des cription/alt_sys_init.c:75: error: initializer element is not constant
system_des cription/alt_sys_init.c:75: error: (near initialization for `ext_flash.dev.read')

  答:ONCHIP_MEMORY_BASE没有赋值,在alt_sys_init.c 程序的开头加上#define ONCHIP_MEMORY_BASE 0x00000000后面的这个地址要与SOPC中的对应。

  19. 在NIOS II IDE编译时出现如下错误是怎么回事?
Pausing target processor: not responding.
Resetting and trying again: FAILED
Leaving target processor paused

  答:以下是一位FAE的回答:
1. 关于USB-Blaster在Nios II IDE下载时会发生偶发性错误,这种现象主要是IDE software与Nios II CPU透过USB-Blaster在做通讯时发生错误,若是确认FPG上配置没有错误,连续发生错误的机率应该是相当的低,您只需要重新下载即可。
2. 若您使用Nios II IDE 6.0,请尽量配合SOPC Builder 6.0重新build您的system,并且使用Quartus II 6.0重新compile您的project,以减少CPU与IDE software不兼容的情形。

  20.在NIOS II IDE中工程的System Library选项中的这几个选项代表什么意思?.text .rodata .rwdata 与reset .exception这几个地址之间的关系是什么?

  答:.text : 代码区 .rodata:只读数据区,一般存放静态全局变量 .rwdata:可读写变量数据区另外还有.bss:存放未被初始化的变量。
■ .text — the actual executable code
■ .rodata — any read only data used in the execution of the code
■ .rwdata — where read/write variables and pointers are stored
■ heap — where dynamically allocated memory is located
■ stack — where function call parameters and other temporary data is stored

21. 怎样在NIOSII中操作PIO,提供一种参考方法。

  答:hello_led.c是这样写IO口的:
IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, led);
首先在altera_avalon_pio_regs.h找到定义
#i nclude
#define IORD_ALTERA_AVALON_PIO_DATA(base) IORD(base, 0)
#define IOWR_ALTERA_AVALON_PIO_DATA(base, data) IOWR(base, 0, data)
因此在NIOSII中可以调用#i nclude库函数IORD/IOWR来操作PIO。
在smallsoftwarehello_led_0_syslibDebugsystem_des cription下的system.h
中,有以下内容:
#define LED_PIO_TYPE "altera_avalon_pio"
#define LED_PIO_BASE 0x00004000
其中LED_PIO_BASE(IO寄存器地址?)为0x00004000同SOPCBuilder中设置一致!
(其实在SopcBuilder中有关NiosII的配置,就是通过system.h来传送给IDE的!)
最后用IOWR(0x00004000, 0, led);替代
IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, led);编译,下载到开发板上,运行成功!

  22.怎样让SDRAM和FLASH,SRAM的地址公用?

  答: sdram可以和sram,flash共用数据总线和地址总线.在sopc builder中添加SDRAM控制器时,在其share pins via tristate选择项上勾上Controller shares dq/dqm/addr IO pins选项,这样sdram可以和sram,flash共用数据总线和地址总线.但是ATERA不推荐这样做,因为这样会降低SDRAM控制器的性能,在FPGA芯片管脚资源比较紧张的时候迫不得已才这样做。

  23.怎样使用DE2板上的数码管,绑定管脚时需要注意什么?请举一个例子说明。

  答: DE2板上的数码管只用了7位,小数点位默认为高电平。例如,在做例程count_binary时,需要用到两个数码管,以实现00到FF的计数,在 SOPC添加一个16位的PIO SEVEN_SEG[15..0],绑定管脚时注意:使SEVEN_SEG[0..6]帮定到数码管HEX0[6..0]位,SEVEN_SEG[8.. 14]绑定到数码管HEX1[6..0]位,SEVEN_SEG[7]和SEVEN_SEG[15]直接接VCC,这样才能让两个数码管正常显示并计数。

  24. 在NIOS II IDE 中调试,编译通过的软件时,出现了下面的提示,是什么原因?
Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00
Processor is already paused
Downloading 00000000 ( 0%)
Downloaded 57KB in 1.2s (47.5KB/s)
Verifying 00000000 ( 0%)
Verify failed
Leaving target processor paused

  答: Verify failed这个问题说明板子的复位电路可能有问题,或装载程序的外部SRAM或SDRAM和CPU 的连接或时序有问题,也有可能是软件偶尔的错误。若是软件偶尔的错误,可以先复位一下CPU,然后再下载程序;或者断电后重新下载.sof和NIOS II 程序

  25.在练习C:alterakits ios2_51examplesverilog niosII_cycloneII_2c35的工程时,里面有很多元件DE2板上都没有对应的管脚,比如网络元件lan91c111,使用的IP核,还有 24位的ext_flash,而DE2板上的FLASH只有22位。是不是SOPC中只能让DE2板上有对应管脚的元件存在,其它的只能删除?

  答:这个目录下的example是针对altera自己的板子的,和DE2硬件不能对应,只能作为参考,或者做一些修改后用。

26.在SOPC中加了一个200KB的onchip_memory ,为什么在Quartus II 编译时出现这个错误?
Error: Selected device has 105 RAM location(s) of type M4K RAM. However, the current design needs more than 105 to successfully fit

  答:SOPC中的onchip_memory和M4K RAM根本就不是一个概念。Quartus II中编译出现这个错误,是由于设计中用到了太多的M4K。

  27. 关于sopc-builder 中reset address 的设置,一直搞得不是很明白。

  答:SOPC中的reset address 指定的是最终全部软件程序代码下载到的地方,并且程序从reset address 启动。
SOPC 中的exception address 指定的是系统异常处理代码存放的地方。如果exception address 和reset address 不一样,那么程序从reset address 启动后将把放在reset address 处的系统异常处理代码拷贝到exception address 。
NIOSII软件中的text address指定的是程序运行的地方。如果text address和reset address 不一样,那么程序从reset address 启动后将把放在reset address 处的普通只读程序代码拷贝到text address 。NIOS II软件中的rodata address指定的是只读数据的存放地方。如果rodata address和reset address 不一样,那么程序从reset address 启动后将把放在reset address 处的只读数据拷贝到rodata address 。
NIOS II软件中的rwdata address指定的是可读写数据的存放地方。如果rwdata address和reset address 不一样,那么程序从reset address 启动后将初始化rwdata address 处的可读写数据。

  28. 如何提高NIOS II系统的性能?

  答:主要可以从这几个方面入手:
1、使用fast CPU类型。
2、提高系统主频。
3、优先在SRAM中运行程序,SDRAM次之,最后选择FLASH中运行。
4、使用片内RAM作为数据缓冲,片外SRAM次之,最后选SDRAM。
5、IO数据传输尽可能采用DMA。
6、对能并行处理的数据考虑使用多CPU协同处理。
7、典型算法做成用户指令,有256条可以做,足够你用的。
8、能用HDL模块来完成工作吗?能,就用HDL模块做成外设来完成吧
9、采用C2H。

  29.如何优化NIOS II里的应用工程?

  答:Optimize your Nios II application design!
1.Creat an Blank Project:Select Altera Nios II " C/C++ Application"
2. In main.c[your main fuctional c/c++ file]:
#i nclude "system.h"
#i nclude "alt_types.h"
#......
int main (void) __attribute__ ((weak, alias ("alt_main")));
int alt_main (void)
{
......
return 0;
}
3."System Library Properties" Options
Select "Clean EXIT"
Select "Small C Library"
Select "Reduced Device Drivers"
Spicify linker s cript position, to ext_flash, ext_ram or on-chip-ram

  30. 关于verify failed的总结
1. SDRAM的时序不对
有时候不正确的pll clock phase shift for sdram_clk_out就会导致SDRAM不能正常工作:
2. SDRAM的连线不对,物理板子的连线问题
3. 在调试的时候,程序下载的空间不是非易丢失存储器(non-volatile memory)或者存储器的空间不够也会导致这个错误
4. QuartusII的默认设置导致的错误
QuartusII默认将所有没有使用的IO口接地,这种时候可能导致某些元器件工作不正常;最好将不用的IO口设置为三态
5. USB-blaster坏了,或者JTAG通信的信号噪声太大
JTAG的端口需要一个弱上拉电阻来抗干扰
6. 确保你的sdram 既连接到CPU的指令总线也连接到CPU的数据总线

31.关于DMA传输的几点说明:
1.memory 到 外设的传输,调用alt_dma_txchan_ioctl()时,有一个参数为alt_dma_tx_only_on等
2.调用alt_dma_txchan_send函数时,在传输结束前就返回一个值,如果此值为负的话,说明发送请求失败。正确传输结束后,调用done函数。
3. 接收函数alt_dma_rxthan_prepare类似上面的1和2
4.传输结束,有两种可能:数据传完或者end of packet(要预先使能)
5.SOPCbuilder中例化时要制定哪些可以访问DMA的主端口,DMA的avalon slave端口要接cpu。实际传输的最大数可以帮助确定设置的位数
6.alt_dma_txchan_ioctl用于控制dma的一些工作性质,使用多的话可以用信号量等来“抢占”
7.dma传输最小应该传4字或者其倍数。

  32. 1. 建立CPU时,下面的那个HardWare Multiply里面可以选①Embedded Multipliers,②Logic Elements,③None,这三个选项有什么区别呀?

  答: ①Embedded Multipliers,使用专门的内嵌硬件乘法单元(不可编程,仅能做乘法,且乘法速度最快),不是RAM。 ②Logic Elements,使用逻辑单元也就是FPGA中的查找表(速度较慢)。③None,那就是不要声长硬件乘法器了,这是只能通过软件模拟乘法,速度最慢。

  33.下载是出现“not responding”错误的又一点发现:

  答:在设计的过程中,经常使用板子上内部的两个晶振作为CPU或者有些信号的时钟,而且习惯用osc_27和osc_50命名。在绑定管脚时又经常导入一个 CSV文件,没有手动一一绑定,而在那个CSV文件中晶振管脚名分别为CLOCK_27,CLOCK_50,这样系统的CPU根本就没有绑定管脚,不出错才怪。把名称改为CLOCK_27,CLOCK_50,重新编译下载就可以了。

  34. 安装了NIOS2linux-1.4之后,为什么在New->Project时并没有出现Microtronx NIOS II选项呢?

  答:这个问题好像难倒过很多人,其实在运行nios2linux-1.4安装的第一步,里面有个提示:
Information Regarding the Installation Procedure
IMPORTANT: Please ensure that you specify the correct path for the Altera Nios II Kit installation directory and the Cygwin root directory. The typical Altera Nios II Kit directory is:c:alterakits ios2
The typical Cygwin root directory is:
c:alteraquartus50 incygwin
问题的关键就是上面的路径不正确。对于Nios 5.1和6.0的路径分别为nios_51和nios_60,都不是nios2,所以安装后找不到模板工程很正常。但它的一些必要文件又确实是安装在了 nios_51或nios_60中。我也遇到了过同样的问题,想到了一个简单的方法可以解决:
1.把文件夹nios_51或nios_60改为nios2,启动Nios II,就可以看到所需模板工程。
2.退出Nios II,把文件夹名还原。
3.再次启动Nios II,你会发现模板工程依然还在。

  35.Nios II汉化解决方案

  答:NIOS II IDE实际上是在eclipse平台上的一个应用插件,而Eclipse 是一个开放源代码的软件开发项目,专注于为高度集成的工具开发提供一个全功能的、具有商业品质的工业平台。可访问如下网站:
1.Eclipse官方网站
http://www.eclipse.org/
2.中国Eclipse社区
http://www.eclipseworld.org/bbs/index.php

  下面介绍如何汉化NIOS II(实际上只是汉化了eclipse)
1.打开NIOS II,点help->about NIOS II IDE,会看到有关NIOS的版权信息。可以看到NIOS II 5.1的版本上的Eclipse版本是Eclipse 3.0.1
2.在Eclipse官方网站上找到Eclipse 3.0.1多国语言包NLpack-eclipse-SDK-3.0.x-win32.zip
3.在NIOS II的安装目录中,你可以找到一个eclipse目录,如:C:alterakits ios2 ineclipse,在这个目录下新建2个文件夹language和links
4.将NLpack1-eclipse-SDK-3.1.1a-win32.zip解压到language目录下
5.在links文件夹下用记事本新建一个文件,取名为link.link(必须是此扩展名)
6.在language.link 里输入代码如下: path="c:/altera/kits/nios2/bin/eclipse/language" 保存此文件。
7.汉化完成。
说明,这种方法只是汉化了eclipse,对NIOS II没有汉化,但这个软件已经大部分为中文了,因为NIOS II 只是eclipse一个插件。对于我们新手来说这还是必要的。

  • Cannot start device configuration because no programming options have been selected for device chain
    Message seen in: the Quartus II Programmer, after clicking "Start".
    Suggested solution: Make sure there is a check in the "Program/Configure" box. Click the box to add (or remove) the check-mark. See our tutorial for details.
  • Confirm Perspective Switch - This kind of launch is configured to open the Debug perspective when it suspends. - Do you want to open this perspective now?
    Message seen in: a message-box in the Nios II IDE, when you start the debugger.
    Discussion and suggested solution: This is not really an error. Check the box "Remember my decision", then click "Yes" in response to this message. The Debug perspective has other sub-windows than the workspace perspective; several of these new sub-windows are essential for a successful debugging session.
  • /cygdrive/c/altera/72/nios2eds/components/altera_hal/build/gtf_rules.mk:81: *** multiple target patterns. Stop.
    Message seen in: the console window of the Nios II IDE, when you try to build or run your project.
    Discussion and suggested solution: When you started Nios II IDE, perhaps you selected a workspace path in "My Documents", which is a Windows-alias for a path with spaces in it. The Nios II IDE cannot handle paths with spaces. Select File - Switch Workspace and select a workspace location with no spaces in the path. See our tutorial for recommendations.
    Alternatively, when you created your project, perhaps you selected a PTF file in "My Documents", which is a Windows-alias for a path with spaces in it. The Nios II IDE cannot handle paths with spaces. Move or copy your PTF file to another location, preferably the workspace directory. See our tutorial for details.
  • Error! : Failed memory access in component cpu - Unable to read data from invalid memory address 0x0
    Error! : Simulation failed in component cpu at instruction 5004016 (PC=0x0 instr =0x00000000).

    Message seen in: the console window of the Nios II IDE, when you try to run your project in the Instruction Set Simulator.
    Discussion and suggested solution: There could be several reasons for this message. If you use interrupts with an assembly-language initialization, please double-check that you really did copy the stub, and that you enabled interrupts with the correct index. In any assembly-language subroutine, please check that you saved the return-address register
    ra (r31) before calling any other subroutine, and that you restored the original value of ra before executing the ret instruction. In C-language code, perhaps you followed an unitialized pointer (using the * operator).
  • Errors exist in a required project. Continue launch?
    Message seen in: a message-box in the Nios II IDE, when you try to run your project.
    Discussion and suggested solution: Always click "No" in response to this message. The message only appears when there is a fatal problem with some program you have written. Compilation, assembly or linking failed, so there is nothing to run. Check the console window for further information, and then check your source code files. Once again: Always click "No" in response to this message!
  • Illegal project location. Directory is not writable: C:\Documents and Settings\someusername\My Documents
    Message seen in: the Nios II IDE. This message can appear at the top of the dialog-box when you create a new project in the Nios II IDE.
    Discussion and suggested solution: When you started Nios II IDE, perhaps you selected a workspace path in "My Documents", which is a Windows-alias for a path with spaces in it. The Nios II IDE cannot handle paths with spaces. Select File - Switch Workspace and select a workspace location with no spaces in the path. See our tutorial for recommendations.
  • In function `alt_main': undefined reference to `main'
    Message seen in: the console window of the Nios II IDE, when you try to build or run your project.
    Discussion and suggested solution: You must have a function or label called
    main. If main is written in assembly-language, the label main must be declared global with the .global directive. See lab nios2time for examples.
  • local label '"3" (instance number 1 of a fb label) is not defined
    Message seen in: the console window of the Nios II IDE, when you try to build or run your project.
    Discussion and suggested solution: You have typed "3f" instead of "0x3f". The assembler believes that "3f" is a local label (a feature which is not used in this course). The "0x" before a hexadecimal constant is strictly required. If you leave out the "0x", the assembler will not do what you want. A similar error would be seen if you typed "3b" instead of "0x3b".
  • make: *** No rule to make target `C:/Documents', needed by ...
    Message seen in: the console window of the Nios II IDE, when you try to build or run your project.
    Discussion and suggested solution: When you started Nios II IDE, perhaps you selected a workspace path in "My Documents", which is a Windows-alias for a path with spaces in it. The Nios II IDE cannot handle paths with spaces. Select File - Switch Workspace and select a workspace location with no spaces in the path. See our tutorial for recommendations.
    Alternatively, when you created your project, perhaps you selected a PTF file in "My Documents", which is a Windows-alias for a path with spaces in it. The Nios II IDE cannot handle paths with spaces. Move or copy your PTF file to another location, preferably the workspace directory. See our tutorial for details.
  • nios2-terminal: can't open uart: Permission denied
    Message seen in: the console window of the Nios II IDE, when you try to run your project on the Nios II Hardware.
    Discussion and suggested solution: This is the same problem as "Terminal process failed", see below.
  • No Hardware
    Message seen in: the Hardware Setup status line of the Quartus II Programmer, when you try to download the configuration into the DE2 board.
    Discussion and suggested solution: There must be a USB cable from your computer, connected to the "Blaster" connector on the DE2 board. Furthermore, the board must be powered up. Please double-check your USB cable, and check that the DE2 board's blue LEDs "Power" and "Good" are lit. See our connection and running tutorials for further details, or if the problem persists.
  • Terminal process failed
    Unable to launch C:/altera/72/nios2eds/bin/nios2-terminal.sh
    exit(1): Nios II Terminal Window ...

    Message seen in: a message-box in the Nios II IDE, when you try to run your project on the Nios II Hardware.
    Discussion and suggested solution: 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.
  • The pipe is being closed.
    Message seen in: a message-box in the Nios II IDE, when you try to build or run your project.
    Discussion and suggested solution: This is one of the many possible error messages that may be seen when a folder containing Nios II program code has been copied, moved, renamed or transferred to a different computer. Only copy, edit, and move source files. Never change, copy or move binary files, and never copy or move directories. The Nios II IDE stores administrative information in hidden files; these hidden files contain path information, which is valid only if the file is not copied or moved. If you copy or move a hidden file, you will confuse the Nios II IDE. This confusion will be an endless source of incomprehensible error messages.
  • There are no JTAG cables available on your system.
    Message seen in: the console window of the Nios II IDE, when you try to run your project on the Nios II Hardware.
    Discussion and suggested solution: There must be a USB cable from your computer, connected to the "Blaster" connector on the DE2 board. Furthermore, the board must be powered up. Please double-check your USB cable, and check that the DE2 board's blue LEDs "Power" and "Good" are lit. See our connection and running tutorials for further details, or if the problem persists.
  • There are no Nios II CPUs with debug modules available which match the values specified. Please check that your PLD is correctly configured, downloading a new SOF file if necessary.
    Message seen in: the console window of the Nios II IDE, when you try to run your project on the Nios II Hardware.
    Discussion and suggested solution: You haven't downloaded the correct configuration into the DE2 board. When this error occurs, the Nios II IDE will start the Quartus II Programmer. Use the programmer to download the correct configuration into the board. See our connection and running tutorials for further details, or if the problem persists.
  • Warning: end of file in comment; newline inserted
    Message seen in: the console window of the Nios II IDE, when you try to build or run your project.
    Discussion and suggested solution: The last character in an assembly-language source file must always be a newline. In this case, the file ended with a comment, so this particular warning does not indicate a harmful problem. However, you should always make sure that all your code compiles with no warnings whatsoever. To achieve this, perform the following steps, in the following order. 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.
  • Warning: end of file not at end of a line; newline inserted
    Message seen in: the console window of the Nios II IDE, when you try to build or run your project.
    Discussion and suggested solution: This message may indicate a very problematic and hard-to-find error, and must always be fixed. The last character in an assembly-language source file must always be a newline. In this case, the last character of the file was something else, so the whole last line of your source-file has been ignored. If your last assembly-code line contained an instruction, that instruction was not translated into machine code, and will therefore not exist in the final executable file.
    To fix this, perform the following steps, in the following order. 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.
    Once again: This message may indicate a very problematic and hard-to-find error, and must always be fixed.
  • warning: no newline at end of file
    Message seen in: the console window of the Nios II IDE, when you try to build or run your project.
    Discussion and suggested solution: The last character in a C source file should always be a newline. In this case, the file ended with something else. This particular warning does not indicate a harmful problem. However, you should always make sure that all your code compiles with no warnings whatsoever. To achieve this, perform the following steps, in the following order. 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.
  • Warning : SOPC Builder system component character_lcd is not supported by the simulator. Simulation may be incorrect if your software attempts to access it
    (The warning is repeated for de2_pio_redled18, de2_pio_keys4, de2_pio_toggles18, de2_pio_jp1_in1_5, de2_pio_jp1_in2_8, de2_pio_jp1_in3_5, de2_pio_jp1_out1_5, de2_pio_jp1_out2_8, de2_pio_jp1_out3_5, ps2_0, de2_pio_hex_low28, de2_pio_hex_high28 and de2_pio_greenled9.)
    Message seen in: the console window of the Nios II IDE, when you run your project on the Nios II Instruction-Set SImulator.
    Discussion and suggested solution: The simulator cannot simulate buttons, LEDs, and other physical things. You can ignore these messages.
  • Windows has reported a TAPI error (80000048). Use the Phone and Modem Options icon in the control panel to ensure that a modem is installed properly.
    Message seen in: a message-box, shown when Hyperterminal is starting up.
    Discussion and suggested solution: This message does not indicate a problem, and will not affect your Hyperterminal session. Click "OK" to continue.
    More information: Hyperterminal was once written for use with dial-up phone-line modems, and may show this error message when used on a computer without a phone-line modem installed. Since we use Hyperterminal with a DE2 board, and not with a modem, the message can be safely ignored.
  • Windows Security Alert - To help protect your computer, Windows Firewall has blocked some features of this program.
    Do you want to keep blocking this program?
    (on some computers: Your network administrator can unblock this program for you.)
    Name: nios2-iss
    (or: nios2-gdb-server)
    Publisher: unknown
    Windows Firewall has blocked this program from accepting connections from the Internet or a network. If you recognize the program or trust the publisher, you can unblock it.

    Message seen in: a message-box, shown when you debug the program. If you use the Nios II Instruction Set Simulator, you would see the program name nios2-iss; if you use the DE2 board, you would see nios2-gdb-server.
    Discussion and suggested solution: This message does not indicate a problem, and will not affect your debugging session. If the dialog box says "Your network administrator can unblock this program for you, check the box "For this program, don't show this message again", and then click "OK" to continue. If the dialog box says "Do you want to keep blocking this program?", click "Unblock".
    More information: Network-related system-calls are used for communication between the debugger and the Nios II Instruction-Set Simulator. Windows Firewall has correctly identified that these system-calls open a possibility for a remote system to connect to the debugger. To the best of our knowledge, this is not a security risk - even if you choose to unblock the program. Should you wish to review or modify your firewall settings for blocking nios2-iss and/or nios2-gdb-server, click Windows' Start button, select Settings (if present), then Control Panel, then Security Center (if present), then Windows Firewall. Open the Exceptions tab and examine the check boxes (if any) for nios2-gdb-server and nios2-iss. Uncheck the check-boxes to block the programs, or check the boxes to unblock the programs.
  • You have more than one JTAG cable available so you must use the --cable option to choose between them (or open the "Run/Run" or "Run/Debug" dialog and go to the "Target Connection" tab). No --cable option was provided (or you selected Automatic)
    Message seen in: the console window of the Nios II IDE, when you try to run your project on the Nios II Hardware.
    Discussion and suggested solution: The most likely cause is that you have a ByteBlaster driver installed, in addition to the USB-Blaster. To fix this, select Tools - Quartus II Programmer, to open the Quartus Programmer. In the Programmer window, click "Hardware Setup...". You will now see a list of installed drivers, under the heading "Available hardware items". In a correct list, only the USB-Blaster is available. If one or more other items are listed (such as ByteBlaster), select an unwanted item and click "Remove Hardware". Repeat this until only the USB-Blaster remains. Now make sure that the USB-Blaster is the "Currently selected hardware", then click Close. See our tutorial for details.

posted on 2010-05-19 17:35  chuyanchao  阅读(5473)  评论(1编辑  收藏  举报