Creating a linker script
Generating a linker script for an application
To generate a linker script for an application:
- Click Tools > Generate Linker Script and select the application project, or right-click the application in the C/C++ Projects view and select
Generate Linker Script.
- Configure the following sections of the Linker Script Generator dialog box:
- Application project name: This field displays the application you selected. It is not editable.
- ELF file used to populate section info: If an Executable Linked Format
(ELF) file is present for the application, it is displayed in this field. The Code Sections, Data Sections, and Heap and Stack areas of the dialog box reflect the settings as defined in the ELF file.
- Code Sections: Use this area of the dialog box to map code sections onto memory.
- Data Sections: Use this area of the dialog box to map data sections onto memory.
- Heap and Stack: Use this area to set heap and stack sizes, and to set the memories.
- Reference Views: This area displays the memory and boot and vector section settings. This area is not editable.
- In the Output Linker Script field, specify the file name for the output linker script file.
- Click OK. If there are errors, they appear in the Console Window at the bottom of the SDK main window.
Note: If the linker script already exists, a message window appears, asking if you want to overwrite
the file. Click OK to overwrite the file or Cancel to cancel the overwrite.
SDK automatically adds the linker script to the linker settings for a
managed make project.
Adding the linker script manually
If you want to manually add the linker script for a
managed make flow, do the following:
- Right-click your managed make project and select Properties.
- Click C/C++ Build.
- In the Tool Settings tab, select Linker Script
to add the linker script.
For standard make projects, add the linker script manually to your makefile linker
options.
Linker scripts
Managed make build settings
Copyright © 1995-2009 Xilinx, Inc. All rights reserved.