Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

4.2.4.3.1. Default BSP Linking

During BSP configuration, the tools perform the following steps automatically:

  1. Assign memory region names—Assign a name to each system memory device, and add each name to the linker file as a memory region.
  2. Find largest memory—Identify the largest read-and-write memory region in the linker file.
  3. Assign sections—Place the default sections (.text, .rodata, .rwdata, .bss, .heap, and .stack) in the memory region identified in the previous step.
  4. Write files—Write the linker.x and linker.h files.

Usually, this section allocation scheme works during the software development process, because the application is guaranteed to function if the memory is large enough.

The rules for the HAL default linking behavior are contained in the Intel-generated Tcl scripts bsp-set-defaults.tcl and bsp-linker-utils.tcl found in the < Nios® II EDS install dir>/sdk2/bin directory. These scripts are called by the nios2-bsp-create-settings configuration application. Do not modify these scripts directly.