cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
747 Views
Registered: ‎12-09-2019

petalinux and AMP on both processors of zynq

Jump to solution

Good day to all.

I am using zinq (zc706). I wanted to run linux on my cpu 0 and freertos on cpu1. I am mentioning the steps i took to do so. Later my doubts.

1. Created Hardware platform using vivado and exported it to SDK.

2. Created an freertos AMP project for cpu1. Edited bsp (changes done -> -DUSE_AMP=1 , and some freertos values).

3. Created a pealinux project (using template zynq option , not from provided bsp). 2018.2 version

4. Exported my hdf usng petalinux-config --get-hw-description (no changes in setings done)

5. Created an app using " petalinux-create -t apps --template install --name echo_test --enable" . And copied my .elf file from the sdk to meta-user->recipe-app->files/ . NOTE echo.elf is the file i copied and app name is echo.

6. Run petalinux config -c kernel . (enabled remoteproc and AMP)

7. Run petalinus-config -c rootfs (enabled the app). 

8. petalinux-build

9. petalinux-package --boot --fsbl ../zynq_fsbl.elf --fpga ../system.bit --u-boot

10. copied to sd card and booted.

cpu0 runs linux, it is booting, used root as username and password. used remoteproc commands to initialize the second cpu1 but it is not working and it is not showing any errors.

 

Questions:

a) From step 2. is there any other changes that i have to do in bsp and sdk.

b) what all changes i have to do in all the configs. 

c) from step 5. what all edits should i do to the .bb file of my app(echo.elf) //note the .elf

d) Am i packaging it correctly. (both fsbl.elf and sysem.bit are in the image/linux file. 

e) how to make AMP work properly

f) what changes do i have to change in device tree file and where to find it(no idea how device tree is generated)

 

regards .... 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
662 Views
Registered: ‎05-10-2017

For your questions,

a) No other changes are needed other than the -DUSE_AMP=1 compiler flag when you build the application

b) Please follow UG1186 2018.2 https://japan.xilinx.com/support/documentation/sw_manuals_j/xilinx2018_2/ug1186-zynq-openamp-gsg.pdf (page 32, step 4) for all the configs that you will need

c) step5 - (do not use underscore for the app name, you will need to follow yocto recipe naming convention) Use example as shown below

petalinux-create -t apps --template install --name echo-test --enable

 

This steps creates a template echo-test in the meta-user recipes-apps folder. 

Copy you echo.elf to the recipes-apps/echo-test/files folder

Modify the echo-test.bb recipe as show below. Note: You must give the exact name of the elf you have copied in the files directory

#
# This file is the echo-test recipe.
#

SUMMARY = "Simple echo-test application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://echo.elf \
	"

S = "${WORKDIR}"
INSANE_SKIP_${PN} = "arch"

do_install() {
	     install -d ${D}/lib/firmware
	     install -m 0644 ${S}/echo.elf ${D}/lib/firmware
}

FILES_${PN} = "/lib/firmware/echo.elf"

d) Your package comand is correct

e) Once you have built your petalinux project using the changes required as mentioned in the document, run the demo on hardware as described on page 39 on the document

f) Please add the device-tree changes as mentioned on page 37 of the document linked above to system-user.dtsi in the meta-user folder located at project-spec/meta-user/recipes-bsp/device-tree/files/

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

1 Reply
Highlighted
Moderator
Moderator
663 Views
Registered: ‎05-10-2017

For your questions,

a) No other changes are needed other than the -DUSE_AMP=1 compiler flag when you build the application

b) Please follow UG1186 2018.2 https://japan.xilinx.com/support/documentation/sw_manuals_j/xilinx2018_2/ug1186-zynq-openamp-gsg.pdf (page 32, step 4) for all the configs that you will need

c) step5 - (do not use underscore for the app name, you will need to follow yocto recipe naming convention) Use example as shown below

petalinux-create -t apps --template install --name echo-test --enable

 

This steps creates a template echo-test in the meta-user recipes-apps folder. 

Copy you echo.elf to the recipes-apps/echo-test/files folder

Modify the echo-test.bb recipe as show below. Note: You must give the exact name of the elf you have copied in the files directory

#
# This file is the echo-test recipe.
#

SUMMARY = "Simple echo-test application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://echo.elf \
	"

S = "${WORKDIR}"
INSANE_SKIP_${PN} = "arch"

do_install() {
	     install -d ${D}/lib/firmware
	     install -m 0644 ${S}/echo.elf ${D}/lib/firmware
}

FILES_${PN} = "/lib/firmware/echo.elf"

d) Your package comand is correct

e) Once you have built your petalinux project using the changes required as mentioned in the document, run the demo on hardware as described on page 39 on the document

f) Please add the device-tree changes as mentioned on page 37 of the document linked above to system-user.dtsi in the meta-user folder located at project-spec/meta-user/recipes-bsp/device-tree/files/

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post