Page 2 of 2

Re: First step with parallella

PostPosted: Wed Feb 18, 2015 2:04 pm
by zodane
patc wrote:I assume you're using Vivado and want to try the Hello_World example. May be you can try out the following:

I'm sorry patc to don't mention it from the beginning, but i'm using ISE (so i can still program the epiphany) :(


Re: First step with parallella

PostPosted: Thu Apr 16, 2015 6:24 am
by alga_kbk
patc wrote:- Run-Debug Configuration and New Xilinx C/C++ application (GDB)
- uncheck "Run ps7_init" and "Run ps7_post_config"

should be like the following:

Following operations will be performed before launching the debugger.
1. Reset processor.
2. 'C:\Users\pat\workspace2014_3_7020\test\Debug\test.elf' will be downloaded to the processor 'ps7_cortexa9_0'

hello patc,
it's really working when there are uncheked. But i want to know the reason why we need to uncheck "Run ps7_init" and "Run ps7_post_config"?

Re: First step with parallella

PostPosted: Wed Nov 25, 2015 8:26 am
by Nicolas-06
Hey guys,

Similarly, I'm working on the Zynq and my purpose is to add a basic IP core (and echo) to the design provided by Parallella. I coded everything, generated the bistream with the default elink2 design + my core, created the bit.bin file, saved it on the SD card, etc... but I don't get how I'm suppose to test my application / run a custom software on the ARM.

I would prefer to avoid coding a driver for linux, recompiling everything and so on, only to test an echo that writes and reads data into a RAM. I followed @patc process and created an "hello world" application but I don't get how I'm supposed to
- connect a terminal to your Parallella serial port (115200 bauds)
- then run it (JTAG to download to the Parallella)

As stated in the post:, the serial port is disabled by default. I can reactivate it but how should I load/run the code?


Re: First step with parallella

PostPosted: Thu Nov 26, 2015 10:21 am
by sebraa
You can access a simple memory-mapped device from Linux userspace through the use of /dev/mem. The Epiphany SDK used this interface before Adapteva did a Linux driver. However, I am not sure if you can actually use interrupts without at least a simple driver. Using /dev/mem is considered bad style, since your application then requires root access and is able to crash your Linux system easily, but it might suffice.

I don't know if Linux provides generic device drivers for simple devices. If that is the case (I think it is), then you just need to describe your IP (memory addresses, interrupt vector etc) in the device-tree and use that driver. But I don't have experience in those areas.

Re: First step with parallella

PostPosted: Thu Nov 26, 2015 2:56 pm
by Nicolas-06
Thanks sebraa,

In fact, since there is no easy access to JTAG, it's """"simpler"""" to update the device tree and code a driver.

I too don't have much experience in writing drivers for Linux but fortunately I found a simple example here: :)

Re: First step with parallella

PostPosted: Thu Nov 26, 2015 9:00 pm
by peteasa
Assuming that you are using Linux on your parallella... When the parallella boots, depending on your linux configuration, it will look on Ethernet for a DHCP server and then with the address it gets will advertise itself via MDNS.. I have a Linux machine that I use to create the FPGA and on that host machine I run avahi-browse -a to find the name that the parallella board advertises. In my case this is parallella-hdmi. Then to copy my application to the parallella is simple:
Code: Select all
$ avahi-browse -a
+   eth0 IPv4 parallella-hdmi                               SSH Remote Terminal  local
+   eth0 IPv4 parallella-hdmi                               SFTP File Transfer   local
$ scp myfile root@parallella-hdmi.local:/home/root
$ ssh root@parallella-hdmi.local

root@parallella-hdmi:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 04:4F:8B:00:30:D8 
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::64f:8bff:fe00:30d8/64 Scope:Link
          RX packets:117 errors:0 dropped:0 overruns:0 frame:0
          TX packets:147 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16168 (15.7 KiB)  TX bytes:18655 (18.2 KiB)
          Interrupt:35 Base address:0xb000

Depending on what flavour of linux distribution that you are running on the Parallella board you will have different names etc.. but you get the idea!
To get to the command line on the parallella I use ssh as above. If you use wireshark then you can look at the ethernet packets being sent from the parallella and find its IP address and use the IP address instead of the ??.local MDNS name. Then you would just replace the parallella-hdmi.local with the IP address... in my case I show you above how to get the IP address once you are on the parallella!!! not much good but in my case ssh root@ would also work.
I would set up the serial connection using the rs232 3 pin connection (tx, rx and gnd) because when the Parallella boots it provides a whole lot of information that is of use if it does not boot fully:
Code: Select all
U-Boot 2012.10-00003-g792c31c (Jan 03 2014 - 12:24:08)

I2C:   ready
DRAM:  992 MiB
WARNING: Caches not enabled
SF: Detected N25Q128 with page size 64 KiB, total 16 MiB
In:    serial
Out:   serial
Err:   serial
Net:   zynq_gem
Hit any key to stop autoboot:  0
Configuring PL and Booting Linux...
Device: SDHCI
Manufacturer ID: 3
OEM: 5344
Name: SL08G
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
reading parallella.bit.bin

4045568 bytes read
reading uImage

3848968 bytes read
reading devicetree.dtb

26110 bytes read
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-3.19.0-parallella
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3848904 Bytes = 3.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
   Booting using the fdt blob at 0x02a00000
   Loading Kernel Image ... OK
   Loading Device Tree to 1fff6000, end 1ffff5fd ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0

Now if on the other hand you are using the parallella with no linux OS running then I would expect that you would have to use JTAG to configure the board with the bare-metal application that you build. Now that is a whole lot more fun to get going and I would not call that first steps because its more like starting from ground zero. Depends on what you want to do and what you want to learn about!
New-Application Project -> test with ps7_cortexa9_0, standalone and create new test_bsp

Notice that this indicates that the Hello World program is being created with a "standalone" project ie no Linux OS. So I think that the instructions that you are following are more likely for bare-metal programming..
Might be wrong.