Nios® V Processor Software Developer Handbook

ID 743810
Date 7/20/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

4.6.1.4. Specifying the Default Bootloader Parameters

The bsp-bootloader-utils.tcl script provides procedures to specify the following BSP Boolean settings in hal.linker:
  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • enable_alt_load_copy_exceptions

The script examines the .text section mapping and the Nios® V processor reset agent port. If the .text section is mapped to the same memory as the Nios® V processor reset agent port and the reset agent port is a flash memory device, the script assumes that the alt_load() function is being used.

The alt_load() function is an early part of the software initialization and handles the copying of sections on reset except the .text section. If it is necessary to copy the .text section to other memory region, the BSP needs to provide a custom bootloader code.

Table 19.  Bootloader-Dependent Settings
Setting name Value When Bootloader Is Used Value When Bootloader Is Not Used
allow_code_at_reset 0 1
enable_alt_load 0 1
enable_alt_load_copy_rodata 0 1 if .rodata memory different than .text memory and .rodata memory is volatile; 0 otherwise
enable_alt_load_copy_rwdata 0 1
enable_alt_load_copy_exceptions 0 1 if .exceptions memory different than .text memory and .exceptions memory is volatile; 0 otherwise