VidorBitstreamがビルドできない原因を探ってみました

気を取り直して、MKRVIDOR4000_graphicsがビルドできない原因を考えてみます。

まずは改めてビルドして気になるところを洗い出してみます。

$ ./intelFPGA_lite/18.1/nios2eds/nios2_command_shell.sh 
------------------------------------------------
Altera Nios2 Command Shell [GCC 4]

Version 18.1, Build 625
------------------------------------------------
$ cd intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/
$ time build_all.sh
2019.02.24.15:35:06 Info: Saving generation log to /home/xxx/intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/build/MKRVIDOR4000_graphics_lite_sys/MKRVIDOR4000_graphics_lite_sys_generation.rpt
2019.02.24.15:35:06 Info: Starting: <b>Create HDL design files for synthesis</b>
2019.02.24.15:35:06 Info: qsys-generate /home/xxx/intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/build/MKRVIDOR4000_graphics_lite_sys.qsys --synthesis=VERILOG --output-directory=/home/xxx/intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/build/MKRVIDOR4000_graphics_lite_sys/synthesis --family="Cyclone 10 LP" --part=10CL016YU256C8G
2019.02.24.15:35:06 Info: Loading build/MKRVIDOR4000_graphics_lite_sys.qsys
  :
  :
##########################################
#        using local bsp settings        #
##########################################
nios2-bsp: Using /home/xxx/intelFPGA_lite/18.1/nios2eds/sdk2/bin/bsp-set-defaults.tcl to set system-dependent settings.
nios2-bsp: Updating existing BSP because ./build/software/launcher_lite_bsp/settings.bsp exists.
nios2-bsp: Running "nios2-bsp-update-settings --settings ./build/software/launcher_lite_bsp/settings.bsp --bsp-dir ./build/software/
  :
  :
INFO: Updating BSP settings...
INFO: nios2-bsp-update-settings --settings ./build/software/launcher_lite_bsp/settings.bsp --bsp-dir ./build/software/launcher_lite_bsp --sopc ./build/MKRVIDOR4000_graphics_lite_sys.sopcinfo --script /home/xxx/intelFPGA_lite/18.1/nios2eds/sdk2/bin/bsp-set-defaults.tcl 
  :
  :
INFO: Initializing BSP components...
  :
  :
INFO: Finished initializing SOPC project local software IP. Total time taken = 2 seconds
INFO: Searching for BSP components with category: driver_element
INFO: Searching for BSP components with category: software_package_element
INFO: No memory regions found in BSP Settings File. Default memory regions generated. 
INFO: Found Flash Memory: qspi_avl_mem for CPU: nios2_gen2_0
INFO: Loading drivers from ensemble report. 
INFO: Finished loading drivers from ensemble report.
INFO: Tcl message: "No STDIO character device"
INFO: Tcl message: "System timer device is timer_0"
INFO: Tcl message: "Default instruction linker sections mapped to onchip_memory2_0"
INFO: Tcl message: "Default data linker sections mapped to SDRAM_ARBITER"
INFO: Tcl message: "Setting specified section .rwdata to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .bss to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .heap to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .entry to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .text to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .rodata to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .data to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .stack to map to region onchip_memory2_0"
INFO: Tcl message: "No bootloader located at the reset address."
INFO: Tcl message: "Application ELF allowed to contain code at the reset address."
INFO: Tcl message: "The alt_load() facility is enabled."
INFO: Tcl message: "The .rwdata section is copied into RAM by alt_load()."
SEVERE: Driver not found: 'arduino_generic_quad_spi_controller2 of any version
WARNING: Tcl command "set_driver arduino_generic_quad_spi_controller2 qspi" error: Driver not found: 'arduino_generic_quad_spi_controller2 of any version
  :
  :
Compiling sf.c...
nios2-elf-gcc -xc -MP -MMD -c  -I./HAL/inc -I. -I./drivers/inc -pipe -D__hal__ -DALT_NO_C_PLUS_PLUS -DALT_NO_CLEAN_EXIT -D'exit(a)=_exit(a)' -DALT_NO_EXIT -DALT_USE_DIRECT_DRIVERS -DALT_NO_INSTRUCTION_EMULATION -DALT_USE_SMALL_DRIVERS -DSMALL_C_LIB -DALT_SINGLE_THREADED  -DNO_RPC=1  -Os -g -Wall -DFREE_VERSION=1 -mno-hw-div -mno-hw-mul -mno-hw-mulx -mgpopt=global   -o obj/drivers/src/sf.o drivers/src/sf.c
drivers/src/sf.c:31:52: fatal error: arduino_generic_quad_spi_controller2.h: No such file or directory  <---- これが致命的にだめな気がする
compilation terminated.
Makefile:681: recipe for target 'obj/drivers/src/sf.o' failed
make[1]: *** [obj/drivers/src/sf.o] Error 1
Makefile:900: recipe for target '../launcher_lite_bsp-recurs-make-lib' failed
make: *** [../launcher_lite_bsp-recurs-make-lib] Error 2
make: ディレクトリ '/home/xxx/intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/build/software/launcher' から出ます
make failed
##########################################
#        using local bsp settings        #
##########################################
  :
  :
