Author Topic: Vitis 2023.1 would fail to compile when I add a custom IP  (Read 3073 times)

0 Members and 1 Guest are viewing this topic.

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Vitis 2023.1 would fail to compile when I add a custom IP
« on: November 21, 2023, 08:51:58 am »
Hi
I have designed a simple microblaze with some GPIO output to test some LED's It would implement and generate bitstream and I can successfully generate the Vitis project, compile and debug it.

But when I add a simple custom AXI slave IP to the project, the project would be implemented ok in vivado, But when I update the Vitis project, it would fail to compile, it would generate errors,

the only changes that I made to the axi slave IP is this
I have changed these lines like this

2'h2   : reg_data_out <= slv_reg0 + slv_reg1;
2'h3   : reg_data_out <= slv_reg0 - slv_reg1;

Code: [Select]
assign slv_reg_rden = axi_arready & S_AXI_ARVALID & ~axi_rvalid;
always @(*)
begin
      // Address decoding for reading registers
      case ( axi_araddr[ADDR_LSB+OPT_MEM_ADDR_BITS:ADDR_LSB] )
        2'h0   : reg_data_out <= slv_reg0;
        2'h1   : reg_data_out <= slv_reg1;
                2'h2   : reg_data_out <= slv_reg0 + slv_reg1;
        2'h3   : reg_data_out <= slv_reg0 - slv_reg1;
        default : reg_data_out <= 0;
      endcase
end

The generated Error log

Code: [Select]
buildplatform.bat 58521 design_1_wrapper 
XSDB Server Channel: tcfchan#4
Building the BSP Library for domain  - standalone_microblaze_0 on processor microblaze_0
make --no-print-directory seq_libs

"Running Make include in microblaze_0/libsrc/bram_v4_8/src"

make -C microblaze_0/libsrc/bram_v4_8/src -s include  "SHELL=CMD" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COMPILE
R_FLAGS=  -O2 -c -mcpu=v11.0 -mlittle-endian -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall
-Wextra -fno-tree-loop-distribute-patterns"

"Running Make include in microblaze_0/libsrc/cpu_v2_17/src"

make -C microblaze_0/libsrc/cpu_v2_17/src -s include  "SHELL=CMD" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COMPILE
R_FLAGS=  -O2 -c -mcpu=v11.0 -mlittle-endian -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall
-Wextra -fno-tree-loop-distribute-patterns"

"Running Make include in microblaze_0/libsrc/gpio_v4_9/src"

make -C microblaze_0/libsrc/gpio_v4_9/src -s include  "SHELL=CMD" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COMPILE
R_FLAGS=  -O2 -c -mcpu=v11.0 -mlittle-endian -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall
-Wextra -fno-tree-loop-distribute-patterns"

"Running Make include in microblaze_0/libsrc/myTestip_v1_0/src"

make -C microblaze_0/libsrc/myTestip_v1_0/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 -fno-tree-loop-distribute-patterns"

"Running Make include in microblaze_0/libsrc/standalone_v8_1/src"

make -C microblaze_0/libsrc/standalone_v8_1/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 -fno-tree-loop-distribute-patterns"

"Running Make libs in microblaze_0/libsrc/myTestip_v1_0/src"

make -C microblaze_0/libsrc/myTestip_v1_0/src -s libs  "SHELL=CMD" "COMPILER=mb-gcc" "ASSEMBLER=mb-as" "ARCHIVER=mb-ar" "COMPIL
ER_FLAGS=  -O2 -c -mcpu=v11.0 -mlittle-endian -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall
 -Wextra -fno-tree-loop-distribute-patterns"

"Compiling myTestip..."

cc1.exe: fatal error: *.c: Invalid argument
compilation terminated.
make[2]: *** [Makefile:18: libs] Error 1
make[1]: *** [Makefile:46: microblaze_0/libsrc/myTestip_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 design_1_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..."
    (file "C:/Xilinx/Vitis/2023.1\scripts\vitis\util\buildplatform.tcl" line 11)
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Daixiwen

  • Frequent Contributor
  • **
  • Posts: 365
  • Country: no
Re: Vitis 2023.1 would fail to compile when I add a custom IP
« Reply #1 on: November 21, 2023, 09:24:24 am »
It looks like when you created your IP, vivado created also some source files for the software project, probably so that you can write a driver for the BSP.
Have a look at the files in microblaze_0/libsrc/myTestip_v1_0/src/
My guess from the error message is that the generated makefile (make.libs) wants to compile some c files in the src folder but can't find any. Try and see if you can modify the makefile, or create an empty c file in the src folder so that make is happy. You'll need to write your driver in there later on anyway
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Re: Vitis 2023.1 would fail to compile when I add a custom IP
« Reply #2 on: November 21, 2023, 09:46:07 am »
Vivado and Vitis sucks, why they do not use or update their software, they use the stupid eclipse IDE instead of VScode too, :palm: :palm: :palm:

I have fond the solution, so others can use it later

the Generated makefile is wrong, plain stupid for AMD, you should update it like this to work

see the updated make file, even their solution article is not working and it's not updated, does anyone really use their Vitis or microblaze? because it seems no one has tested the damn thing before uploading it.
https://support.xilinx.com/s/article/75527?language=en_US
Quote
COMPILER=
ARCHIVER=
CP=cp
COMPILER_FLAGS=
EXTRA_COMPILER_FLAGS=
LIB=libxil.a

RELEASEDIR=../../../lib
INCLUDEDIR=../../../include
INCLUDES=-I./. -I${INCLUDEDIR}

INCLUDEFILES=*.h
LIBSOURCES=$(wildcard *.c)
OUTS = *.o
OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c)))
ASSEMBLY_OBJECTS = $(addsuffix .o, $(basename $(wildcard *.S)))
libs:
   echo "Compiling myTestip..."
   $(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
   $(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OBJECTS} ${ASSEMBLY_OBJECTS}
   make clean

include:
   ${CP} $(INCLUDEFILES) $(INCLUDEDIR)

clean:
   rm -rf ${OBJECTS} ${ASSEMBLY_OBJECTS}

ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 

Offline Boscoe

  • Frequent Contributor
  • **
  • Posts: 279
Re: Vitis 2023.1 would fail to compile when I add a custom IP
« Reply #3 on: November 22, 2023, 08:06:43 pm »
I feel your pain on Vitis, Vivado I don’t have any critical problems with at the moment. Vitis 2023.1 would break when using MIPI DSI, 2023.2 on Linux and Windows fail to debug the target. 2023.2 unified can’t create new projects or import old ones on both platforms. At the moment, the development on my project has stopped because the tooling is actually just broken… unbelievable. How do they output this shit?
 

Offline ali_asadzadehTopic starter

  • Super Contributor
  • ***
  • Posts: 1929
  • Country: ca
Re: Vitis 2023.1 would fail to compile when I add a custom IP
« Reply #4 on: November 23, 2023, 12:09:48 pm »
Quote
I feel your pain on Vitis, Vivado I don’t have any critical problems with at the moment. Vitis 2023.1 would break when using MIPI DSI, 2023.2 on Linux and Windows fail to debug the target. 2023.2 unified can’t create new projects or import old ones on both platforms. At the moment, the development on my project has stopped because the tooling is actually just broken… unbelievable. How do they output this shit?
It's unbelievable |O |O |O
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf