Xilinx / Vitis-Tutorials

Vitis In-Depth Tutorials
https://Xilinx.github.io/Vitis-Tutorials/
MIT License
1.26k stars 558 forks source link

GS/Vitis/ZCU102: makefile needs modification #68

Open yka2ki opened 3 years ago

yka2ki commented 3 years ago

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

Premduth commented 3 years ago

@imrickysu please look at this

imrickysu commented 3 years ago

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.

Candice-Yin commented 2 years ago

@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

imrickysu commented 2 years ago

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.

Candice-Yin commented 2 years ago

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

imrickysu commented 2 years ago

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.

Candice-Yin commented 2 years ago

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

imrickysu commented 2 years ago

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

Candice-Yin commented 2 years ago

@imrickysu You helped me a lot, thx!