Specifications
Table 4-11: Memory Types Recognized when Making Decisions about Your Boot Configura‐
tion
Memory Type Examples IsFlash IsNonVolatileStorage
Flash Common flash interface (CFI),
erasable programmable configu‐
rable serial (EPCS) device
true true
ROM On-chip memory configured as
ROM, HardCopy ROM
false true
RAM On-chip memory configured as
RAM, HardCopy RAM, SDRAM,
synchronous static RAM (SSRAM)
false false
The following sections describe each supported build configuration in detail. The alt_load() facility is
HAL code that optionally copies sections from the boot memory to RAM. You can set an option to enable
the boot copy. This option only adds the code to your BSP if it needs to copy boot segments. The
hal.enable_alt_load setting enables alt_load() and there are settings for each of the three sections it
can copy (such as hal.enable_alt_load_copy_rodata). Enabling alt_load() also modifies the
memory layout specified in your linker script.
Boot from Flash Configuration
The reset address points to a boot loader in a flash memory. The boot loader initializes the instruction
cache, copies each memory section to its virtual memory address (VMA), and then jumps to start.
This boot configuration has the following characteristics:
• alt_load() not called
• No code at reset in executable file
The default Tcl script chooses this configuration when the memory associated with the processor reset
address is a flash memory and the .text section is mapped to a different memory (for example, SDRAM).
Altera provides example boot loaders for CFI and EPCS memory in the Nios II EDS, precompiled to
Motorola S-record Files (.srec). You can use one of these example boot loaders, or provide your own.
Boot from Monitor Configuration
The reset address points to a monitor in a nonvolatile ROM or initialized RAM. The monitor initializes
the instruction cache, downloads the application memory image (for example, using a UART or Ethernet
connection), and then jumps to the entry point provided in the memory image.
This boot configuration has the following characteristics:
• alt_load() not called
• No code at reset in executable file
The default Tcl script assumes no boot loader is in use, so it chooses this configuration only if you enable
it. To enable this configuration, pass the following argument to the default Tcl script:enable_bootloader
1
If you are using the nios2-bsp script, call it as follows:
nios2-bsp hal my_bsp --use_bootloader 1
4-40
Boot from Flash Configuration
NII5V2
2015.05.14
Altera Corporation
Nios II Software Build Tools
Send Feedback