[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] Using impulse's C-to-FPGA tool with Petalinux ...
- To: microblaze-uclinux <microblaze-uclinux@xxxxxxxxxxxxxx>
- Subject: [microblaze-uclinux] Using impulse's C-to-FPGA tool with Petalinux ...
- From: Nicolas Herve <nicolas.herve@xxxxxxxxx>
- Date: Mon, 20 Jul 2009 18:31:55 -0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=z834OdLEWn19tJqtr2IGIJrkq6Nh20PA0VYiUVq9U/o=; b=ftJxLDmT6o5gBknp/ishGobreKiw6vYCoOzpgkFCcTvIiAB7Dn1+jCuhl3DXS2/QeE MTR1prikkr8sG3pNFdtNdoTRSKx4+sHtKlzlVPZPwdjgwRWHXc1E4awPaXj/8ay1zP93 zimeSbpr5FM47HUjyFhKtr0VVOaGf54F4nPh8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=AWLwKUpKUOqrfZpo3AYOAwq5+1APt5BG1U5DPdfjl7cvkLkUnAjqH9/V4h5SZu1GNb PSD228Uqo0QmI7i3tziFFx5Z/OoK8ofpfAD6nX07zp/6qNAzjZTpJwdD3dfoOjdQLy2R uaTDo7F2Uprowx2zMPuSLsY+P4GHgR3kIStlw=
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxxxxxxxx
Hi all !
I am evaluating the tool "C-to-FPGA' from the Impulse company
http://www.impulseaccelerated.com/.
This tool can generate HW accelerators with an FSL interface from a
description in the C language.
They have a tutorial for a prebuilt uClinux system.
I am tempting to use the latest Petalinux distribution with the
example of the tutorial, that is to substitute the windows-version
prebuilt uclinux cross-tools with an up-to-date Petalinux environment.
Following the steps of the Impulse tutorial, step 5 has to be replace
with the configuration of the linux kernel.
In my case, I have configured a system with kernel version 2.6, the
glibc library and a MMU.
Then in step 6 (building the software) the Makefile have to be changed
in order to use the Petalinux cross-tools.
In particular the original Makefile compiles with mb-gcc, I have
changed for mb-linux-gcc and it would links the final executable with
the following command (after variable substitution)
$ make -f Makefile_orig -n | tail -1
/opt/Impulse/CoDeveloper3/uClinux/elf2flt/ld-elf2flt -Os -g -elf2flt
-L/opt/Impulse/CoDeveloper3/uClinux/lib/uClibc/lib -o img img_sw.o
tiff.o co_init.o libimpulsec.a
/opt/Impulse/CoDeveloper3/uClinux/lib/uClibc/lib/crt0.o -lc
/opt/Impulse/CoDeveloper3/uClinux/tools/lib/gcc-lib/microblaze/2.95.3-4/libgcc.a
/opt/Impulse/CoDeveloper3/uClinux/tools/microblaze/lib/libc_hard_shift.a
-lc
that I have simply changed in
$ make -f Makefile_petalinux -n | tail -1
mb-linux-gcc -o img img_sw.o tiff.o co_init.o libimpulsec.a
It compiles without claiming, but when I test the executable on the
target with arguments, I have a segmentation fault.
So the build should not be ok.
# ./img
usage: fpga_edge <input file> <output file>
# ./img peppers.tiff output.tiff
Edge Detect Demo
----------------
Running...
Segmentation fault
Any idea of what should be missing ?
Bellow the original Makefile.
Nicolas
---
ifeq ($(FSL),)
FSL = 0
endif
IMPULSEC_HOME=/opt/Impulse/CoDeveloper3
UCLINUX=$(IMPULSEC_HOME)/uClinux
UCLIB_INC=$(UCLINUX)/lib/uClibc/include
UCLIB_LIB=$(UCLINUX)/lib/uClibc/lib
MB_GCC_LIB=$(UCLINUX)/tools/lib/gcc-lib/microblaze/2.95.3-4
MB_LIB=$(UCLINUX)/tools/microblaze/lib
MB_GCC=mb-gcc
MB_LD=$(UCLINUX)/elf2flt/ld-elf2flt
MB_AR=mb-ar
CFLAGS=-Os -g -fomit-frame-pointer -DIMPULSE_FIRST_FSL=$(FSL) -Dlinux
-D__linux__ -Dunix -D__uClinux__ -DEMBED -I$(UCLIB_INC) -fno-builtin
-mno-xl-soft-mul -O -mno-xl-soft-div -mxl-barrel-shift
LFLAGS=-Os -g -elf2flt -L$(UCLIB_LIB)
LIBS=$(UCLIB_LIB)/crt0.o -lc $(MB_GCC_LIB)/libgcc.a
$(MB_LIB)/libc_hard_shift.a -lc
img: img_sw.o tiff.o co_init.o libimpulsec.a
$(MB_LD) $(LFLAGS) -o $@ img_sw.o tiff.o co_init.o libimpulsec.a $(LIBS)
libimpulsec.a: co_stream.o co_signal.o co_register.o co_memory.o
co_process.o co_type.o
$(MB_AR) -r $@ co_stream.o co_signal.o co_register.o co_memory.o
co_process.o co_type.o
.c.o:
mb-gcc $(CFLAGS) -o $@ -c $<
clean:
rm -rf *.o img
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/