Vitis-Tutorials icon indicating copy to clipboard operation
Vitis-Tutorials copied to clipboard

GS/Vitis/ZCU102: makefile needs modification

Open yka2ki opened this issue 3 years ago • 9 comments

https://github.com/Xilinx/Vitis-Tutorials/blob/master/Getting_Started/Vitis/example/zcu102/hw/Makefile

(Original) package/sd_card.img: app.exe vadd.xclbin xrt.ini run_app.sh $(call ndef,ROOTFS) v++ -p -t ${TARGET} --config ../../src/zcu102.cfg ./vadd.xclbin -o vadd.xclbin
--package.out_dir package
--package.rootfs ${ROOTFS}/rootfs.ext4
--package.sd_file vadd.xclbin
--package.sd_file ${ROOTFS}/Image
--package.sd_file xrt.ini
--package.sd_file emconfig.json
--package.sd_file app.exe
--package.sd_file run_app.sh

(Modified) package/sd_card.img: app.exe vadd.xclbin xrt.ini run_app.sh $(call ndef,ROOTFS) v++ -p -t ${TARGET} --config ../../src/zcu102.cfg ./vadd.xclbin
--package.out_dir package
--package.rootfs ${ROOTFS}/rootfs.ext4
--package.sd_file vadd.xclbin
--package.sd_file ${ROOTFS}/Image
--package.sd_file xrt.ini
--package.sd_file app.exe
--package.sd_file run_app.sh

yka2ki avatar May 05 '21 03:05 yka2ki

@imrickysu please look at this

Premduth avatar Aug 18 '21 16:08 Premduth

In Vitis 2021.1, the original Makefile generates error ERROR: [v++ 60-2504] The input file and output file cannot be the same. The Modified code can pass compilation, but it generates two xclbin files in sd_card directory: a.xclbin and vadd.xclbin.

ls Getting_Started/Vitis/example/zcu102/hw/package/sd_card/
app.exe   BOOT.BIN  Image    platform_desc.txt  system.dtb   xrt.ini
a.xclbin  boot.scr  init.sh  run_app.sh         vadd.xclbin

Investigating how to reduce the redundancy.

imrickysu avatar Aug 21 '21 03:08 imrickysu

@imrickysu Hi, I met the same question, and I modified it in this way. But then I have another question, do you have any ideas? Thank you. image

Candice-Yin avatar Jan 06 '22 13:01 Candice-Yin

Hi @Candice-Yin , in your modified makefile, package.out_dir is being treated as a makefile target. Maybe you added an extra new line. Please check.

imrickysu avatar Jan 06 '22 14:01 imrickysu

I solved it. Thank you very much! @imrickysu During hardware emulation, I have an error about ./package/launch_hw_emu.sh. Could you please have a look at it? 6c3848699a9bb3637843105213f4893

Candice-Yin avatar Jan 07 '22 07:01 Candice-Yin

Hi @Candice-Yin , I don't see a hard stop error in your messages. Your Linux has boot up. There are some application level errors. Your Linux system should still work. If you hit enter, it should show you the input cursor.

imrickysu avatar Jan 07 '22 07:01 imrickysu

hi @imrickysu , it displayed “ Current directory: 0" when I continued typing. 3c6a82ce12df8b5931bcb27bf076693

Candice-Yin avatar Jan 07 '22 07:01 Candice-Yin

@Candice-Yin It's a valid error message. Please add your xclbin file as an argument to app.exe.

imrickysu avatar Jan 07 '22 07:01 imrickysu

@imrickysu You helped me a lot, thx!

Candice-Yin avatar Jan 07 '22 07:01 Candice-Yin