Embedded Design Handbook

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

5.3.3.2. The Default CFI Flash Boot Copier

The Nios® II default boot copier is automatically included by the Nios® II flash programmer during the execution of the elf2flash utility. Based on the processor reset address, the elf2flash utility determines the entry point of the application code and the address range of flash memory, whether or not a boot copier is needed. A CFI boot copier is needed whenever the processor’s reset address points to CFI flash memory and the application’s .text section points to somewhere other than CFI flash memory. When a boot copier is needed, elf2flash packs the application code in a boot record, and then creates a Motorola S-record Flash Programming File (.flash) containing the default boot copier and the boot record. The flash programmer downloads this boot record to CFI flash memory.

Immediately after the Nios® II processor completes reset, the boot copier executes, reads the boot record as described in the “Boot Images” section, and copies the application code to RAM. After copying is complete, the boot copier reads the entry point of the application code from the boot record. The boot copier executes the jump to that address, and the application software begins executing.