2019/02/24 15:41:20 - (情報) elf2flash: args = --input=build/software/MKRVIDOR4000_graphics/MKRVIDOR4000_graphics_lite.elf --output=build/output_files/MKRVIDOR4000_graphics_lite.flash --base=0x008E0000 --end=0x008FFFFF --verbose --save
2019/02/24 15:41:20 - (普通) elf2flash: Starting
2019/02/24 15:41:20 - (普通) elf2flash: Done
projects
ip
cp: -r not specified; omitting directory './ip/GFX/arduino/Vidor_GFX/examples'
cp: -r not specified; omitting directory './ip/QUAD_ENCODER/arduino/VidorEncoder/examples'
cp: -r not specified; omitting directory './ip/NEOPIXEL/arduino/VidorNeopixel/examples'
cp: -r not specified; omitting directory './ip/MIPI_RX_ST/arduino/VidorCamera/examples'

real	6m31.672s
user	10m18.175s
sys	0m15.768s
$

途中で

SEVERE: Driver not found: 'arduino_generic_quad_spi_controller2 of any version
WARNING: Tcl command "set_driver arduino_generic_quad_spi_controller2 qspi" error: Driver not found: 'arduino_generic_quad_spi_controller2 of any version
  :
  :
drivers/src/sf.c:31:52: fatal error: arduino_generic_quad_spi_controller2.h: No such file or directory  <---- これが致命的にだめな気がする
compilation terminated.

というところがあって、arduino_generic_quad_spi_controller2が絡んで致命的にだめな感じです。

~/intelFPGA_lite/18.1/ip/altera/pgm/arduino_generic_qpsi_controller2 の下でリジェクトされたパッチが2つあったのですが、そのうちの対象の一つが arduino_generic_quad_spi_controller2_sw.tcl というファイル名なので、何か関連がありそうです。リジェクトされたパッチ arduino_generic_quad_spi_controller2_sw.tcl.rej を見てみます。

--- pgm/arduino_generic_qspi_controller2/arduino_generic_quad_spi_controller2_sw.tcl	2018.18-22 19:45:29.112314100 +0200
+++ pgm/arduino_generic_qspi_controller2/arduino_generic_quad_spi_controller2_sw.tcl	2018.18-22 19:45:06.047573800 +0200
@@ -16,10 +16,10 @@
 #
 
 # Create a new driver
-create_driver altera_generic_quad_spi_controller2
+create_driver arduino_generic_quad_spi_controller2
 
-# Associate it with some hardware known as "altera_generic_quad_spi_controller2"
-set_sw_property hw_class_name altera_generic_quad_spi_controller2
+# Associate it with some hardware known as "arduino_generic_quad_spi_controller2"
+set_sw_property hw_class_name arduino_generic_quad_spi_controller2
 
 # The version of this driver
 set_sw_property version 18.1
@@ -50,11 +50,11 @@
 #
 
 # Header files
-add_sw_property include_source HAL/inc/altera_generic_quad_spi_controller2.h
-add_sw_property include_source inc/altera_generic_quad_spi_controller2_regs.h
+add_sw_property include_source HAL/inc/arduino_generic_quad_spi_controller2.h
+add_sw_property include_source inc/arduino_generic_quad_spi_controller2_regs.h
 
 # C/C++ source files
-add_sw_property c_source HAL/src/altera_generic_quad_spi_controller2.c
+add_sw_property c_source HAL/src/arduino_generic_quad_spi_controller2.c
 
 # This driver supports HAL & UCOSII BSP (OS) types
 add_sw_property supported_bsp_type HAL

この中に、

 # Create a new driver
-create_driver altera_generic_quad_spi_controller2
+create_driver arduino_generic_quad_spi_controller2

というようなところがあるので、なんか関連はありそうです。arduino_generic_quad_spi_controller2_sw.tcl の中をみても、なぜリジェクトされたのかイマイチよくわかりません(適用されても良さそうな気がする)が、とにかく手動で適用してみます。(追記: 要は、arduino_generic_quad_spi_controller2_sw.tcl というファイルの中の16行目からの10行くらいと、50行目からの11行くらいのところにある「altera_generic_quad_spi_controller2」を「arduino_generic_quad_spi_controller2」に書き換える、ということです。)

