Nios® V Embedded Processor Design Handbook

ID 726952
Date 4/04/2022
Public

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

Document Table of Contents

5.4.1.1. alt_load()

You can enable the alt_load() function in the HAL code using the BSP Editor.

The alt_load() function performs the following tasks:
  • Operates as a mini boot copier that copies only the writable memory sections to RAM based on the BSP settings.
  • Optionally copies sections from the boot memory to RAM.
  • Copies data sections (.rodata, .rwdata, .exceptions) to RAM but not the code sections (.text).The code section (.text) section is a read-only section and remains in the booting flash memory region. This partitioning helps to minimize the RAM usage but may limit the code execution performance because accesses to flash memory are slower than accesses to the on-chip RAM.

The following table lists the BSP Editor settings and functions:

Table 8.  BSP Editor Settings
BSP Editor Setting Function
hal.linker.enable_alt_load Enables alt_load() function.
hal.linker.enable_alt_load_copy_rodata alt_load() copies .rodata section to RAM.
hal.linker.enable_alt_load_copy_rwdata alt_load() copies .rwdata section to RAM.
hal.linker.enable_alt_load_copy_exceptions alt_load() copies .exceptions section to RAM.