05-07-2013 10:06 AM
I am trying to build a simple bare metal application for a Zynq device. When I try to build the project in the SDK, the console output says:
arm-xilinx-eabi-gcc -Wl,-T -Wl,../src/lscript.ld -L../../zynq_fsbl_0_bsp/ps7_cortexa9_0/lib -o "zynq_fsbl_0.elf" ./src/ddr_init.o ./src/ff.o ./src/fsbl_handoff.o ./src/fsbl_hooks.o ./src/image_mover.o ./src/main.o ./src/mmc.o ./src/nand.o ./src/nor.o ./src/pcap.o ./src/ps7_init.o ./src/qspi.o ./src/rsa.o ./src/sd.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group c:/xilinx/sdk/2013.1/gnu/arm/nt/bin/../lib/gcc/arm-xilinx-eabi/4.7.2/../../../../arm-xilinx-eabi/bin/ld.exe: cannot find -lxil c:/xilinx/sdk/2013.1/gnu/arm/nt/bin/../lib/gcc/arm-xilinx-eabi/4.7.2/../../../../arm-xilinx-eabi/bin/ld.exe: cannot find -lc collect2.exe: error: ld returned 1 exit status
I have googled a lot, but have not found a solution for my problem which other users also seem to have. My machine is a x86-64 Windows 8. I hope someone can help resolving the problem.
05-14-2013 07:21 AM
05-27-2013 11:13 AM
libxil.a (referenced as -lxil) is the BSP build target. If the BSP build fails, the library isn't built, and the application build will fail. Simple enough...
Why might the BSP build fail? My intsallation (Xubuntu 12.10) was missing a soft link for arm-xilinx-eabi-ar. That seemed easy enough to fix:
/usr/bin$ sudo ln -s arm-linux-gnueabi-ar arm-xilinx-eabi-ar
Similarly for other arm-linux-gnueabi-* that might be used...
It would help me if someone could point out where the matching headers are installed. My builds now fail with missing headers. For example, errno.c fails to find reent.h.
arm-xilinx-eabi-ar: creating ../../../lib/libxil.a
errno.c:47:19: fatal error: reent.h: No such file or directory
_sbrk.c: In function ‘_sbrk’:
_sbrk.c:55:32: error: ‘NULL’ undeclared (first use in this function)
_sbrk.c:55:32: note: each undeclared identifier is reported only once for each function it appears in
gmake: *** [standalone_libs] Error 1
gmake: Target `libs' not remade because of errors.