Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

4.11.3.3.1. alt-file-convert (BETA)

Description

alt-file-convert (BETA): General file conversion tool. For Gen2, it is primarily used for generating a Nios II application image for Max Onchip Flash and EPCQ.

Usage

alt-file-convert -I <input_type> -O <output_type> [option(s)] --input=<input_file> --output=<output_file>

Options

-h, --help - prints usage
-I - input type
-O - output type
--base - base address (in hex) f target memory (default 0x0)
--end - end address (in hex) of target memory (default 0xFFFFFFFF)
--reset - reset address (in hex) of target memory (default None)
--input - path to input file
--output - path to output file
--in-data-width - data width of inputfile [8, 16, 32, 64, 128, 256] (default 8)
--out-data-width - data width of target memory [8, 16, 32, 64, 128, 256] (default None)
--boot - location of boot file to be appended (srec format)

Examples

Converting from Intel Hex (IHEX) to a Quartus Hex (HEX) for a memory with a 32-bit data width:
alt-file-convert –I ihex –O
          hex out-data-width 32 in.ihex out.hex
Converting from an .elf file to a flash and appending a bootcopier given as a srec file:
alt-file-convert –I elf32-littlenios2 –O flash in.elf out.flash –-have-boot-copier –-boot boot.elf