[VEEK]Application Selector用HW(.sof -> .flash -> .bin), SW(.elf -> .bin)ファイル作成方法
どんなファイルを用意すればApplication Selectorで読めるのか?を調べた。
◆pdfのpage44のCreating Your Own Loadable Applications説明和訳
・必要な物は、HWイメージ(.sof)と、それ上で動くSWイメージ(NIOS II .elf)のみ。
・制約は以下だけ。
- HWデザインはCFI Flash controllerを含む事。
- .SOFがNios IIを含むなら、リセットアドレス=CFI Flash、offset 0x0 にする。
- プログラムメモリ (.text section)はフラッシュメモリへセット。
・.SOFと.ELFは以下ステップで変換。
- Nios II Command Shell起動(Start ->Programs -> Altera -> Nios IIEDS -> Nios II Command Shell)
- sof2flash --epcs --input=*.sof --output=*_HW.flash
- nios2-elf-objcopy –I srec –O binary *_HW.flash *_HW.bin
- nios2-elf-objcopy –O binary *.elf *_SW.bin
- SDカード内Dir構成: Application_Selector\<表示アプリ名>\*_SW.bin & *_HW.bin
・今やってる「Linux with MMU on VEEK/t-Pad」を参考にやってみる。
ちなみに、Cygwinではエラーが出て出来なかった。
x230: sof2flash --epcs --input= DE2_115_NIOS_HOST_MOUSE_VGA_time_limited.sof --output= DE2_115_NIOS_HOST_MOUS
E_VGA_time_limited_HW.flash
: No such file or directorys2eds/bin/sof2flash: line 4: /cygdrive/c/altera/13.1/nios2eds/bin/sh_jar.sh
・さらに、この記事によると、ふつーに実行してもダメらしい。
http://shopaltera.com/support/kdb/solutions/rd11112013_614.html
確かに、記事にあるQUARTUS_BINDIR変数を設定しなかったら、実行してもエラーは出ないが何も生成されなかった。
なので、ちゃんとNios Command Shellをスタートメニューのプログラムから起動して、さらに記事に従い変数も設定して実行してみた。しかしエラー。
bob@x230 /cygdrive/c/user/work/veek/Linux_with_MMU_on_VEEK_t-Pad/DE2_115_NIOS_HOST_MOUSE_VGA_restored
$ export QUARTUS_BINDIR=${QUARTUS_ROOTDIR}/bin
bob@x230 /cygdrive/c/user/work/veek/Linux_with_MMU_on_VEEK_t-Pad/DE2_115_NIOS_HOST_MOUSE_VGA_restored
$ sof2flash --epcs --input=DE2_115_NIOS_HOST_MOUSE_VGA_time_limited.sof --output=DE2_115_NIOS_HOST_MOUSE_VGA_time_
limited_HW.flash
Info: *******************************************************************
Info: Running Quartus II 32-bit Convert_programming_file
Info: Command: quartus_cpf --no_banner --convert --device=EPCS128 --option=DE2_115_NIOS_HOST_MOUSE_VGA_time_limited
_HW.opt DE2_115_NIOS_HOST_MOUSE_VGA_time_limited.sof DE2_115_NIOS_HOST_MOUSE_VGA_time_limited_HW.pof
File DE2_115_NIOS_HOST_MOUSE_VGA_time_limited.sof contains one or more time-limited megafunctions that support the
OpenCore Plus feature that will not work after the hardware evaluation time expires. Refer to the Messages window f
or evaluation time details.
Info (210040): SRAM Object File DE2_115_NIOS_HOST_MOUSE_VGA_time_limited.sof contains time-limited megafunction tha
t supports OpenCore Plus feature -- Vendor: 0x6AF7, Product: 0x00A2
Error: Quartus II 32-bit Convert_programming_file was unsuccessful. 0 errors, 0 warnings
Error: Peak virtual memory: 199 megabytes
Error: Processing ended: Sun Jan 05 02:43:54 2014
Error: Elapsed time: 00:00:03
Error: Total CPU time (on all processors): 00:00:03
Info: *******************************************************************
Info: Running Quartus II 32-bit Convert_programming_file
Info: Command: quartus_cpf --no_banner --convert DE2_115_NIOS_HOST_MOUSE_VGA_time_limited_HW.pof DE2_115_NIOS_HOST_
MOUSE_VGA_time_limited_HW.rpd
Error (213009): File name "DE2_115_NIOS_HOST_MOUSE_VGA_time_limited_HW.pof" does not exist
Error: Quartus II 32-bit Convert_programming_file was unsuccessful. 1 error, 0 warnings
Error: Peak virtual memory: 183 megabytes
Error: Processing ended: Sun Jan 05 02:43:57 2014
Error: Elapsed time: 00:00:01
Error: Total CPU time (on all processors): 00:00:01
2014/01/05 2:43:57 - (致命的) sof2flash: Read error: File: DE2_115_NIOS_HOST_MOUSE_VGA_time_limited_HW.rpd not foun
d, exiting
2014/01/05 2:43:57 - (致命的) sof2flash: Error retrieving data from DE2_115_NIOS_HOST_MOUSE_VGA_time_limited_HW.rpd