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.
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).
In the src directory, delete the default
lscript.ldfile.Right-click helloworld_r5 and click Reset Linker Script.
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.