もう一つのarduino_generic_qspi_controller2_hw.tclに対して1箇所失敗している方はかなり雰囲気が違うので、まずはこのまま再トライしてみることにしてみます。

$ time build_all.sh
2019.02.24.16:18:05 Info: Saving generation log to /home/xxx/intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/build/MKRVIDOR4000_graphics_lite_sys/MKRVIDOR4000_graphics_lite_sys_generation.rpt
2019.02.24.16:18:05 Info: Starting: <b>Create HDL design files for synthesis</b>
2019.02.24.16:18:05 Info: qsys-generate /home/xxx/intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/build/MKRVIDOR4000_graphics_lite_sys.qsys --synthesis=VERILOG --output-directory=/home/xxx/intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/build/MKRVIDOR4000_graphics_lite_sys/synthesis --family="Cyclone 10 LP" --part=10CL016YU256C8G
  :
  :
INFO: Finished initializing SOPC project local software IP. Total time taken = 2 seconds
INFO: Searching for BSP components with category: driver_element
INFO: Searching for BSP components with category: software_package_element
INFO: No memory regions found in BSP Settings File. Default memory regions generated. 
INFO: Found Flash Memory: qspi_avl_mem for CPU: nios2_gen2_0
INFO: Loading drivers from ensemble report. 
INFO: Finished loading drivers from ensemble report.
INFO: Tcl message: "No STDIO character device"
INFO: Tcl message: "System timer device is timer_0"
INFO: Tcl message: "Default instruction linker sections mapped to onchip_memory2_0"
INFO: Tcl message: "Default data linker sections mapped to SDRAM_ARBITER"
INFO: Tcl message: "Setting specified section .rwdata to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .bss to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .heap to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .entry to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .text to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .rodata to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .data to map to region onchip_memory2_0"
INFO: Tcl message: "Setting specified section .stack to map to region onchip_memory2_0"
INFO: Tcl message: "No bootloader located at the reset address."
INFO: Tcl message: "Application ELF allowed to contain code at the reset address."
INFO: Tcl message: "The alt_load() facility is enabled."
INFO: Tcl message: "The .rwdata section is copied into RAM by alt_load()."
INFO: Default memory regions will not be persisted in BSP Settings File.
INFO: Generated file "/home/xxx/intelFPGA_lite/VidorBitstream-release/projects/MKRVIDOR4000_graphics/build/software/launcher_lite_bsp/settings.bsp"
INFO: BSP settings updated
  :
  :
Compiling sf.c...
nios2-elf-gcc -xc -MP -MMD -c  -I./HAL/inc -I. -I./drivers/inc -pipe -D__hal__ -DALT_NO_C_PLUS_PLUS -DALT_NO_CLEAN_EXIT -D'exit(a)=_exit(a)' -DALT_NO_EXIT -DALT_USE_DIRECT_DRIVERS -DALT_NO_INSTRUCTION_EMULATION -DALT_USE_SMALL_DRIVERS -DSMALL_C_LIB -DALT_SINGLE_THREADED  -DNO_RPC=1  -Os -g -Wall -DFREE_VERSION=1 -mno-hw-div -mno-hw-mul -mno-hw-mulx -mgpopt=global   -o obj/drivers/src/sf.o drivers/src/sf.c
Compiling tmr.c...
  :
  :
create ram + flash app.ttf
2019/02/24 16:24:33 - (情報) elf2flash: args = --input=build/software/MKRVIDOR4000_graphics/MKRVIDOR4000_graphics_lite.elf --output=build/output_files/MKRVIDOR4000_graphics_lite.flash --base=0x008E0000 --end=0x008FFFFF --verbose --save
2019/02/24 16:24:33 - (普通) elf2flash: Starting
2019/02/24 16:24:33 - (普通) elf2flash: Done
projects
ip
cp: -r not specified; omitting directory './ip/GFX/arduino/Vidor_GFX/examples'
cp: -r not specified; omitting directory './ip/QUAD_ENCODER/arduino/VidorEncoder/examples'
cp: -r not specified; omitting directory './ip/NEOPIXEL/arduino/VidorNeopixel/examples'
cp: -r not specified; omitting directory './ip/MIPI_RX_ST/arduino/VidorCamera/examples'

real	6m45.698s
user	10m49.909s
sys	0m15.988s
$

ということで、当該箇所では特にエラーなく完了しました。

・・・ということで試してみると、

4:3サイズで全面白になった後、しばらく経ってからこんな表示に。
まあ、全く動いてないわけではないので、だいぶ進歩しました^^;

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)