cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
art
Visitor
Visitor
3,919 Views
Registered: ‎05-05-2014

Petalinux + FreeRTOS AMP

Hi folks,

 

I'm trying to run Petalinux 2013.10 (CPU0) together with FreeRTOS (CPU1) on our custom Zynq7K board. The whole process is done under ubuntu 12.04, Xilinx XPS 2013.4

 

Here are the steps I followed to prepare the set of files for our AMP design:

 

1) Created HW design in EDK and exported HW platform to SDK

2) Installed Petalinux

3) Set repositories in SDK using source files located in the installed Petalinux folder

4) In SDK created BSP for Petalinux, freeRTOS and standalone BSP for the FSBL

5) Created FSBL and my test freeRTOS application. freeRTOS application has a signle task which toggles a LED and prints out a test message on UART-RS232 port.

6) Created Petalinux SW platform project and merged it with the HW platform specification

7) Configured linux,kernel,rootfs and added remoteproc-test node to the device tree (DTS)

8) Created freertos_fw application, copied ELF to components/apps/freertos_fw and to petalinux-v2-13.10-final/components/linux-kernel/xlnx-3.8/firmware

9) Modified the make file in freertos_fw folder and enabled this application in the rootfs

10) Build the petalinux project and generated BOOT.BIN

11) Copied BOOT.BIN and image.ub to SD card

 

After turning ON the board supply, FPGA gets configured by FSBL and Petalinux gets loaded by u-boot. So everything as expected. As I understood from UG978, to load the second processor (CPU1) it first needs to be released by CPU0 - running Petalinux.

 

When I enter:

------------------------------------------------------

root@Xilinx-ZC702-2013_3:~#  modprobe zynq_remoteproc

CPU1: shutdown

remoteproc0: 0.remoteproc-test is available

remoteproc0: Note: remoteproc is still under development and considered experimental.

remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

------------------------------------------------------

 

Indeed, when I check cpuinfo file I can see that Linux sees only CPU0.

 

Next, I'm entering:

------------------------------------------------------

root@Xilinx-ZC702-2013_3:~# modprobe rpmsg_freertos_statistic

root@Xilinx-ZC702-2013_3:~#

------------------------------------------------------

 

As you can see nothing happens and freeRTOS is not being loaded.

 

Now, when I follow the same steps as it was described above and use the same HW and BSPs, however instead of my freeRTOS application use generated in SDK FreeRTOS AMP demo application, I observe the following output:

------------------------------------------------------

 

root@Xilinx-ZC702-2013_3:~# modprobe zynq_remoteproc

CPU1: shutdown

remoteproc0: 0.remoteproc-test is available

remoteproc0: Note: remoteproc is still under development and considered experimental.

remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

root@Xilinx-ZC702-2013_3:~#

root@Xilinx-ZC702-2013_3:~# remoteproc0: registered virtio0 (type 7)

 

root@Xilinx-ZC702-2013_3:~#

root@Xilinx-ZC702-2013_3:~# modprobe rpmsg_freertos_statistic

remoteproc0: powering up 0.remoteproc-test

remoteproc0: Booting fw image freertos, size 2130820

remoteproc0: remote processor 0.remoteproc-test is now up

virtio_rpmsg_bus virtio0: rpmsg host is online

virtio_rpmsg_bus virtio0: creating channel rpmsg-timer-statistic addr 0x50

rpmsg_freertos_statistic rpmsg0: new channel: 0x400 -> 0x50!

root@Xilinx-ZC702-2013_3:~#

------------------------------------------------------

 

As it can be seen, the firmware application in case of a demo freeRTOS design is loaded.

 

In onrder to exclude the fact that my freeRTOS application is not working, I created new freeeRTOS BSP for CPU0 and compiled my app to run on CPU0. After that I prepared single BOOT.BIN consisting of FSBL.elf + system.bit + freeRTOS.elf and I got LEDs working and UART-RS232 console outputting messages.

 

Can anyone who is more expirienced with Petalinux + freeRTOS suggest what I'm doing wrong. Why my freeRTOS application can not be loaded from linux?

 

For a reference I attached an archive with kernel and rootfs configuration.

 

Appreciated everyones comments/suggestions.

 

Art

 

Tags (3)
0 Kudos
1 Reply
mascot02
Observer
Observer
3,356 Views
Registered: ‎04-11-2013

hi, art ,

         i'm trying to build amp system wiith freeRTOS,  but i don't know how to do the step3 :

set repositores in SDK using source file located in the installed petalinux folder;

 the  installed petalinux folder have not any  bsp can be set repositores;   i  use the petalinux 14.2;

i can't  use petalinux-create to build   amp bsp  project  that the ug978 suggest to do;

 

  

0 Kudos