- Go to the PetaLinux
project:
$ cd <plnx_proj> - Build the PetaLinux
project:
$ petalinux-build - Run PetaLinux
boot:
$ petalinux-boot jtag --kernelIf you encounter any issues, append
-vto these commands to see the textual output. - Boot RPU firmware with remoteproc sysfs.
The firmware should be placed in the /lib/firmware directory.
$ echo <firmware_name> > /sys/class/remoteproc/remoteproc0/firmware $ echo start > /sys/class/remoteproc/remoteproc0/stateYou can also use other methods to boot Linux on APU and the firmware on RPU, such as SD boot. This example only documents JTAG boot.
- On the APU Linux target console, run the demo application on the Linux
application you built with XVitis or use the prebuilt "libmetal_amp_demo" provided
with PetaLinux BSP. This process produces output similar to the
following:
# <linux libmetal application metal: warning: skipped page size 2097152 - invalid args CLIENT> ****** libmetal demo: shared memory ****** metal: info: meta SERVER> Demo has started. SERVER> Shared memory test finished SERVER> ====== libmetal demo: atomic operation over shared memory ====== SERVER> Starting atomic add on shared memory demo. l_uio_dev_open: No IRQ for device 3ed80000.shm. CLIENT> Setting up shared memory demo. CLIENT> Starting shared memory demo. CLIENT> Sending message: Hello World - libmetal shared memory demo CLIENT> Message Received: Hello World - libmetal shared memory demo CLIENT> Shared memory demo: Passed. CLIENT> ****** libmetal demo: atomic operation over shared memory ******
Note: One method with which the application can be debugged
is XSDB. See the Vitis Unified Software Platform Documentation:
Embedded Software Development (UG1400) for more information on the use of
XSDB.