SW Tools / Don't make the mistakes I have: part 2

Applications, development tools, FPGA, C, WEB
Post Reply
john k2ox
Posts: 39
Joined: Sun Oct 05, 2014 6:47 pm
Location: New York
Contact:

SW Tools / Don't make the mistakes I have: part 2

Post by john k2ox » Sun Nov 16, 2014 11:56 pm

Welcome Back,

In part 1, I discussed how I got (falsely) started installing tools to begin developing on the Red Pitaya board. It seems that there is a lot of stuff that is needed to customize or create new applications on RP. Not so.

The part that gets programmed on RP is the Zync xc7z010 400 pin chip. It contains an FPGA(fast logic) and a microprocessor. The RP board has a bunch of stuff connected to the Zync that makes it the coolest Zync board available for the money! 125MHz ADCs/DACs, GBit Ethernet, Awsome. Much cooler than the Zedboards. IMHO, but I digress.

The FPGA hardware can easily keep up with the high speed I/O of the ADCs/DACs is programmed in Verilog or VHDL. You can think of FPGA programming as a way of wiring a whole bunch of small ICs together, referred to as programmable logic or PL. The processor, PS, can be programmed in probably any language you've heard of. The most common is 'C' and 'C++'. I'll stick with these. There are lots of expensive tools to speed development and you can spend tens of thousands of dollars on them. I'll stay with the free stuff for now.

Eclipse is a free open source IDE tool that can be tailored to program all sorts of micro's. Arduino, RPi, ...
The FPGA on the other hand needs a specilized tool. FPGA manufactures provide proprietary tools for their devices. It wasn't too long ago that they didn't offer any free tools. Even now the free tools only work with the smallest devices.

You have three choices. Program only the Zynq microprocessor, only the programmable logic or both of them. If you decide you simply want to write 'C' code for the processor, any tool that spits out machine instructions for the ARM Cortex A9 will work. I choose to use the tools that have the most support and will hopefully be around for a while.

There is a single tool to do all the above, Vivado. Vivado is a Xilinx product. They also have an older product, ISE, that is referenced in the Wiki. ISE is no longer being updated. Stick with the newest platform, Vivado. As it turns out Xilinx has integrated 'Eclipse' into Vivado and it is referred to as 'SDK'. Go to the Xilinx site and download 'Vivado + SDK'.

SDK uses the same GCC open source compiler tools for the ARM A9 as the RP Wiki has you install.

To get everything you need. Follow the RP Wiki instructions in the 'developer guide' up to the point where is says:
Using Eclipse to develop C code for your Red Pitaya
Eclipse for Linux


At this point install Vivado.

Then double click on the C:\Users\Crt\Projects\RedPitaya\FPGA\release1\fpga\vivado\red_pitaya.xpr
This automagically opened Vivado.
Then 'Open Block Diagram' and clicked 'Generate Bitstream'.
After a few minutes it completed successfully.
Then select File>Export>Export Hardware for SDK... check the 'Launch SDK' check box, click OK.
Now follow the RP Wiki instructions for setting up Eclipse(in this case SDK). Eclipse for Windows link. Make note of the mistakes I outlined in SW Tools / Don't make the mistakes I have: part 1

In summary:
1. Clone the RP repo
2. install Cygwin >>>>>>>>> I did this, but I don't think you need it. Comments encouraged! <<<<<<<<<<<<
3. Install Linaro ARM toolchain for Windows (gcc-linaro-arm-linux-gnueabi-2012.03-20120326_win32.exe)
4. Add paths to environmental system variables
5. Verify it all works from the command line
6. Install Vivado + SDK
7. NOT NEED, SKIP THIS edit path in red_pitaya.xpr >>>>>>>>> I did this trying to get Eclipse to work early on, but I know if it makes a difference now Comments encouraged! <<<<<<<<<<<<
8. Double click red_pitaya.xpr to launch Vivado
9. Play around with Terminal to look at RPs files, set the RP date, move files from the PC to RP. Download the labs (and the book) from http://zynqbook.com/

That's it for now.

Sharing is Caring,
John
Last edited by john k2ox on Wed Nov 19, 2014 3:31 pm, edited 1 time in total.

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: SW Tools / Don't make the mistakes I have: part 2

Post by Nils Roos » Wed Nov 19, 2014 10:13 am

Hi John. Thanks for posting this, it is good to see you were able to turn your frustration into something productive and helpful.

Regarding you requests for comments:
  • cygwin is not required to build RP applications from the SDK, but it is helpful to have it for using parts of the Makefile infrastructure of the project.
  • it is not neccessary to modify the red_pitaya.xpr, Vivado uses the parent dir of the xpr file as working directory and only emits a short info that the project file originated somewhere else

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