Build Libmetal Baremetal Firmware with AMD Vitis - Build Libmetal Baremetal Firmware with AMD Vitis - 2024.1 English - UG1186

Libmetal and OpenAMP User Guide (UG1186)

Document ID
UG1186
Release Date
2024-06-26
Version
2024.1 English
  1. From the AMD Vitis™ tools window, create the application project by selecting File > New Application Projects > Next.
    1. Create a new platform from hardware (XSA): Click Browse and import your .xsa file, then click Next.
    2. Enter a name for your application project. Select psu_ Cortex® r5_0 as the target processor, then click Next.
    3. Create a new standalone domain for psu_cortex5_0 target > Next.
    4. Select Libmetal AMP Demo from the available templates.
    5. Click Finish.
  2. Before you build the application, review the source code of the generated application from the AMD Vitis™ unified software platform 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 IP integrator device and shared memory.
    • libmetal_amp_demod.c: Demo application that illustrates how to use IP integrator and shared memory with libmetal for inter-processor communication.
    • common.h: common file with shared resources and functions needed for multiple demos in AMD Libmetal AMP Demo with 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.
Note: As a pre-requisite, a hardware project with generated XSA, or a BSP is required.
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.