Testing on Hardware - Testing on Hardware - 2024.2 English - UG1186

Libmetal and OpenAMP User Guide (UG1186)

Document ID
UG1186
Release Date
2024-12-20
Version
2024.2 English
  1. Go to the PetaLinux project:
    $ cd <plnx_proj>
  2. Build the PetaLinux project:
    $ petalinux-build
  3. Run PetaLinux boot:
    $ petalinux-boot jtag --kernel

    If you encounter any issues, append -v to these commands to see the textual output.

  4. 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/state

    You 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.

  5. 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.