Nios® II Software Developer Handbook

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

7.14.2.1. System Initialization Code Boot Sequence

The HAL provides system initialization code in the C runtime library (crt0.S). This code performs the following boot sequence:
  • Flushes the instruction and data cache.
  • Configures the stack pointer.
  • Configures the global pointer register.
  • Initializes the block started by symbol (BSS) region to zeroes using the linker-supplied symbols __bss_start and __bss_end. These are pointers to the beginning and the end of the BSS region.
  • If there is no boot loader present in the system, copies to RAM any linker section whose run address is in RAM, such as .rwdata, .rodata, and .exceptions.

    For more information, refer to “Global Pointer Register” on page 6–41.

  • Calls alt_main().