Ubuntu with Compiler toolchain on RP

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

Ubuntu with Compiler toolchain on RP

Post by Arnold » Fri Apr 24, 2015 8:01 am

Hello,

Is there a way to install the RP compiler toolchain on the SD card running Linux?
Is there some predefined image available?

If not, which development machine do you use (Windows, Linux)? Do you use a VM?

Thanks,
A

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

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Fri Apr 24, 2015 9:45 am

Hi Arnold,

You can try to boot your Red Pitaya with the Ubuntu 14.04 image

https://googledrive.com/host/0B-t5klOOy ... 150130.zip

and then use apt-get to install gcc and other tools.

To write the image to a SD card, the dd command-line utility can be used on GNU/Linux and Mac OS X or Win32 Disk Imager can be used on MS Windows.

The default user name is root and the default password is changeme.

You can find more details about this image at

http://pavel-demin.github.io/red-pitaya ... d-blinker/

There is currently a work in progress to port the Red Pitaya applications available on the original Red Pitaya SD card to the Ubuntu based SD card.

Cheers,

Pavel

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

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Fri Apr 24, 2015 9:53 am

I've also put together some instructions on how to create a virtual development machine that I'm using for my experiments with the Red Pitaya board:

http://pavel-demin.github.io/red-pitaya ... t-machine/

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

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Fri Apr 24, 2015 11:02 am

could I use the newest gcc/g++ and cross compiler to the arm core a9, when starting the RP with the Ubuntu 14.04 image?

e.g. the Install Linaro ARM toolchain for Windows (gcc-linaro-arm-linux-gnueabi-2012.03-20120326_win32.exe)
only comes with a very old gcc....
gcc version 4.6.3 (crosstool-NG linaro-1.13.1-2012.03-20120326 - Linaro GCC 2012
.03)

is there a newer one available?

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

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Fri Apr 24, 2015 11:50 am

The GCC version provided with the Ubuntu 14.04 distribution is 4.8.2.

If you follow the instructions to create a virtual development machine from my previous comment, then it'll contain cross-compilers for the ARM CPU (arm-linux-gnueabihf-gcc, arm-linux-gnueabihf-g++ etc).

The same versions of the GCC compilers can be installed on the Ubuntu SD card.

If you want to compile your code directly on a windows machine then you could probably use the GCC cross-compilers provided with the Xilinx SDK.

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

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Fri Apr 24, 2015 12:27 pm

Would I be able to update the gcc on the SD card - running Ubuntu 14.04 to a newer version without installing a ARM cross compiler?

which gcc version is installed on the VM image? would you be able to update to a new version?

which gcc version is in the Xilinx SDK on Windows?

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

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Fri Apr 24, 2015 1:14 pm

The development virtual machine and SD card are based on the same Ubuntu version - 14.04. So they both have the same GCC version - 4.8.2.

Xilinx SDK 2014.3.1 provides GCC 4.8.3.

When you are running GCC compiler directly on the Red Pitaya booted from the Ubuntu SD card, then the compiler is actually native compiler and not cross-compiler:-)

What do you mean by "newer version"?

Currently, the latest GCC version is 5.1. I don't see any repository that provides pre-built packages for this GCC version for the ARM CPU. If you really need this version, I'd say that the easiest would be to build it from sources.

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

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Fri Apr 24, 2015 2:48 pm

ok, I have downloaded the ubuntu image and stored it to the sd card...
$diskutil unmount /dev/disk2s1
Volume NO NAME on disk2s1 unmounted
$ sudo dd if=red-pitaya-ubuntu-14.04.1-20150130.img of=/dev/disk2s1 bs=1m
512+0 records in
512+0 records out
536870912 bytes transferred in 436.732846 secs (1229289 bytes/sec)

how can i connect to rp now?
$ ls /dev/cu.*
/dev/cu.usbserial-DB00BJM7

the following command just gives me a white screen... i cant enter the user + password...
$screen /dev/cu.usbserial-DB00BJM7 115200 8N1

any idea?

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

Re: Ubuntu with Compiler toolchain on RP

Post by pavel-demin » Fri Apr 24, 2015 3:52 pm

According to

http://elinux.org/RPi_Easy_SD_Card_Setup

the correct command to create the SD card is

sudo dd if=red-pitaya-ubuntu-14.04.1-20150130.img of=/dev/rdisk2 bs=1M

Could you give it another try?

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

Re: Ubuntu with Compiler toolchain on RP

Post by Arnold » Fri Apr 24, 2015 9:17 pm

for info:

$ diskutil list
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.5 GB disk2
1: Windows_FAT_32 15.5 GB disk2s1

tried:
$ sudo dd if=red-pitaya-ubuntu-14.04.1-20150130.img of=/dev/rdisk2 bs=1m
512+0 records in
512+0 records out
536870912 bytes transferred in 110.265090 secs (4868911 bytes/sec)

seems its alive :)
Waiting up to 60 more seconds for network configuration...

ok ubuntu on the sd card works :)

is there a way to use kde on the ubuntu and connect with a external monitor? i guess not if there is no graphics card...

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 21 guests