Ubuntu with Compiler toolchain on RP

Just about everything about Red Pitaya
Arnold
Posts: 54
Joined: Wed Mar 11, 2015 3:07 pm

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Sat Apr 25, 2015 8:45 pm

i would like to build those examples: https://github.com/RedPitaya/RedPitaya/ ... Examples/C

i see the shared library (librp.so) is not open source! why not?

how can i run those examples now???????

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Sat Apr 25, 2015 9:53 pm

If I'm not mistaken, you can still compile and link your programs with the librp.so library.

I can see that both the library and its header file are available at

https://github.com/RedPitaya/RedPitaya/ ... DK/include

I'd say that these two files (rp.h and librp.so) should be enough to compile the example programs.

To be able to run those examples from the Ubuntu SD card, you'll also need to configure the FPGA with the original Red Pitaya FPGA bitstream file.

Arnold
Posts: 54
Joined: Wed Mar 11, 2015 3:07 pm

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Sat Apr 25, 2015 10:10 pm

im not able to load the application bc of the librp.so error!! any idea?
http://paste.ubuntu.com/10890114/

here is my makefile:
http://ideone.com/Y5ZJot

yeah, but the github binary was compiled with the linaro (or Xilinx) cross-toolchain
which might make it incompatible with your my ubuntu based native toolchain

edit:
The problem is that librp.so is compiled for the architecture "armv5t" and the machine (with your image) is "arm"
please comment?! how can we fix this issue????
can you rebuild the image? -march=armv5t, to match the librp

i attached the objdump for two files:
- librp.so: http://paste.ubuntu.com/10890581/
- libperl.so: http://paste.ubuntu.com/10890591/

look at line 3!!!

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Sat Apr 25, 2015 11:28 pm

Indeed. You are right.

librp.so is compiled for ARMv5t (armel) and Ubuntu 14.04 is only available for ARMv6 (armhf).

Here is the location of the Ubuntu releases that I'm using for the SD card image:

http://cdimage.ubuntu.com/ubuntu-core/r ... 4/release/

Arnold
Posts: 54
Joined: Wed Mar 11, 2015 3:07 pm

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Sat Apr 25, 2015 11:42 pm

i talked to the ubuntu-arm guys on irc:
Ubuntu no longer provides pre-built images of new Ubuntu versions for armel. It only provides images for armhf (Hard Float, instead of floating-point emulation).
the old ones like the rpi1 uses were dropped a long time ago

how can we fix that?

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Sun Apr 26, 2015 9:20 pm

Unfortunately, I don't have any fix for this problem. Only workarounds.

What kind of application are you trying to implement?

May be it would be easier to write a custom FPGA configuration with just a small set of configuration registers and memory buffers. If there are only a few application specific configuration registers and memory buffers, then you won't need any library to work with them.

Arnold
Posts: 54
Joined: Wed Mar 11, 2015 3:07 pm

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Sun Apr 26, 2015 9:38 pm

there are 2 solutions: viewtopic.php?f=8&t=499&p=1913#p1913
please comment within this thread.

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Mon Apr 27, 2015 4:49 pm

Just noticed your question about KDE.

Actually, it's possible to run a desktop environment via VNC.

KDE is slightly too heavy for the CPU and RAM available on the Red Pitaya board. XFCE works quite well.

The following commands should install a minimal set of packages and then run VNC and XFCE:

apt-get install xfonts-base tightvncserver xfce4-panel xfce4-session xfwm4 xfdesktop4 xfce4-terminal tango-icon-theme

vncserver -geometry 1280x700

Arnold
Posts: 54
Joined: Wed Mar 11, 2015 3:07 pm

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Mon Apr 27, 2015 9:57 pm

To be able to run those examples from the Ubuntu SD card, you'll also need to configure the FPGA with the original Red Pitaya FPGA bitstream file.
thanks for the info.

how can i program the fpga on the Ubuntu SD card?
is there a xdevcfg device?

if the xdevcfg device is available can i simply follow this instruction:
http://wiki.redpitaya.com/index.php?tit ... nvironment

pavel-demin
Posts: 33
Joined: Tue Dec 23, 2014 10:52 pm

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Mon Apr 27, 2015 10:10 pm

Yes, /dev/xdevcfg is available.

As the Ubuntu SD card image is based on a more recent kernel version, you can skip the promgen step and program FPGA with the .bit file:

cat red_pitaya_top.bit > /dev/xdevcfg

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 25 guests