Build Libmetal Baremetal Firmware with Xilinx Vitis - 2022.1 English

Libmetal and OpenAMP User Guide (UG1186)

Document ID
Release Date
2022.1 English

1. From the Xilinx Vitis window, create the application project by selecting File > New Application Projects > Next .

a. Create a new platform from hardware (XSA):

- Click Browse and import your .xsa file > Next .

b. Enter a name for your application project.

- Select psu_cortexr5_0 as the target processor > Next.

c. Create a new standalone domain for psu_cortex5_0 target > Next .

d. Select Libmetal AMP Demo from the available templates.

e. Click Finish .

2. Before you build the application, review the source code of the generated application from the Xilinx Vitis project explorer. The key source files of the libmetal demonstration application are as follows:

- sys_init.c : System initialization, such as GIC initialization, and metal device definition for IPI device and shared memory.

Note: If you have selected psu_cortex_r5_1, change the following: In sys_init.c, change IPI_BASE_ADDR to 0xFF320000 and IPI_IRQ_VECT_ID to 66.

- libmetal_amp_demod.c : Demo application that illustrates how to use IPI and shared memory with libmetal for inter-processor communication.

- common.h : common file with shared resources and functions needed for multiple demos in Xilinx Libmetal AMP Demo as well as function headers for each demo.

- ipi_latency_demod.c : Demo application that measures latency between APU and RPU.

- ipi_shmem_demod.c : Demonstrates how to access shared memory and IPI.

- shmem_atomic_demod.c : Demonstrates how to access shared memory with atomics.

- shmem_demod.c : Demonstrates use of shared memory between APU and RPU.

- shmem_latency_demod.c : Demo application that measures shared memory latency between APU and RPU.

- shmem_throughput_demod.c : Demo application that measures shared memory throughput between APU and RPU.

3. To build the application project, select Ctrl+B . The generated ELF is in the <rpu_app_proj>/Debug/ directory.