Specifications
Linker Map Validation
When a BSP is generated, the SBT validates the linker region and section mappings, to ensure that they
are valid for a HAL project. The tools display an error in each of the following cases:
• The .entry section maps to a nonexistent region.
• The .entry section maps to a memory region that is less than 32 bytes in length.
• The .entry section maps to a memory region that does not start on the reset vector base address.
• The .exceptions section maps to a nonexistent region.
• The .exceptions section maps to a memory region that does not start on the exception vector base
address.
• The .entry section and .exceptions section map to the same device, and the memory region
associated with the .exceptions section precedes the memory region associated with the .entry
section.
• The .entry section and .exceptions section map to the same device, and the base address of the
memory region associated with the .exceptions section is less than 32 bytes above the base address of
the memory region associated with the .entry section.
Tcl Scripts for BSP Settings
In many cases, you can fully specify your Nios II BSP with the Nios II SBT settings and defaults. However,
in some cases you might need to create some simple Tcl scripts to customize your BSP.
You control the characteristics of your BSP by manipulating BSP settings, using Tcl commands. The most
powerful way of using Tcl commands is by combining them in Tcl scripts.
Tcl scripting gives you maximum control over the contents of your BSP. One advantage of Tcl scripts over
command-line arguments is that a Tcl script can obtain information from the hardware system or pre-
existing BSP settings, and then use it later in script execution.
For more information about the Tcl commands used to manipulate BSPs, refer to “Software Build Tools
Tcl Commands” in the Nios II Software Build Tools Reference chapter of the Nios II Software Developer’s
Handbook.
Related Information
Nios II Software Build Tools Reference on page 15-1
Calling a Custom BSP Tcl Script
From the Nios II Command Shell, you can call a custom BSP Tcl script with any of the following
commands:
nios2-bsp --script custom_bsp.tcl
nios2-bsp-create-settings --script custom_bsp.tcl
nios2-bsp-query-settings --script custom_bsp.tcl
nios2-bsp-update-settings --script custom_bsp.tcl
In the Nios II BSP editor, you can execute a Tcl script when generating a BSP, through the New BSP
Settings File dialog box.
For more information about using Tcl scripts in the SBT for Eclipse, refer to Using the BSP Editor in the
"Getting Started with the Graphical User Interface" chapter.
4-26
Linker Map Validation
NII5V2
2015.05.14
Altera Corporation
Nios II Software Build Tools
Send Feedback