Nios® II Flash Programmer User Guide

ID 683118
Date 11/06/2017
Public
Document Table of Contents

3.3.2. Programming Both Hardware and Software into an EPCS/EPCQ Device

The --base parameter is not available for EPCS/EPCQ devices, because in EPCS/EPCQ devices, FPGA configuration data must start at address 0x0. However, if you are programming both an FPGA configuration and a Nios® II software executable in the EPCS/EPCQ device, the --after parameter lets you position the software executable directly after the FPGA configuration data.

Convert the FPGA configuration file first using sof2flash. When converting the Nios® II software executable, use the --after parameter, and specify the FPGA configuration S-record file. The S-record output for the software executable starts at the first address unused by the FPGA configuration. Refer to the second example under the “elf2flash Command-Line Examples” chapter.

Note: elf2flash does not insert the FPGA configuration into the output file. It simply leaves space, starting at offset 0x0, that is large enough for the configuration data.
Note: In Intel® Quartus® Prime software version 13.1 and onwards, the -epcs/--epcq option in sof2flash generates .flash file with a SOF header, which contains the SOF length. This change is required for V-series devices and above for new SOF format, and to allow for future SOF format variations. The Nios® II bootcopier loads the Nios® II software executable from EPCS/EPCQ devices based on the SOF length. For more information about how to program EPCS/EPCQ devices, refer to the "KDB Solution rd11192013_118" webpage.