Nios® V Embedded Processor Design Handbook

ID 726952
Date 12/04/2023
Public
Document Table of Contents

4.4.1.1. alt_load()

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

When used in the execute-in-place boot flow, the alt_load() function performs the following tasks:
  • Operates as a mini boot copier that copies the memory sections to RAM based on the BSP settings.
  • 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 24.  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.