Hello everyone, I'm having some difficulty getting applications to compile in Vitis for deployment on embedded Linux. I thought the way I setup the platform project was correct because the included header files were found by Vitis. However, when I compile the program it seems to fail. The weird thing is that it actually did compile and run on my Cora Z7-10 when I hadn't populated all the fields for the platform project. So I believe I may be doing something incorrectly here. How am I supposed to setup the Vitis project properly to get applications for Linux to compile on them?
Above is how I setup my platform project in Vitis with (what I think is) the relevant petalinux directory information.
Building target: HelloWorldApp.elf
Invoking: ARM v7 Linux gcc linker
arm-linux-gnueabihf-gcc -L/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi/lib -L/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi/usr/lib -o "HelloWorldApp.elf" ./src/helloworld.o --sysroot=/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi -Wl,-rpath-link=/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi/lib -Wl,-rpath-link=/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi/usr/lib
/tools/Xilinx/Vitis/2021.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/x86_64-petalinux-linux/usr/bin/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi-ld.real: cannot find crtbeginS.o: No such file or directory
/tools/Xilinx/Vitis/2021.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/x86_64-petalinux-linux/usr/bin/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi-ld.real: cannot find -lgcc
/tools/Xilinx/Vitis/2021.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/x86_64-petalinux-linux/usr/bin/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi-ld.real: cannot find -lgcc
collect2.real: error: ld returned 1 exit status
make: *** [makefile:38: HelloWorldApp.elf] Error 1
Above is the error I'm getting when attempting to compile in Vitis. Seems like maybe I'm setting up the settings for the compiler or the sysroot wrong?
Question
RyanW
Hello everyone, I'm having some difficulty getting applications to compile in Vitis for deployment on embedded Linux. I thought the way I setup the platform project was correct because the included header files were found by Vitis. However, when I compile the program it seems to fail. The weird thing is that it actually did compile and run on my Cora Z7-10 when I hadn't populated all the fields for the platform project. So I believe I may be doing something incorrectly here. How am I supposed to setup the Vitis project properly to get applications for Linux to compile on them?
Above is how I setup my platform project in Vitis with (what I think is) the relevant petalinux directory information.
Building target: HelloWorldApp.elf Invoking: ARM v7 Linux gcc linker arm-linux-gnueabihf-gcc -L/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi/lib -L/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi/usr/lib -o "HelloWorldApp.elf" ./src/helloworld.o --sysroot=/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi -Wl,-rpath-link=/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi/lib -Wl,-rpath-link=/home/bryan/Vivado/Tutorials/Linux_UIO/Vitis/LinuxUIOPlat/export/LinuxUIOPlat/sw/LinuxUIOPlat/linux_domain/sysroot/cortexa9t2hf-neon-xilinx-linux-gnueabi/usr/lib /tools/Xilinx/Vitis/2021.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/x86_64-petalinux-linux/usr/bin/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi-ld.real: cannot find crtbeginS.o: No such file or directory /tools/Xilinx/Vitis/2021.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/x86_64-petalinux-linux/usr/bin/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi-ld.real: cannot find -lgcc /tools/Xilinx/Vitis/2021.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/x86_64-petalinux-linux/usr/bin/arm-xilinx-linux-gnueabi/arm-xilinx-linux-gnueabi-ld.real: cannot find -lgcc collect2.real: error: ld returned 1 exit status make: *** [makefile:38: HelloWorldApp.elf] Error 1
Above is the error I'm getting when attempting to compile in Vitis. Seems like maybe I'm setting up the settings for the compiler or the sysroot wrong?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now