Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This design note is to document a set of steps in Vitis and PetaLinux that will create a system with Linux on the APU and bare metal on each of the R5s in the RPU of a Versal device (in this example a VCK190). Libmetal will be used to communicate between the APU and RPU.

In this system, the APU will boot first and bring up and initialize each of the R5s. Example applications for the R5s and Linux on the APU will be created to utilize use many features of Libmetal.

...

This demonstration leverages the Versal Libmetal Demo and the Libmetal AMP Demo in (UG1186). In each of those references there is only a single R5 instance running with a single Linux application interacting with it. For this exercise the R5s will operate in split mode with each having its own application. There will be two Linux applications, each paired with an R5 instance.

...

  • It is assumed that you have an XSA exported from a Vivado project for the VCK190 which incorporates the requirements noted in the Appendix

  • Create bare metal applications for each of the R5s which use Libmetal and have been configured to run on the respective core.

  • Create a PetaLinux project which includes Libmetal with a properly configured device tree and make the resultant resulting sysroot available for the creation of the Linux applications.

  • Create Linux applications which will use Libmetal to communicate with each of the respective R5s respectively.

  • Integrate the R5 bare metal applications as well as the Linux applications into the Linux image and package the project to be deployed on the target board.

  • Deploy the packaged project on the VCK190 and exercise the various included Libmetal functions.

...

  • Launch Vitis in classic mode (vitis --classic on linuxLinux)

Create a Vitis project in a workspace named vitis_prj.

...

  • Modify the my-R5-0-app application. The changes are to define the shared memory region between R5-0 and the APU (adjusted because another region for the R5-1 & and APU will be needed) as well as and to make the print statements easily identifiable to R5-0.

...

  • Build the application by right clicking on it and selecting Build Project.

Create the bare metal application for R5-1

  • Create a Domain for R5-1.

Select platform.spr in VCK190_hw.

Use the green '+' to add a domain.

...

Modify the versal_cips_0_pspmc_0_psv_cortexr5_1 domain.

Use Modify BSP Settingsā€¦ to add the LibMetal library

...

Click Next (use the VCK190_hw plaformplatform)

Application project name : my-R5-1-app

...

  • Modify the my-R5-1-app application. The changes are to define the shared memory region between R5-1 and the APU (accounting for the region allocated to R5-0 & and the APU) as well as and to make the print statements easily identifiable to R5-1. Additionally, a different IPI channel is being used for the R5-1 communications with the APU than the one for the R5-0 so its corresponding base address, interrupt vector ID, and mask are adjusted accordingly. LastlyFinally, a different TTC is used for R5-1 so its corresponding values are modified.

...

  • Build Project on libmetaldemo-plat.

Create

...

the Linux application paired to R5-0

  • Create a new application project (Libmetal).

...

  • Import the same set of source files from <>/libmetal/examples/system/linux/zynqmp/zynqmp_amp_demo as was done for my-lm-linux-app0.

  • Add the compiler flag CONFIG_IPI_MASK=0x10 under ARM v8 Linux gcc compiler symbols. This will select a different IPI channel from what is than the one used for my-lm-linux-app0.

...

Code Block
languagenone
cd <>/plnx_prj/project-spec/meta-user/recipes-apps/my-lm-linux-app1/files
cp <>/vitis_prj/my-lm-linux-app1/Debug/my-lm-linux-app1.elf .
cp <>/vitis_prj/my-R5-1-app/Debug/my-R5-1-app.elf .
  • Replace the contents of <>/plnx_prj/project-spec/meta-user/recipes-apps/my-lm-linux-app1/my-lm-linux-app1.bb with the code below. This adds references to the apps for R5-1 and APU (app1), notes dependencies for the Linux app, and instructs you where to locate these apps in the root file system.

...

  • Copy BOOT.BIN, boot.scr, and image.ub onto SD card.

  • Power up the VCK190 with the SD inserted and boot mode set to SD.

Login : is petalinux, you will be prompted to set a password.

...