自作のAXI IPパッケージを含むデザイン用のプロジェクトをVitisでコンパイルしようとすると次のようなエラーが表示されました。エラーは、Vitisプロジェクトでsystem_wrapperをコンパイルする時に発生しています。
"Running Make include in microblaze_0/libsrc/spi_oc_v1_0/src"
make -C microblaze_0/libsrc/spi_oc_v1_0/src -s include "SHELL=CMD" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COMPI
LER_FLAGS= -O2 -c -mcpu=v11.0 -mlittle-endian -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wal
l -Wextra"
"Running Make include in microblaze_0/libsrc/standalone_v7_3/src"
make -C microblaze_0/libsrc/standalone_v7_3/src -s include "SHELL=CMD" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "C
OMPILER_FLAGS= -O2 -c -mcpu=v11.0 -mlittle-endian -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections
-Wall -Wextra"
"Running Make include in microblaze_0/libsrc/uartlite_v3_5/src"
make -C microblaze_0/libsrc/uartlite_v3_5/src -s include "SHELL=CMD" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COM
PILER_FLAGS= -O2 -c -mcpu=v11.0 -mlittle-endian -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -W
all -Wextra"
"Running Make libs in microblaze_0/libsrc/spi_oc_v1_0/src"
make -C microblaze_0/libsrc/spi_oc_v1_0/src -s libs "SHELL=CMD" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COMPILER
_FLAGS= -O2 -c -mcpu=v11.0 -mlittle-endian -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -
Wextra"
"Compiling spi_oc..."
spi_oc_selftest.c: In function 'SPI_OC_Reg_SelfTest':
spi_oc_selftest.c:52:55: warning: comparison of integer expressions of different signedness: 'u32' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
52 | if ( SPI_OC_mReadReg (baseaddr, read_loop_index*4) != (read_loop_index+1)*READ_WRITE_MUL_FACTOR){
| ^~
spi_oc_selftest.c:36:6: warning: unused variable 'Index' [-Wunused-variable]
36 | int Index;
| ^~~~~
mb-ar: creating ../../../lib/libxil.a
mb-ar: *.o: Invalid argument
make[2]: *** [Makefile:19: libs] Error 1
make[1]: *** [Makefile:46: microblaze_0/libsrc/spi_oc_v1_0/src/make.libs] Error 2
make: *** [Makefile:18: all] Error 2
Failed to build the bsp sources for domain - standalone_microblaze_0
Failed to generate the platform.
Reason: Failed to build the bsp sources for domain - standalone_microblaze_0
invoked from within
"::tcf::eval -progress {apply {{msg} {puts $msg}}} {tcf_send_command tcfchan#0 xsdb eval s es {{platform active system_wrapper; platform generate }}}"
(procedure "::tcf::send_command" line 4)
invoked from within
"tcf send_command $::xsdb::curchan xsdb eval s es [list "platform active $PLATFORM_NAME; platform generate $target"]"
invoked from within
"if { $iswindows == 1 } {
set XSDB_PORT [lindex $argv 0]
set PLATFORM_NAME [lindex $argv 1]
set arglen [llength $argv]
set lastind..."
09:46:51 Build Finished (took 2s.748ms)
Vivadoのプロジェクトから自作IPを削除するとエラーが出なくなるので、原因は自作IPが関係してそうです。
原因と解決策
Vitisに関係しそうなファイルは、IPのひな形を生成した時に作成されるSoftware Driverなので、これらのファイルをすべて削除しました。
SoftwareDriverを削除してから Vivadoでbitstream生成とExport Hardwareを実行し、再度vitisでコンパイルを実行すると、エラーが消えて問題なくコンパイルできるようになりました。