» May 2012 » Linux on a XUPv2 FPGA

Linux on a XUPv2 FPGA Board

Since some days, i try to install a toolchain consisting of

on my Debian Squeeze Linux with Kernel. I ran in some ugly linux typical problems, from these I want to show my solutions, to safe me and other people time for the next installation.

But first, some links to tutorials and projects that will help you to syntesize, build, install and use your FPGA linux on a XUPv2 Pro board with the use of one PowerPC core.

I installed all the Xilinx things in /opt/xilinx/ , maybee you must change some paths to your paths.


Problem 1:

You have created a new project in EDK with the Base System Builder Wizard, but when you try to synthesize it, all runs perfect, but finally you get a "Build Failed" without any explaination.

Solution: Its a upper/lower case problem in the code. Simply install Xilinx ISE 8.1 SP3.


Problem 2:

You want to build the test applications generated from Base System Builder Wizard and got a error like "Can't find gmake".

Solution: ln -s /usr/bin/make /usr/bin/gmake should help.


Problem 3:

You run into problems when you want to install the Jungo USB Driver for the Xilinx USB Cable.

Solution: The Jungo driver doesn't works with Kernel >2.6.18. Use the open source cable driver linked above[5].


Problem 4:

You tried this driver and he doesn't found your cable.

Solution: Maybee you forgot to install the new cable firmware. Follow the instructions from [6](see Firmware). If this not helps, maybee you've a different udev version. Try to use this code here for you /etc/udev/rules.d/xusbdfwu.rules :

iATTRS{idVendor}=="03fd", ATTRS{idProduct}=="0008", SYMLINK+="windrvr6"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="0007", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="0009", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="000b", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="000d", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="03fd",ATTRS{idProduct}=="000f", RUN+="/sbin/fxload -v -t fx2 -I /usr/share/xusbdfwu.hex -D $tempnode"
ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03fd", MODE="666"


Problem 5:

You started impact, tried to initialize the JTAG chain, and impact needed 10 minutes to update the programmer firmware. Then you tried again and got some dynamic linker error messages.

Solution: Maybee you messed up your environment variables. Try first to restart your shell, then maybee the whole system, before you dig deeper in your linux.


Problem 6:

crosstool-ng stops by downloading a file. Mostly one of the debugger-packs.

Solution: Download the tarball manually and copy it to the path where crosstool-ng saves the tarballs.
On my system, this path was "/opt/crosstool-ng-1.6.1/.build/tarballs/".You can download the debugger files here: gdb, duma


Problem 7:

Compiling TestApp_Memory drops the following lines:


: In function `padding':
/cygdrive/d/Project/kernel3/ppc405_0/libsrc/standalone_v1_00_a/src/xil_printf.c:50: undefined reference to `outbyte'
./ppc405_0/lib//libxil.a(xil_printf.o)(.text+0x178): In function `outnum':
/cygdrive/d/Project/kernel3/ppc405_0/libsrc/standalone_v1_00_a/src/xil_printf.c:111: undefined reference to `outbyte'
./ppc405_0/lib//libxil.a(xil_printf.o)(.text+0x260): In function `xil_printf':
/cygdrive/d/Project/kernel3/ppc405_0/libsrc/standalone_v1_00_a/src/xil_printf.c:228: undefined reference to `outbyte'
./ppc405_0/lib//libxil.a(xil_printf.o)(.text+0x3a4):/cygdrive/d/Project/kernel3/ppc405_0/libsrc/standalone_v1_00_a/src/xil_printf.c:228: undefined reference to `outbyte'
./ppc405_0/lib//libxil.a(xil_printf.o)(.text+0x3dc):/cygdrive/d/Project/kernel3/ppc405_0/libsrc/standalone_v1_00_a/src/xil_printf.c:228: undefined reference to `outbyte'
./ppc405_0/lib//libxil.a(xil_printf.o)(.text+0x48c):/cygdrive/d/Project/kernel3/ppc405_0/libsrc/standalone_v1_00_a/src/xil_printf.c:66: more undefined references to `outbyte' follow
collect2: ld returned 1 exit status
make: *** [TestApp_Memory/executable.elf] Error 1
Solution: Set the interface for stdin/stdout in Software->Plattform Settings->OS and Library.

Problem 8:

Compiling the kernel ends with:

DTC: dts->dtb  on file "arch/powerpc/boot/dts/virtex405-mine.dts"
ERROR (duplicate_label): Duplicate label 'DDR_512MB_64Mx64_rank2_row13_col10_cl2_5' on /memory@10000000 and /memory@0
ERROR: Input tree has errors, aborting (use -f to force output)
make[1]: *** [arch/powerpc/boot/virtex405-mine.dtb] Error 2
make: *** [simpleImage.virtex405-mine] Error 2

Solution: Simply delete the lines:

        DDR_512MB_64Mx64_rank2_row13_col10_cl2_5: memory@10000000 {
                device_type = "memory";
                reg = < 0x10000000 0x10000000 >;
        } ;

from your "arch/powerpc/boot/dts/virtex405-mine.dts".


Problem 9:

You try to load a reference design from the xilinx website with EDK newer than 7.1 and get the following error:

Reving up design to EDK 8.1...ERROR:MDT - Unrecoverable error(s) were encountered while updating your project

Solution: This problem happens because of the a hardcoded libname. In my case, I missed I symlinked a newer version with:

ln -s /usr/lib/ /usr/lib/

and all worked like a charm.


Problem 10:

You try to start the Floorplanner or FPGA-Editor in Xilinx ISE and you got just a Message like:

"Process "View/Edit Placed Design (Floorplanner)" completed successfully"

Solution: is missing. Install libmotif3 or libmotif4 and create a link to from to Additionally add this line to your

export DISPLAY=:0

On my system, it needs 30s where nothing happens before the editor starts.


to be continued...