Modifying the Linker Script for testapp_r5 - 2024.2 English - UG1209

Zynq UltraScale+ MPSoC Embedded Design Tutorial (UG1209)

Document ID
UG1209
Release Date
2025-03-20
Version
2024.2 English

When two applications needs to run at the same time, they cannot use resources in conflict. They should not each other’s memory space. They should use their own peripherals, or share peripherals by time. In this step, memory space is assigned by updating the linker scripts.

  1. In the Explorer view, expand the testapp_r5 project.

  2. In the src directory, double-click lscript.ld to open the linker script for this project.

  3. In the linker script, in Available Memory Regions, modify the following attributes for psu_r5_ddr_0_MEM_0:

    • Base Address: 0x70000000

    • Size: 0x10000000

    The linker script modification is shown in following figure. The following figure is for representation only. Actual memory regions might vary in the case of isolation settings.

    Linker Script View

    Fig. 6 Linker Script View

    This modification in the linker script ensures that the RPU bare-metal application resides above 0x70000000 base address in the DDR, and occupies no more than 256 MB of size.

  4. Press Ctrl + S to save the changes.

  5. Select the testapp_r5 project in the component box within the flow tab and then click Build.

  6. Verify that the application is compiled and linked successfully, and that the testapp_r5.elf file has been generated in the testapp_r5/build folder.