Knowledge Base Article

How do I specify a custom linker script for my software project in Eclipse?

Description

The most common reasons for creating a custom linker script are to add custom linker section mappings, or additional memory regions. Both of these functions are available within the Nios® II BSP Editor, available by right-clicking on the BSP project within Eclipse, and selecting Nios II -> BSP Editor, and then selecting the "Linker Script" tab.

If the user requires aspects of a linker script that are not available in the gui, then the linker script generated by the BSP GUI cannot be used.  After hand-creating the custom linker script, save this file locally to your software project, and then open the Makefile for editing.  Locate the Makefile line that has a blank assignment for the variable "LINKER_SCRIPT" and complete the line to point to your custom script.  After saving the makefile, this linker script will be used for future builds of your software.

Updated 28 days ago
Version 2.0
No CommentsBe the first to comment