(原創) DE2_NIOS_Lite 1.1 (SOC) (Nios II) (SOPC Builder) (μC/OS-II) (DE2)
2008-08-23 10:35
525 查看
Abstract
有網友發現DE2_Nios_Lite 1.0在μC/OS-II無法執行,1.1版修正對μC/OS-II的支援。
Introduction
[b]使用環境:Quartus II 7.2 SP3 + Nios II EDS 7.2 SP3 + [b][b]DE2(Cyclone II EP2C35F627C6)[/b][/b][/b]
在(原創) DE2_NIOS_Lite 1.0 (SOC) (Nios II) (SOPC Builder) (DE2)中,網友kdjwangz8發現在μC/OS-II會出現以下錯誤訊息:
**** Build of configuration Debug for project ucosii_tutorial_0 ****
make -s all includes
Creating generated_app.mk
Creating system.h
2008/8/22 下午 11:33:49 - (嚴重的) generate: java.lang.IllegalStateException: java.lang.IllegalStateException: java.lang.NumberFormatException: empty String
make[1]: *** [system_description/../obj/system.h-t] Error 1
make: *** [system_project] Error 2
Build completed in 12.157 seconds
原因在於DE2_Nios_Lite 1.0中,我在SOPC Builder沒有加上timer ip,若沒上OS,沒有timer也無仿,但若上了OS,則一定要加上timer才行。DE2_NIOS_Lite 1.1加上了timer ip。
![](http://images.cnblogs.com/cnblogs_com/oomusou/WindowsLiveWriter/DE2_NIOS_Lite1.1SOCNiosIISOPCBuilderDE2_94B4/de2_nios_lite_11_00_909e7753-ad3a-4427-919a-abbdca97702d.gif)
Remark
要能成功上μC/OS-II,還有幾個地方必須注意:
Step 1:
設定System clock timer
![](http://images.cnblogs.com/cnblogs_com/oomusou/WindowsLiveWriter/DE2_NIOS_Lite1.1SOCNiosIISOPCBuilderDE2_94B4/de2_nios_lite_11_01_3919b52e-0a14-43de-99c6-a9986af49e57.gif)
Step 2:
在SDRAM執行
預設會跑在onchip memory,由於onchip memory太小,μC/OS-II執行一定失敗,所以改跑在SDRAM上。
![](http://images.cnblogs.com/cnblogs_com/oomusou/WindowsLiveWriter/DE2_NIOS_Lite1.1SOCNiosIISOPCBuilderDE2_94B4/de2_nios_lite_11_02_fb8fc017-8199-407c-bf59-c35e91c7095c.gif)
Step 3:
μC/OS-II Tutorial project template執行結果
nios2-terminal: connected to hardware target using JTAG UART on cable
nios2-terminal: "USB-Blaster [USB-0]", device 1, instance 0
nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)
Hello from task1
****************************************************************
Hello From MicroC/OS-II Running on NIOS II. Here is the status:
The number of messages sent by the send_task: 39
The number of messages received by the receive_task1: 10
The number of messages received by the receive_task2: 3
The shared resource is owned by: getsem_task2
The Number of times getsem_task1 acquired the semaphore 30
The Number of times getsem_task2 acquired the semaphore 24
****************************************************************
****************************************************************
Hello From MicroC/OS-II Running on NIOS II. Here is the status:
The number of messages sent by the send_task: 51
The number of messages received by the receive_task1: 19
The number of messages received by the receive_task2: 6
The shared resource is owned by: getsem_task2
The Number of times getsem_task1 acquired the semaphore 60
The Number of times getsem_task2 acquired the semaphore 47
****************************************************************
完整程式碼下載
DE2_NIOS_Lite_11.7z
Conclusion
常常聽到初學者在問這個Java錯誤訊息,因為我沒有遇過,所以想幫也無能為力,經由這次的經驗,我發現這個錯誤主要是在產生system.h時發生,system.h簡單的說就是SOPC Builder的register map,這樣Nios II的C才能透過system.h所定義的macro去存取SOPC Builder內的各ip。這次的錯誤,是由於μC/OS-II一定要timer ip,但卻找不到SOPC Builder的timer ip來產生system.h而導致錯誤。因此下次遇到這個錯誤訊息,可以朝SOPC Builder所缺少的ip下手,若初學者對於手動在SOPC Builder加入ip有困難,DE2 CD的Nios II reference design是很好的範例,他已經將所有DE2的周邊都加上了,或者參考(原創) 如何自己用SOPC Builder建立一個能在DE2上跑μC/OS-II的Nios II系統? (IC Design) (DE2) (Quartus II) (Nios II) (SOPC Builder) (μC/OS-II)與(原創) DE2_NIOS_Lite 1.0 (SOC) (Nios II) (SOPC Builder) (DE2)。
See Also
(原創) 如何自己用SOPC Builder建立一個能在DE2上跑μC/OS-II的Nios II系統? (IC Design) (DE2) (Quartus II) (Nios II) (SOPC Builder) (μC/OS-II)
(原創) DE2_NIOS_Lite 1.0 (SOC) (Nios II) (SOPC Builder) (DE2)
(原創) 如何自己用SOPC Builder建立一個能在DE2上跑μC/OS-II的Nios II系統 (SRAM精簡版)? (SOC) (Quartus II) (Nios II) (SOPC Builder) (μC/OS-II) (DE2)
(原創) DE2_NIOS_Lite 1.2 (SOC) (Nios II) (SOPC Builder) (DE2)
有網友發現DE2_Nios_Lite 1.0在μC/OS-II無法執行,1.1版修正對μC/OS-II的支援。
Introduction
[b]使用環境:Quartus II 7.2 SP3 + Nios II EDS 7.2 SP3 + [b][b]DE2(Cyclone II EP2C35F627C6)[/b][/b][/b]
在(原創) DE2_NIOS_Lite 1.0 (SOC) (Nios II) (SOPC Builder) (DE2)中,網友kdjwangz8發現在μC/OS-II會出現以下錯誤訊息:
**** Build of configuration Debug for project ucosii_tutorial_0 ****
make -s all includes
Creating generated_app.mk
Creating system.h
2008/8/22 下午 11:33:49 - (嚴重的) generate: java.lang.IllegalStateException: java.lang.IllegalStateException: java.lang.NumberFormatException: empty String
make[1]: *** [system_description/../obj/system.h-t] Error 1
make: *** [system_project] Error 2
Build completed in 12.157 seconds
原因在於DE2_Nios_Lite 1.0中,我在SOPC Builder沒有加上timer ip,若沒上OS,沒有timer也無仿,但若上了OS,則一定要加上timer才行。DE2_NIOS_Lite 1.1加上了timer ip。
![](http://images.cnblogs.com/cnblogs_com/oomusou/WindowsLiveWriter/DE2_NIOS_Lite1.1SOCNiosIISOPCBuilderDE2_94B4/de2_nios_lite_11_00_909e7753-ad3a-4427-919a-abbdca97702d.gif)
Remark
要能成功上μC/OS-II,還有幾個地方必須注意:
Step 1:
設定System clock timer
![](http://images.cnblogs.com/cnblogs_com/oomusou/WindowsLiveWriter/DE2_NIOS_Lite1.1SOCNiosIISOPCBuilderDE2_94B4/de2_nios_lite_11_01_3919b52e-0a14-43de-99c6-a9986af49e57.gif)
Step 2:
在SDRAM執行
預設會跑在onchip memory,由於onchip memory太小,μC/OS-II執行一定失敗,所以改跑在SDRAM上。
![](http://images.cnblogs.com/cnblogs_com/oomusou/WindowsLiveWriter/DE2_NIOS_Lite1.1SOCNiosIISOPCBuilderDE2_94B4/de2_nios_lite_11_02_fb8fc017-8199-407c-bf59-c35e91c7095c.gif)
Step 3:
μC/OS-II Tutorial project template執行結果
nios2-terminal: connected to hardware target using JTAG UART on cable
nios2-terminal: "USB-Blaster [USB-0]", device 1, instance 0
nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)
Hello from task1
****************************************************************
Hello From MicroC/OS-II Running on NIOS II. Here is the status:
The number of messages sent by the send_task: 39
The number of messages received by the receive_task1: 10
The number of messages received by the receive_task2: 3
The shared resource is owned by: getsem_task2
The Number of times getsem_task1 acquired the semaphore 30
The Number of times getsem_task2 acquired the semaphore 24
****************************************************************
****************************************************************
Hello From MicroC/OS-II Running on NIOS II. Here is the status:
The number of messages sent by the send_task: 51
The number of messages received by the receive_task1: 19
The number of messages received by the receive_task2: 6
The shared resource is owned by: getsem_task2
The Number of times getsem_task1 acquired the semaphore 60
The Number of times getsem_task2 acquired the semaphore 47
****************************************************************
完整程式碼下載
DE2_NIOS_Lite_11.7z
Conclusion
常常聽到初學者在問這個Java錯誤訊息,因為我沒有遇過,所以想幫也無能為力,經由這次的經驗,我發現這個錯誤主要是在產生system.h時發生,system.h簡單的說就是SOPC Builder的register map,這樣Nios II的C才能透過system.h所定義的macro去存取SOPC Builder內的各ip。這次的錯誤,是由於μC/OS-II一定要timer ip,但卻找不到SOPC Builder的timer ip來產生system.h而導致錯誤。因此下次遇到這個錯誤訊息,可以朝SOPC Builder所缺少的ip下手,若初學者對於手動在SOPC Builder加入ip有困難,DE2 CD的Nios II reference design是很好的範例,他已經將所有DE2的周邊都加上了,或者參考(原創) 如何自己用SOPC Builder建立一個能在DE2上跑μC/OS-II的Nios II系統? (IC Design) (DE2) (Quartus II) (Nios II) (SOPC Builder) (μC/OS-II)與(原創) DE2_NIOS_Lite 1.0 (SOC) (Nios II) (SOPC Builder) (DE2)。
See Also
(原創) 如何自己用SOPC Builder建立一個能在DE2上跑μC/OS-II的Nios II系統? (IC Design) (DE2) (Quartus II) (Nios II) (SOPC Builder) (μC/OS-II)
(原創) DE2_NIOS_Lite 1.0 (SOC) (Nios II) (SOPC Builder) (DE2)
(原創) 如何自己用SOPC Builder建立一個能在DE2上跑μC/OS-II的Nios II系統 (SRAM精簡版)? (SOC) (Quartus II) (Nios II) (SOPC Builder) (μC/OS-II) (DE2)
(原創) DE2_NIOS_Lite 1.2 (SOC) (Nios II) (SOPC Builder) (DE2)
相关文章推荐
- (原創) DE2_NIOS_Lite 1.0 (SOC) (Nios II) (SOPC Builder) (DE2)
- (原創) 如何自己用SOPC Builder建立一個能在DE2上跑μC/OS-II的Nios II系統 (SRAM精簡版)? (SOC) (Quartus II) (Nios II) (SOPC Builder) (μC/OS-II) (DE2)
- (原創) DE2-70能玩些什麼? (SOC) (Verilog) (Quartus II) (SOPC Builder) (Nios II) (μC/OS-II) (DE2-70)
- (原創) 哪裡有DE2-70的Nios II reference design可以參考? (SOC) (DE2-70) (Nios II) (SOPC Builder)
- (原創) DE2_NIOS_Lite 1.2 (SOC) (Nios II) (SOPC Builder) (DE2)
- (原創) 如何在DE2將CCD影像顯示在彩色LCD? (Nios II軟體篇 + μC/OS-II + SRAM + 驅動程式) (IC Design) (DE2) (Nios II) (μC/OS-II) (SOPC Builder) (TRDB-LCM)
- (原創) 如何解決Nios II的『Leaving target processor paused』的錯誤訊息 (II)? (SOC) (Nios II) (SOPC Builder) (DE2-70)
- (原創) 如何自己用SOPC Builder建立一個能在DE2上跑μC/OS-II的Nios II系統? (IC Design) (DE2) (Quartus II) (Nios II) (SOPC Builder) (μC/OS-II)
- (原創) 如何讓Nios II一Power On就執行? (SOC) (Nios II) (SOPC Builder) (DE2) (DE2-70)
- (原創) 如何從Nios II讀出CMOS放在SDRAM中的影像? (SOC) (SOPC Builder) (Nios II) (DE2-70) (TRDB-D5M) (TRDB-LTM)
- (原創) 如何設計一個SD卡Wav Player? (SOC) (Quartus II) (SOPC Builder) (Nios II) (DE2-70)
- (原創) 如何使用ModelSim-Altera對Nios II仿真? (SOC) (Nios II) (SOPC Builder) (ModelSim) (DE2)
- (原創) 如何使用Pipeline Bridge增進Nios II系統的Fmax? (SOC) (Quartus II) (Nios II) (SOPC Builder) (DE2-70)
- (原創) 深入探討Altera的Checksum Master範例 (SOC) (SOPC Builder) (Nios II) (DE2)
- (原創) 如何在Nios II顯示8位數的七段顯示器? (SOC) (Nios II) (SOPC Builder) (DE2-70)
- (原創) 如何以32 bit的方式存取SDRAM? (SOC) (Nios II) (SOPC Builder) (DE2-70)
- (原創) 如何讓Nios II自動抓到自己寫的IP的HAL? (SOC) (Nios II) (SOPC Builder) (DE2-70)
- (原創) 如何傳參數到每個task? (SOC) (Nios II) (μC/OS-II) (DE2-70)
- 【转】(原創) 如何使用ModelSim-Altera對Nios II仿真? (SOC) (Nios II) (SOPC Builder) (ModelSim) (DE2)
- (原創) 如何使用Nios II C2H compiler? (IC Design) (DE2) (Nios II) (Quartus II) (SOPC Builder) (C/C++) (C2H)