cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
milosoftware
Scholar
Scholar
8,932 Views
Registered: ‎10-26-2012

Build FSBL for zynq zc702 fails

Jump to solution

I've created a bitstream and exported the design to the SDK tool, all version 14.4. Then using file -> new -> application I added an FSBL project from the template. When I try to build this project, I get the following error from the compiler:

 


**** Build of configuration Release for project zc702-fsbl ****

make all
Building file: ../src/ddr_init.c
Invoking: ARM gcc compiler
arm-xilinx-eabi-gcc -Wall -O3 -c -fmessage-length=0 -I../../zc702-fsbl_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/ddr_init.d" -MT"src/ddr_init.d" -o"src/ddr_init.o" "../src/ddr_init.c"
../src/ddr_init.c:62:20: fatal error: xil_io.h: No such file or directory
compilation terminated.
make: *** [src/ddr_init.o] Error 1

 

What's wrong with the tools? (This used to work fine with the 14.3 version)

0 Kudos
1 Solution

Accepted Solutions
milosoftware
Scholar
Scholar
11,827 Views
Registered: ‎10-26-2012

Finally found the problem (and hence the solution) myself.

 

While starting the SDK GUI, there were some messages flying by, which disappeared later on. Turned out that the program was trying to call "gmake", which does not exist on most Linux systems because "make" is already "gmake". So i "solved" that by simply linking make to gmake and now it works.

 

So please fix the bug in the GUI that it doesn't stop on this error. When "gmake" cannot run, stop right there. Don't pretend there's nothing wrong and continue without telling the user that it's never gonna work. This has cost me about a full day to find and "fix".

 

The same goes for the general compile, by the way. Nothing in the GUI indicates when the build has failed. You're supposed to somehow figure out for yourself that the compilation has stopped, as the last lines in the terminal output aren't necessarily from the step that failed, so on the outside it often appears as if the compilation is still running. I'm working around this issue by running a CPU monitor and when the CPUs go idle, press some buttons on the GUI to find out what's happened.

View solution in original post

Tags (1)
6 Replies
milosoftware
Scholar
Scholar
8,930 Views
Registered: ‎10-26-2012

After a dozen iterations of

 

find /opt/Xilinx/ -name missing-header-name.h

 

and then adding the resulting path to the include directories, I managed to get through all the missing header compiler errors.

 

screenshot-includepath.png

 

After that, I could get to the linker stage, which (not surpisingly) failed on a "xil" lib.

 

make all
Building target: zc702-fsbl.elf
Invoking: ARM gcc linker
arm-xilinx-eabi-gcc -Wl,-T -Wl,../src/lscript.ld -L../../zc702-fsbl_bsp/ps7_cortexa9_0/lib -o"zc702-fsbl.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/sd.o   -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
/opt/Xilinx/14.4/ISE_DS/EDK/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-eabi/4.6.3/../../../../arm-xilinx-eabi/bin/ld: cannot find -lxil
collect2: ld returned 1 exit status
make: *** [zc702-fsbl.elf] Error 1

Looking for that lib with "find /opt/Xilinx/ -name *xil.a" revealed only powerpc and microblaze related files, so that's where my efforts end.

 

 

0 Kudos
milosoftware
Scholar
Scholar
11,828 Views
Registered: ‎10-26-2012

Finally found the problem (and hence the solution) myself.

 

While starting the SDK GUI, there were some messages flying by, which disappeared later on. Turned out that the program was trying to call "gmake", which does not exist on most Linux systems because "make" is already "gmake". So i "solved" that by simply linking make to gmake and now it works.

 

So please fix the bug in the GUI that it doesn't stop on this error. When "gmake" cannot run, stop right there. Don't pretend there's nothing wrong and continue without telling the user that it's never gonna work. This has cost me about a full day to find and "fix".

 

The same goes for the general compile, by the way. Nothing in the GUI indicates when the build has failed. You're supposed to somehow figure out for yourself that the compilation has stopped, as the last lines in the terminal output aren't necessarily from the step that failed, so on the outside it often appears as if the compilation is still running. I'm working around this issue by running a CPU monitor and when the CPUs go idle, press some buttons on the GUI to find out what's happened.

View solution in original post

Tags (1)
zhaoshijun
Contributor
Contributor
7,975 Views
Registered: ‎11-18-2013

Thanks, milosoftware.

I met the same problem, and I solved it using your solution.

0 Kudos
dpekin
Explorer
Explorer
7,419 Views
Registered: ‎07-09-2012

Hello,

 

I am having the same issue.  I'm running V14.4 of the SDK and have been building the fsbl for our board fine.  Recently, I received an update froim the PL engineer and I changed the hardware specification to the newer one.  (The interface is the same so this shouldn't really be an issue).   Since then, I can no longer build the fsbl.  I get the fatal error "xil_io.h: No such file or directory. 

 

I made sure the bsp is referenced.  I even built a new bsp and referenced it.  

 

I tried to go back to the hardware specification that was working and building correctly and now that build is giving me the same error..

 

MiloSoft talks about changing make to gmake but I'm running on a Windows box.  I don't see any make or gmake.

 

I updated to SDK V2013.4 and get the same results.  

 

Any suggestions appreciated...

 

- Dave

 

 

0 Kudos
juliancaba
Newbie
Newbie
4,602 Views
Registered: ‎03-10-2016

I had the same problem (Vivado 2015.4) and I solved it by a linking

 

# ln -sf $(HOME_VIVADO)/SDK/2015.4/gnu/arm/lin/libexec/gcc/arm-xilinx-eabi/4.9.2/liblto_plugin.so.0.0.0 $(HOME_VIVADO)/SDK/2015.4/gnu/arm/lin/libexec/gcc/arm-xilinx-eabi/4.9.2/liblto_plugin.so

0 Kudos
gustoff
Participant
Participant
369 Views
Registered: ‎07-07-2016

I get the same issue on Windows host, but I fix it by open "Modify BSP" menu in FSBL bsp project, disable and then enable "xilffs" option and then rebuild project. 

It's all.

0 Kudos