Modifying the Application Linker Script for the Application Project helloworld_r5 - Modifying the Application Linker Script for the Application Project helloworld_r5 - 2026.1 English - UG1305

Versal Adaptive SoC Embedded Design Tutorial (UG1305)

Document ID
UG1305
Release Date
2026-06-23
Version
2026.1 English

The following steps demonstrate the procedure to modify the application linker script for the application project helloworld_r5.

Note

The Vitis software platform provides a linker script generator to simplify the task of creating a linker script for GCC. The linker script generator GUI examines the target hardware platform and determines the available memory sections. All you need to do is assign the different code and data sections in the ELF file to different memory regions.

  1. Select the application project (helloworld_r5) in the Vitis Explorer view.

    Note

    The linker will use the DDR memory if it exists on the platform. Otherwise, it will default to the on-chip memory (OCM).

  2. In the src directory, delete the default lscript.ld file.

  3. Right-click helloworld_r5 and click Reset Linker Script.

    ../_images/linker_script.PNG

    Note

    In the Generate linker script dialog box, the left side is read-only, except for the Output Script name and project build settings in the Modify project build settings as follows field. On the right side, you have two options to allocate memory: The Basic tab and the Advanced tab. Both perform the same tasks; however, the Basic tab is less granular and treats all types of data as “data” and all types of instructions as “code.” This is often sufficient to accomplish most tasks. Use the Advanced tab for precise allocation of software blocks into various types of memory.

    Note

    To terminate the debug configuration, delete the debug configuration.

    ../_images/terminate_new_vitis.PNG