Embedded Design Handbook

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

5.2.7. Summary of Nios® II Processor Vector Configurations and BSP Settings

The following table shows a summary of Nios® II processor reset and exception vector configurations, and BSP settings.
Table 44.  Summary of Nios® II Processor Vector Configurations and BSP Settings
Boot Option Reset Vector Configuration Exception Vector Configuration BSP Editor Setting: Settings.Advanced.hal.linker BSP Editor Setting: Linker Script
Nios® II processor application execute-in-place from On-chip Flash (UFM) On-chip Flash (UFM) Choose between:
  • OCRAM/ External RAM
  • On-chip Flash
If the exception vector memory is set to OCRAM/ External RAM, enable the following settings in Settings.Advanced.hal.linker:
  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • enable_alt_load_copy_exceptions

If the exception vector memory is set to On-chip Flash, enable the following settings in Settings.Advanced.hal.linker:

  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • Set .text Linker Section to UFM
  • Set other Linker Sections (.heap, .rwdata, .rodata, .bss, .stack) to OCRAM / External RAM
Nios® II processor application copied from UFM to RAM using boot copier On-chip Flash (UFM) OCRAM/ External RAM Make sure all settings in Settings.Advanced.hal.linker are left unchecked. Make sure all Linker Sections are set to OCRAM / External RAM.
Nios® II processor application execute-in-place from EPCQ flash EPCQ Flash Choose between:
  • OCRAM/ External RAM
  • EPCQ Flash
If the exception vector memory is set to OCRAM/ External RAM, enable the following settings in Settings.Advanced.hal.linker:
  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • enable_alt_load_copy_exceptions

If the exception vector memory is set to EPCQ Flash, enable the following settings in Settings.Advanced.hal.linker:

  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • Set .text Linker Section to EPCQ flash
  • Set other Linker Sections (.heap, .rwdata, .rodata, .bss, .stack) to OCRAM / External RAM
Nios® II processor application copied from EPCQ flash to RAM using boot copier EPCQ Flash OCRAM/ External RAM Make sure all settings in Settings.Advanced.hal.linker are left unchecked. Make sure all Linker Sections are set to OCRAM / External RAM.
Nios® II processor application executes in-place from QSPI flash QSPI Flash (Configuration / General Purpose) Choose between:
  • OCRAM/ External RAM
  • QSPI Flash
If the exception vector memory is set to OCRAM/ External RAM, enable the following settings in Settings.Advanced.hal.linker:
  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • enable_alt_load_copy_ exceptions
If the exception vector memory is set to QSPI Flash, enable the following settings in Settings.Advanced.hal.linker:
  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • Set .text Linker Section to QSPI flash
  • Set other Linker Sections (.heap, .rwdata, .rodata, .bss, .stack) to OCRAM / External RAM
Nios® II processor application copied from QSPI flash to RAM using boot copier QSPI flash (Configuration / General Purpose) OCRAM/External RAM Make sure all settings in Settings.Advanced.hal.linker are left unchecked Make sure all Linker Sections are set to OCRAM / External RAM.
Nios® II processor application execute-in-place from On-chip Memory (OCRAM) OCRAM OCRAM Enable allow_code_at_reset in Settings.Advanced.hal.linker and other settings are left unchecked. Make sure all Linker Sections are set to OCRAM.
Nios® II processor application execute-in-place from CFI flash CFI Flash Choose between:
  • OCRAM/ External RAM
  • CFI Flash
If the exception vector memory is set to OCRAM/ External RAM, enable the following settings in Settings.Advanced.hal.linker:
  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • enable_alt_load_copy_exceptions

If the exception vector memory is set to CFI Flash, enable the following settings in Settings.Advanced.hal.linker:

  • allow_code_at_reset
  • enable_alt_load
  • enable_alt_load_copy_rodata
  • enable_alt_load_copy_rwdata
  • Set .text Linker Section to CFI flash
  • Set other Linker Sections (.heap, .rwdata, .rodata, .bss, .stack) to OCRAM / External RAM
Nios® II processor application copied from CFI flash to RAM using boot copier CFI Flash OCRAM/External RAM Make sure all settings in Settings.Advanced.hal.linker are left unchecked Make sure all Linker Sections are set to OCRAM / External RAM.