Basic project with Vivado 2014.3 and Ubuntu 14.04

Just about everything about Red Pitaya
pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by pavel » Thu May 28, 2015 12:26 am

I think I've found how to add this UIO patch to my scripts without breaking other projects.

1. add patches/uio.dts containing the following code:

Code: Select all

/include/ "system.dts"

/ {
        chosen {
                bootargs = "uio_pdrv_genirq.of_id=generic-uio console=ttyPS0,115200 root=/dev/mmcblk0p2 ro rootfstype=ext4 earlyprintk rootwait";
        };

        uio0: uio@40000000 {
                compatible = "generic-uio";
                reg = <0x40000000 0x1000>;
        };
};
2. add the following command to scripts/debian-ecosystem.sh:

Code: Select all

tmp/linux-xlnx-xilinx-v2015.1/scripts/dtc/dtc -I dts -O dtb -o $boot_dir/devicetree.dtb -i tmp/red_pitaya_0_92.tree patches/uio.dts
This way, only the SD card image with Debian and Red Pitaya ecosystem will be affected by this patch.

What do you think?

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

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by Arnold » Thu May 28, 2015 8:55 am

ok. so those timing/sync changes are not needed in the red_pitaya project?

but you cant run the whole build?

Code: Select all

$ make NAME=red_pitaya_0_92 all
is there somth debian specific in the makefile? i currently use ubuntu...

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by pavel » Thu May 28, 2015 9:10 am

I see. I thought that you switched to Debian since you were interested in the web server and SDK at some point.

Actually, you can use this devicetree generation command with any project.

For example, here are the commands to generate an SD card image with red_pitaya_0_92 and Ubuntu:

Code: Select all

make NAME=red_pitaya_0_92 all
tmp/linux-xlnx-xilinx-v2015.1/scripts/dtc/dtc -I dts -O dtb -o devicetree.dtb -i tmp/red_pitaya_0_92.tree patches/uio.dts
sudo sh scripts/image.sh scripts/ubuntu.sh red-pitaya-ubuntu-14.04.2.img
So, after all, the only needed modification is to add patches/uio.dts.
Last edited by pavel on Thu May 28, 2015 9:38 am, edited 1 time in total.

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by pavel » Thu May 28, 2015 9:20 am

so those timing/sync changes are not needed in the red_pitaya project?
The red_pitaya project in my repository is a copy of the devel branch of the RedPitaya repository.

It already contains the fix for the synchronization problem.

When I tried to apply the fix for the timing problem, I got other timing problems.

So, at the moment, I'm only using red_pitaya_0_92 and I'm waiting for the Red Pitaya developers to release a new stable version of their code based on the devel branch.

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

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by Arnold » Thu May 28, 2015 3:43 pm

works so far...

i tested the blink_uio example:

the following statement was blinking led number 2 (according to naming on the rp board) before, now it blinks led number 1...is there someth. changed?

Code: Select all

*(uint32_t *)(ptr + 0x30) ^= (1 << 1);

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by pavel » Thu May 28, 2015 7:26 pm

I've just tested the blink_uio example with two versions (old and new) of the Debian image and in both cases the same led was blinking.

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

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by Arnold » Sat May 30, 2015 12:40 pm

ok, works. great! what might be improved is a proxy server support for the build system... at the moment i need to add stuff to get the makefile running behind a proxy...

fbalakirev
Posts: 99
Joined: Thu Sep 03, 2015 6:56 pm

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by fbalakirev » Sat Sep 05, 2015 9:42 pm

Hi Pavel,

Sorry if I should not be resurrecting old threads, but I'm just got Red Pitaya and I'm trying to get your environment going. I followed your directions for Ubuntu 14.04 development machine in VirtualBox, but it seems to be outdated for your latest git source - e.g. native make v. 3.81 throws an error on line 9 with 'undefine ...' statement, since it was 1st introduced in v 3.92. If I comment that line out, it runs into other problems later on such as:

Code: Select all

tar: tools/buildman/buildman: Cannot create symlink to ‘buildman.py’: Read-only file system

Code: Select all

*** Can't find default configuration "arch/../configs/zynq_red_pitaya_defconfig"!
***
Should I be using other distro for your red pitaya notes these days ? I recall that you mentioned that it's best to use same disrto for development and for red pitaya machines.

P.S. As an alternative, how hard is it to port your repository for development under Windows, perhaps with a different linux flavor on Red Pitaya if needed?

pavel
Posts: 799
Joined: Sat May 23, 2015 5:22 pm

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by pavel » Sat Sep 05, 2015 11:01 pm

Thank you for your tests and for finding the problem with undefine. I added it a few days ago and only tested it on Debian 8. I've just replaced 'undefine LD_LIBRARY_PATH' with 'LD_LIBRARY_PATH =' and committed it to my github repository. It now works again with Ubuntu 14.04.
Should I be using other distro for your red pitaya notes these days ?
No, not necessarily. Ubuntu 14.04 is perfectly OK.

Recently, I started to use Debian 8 more often than Ubuntu 14.04 but I'm still trying to keep my scripts compatible with both systems.

Looking at the error message that you get from the tar command (... Read-only file system), I'd say that there is something wrong with the filesystem. Could you check if it's really read-only? Maybe the disk is full...

fbalakirev
Posts: 99
Joined: Thu Sep 03, 2015 6:56 pm

Re: Basic project with Vivado 2014.3 and Ubuntu 14.04

Post by fbalakirev » Sun Sep 06, 2015 6:19 pm

Hi Pavel,

Thanks for the fix, I appreciate the time you take sharing your code and answering questions!

I was able to build led_blinker and run in on the RP board. I think the permission errors I mentioned were due to me trying to build the project in a folder shared with Windows host. Once I moved it to internal Ubuntu folder they were gone.

I'm still trying to figure out proper design flow within your environment. I went to change led blinking pattern through VirtualBox -> Vivado GUI -> board redesign -> bit file -> remake of red-pitaya-ubuntu-14.04.2.img. I'm looking into if I can work around the need for Linux VM when I don't need to recompile the kernel, i.e. when changes are limited to PL side and server app code.
Do I get it right that while led_blinker project targets Ubuntu, the sdr ones are designed for original Red Pitaya kernel?

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