AN 736: Nios II Processor Booting From Altera Serial Flash (EPCQ)

ID 683104
Date 5/20/2016
Public

1.5.3. BSP Editor Settings

  1. Open the Nios II SBT tool and create the Nios II processor HAL BSP based on the .sopinfo created from Qsys generation.
  2. Right-click on the BSP that you have created and select Nios II > BSP Editor.
  3. Configure the Settings.Advanced.hal.linker and the Linker Section mappings in the BSP Editor based on your boot options. Refer to the table below.
    Table 3.  BSP Editor Mappings
    Boot Option BSP Editor: Linker Script Settings.Advanced.hal.linker
    Nios II processor application executes in place from EPCQ flash
    • Set .text Linker Section to EPCQ (epcq_controller_0_avl_mem)
    • Set other Linker Sections (.heap, .rwdata, .rodata, .bss, .stack) to OCRAM

    If the exception vector is set to OCRAM, 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 is set to EPCQ, 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
    Nios II processor application is copied from EPCQ flash to RAM using boot copier Make sure all Linker Sections are set to OCRAM/External RAM. Make sure all settings are left unchecked.
    Figure 5. Settings.Advanced.hal.linker for Execute-In-Place Method if Exception Vector is Set to OCRAM
    Figure 6. Settings.Advanced.hal Linker for Execute-in-Place Method if Exception Vector is Set to EPCQ
    Figure 7. Settings.Advanced.hal Linker for Boot Copier Method
    Figure 8. Linker Section Mappings for Execute-In-Place Method
    Figure 9. Linker Section Mappings for Boot Copier Method
  4. Click Generate. Make sure the BSP generation is successful.
  5. Click Exit to close the BSP editor.