cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jcortiz
Visitor
Visitor
537 Views
Registered: ‎11-25-2019

Vitis 2021.1 error Makefile

Jump to solution

Hi everyone,

I have migrated my project to Vivado 2021 and I'm trying to build HW with Vitis 2021.1. This project is working with Vivado 2020.2 and Vitis 2020.2. However, I have problems with Makefiles.


I have seen this AR, but problem continues after doing what that AR says.

https://www.xilinx.com/support/answers/75527.html

This is the error:

"Compiling ARM_SYSTEM..."

arm-xilinx-eabi-gcc.exe: error: *.c: Invalid argument
arm-xilinx-eabi-gcc.exe: fatal error: no input files
compilation terminated.
make[2]: *** [Makefile:20: libs] Error 1
make[1]: *** [Makefile:46: ps7_cortexa9_0/libsrc/ARM_SYSTEM_v1_0/src/make.libs] Error 2
make: *** [Makefile:18: all] Error 2

This is my makefile:

COMPILER=
ARCHIVER=
CP=cp
COMPILER_FLAGS=
EXTRA_COMPILER_FLAGS=
LIB=libxil.a

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

INCLUDEFILES=*.h
LIBSOURCES=*.c
OUTS = *.o
OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c)))
ASSEMBLY_OBJECTS = $(addsuffix .o, $(basename $(wildcard *.S)))

libs:
echo "Compiling ARM_SYSTEM..."
$(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}

I have modified it in these paths:
- HW/hw/drivers/ARM_SYSTEM_v1_0/src/Makefile
- HW/ps7_cortexa9_0/standalone_ps7_cortexa9_0/bsp/ps7_cortexa9_0/libsrc/ARM_SYSTEM_v1_0/src/Makefile
- HW/ps7_cortexa9_0/standalone_ps7_cortexa9_1/bsp/ps7_cortexa9_1/libsrc/ARM_SYSTEM_v1_0/src/Makefile
- HW/zynq_fsbl/zynq_fsbl_bsp/ps7_cortexa9_0/libsrc/ARM_SYSTEM_v1_0/src/Makefile

Thanks for your reply!

0 Kudos
1 Solution

Accepted Solutions
Programaths
Visitor
Visitor
167 Views
Registered: ‎09-06-2021

I made it stupid and it worked.

Pmods are the issue and it tells about "*.c" being invalid argument. Well, that means shell expansion didn't happen. Shell expansion is what would turn "*.c" into "foo.c bar.c" (if you were to have those two files lying in that directory)

So, I ended up looking up ALL the makefiles for my PMODS and did those substitutions:

COMPILER=
ARCHIVER=
CP=cp
COMPILER_FLAGS=
EXTRA_COMPILER_FLAGS=
LIB=libxil.a

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

INCLUDEFILES=$(wildcard *.h)
LIBSOURCES=$(wildcard *.c *.cpp)
OUTS =*.o
OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c *.cpp)))
ASSEMBLY_OBJECTS = $(addsuffix .o, $(basename $(wildcard *.S)))

libs:
echo "Compiling PmodMTDS..."
$(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}

 

This comes from there: https://www.xilinx.com/support/answers/75527.html

With a little addition, INCLUDEFILES and LIBSOURCES have also been changed.

 

Then you will have another error about "qemu_args.txt". In your system project, create the empty file with a similar path (I found it easier to use Exploprer --file browser-- for that):

C:\Users\Programaths\workspace\lcd_rotary\export\lcd_rotary\sw\lcd_rotary\qemu\qemu_args.txt

The part in bold is your system project name, and obviously the "C:\Users\Programaths\workspace" is the path to your Eclipse/Vitis workspace.

There are multiple Makefile for one PMOD:

  • C:\Users\Programaths\workspace\lcd_rotary\ps7_cortexa9_0\standalone_domain\bsp\ps7_cortexa9_0\libsrc\PmodMTDS_v1_0\src\Makefile
  • C:\Users\Programaths\workspace\lcd_rotary\zynq_fsbl\zynq_fsbl_bsp\ps7_cortexa9_0\libsrc\PmodMTDS_v1_0\src\Makefile
  • C:\Users\Programaths\workspace\lcd_rotary\hw\drivers\PmodMTDS_v1_0\src\Makefile

Also, they are almost all the same, so I simply did the changes once, then copied all over by tacking care of subtle difference. Here, the MTDS PMOD is also using cpp files, so LIBSOURCES references "*.cpp" wildcard.

View solution in original post

4 Replies
yzhang
Moderator
Moderator
452 Views
Registered: ‎05-11-2010

Can you upload your xsa file?

0 Kudos
etnapoli
Visitor
Visitor
221 Views
Registered: ‎12-25-2013

I wonder if you found a solution to this problems.

I also have the same problem and not being able to solve.

This looks like a VITIS bug. There will be a patch?

0 Kudos
Programaths
Visitor
Visitor
168 Views
Registered: ‎09-06-2021

I made it stupid and it worked.

Pmods are the issue and it tells about "*.c" being invalid argument. Well, that means shell expansion didn't happen. Shell expansion is what would turn "*.c" into "foo.c bar.c" (if you were to have those two files lying in that directory)

So, I ended up looking up ALL the makefiles for my PMODS and did those substitutions:

COMPILER=
ARCHIVER=
CP=cp
COMPILER_FLAGS=
EXTRA_COMPILER_FLAGS=
LIB=libxil.a

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

INCLUDEFILES=$(wildcard *.h)
LIBSOURCES=$(wildcard *.c *.cpp)
OUTS =*.o
OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c *.cpp)))
ASSEMBLY_OBJECTS = $(addsuffix .o, $(basename $(wildcard *.S)))

libs:
echo "Compiling PmodMTDS..."
$(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}

 

This comes from there: https://www.xilinx.com/support/answers/75527.html

With a little addition, INCLUDEFILES and LIBSOURCES have also been changed.

 

Then you will have another error about "qemu_args.txt". In your system project, create the empty file with a similar path (I found it easier to use Exploprer --file browser-- for that):

C:\Users\Programaths\workspace\lcd_rotary\export\lcd_rotary\sw\lcd_rotary\qemu\qemu_args.txt

The part in bold is your system project name, and obviously the "C:\Users\Programaths\workspace" is the path to your Eclipse/Vitis workspace.

There are multiple Makefile for one PMOD:

  • C:\Users\Programaths\workspace\lcd_rotary\ps7_cortexa9_0\standalone_domain\bsp\ps7_cortexa9_0\libsrc\PmodMTDS_v1_0\src\Makefile
  • C:\Users\Programaths\workspace\lcd_rotary\zynq_fsbl\zynq_fsbl_bsp\ps7_cortexa9_0\libsrc\PmodMTDS_v1_0\src\Makefile
  • C:\Users\Programaths\workspace\lcd_rotary\hw\drivers\PmodMTDS_v1_0\src\Makefile

Also, they are almost all the same, so I simply did the changes once, then copied all over by tacking care of subtle difference. Here, the MTDS PMOD is also using cpp files, so LIBSOURCES references "*.cpp" wildcard.

View solution in original post

etnapoli
Visitor
Visitor
153 Views
Registered: ‎12-25-2013

I see that in the end everybody finds its own solution. In every case this is something created by Vitis that has a bug, at least in thw win10 version 2021.1

I wonder if this will be patched or solved in 2021.2

0 Kudos