Nios® V Processor Software Developer Handbook

ID 743810
Date 7/20/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

13.2.2.2. elf2flash

Synopsis

elf2flash [OPTIONS] <ELF FILE> <SREC FILE>

Description

The elf2flash utility converts the software and data within an ELF file in the address range [base, end] into a SREC file that can be programmed into the flash memory connected to an Intel FPGA.

This utility can also optionally insert a boot copier into the FLASH file to copy the software from flash memory to RAM before running it.

Usage

#Generate flash file in srec format
elf2flash --input software/user_application/app/debug/<user application>.elf --output flash.srec –epcs –-offset 0x0

Options

Options Description
--after <file> Start output at address immediately following data in specified .flash file
-b,--base <addr> Flash base address
--boot <file> Boot copier SREC file
--debug Debug mode
-e,--end <addr> Flash end address
--epcs Quad SPI flash mode
-h,--help Print this message
-i,--input <file> Input ELF file to process
--log <file> File for logging progress
-o,--output <file> Output Hex file
offset <offset> Flash offset
-q,--quiet Only print errors
-r,--reset <addr> CPU reset address
-s,--silent Silent mode - same as quiet
--save Save intermediate files
--sim_optimize <value> Optimize for simulation
-v,--verbose Lots of interesting information