Convert to Intel Hex Format at the Command Line

You can convert a bitstream file to Intel Hex and other formats at the command line using this command:

export_bitstream.py [--help] [--family FAMILY] [--idcode IDCODE] [--freq FREQ]
    [--sdr_size SDR_SIZE] [--tir_length TIR_LENGTH] [--hir_length HIR_LENGTH]
    [--tdr_length TDR_LENGTH] [--hdr_length HDR_LENGTH] [--enter_user_mode {on, off}]
    format input_file output_file
Table 1. export_bitstream.py Positional Arguments
Argument Input Description
format hex_to_bin, hex_to_intelhex, bin_to_hex, intelhex_to_hex, hex_to_svf Conversion type.
input_file Filename Image file source.
output_file Filename Image file destination.
Table 2. export_bitstream.py Options
Option (Long) Option (Short) Input Description
--help -h None Show help.
--family N/A Family name Device family (SVF only)
--idcode N/A Identification code JTAG IDCODE (SVF only).
--freq N/A Number JTAG frequency (SVF only).
--sdr_size N/A Number Approximate JTAG shift_dr size before cycling to idle state (SVF only).
--tir_length N/A Number JTAG bypass trailer instruction register length (SVF only).
--hir_length N/A Number JTAG bypass header instruction register length (SVF only).
--tdr_length N/A Number JTAG bypass header data register length (SVF only).
--enter_user_mode N/A on, off Enter user mode after JTAG configuration (SVF only).

The following example shows conversion of the bitstream hex file to bin format:

Converting Hex to Bin

%EFINITY_HOME%\bin\python3
%EFINITY_HOME%\pgm\bin\efx_pgm\export_bitstream.py hex_to_bin new_project.hex test2.bin