- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
■概要(質問の経緯)
下記環境を使用し、下記資料1のP.17~P.20の手順で作業したところ、ビルド時エラーが発生しましたが、プログラムサイズを小さくすることで回避しました。
・デザイン:Nios II ADC /LCD Display Controller Design Example
・ツール
QuartusPSE v17.1
・資料1
https://fpgawiki.intel.com/uploads/b/b4/Evalkit_adc_lcd_controller_userguide.pdf
■エラー内容
資料1の手順10のBuild Allで下記エラーメッセージ1が発生します
//エラーメッセージ1//
Task欄
16:32:21 **** Incremental Build of configuration Nios II for project niosMAx10EvalBoard ****
make all
Info: Building ../niosMAx10EvalBoard_bsp/
C:/intelFPGA/17.1/nios2eds/bin/gnu/H-x86_64-mingw32/bin/make --no-print-directory -C ../niosMAx10EvalBoard_bsp/
[BSP build complete]
Info: Linking niosMAx10EvalBoard.elf
nios2-elf-g++ -T'../niosMAx10EvalBoard_bsp//linker.x' -msys-crt0='../niosMAx10EvalBoard_bsp//obj/HAL/src/crt0.o' -msys-lib=hal_bsp -L../niosMAx10EvalBoard_bsp/ -Wl,-Map=niosMAx10EvalBoard.map -O0 -g -Wall -mno-hw-div -mno-hw-mul -mno-hw-mulx -mgpopt=global -o niosMAx10EvalBoard.elf obj/default/src/devices/adcMAX10.o obj/default/src/devices/lcdGeneric.o obj/default/src/devices/mcp23017.o obj/default/src/drivers/i2c.o obj/default/src/main.o -lm -msys-lib=m
c:/intelfpga/17.1/nios2eds/bin/gnu/h-x86_64-mingw32/bin/../lib/gcc/nios2-elf/5.3.0/../../../../../H-x86_64-mingw32/nios2-elf/bin/ld.exe: address 0x8d50 of niosMAx10EvalBoard.elf section `.rwdata' is not within region `ONCHIP_RAM_16K'
c:/intelfpga/17.1/nios2eds/bin/gnu/h-x86_64-mingw32/bin/../lib/gcc/nios2-elf/5.3.0/../../../../../H-x86_64-mingw32/nios2-elf/bin/ld.exe: address 0xa4ec of niosMAx10EvalBoard.elf section `.bss' is not within region `ONCHIP_RAM_16K'
c:/intelfpga/17.1/nios2eds/bin/gnu/h-x86_64-mingw32/bin/../lib/gcc/nios2-elf/5.3.0/../../../../../H-x86_64-mingw32/nios2-elf/bin/ld.exe: address 0x8d50 of niosMAx10EvalBoard.elf section `.rwdata' is not within region `ONCHIP_RAM_16K'
c:/intelfpga/17.1/nios2eds/bin/gnu/h-x86_64-mingw32/bin/../lib/gcc/nios2-elf/5.3.0/../../../../../H-x86_64-mingw32/nios2-elf/bin/ld.exe: address 0xa4ec of niosMAx10EvalBoard.elf section `.bss' is not within region `ONCHIP_RAM_16K'
collect2.exe: error: ld returned 1 exit status
make: *** [niosMAx10EvalBoard.elf] Error 1
16:32:23 Build Finished (took 1s.854ms)
■原因
下記URLよりプログラムサイズが、on chip memory のサイズをオーバーしている可能性があると分かりました。
https://service.macnica.co.jp/support/faq/120145
■回避方法
そこで、下記方法によりプログラムサイズを小さくしたところ正常にビルドできました。
[ハード部分の手順]
・PlatformDesigner起動
・ONCHIP_RAM_16KブロックのInitialize memory contentにチェックを入れる
・System > Assign Base Address
・再Generate
・Quartusで再コンパイル
[ソフト部分の手順]
・資料1のHow to compile the softwareの中で、下記のtempltesを使用してビルドする。
Hello World Smallのtempltes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By right, when it's fail to compile, you should be able to see the error message in NIOS console that shows how much of memory size needed. If there is no such details, you could enlarge the onchip memory size or use other larger off-board memory to build the project and evaluate the resources.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These are two command lines to check the program size from .elf https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/nios2/edh_ed51004.pdf
1) nios2-stackreport <>.elf
2) nios2-elf-size <>.elf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ご返信ありがとうございます。
ビルドエラーが発生した場合、elfファイルは生成されません。
その場合、どのくらいのプログラムサイズになるのか確認する方法はあるでしょうか。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By right, when it's fail to compile, you should be able to see the error message in NIOS console that shows how much of memory size needed. If there is no such details, you could enlarge the onchip memory size or use other larger off-board memory to build the project and evaluate the resources.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page