Embedded Design Handbook

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

5.2.6.2. Nios® II Processor Application Execute-In-Place from CFI Flash

This option is suitable for Nios® II processor applications which require limited on-chip memory usage. The alt_load() function operates as a mini boot copier which initializes and copies the data sections (.rodata, .rwdata, or .exceptions) from CFI flash to RAM based on the BSP settings. The code section (.text) which is a read only section, remains in the CFI flash memory region. This setup offers faster boot time because it does not need to copy code to RAM.

The Nios® II processor reset vector points to the CFI flash to allow code execution after the system reset. If you are debugging the application using the source-level debugger, you must use a hardware breakpoint because the CFI cannot efficiently support random memory access.
Figure 177.  Nios® II Application XIP from CFI Flash
Figure 178. Design, Configuration and Booting Flow