1. 怎樣在TCL腳本分配管腳 source
.tcl 有點(diǎn)問題:
# 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下載時出現(xiàn)錯誤:
Error: Can't configure device. Expected JTAG ID code 0x020010DD for device 1, but found JTAG ID code 0x020B40DD.
答:SOPC所選器件和開發(fā)板上的不一致。
3.在NOIS II中Bulid例程hello_world都出現(xiàn)了錯誤,錯誤提示為:
gdrive/c/altera/kits/NIOS2/components/altera_nios2/HAL/src/alt_busy_sleep.c:68: error: parse error before '/' token等錯誤全部由alt_busy_sleep.c引起,都是關(guān)于括號不匹配的問題,而alt_busy_sleep.c是IDE中的一個默認(rèn)程序。這個錯誤同樣出現(xiàn)在D:TESTDE2Projectsoftware ios2 ,培訓(xùn)用的一個簡單實(shí)驗(yàn)。
答:找到system.h文件,里面有個關(guān)于系統(tǒng)時鐘頻率的設(shè)置項(xiàng),應(yīng)該是沒有賦值,你手動賦值。比如你用50MHZ的時鐘,就設(shè)成50000000。如果總是出現(xiàn)上述問題,可能和軟件有關(guān)系,建議重新安裝軟件。注意quartus和NIOS安裝版本一定要相同,不能混裝。
4.這個錯誤是什么原因引起,把那個sdk_arm刪除后,又提示另一個地方出錯。
答:運(yùn)行NIOS II IDE,點(diǎn)Project->Clear,重新Builde,應(yīng)該可以解決問題。
5.在SOPC中Generate出現(xiàn)如下錯誤是怎么回事? Error: Generator program for module 'epcs_controller' did NOT run successfully. 只要在SOPC中加入epcs_controller就會出現(xiàn)此錯誤,無法生成一個元件。
答:可能和軟件有關(guān)系,建議重新安裝軟件(這個問題是我剛學(xué)NIOS遇到的最頭痛的一個問題,問題的原因是Quartus和Nios安裝的版本不一致)。
6.在Nios II IDE中,怎樣打開一個已經(jīng)存在的工程?每次新建工程比較麻煩。
答:指定一個Nios II IDE的工作目錄,就打開了那個目錄下存在的工程。另外,在Nios II中是可以建立多個工程的。
7.在Quartus II 中編譯出現(xiàn)如下錯誤怎么辦?
Error: Can't place pins assigned to pin location Pin_AE24 (IOC_X65_Y2_N2)
答:按F1可以查看幫助,出現(xiàn)這樣的錯誤的原因是:
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 下跟蹤查看變量的定義或者函數(shù)的定義?
答:按住CTRL鍵,鼠標(biāo)移動到變量或者函數(shù)名的地方,就可以發(fā)現(xiàn)這些地方高亮顯示,單擊就可以進(jìn)入到變量或者函數(shù)定義的地方。
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)顯示十位數(shù)0~F,個位0~F,然后十位加一。
10.這個錯誤是由什么引起?提示LED_ PIO_BASE沒有聲明
答:這是因?yàn)槊植灰恢乱鸬谋热?,在生成SOPC系統(tǒng)時,雙擊PIO(Parallel I/O)(在Avalon Modules -> Other 下),為系統(tǒng)添加輸出接口,你沒有把該組件改名成LED_PIO,而是保留了原始的名字:PIO_0;但你又通過 IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, led);來向該組件寫入數(shù)據(jù),就會導(dǎo)致上述錯誤。解決辦法:1.可以修改sopc系統(tǒng),為該P(yáng)IO改名為LED_PIO ;2.在hello_led.c的前面給LED_PIO_BASE賦值,如#define LED_PIO_BASE 0x00001800,后面的這個地址要與SOPC中的地址對應(yīng)。
11. 如何在NIOSII中驅(qū)動外部芯片或設(shè)備?
答:在開發(fā)過程中,我們經(jīng)常會使用外接一些芯片,或外接一些實(shí)用電路,比如AD芯片、串并轉(zhuǎn)換芯片等等,那么如何在NIOS II中去使用這些芯片呢? 我們在開發(fā)中會有多個選擇:
1.如果這個芯片是使用數(shù)據(jù)和地址總線的,并且補(bǔ)線時沒有足夠的單獨(dú)引腳,那么這個芯片必須掛接在tri_stat總線上,這種用法和我們以往單片機(jī)或 MCU 類似,在SOPC Builder中直接定義用戶邏輯,如果有額外的控制引腳,就需要用PIO來驅(qū)動,雖然公用數(shù)據(jù)地址線節(jié)省了引腳,但做控制時序費(fèi)勁了。
2.如果這個芯片單獨(dú)使用數(shù)據(jù)和地址,那么我們會直接做成Avalone總線的Slave設(shè)備,在Sopc Builder中自己定義component。需要寫HDL模塊,自己定控制、狀態(tài)、數(shù)據(jù)寄存器和控制位定義,這種方式控制靈活,易于實(shí)現(xiàn)復(fù)雜的控制時序。
3.在Quartus II 工程中畫電路模塊(或用HDL寫電路模塊),這種方式是獨(dú)立于SOPC定義的模塊之外的,做一個純電路的處理模塊,有時候會比較容易實(shí)現(xiàn)某些靈活的處理。
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
答:需要一個專門接三臺橋的設(shè)備, 把flash添加到sopc中就可以了。
13. 在做count_binary這個例子時,出現(xiàn)一個錯誤: error: `BUTTON_PIO_IRQ' undeclared (first use in this function) BUTTON_PIO_IRQ的值如何給他定義?
答:這個錯誤可能是在sopc builder中定制的pio端口名稱是否與程序中用的不一致,要和程序里的一致,把pio組件的名稱就改為button_pio。
14.在Quartus II中編譯時出現(xiàn)如下錯誤:
Error: Node instance "cpu_bht" instantiates undefined entity "cpu_bht_module"
點(diǎn)擊錯誤的地方彈出一個對話框這個錯誤是怎么回事?怎樣解決?
答:可能是在SOPC中所選的CPU型號不正確,換一個試試。
15.怎樣自動分配管腳?
答:在Quartus II自動分配管腳有一個方法,點(diǎn)擊Assignments->Import Assginments,導(dǎo)入一個管腳分配文件,后綴為.csv .txt等,前提是在頂層原理圖中各個輸入輸出的名稱要和這個文件中的名稱一致。
16.在NIOS II中編譯時出現(xiàn)如下錯誤怎么解決?錯誤是不是由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) 的偏余量不夠,設(shè)置大些就可以了。如果還是出現(xiàn) 這個問題,加一個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編譯時出現(xiàn)如下錯誤是怎么回事?
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中的對應(yīng)。
19. 在NIOS II IDE編譯時出現(xiàn)如下錯誤是怎么回事?
Pausing target processor: not responding.
Resetting and trying again: FAILED
Leaving target processor paused
答:以下是一位FAE的回答:
1. 關(guān)于USB-Blaster在Nios II IDE下載時會發(fā)生偶發(fā)性錯誤,這種現(xiàn)象主要是IDE software與Nios II CPU透過USB-Blaster在做通訊時發(fā)生錯誤,若是確認(rèn)FPG上配置沒有錯誤,連續(xù)發(fā)生錯誤的機(jī)率應(yīng)該是相當(dāng)?shù)牡?,您只需要重新下載即可。
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選項(xiàng)中的這幾個選項(xiàng)代表什么意思?.text .rodata .rwdata 與reset .exception這幾個地址之間的關(guān)系是什么?
答:.text : 代碼區(qū) .rodata:只讀數(shù)據(jù)區(qū),一般存放靜態(tài)全局變量 .rwdata:可讀寫變量數(shù)據(jù)區(qū)另外還有.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中可以調(diào)用#i nclude庫函數(shù)IORD/IOWR來操作PIO。
在smallsoftwarehello_led_0_syslibDebugsystem_des cription下的system.h
中,有以下內(nèi)容:
#define LED_PIO_TYPE "altera_avalon_pio"
#define LED_PIO_BASE 0x00004000
其中LED_PIO_BASE(IO寄存器地址?)為0x00004000同SOPCBuilder中設(shè)置一致!
(其實(shí)在SopcBuilder中有關(guān)NiosII的配置,就是通過system.h來傳送給IDE的!)
最后用IOWR(0x00004000, 0, led);替代
IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, led);編譯,下載到開發(fā)板上,運(yùn)行成功!
22.怎樣讓SDRAM和FLASH,SRAM的地址公用?
答: sdram可以和sram,flash共用數(shù)據(jù)總線和地址總線.在sopc builder中添加SDRAM控制器時,在其share pins via tristate選擇項(xiàng)上勾上Controller shares dq/dqm/addr IO pins選項(xiàng),這樣sdram可以和sram,flash共用數(shù)據(jù)總線和地址總線.但是ATERA不推薦這樣做,因?yàn)檫@樣會降低SDRAM控制器的性能,在FPGA芯片管腳資源比較緊張的時候迫不得已才這樣做。
23.怎樣使用DE2板上的數(shù)碼管,綁定管腳時需要注意什么?請舉一個例子說明。
答: DE2板上的數(shù)碼管只用了7位,小數(shù)點(diǎn)位默認(rèn)為高電平。例如,在做例程count_binary時,需要用到兩個數(shù)碼管,以實(shí)現(xiàn)00到FF的計(jì)數(shù),在 SOPC添加一個16位的PIO SEVEN_SEG[15..0],綁定管腳時注意:使SEVEN_SEG[0..6]幫定到數(shù)碼管HEX0[6..0]位,SEVEN_SEG[8.. 14]綁定到數(shù)碼管HEX1[6..0]位,SEVEN_SEG[7]和SEVEN_SEG[15]直接接VCC,這樣才能讓兩個數(shù)碼管正常顯示并計(jì)數(shù)。
24. 在NIOS II IDE 中調(diào)試,編譯通過的軟件時,出現(xiàn)了下面的提示,是什么原因?
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這個問題說明板子的復(fù)位電路可能有問題,或裝載程序的外部SRAM或SDRAM和CPU 的連接或時序有問題,也有可能是軟件偶爾的錯誤。若是軟件偶爾的錯誤,可以先復(fù)位一下CPU,然后再下載程序;或者斷電后重新下載.sof和NIOS II 程序
25.在練習(xí)C:alterakits ios2_51examplesverilog niosII_cycloneII_2c35的工程時,里面有很多元件DE2板上都沒有對應(yīng)的管腳,比如網(wǎng)絡(luò)元件lan91c111,使用的IP核,還有 24位的ext_flash,而DE2板上的FLASH只有22位。是不是SOPC中只能讓DE2板上有對應(yīng)管腳的元件存在,其它的只能刪除?
答:這個目錄下的example是針對altera自己的板子的,和DE2硬件不能對應(yīng),只能作為參考,或者做一些修改后用。
26.在SOPC中加了一個200KB的onchip_memory ,為什么在Quartus II 編譯時出現(xiàn)這個錯誤?
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中編譯出現(xiàn)這個錯誤,是由于設(shè)計(jì)中用到了太多的M4K。
27. 關(guān)于sopc-builder 中reset address 的設(shè)置,一直搞得不是很明白。
答:SOPC中的reset address 指定的是最終全部軟件程序代碼下載到的地方,并且程序從reset address 啟動。
SOPC 中的exception address 指定的是系統(tǒng)異常處理代碼存放的地方。如果exception address 和reset address 不一樣,那么程序從reset address 啟動后將把放在reset address 處的系統(tǒng)異常處理代碼拷貝到exception address 。
NIOSII軟件中的text address指定的是程序運(yùn)行的地方。如果text address和reset address 不一樣,那么程序從reset address 啟動后將把放在reset address 處的普通只讀程序代碼拷貝到text address 。NIOS II軟件中的rodata address指定的是只讀數(shù)據(jù)的存放地方。如果rodata address和reset address 不一樣,那么程序從reset address 啟動后將把放在reset address 處的只讀數(shù)據(jù)拷貝到rodata address 。
NIOS II軟件中的rwdata address指定的是可讀寫數(shù)據(jù)的存放地方。如果rwdata address和reset address 不一樣,那么程序從reset address 啟動后將初始化rwdata address 處的可讀寫數(shù)據(jù)。
28. 如何提高NIOS II系統(tǒng)的性能?
答:主要可以從這幾個方面入手:
1、使用fast CPU類型。
2、提高系統(tǒng)主頻。
3、優(yōu)先在SRAM中運(yùn)行程序,SDRAM次之,最后選擇FLASH中運(yùn)行。
4、使用片內(nèi)RAM作為數(shù)據(jù)緩沖,片外SRAM次之,最后選SDRAM。
5、IO數(shù)據(jù)傳輸盡可能采用DMA。
6、對能并行處理的數(shù)據(jù)考慮使用多CPU協(xié)同處理。
7、典型算法做成用戶指令,有256條可以做,足夠你用的。
8、能用HDL模塊來完成工作嗎?能,就用HDL模塊做成外設(shè)來完成吧
9、采用C2H。
29.如何優(yōu)化NIOS II里的應(yīng)用工程?
答: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. 關(guān)于verify failed的總結(jié)
1. SDRAM的時序不對
有時候不正確的pll clock phase shift for sdram_clk_out就會導(dǎo)致SDRAM不能正常工作:
2. SDRAM的連線不對,物理板子的連線問題
3. 在調(diào)試的時候,程序下載的空間不是非易丟失存儲器(non-volatile memory)或者存儲器的空間不夠也會導(dǎo)致這個錯誤
4. QuartusII的默認(rèn)設(shè)置導(dǎo)致的錯誤
QuartusII默認(rèn)將所有沒有使用的IO口接地,這種時候可能導(dǎo)致某些元器件工作不正常;最好將不用的IO口設(shè)置為三態(tài)
5. USB-blaster壞了,或者JTAG通信的信號噪聲太大
JTAG的端口需要一個弱上拉電阻來抗干擾
6. 確保你的sdram 既連接到CPU的指令總線也連接到CPU的數(shù)據(jù)總線
31.關(guān)于DMA傳輸?shù)膸c(diǎn)說明:
1.memory 到 外設(shè)的傳輸,調(diào)用alt_dma_txchan_ioctl()時,有一個參數(shù)為alt_dma_tx_only_on等
2.調(diào)用alt_dma_txchan_send函數(shù)時,在傳輸結(jié)束前就返回一個值,如果此值為負(fù)的話,說明發(fā)送請求失敗。正確傳輸結(jié)束后,調(diào)用done函數(shù)。
3. 接收函數(shù)alt_dma_rxthan_prepare類似上面的1和2
4.傳輸結(jié)束,有兩種可能:數(shù)據(jù)傳完或者end of packet(要預(yù)先使能)
5.SOPCbuilder中例化時要制定哪些可以訪問DMA的主端口,DMA的avalon slave端口要接cpu。實(shí)際傳輸?shù)淖畲髷?shù)可以幫助確定設(shè)置的位數(shù)
6.a(chǎn)lt_dma_txchan_ioctl用于控制dma的一些工作性質(zhì),使用多的話可以用信號量等來“搶占”
7.dma傳輸最小應(yīng)該傳4字或者其倍數(shù)。
32. 1. 建立CPU時,下面的那個HardWare Multiply里面可以選①Embedded Multipliers,②Logic Elements,③None,這三個選項(xiàng)有什么區(qū)別呀?
答: ①Embedded Multipliers,使用專門的內(nèi)嵌硬件乘法單元(不可編程,僅能做乘法,且乘法速度最快),不是RAM。 ②Logic Elements,使用邏輯單元也就是FPGA中的查找表(速度較慢)。③None,那就是不要聲長硬件乘法器了,這是只能通過軟件模擬乘法,速度最慢。
33.下載是出現(xiàn)“not responding”錯誤的又一點(diǎn)發(fā)現(xiàn):
答:在設(shè)計(jì)的過程中,經(jīng)常使用板子上內(nèi)部的兩個晶振作為CPU或者有些信號的時鐘,而且習(xí)慣用osc_27和osc_50命名。在綁定管腳時又經(jīng)常導(dǎo)入一個 CSV文件,沒有手動一一綁定,而在那個CSV文件中晶振管腳名分別為CLOCK_27,CLOCK_50,這樣系統(tǒng)的CPU根本就沒有綁定管腳,不出錯才怪。把名稱改為CLOCK_27,CLOCK_50,重新編譯下載就可以了。
34. 安裝了NIOS2linux-1.4之后,為什么在New->Project時并沒有出現(xiàn)Microtronx NIOS II選項(xiàng)呢?
答:這個問題好像難倒過很多人,其實(shí)在運(yùn)行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
問題的關(guān)鍵就是上面的路徑不正確。對于Nios 5.1和6.0的路徑分別為nios_51和nios_60,都不是nios2,所以安裝后找不到模板工程很正常。但它的一些必要文件又確實(shí)是安裝在了 nios_51或nios_60中。我也遇到了過同樣的問題,想到了一個簡單的方法可以解決:
1.把文件夾nios_51或nios_60改為nios2,啟動Nios II,就可以看到所需模板工程。
2.退出Nios II,把文件夾名還原。
3.再次啟動Nios II,你會發(fā)現(xiàn)模板工程依然還在。
35.Nios II漢化解決方案
答:NIOS II IDE實(shí)際上是在eclipse平臺上的一個應(yīng)用插件,而Eclipse 是一個開放源代碼的軟件開發(fā)項(xiàng)目,專注于為高度集成的工具開發(fā)提供一個全功能的、具有商業(yè)品質(zhì)的工業(yè)平臺??稍L問如下網(wǎng)站:
1.Eclipse官方網(wǎng)站http://www.eclipse.org/
2.中國Eclipse社區(qū)http://www.eclipseworld.org/bbs/index.php
下面介紹如何漢化NIOS II(實(shí)際上只是漢化了eclipse)
1.打開NIOS II,點(diǎn)help->about NIOS II IDE,會看到有關(guān)NIOS的版權(quán)信息。可以看到NIOS II 5.1的版本上的Eclipse版本是Eclipse 3.0.1
2.在Eclipse官方網(wǎng)站上找到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(必須是此擴(kuò)展名)
6.在language.link 里輸入代碼如下: path="c:/altera/kits/nios2/bin/eclipse/language" 保存此文件。
7.漢化完成。
說明,這種方法只是漢化了eclipse,對NIOS II沒有漢化,但這個軟件已經(jīng)大部分為中文了,因?yàn)镹IOS 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.