Nios® V Processor Software Developer Handbook

ID 743810
Date 10/02/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.8.3. Run from Initialized Memory Configuration

The reset address points to the beginning of the application in memory (no bootloader). The reset memory must have its contents initialized before the processor comes out of reset. The initialization might be implemented by using a non-volatile reset memory (for example, flash, ROM, initialized FPGA RAM) or by an external master (for example, another processor) that writes the reset memory. The HAL C run-time start-up code (crt0) initializes the instruction cache, uses alt_load() to copy select sections to their VMAs, and then jumps to _start. For each associated section (.rwdata, .rodata, .exceptions), Boolean settings control this behavior. The default Tcl scripts set these to default values as described in the Table Bootloader-Dependent Settings.

alt_load() must copy the .rwdata section (either to another RAM or to a reserved area in the same RAM as the .text RAM) if .rwdata needs to be correct after multiple resets.

This boot configuration has the following characteristics:
  • alt_load() called
  • Code at reset in executable file

The default Tcl script chooses this configuration when the reset and .text memory are the same.

In this boot configuration, when the processor core resets, by default the .rwdata section is not reinitialized. Reinitialization would normally be done by a bootloader. However, this configuration has no bootloader because the software is running out of memory that is assumed to be preinitialized before start-up. If your software has a .rwdata section that must be reinitialized at processor reset, turn on the hal.linker.enable_alt_load_copy_rwdata setting in the BSP.