conv(1)

NAME
conv - ELF object file converter

SYNOPSIS
conv [-lvypr] [-a addr[/size]] [-a addr[:limit]] [-R offs] [-f fmt] [-i offs] [-w width] [-b byte,...]
[-s size] [-x seg,...] [-o ofile] [ifile]

DESCRIPTION
The conv command takes ELF executable ifile and converts it into an ASCII or encoded binary format, suitable for downloading onto a PROM programmer or evaluation board. It can take horizontal and/or vertical slices through the file, to cater for PROM programmers that do not have this facility or memory capacity.

OPTIONS

-l  Lists the segments in the ELF file's program header, for possible use in the -x option below; does not produce any other output.

-v  Selects verbose mode, which makes the program report its actions as it converts the file.

-p  Selects PROM mode: output addresses start at zero; the read-only segments are converted first and the other segments are concatenated to them (aligned to 16 byte boundaries). If this option is not given, then the segments are converted in program header order, and the output addresses are the data's actual virtual addresses.

-y  Requests symbol output: for formats which support this the file's symbol table is also converted and sent to the output file.

-a addr[/size]

-a addr[:limit]
    Specifies the physical address range of the PROM, for use with the -p option. All input data located between addr and limit (i.e. between addr and addr+size) are deemed to be intended for PROM execution, and are placed at the relevant offset from addr. Segments outside of this address range are assumed to be intended for relocation to RAM, and are concatenated to the end of the last read-only segment. The default value for addr is 0x1fc00000, and the default size is 0x400000 (i.e. 4Mb).

-r  Selects raw binary input mode, which ignores any ELF headers and converts the whole input file into the output format, starting at the selected PROM base address.

-R offs
    Selects raw binary input mode as above, but places the input at offset offs from the PROM base address.

-f fmt
    Selects the output format, from the list below. If not specified then the environment variable DLTYPE is used. The default if neither of these are specified is srec.

    srec, s3
        Motorola S-records, using S3 and S7 (32-bit address) records; symbol output can be provided via S4 records, as supported by LSI PMON.

    s2  Same as above, except using S2 and S8 (24-bit address) records, to suit some PROM programmers.

    s1  Same as above, except using S1 and S9 (16-bit address) records.

    lsi High density (radix 64) ASCII encoding for downloading by the LSI PMON monitor; symbol output is supported.

    idt Binary S-record format for downloading by the IDT/sim monitor.

    stagbin
        Proprietary binary format for Stag PROM programmers.

    bin Raw binary output, suitable for further conversion by another user program.

-w width
    Specifies the width of CPU data bus in bits (default: 32).

-b byte,...
    The input file is read in multiples of width bits, and then these bytes are selected from it. The default is ``0,1,2,3'', which sends all bytes in their file order. To perform a byte swap specify ``3,2,1,0''. To program four PROMs with consecutive bytes, run convert four times with ``-b0'', ``-b1'', ``-b2'' and ``-b3''.

    To handle interleaved PROMs, multiply the PROM width by the interleave, (e.g. ``-w64'' for two-way interleave on a 32-bit bus), and then run conv interleave × byte-width times (e.g. ``-b0'' to ``-b7'').

-i offs

-s size
    Specified together to split a large program into multiple PROMs. The -i flag specifies the initial offset, and -s the size of the PROM. For example for two 128K proms:
    conv -f s3 -i 0x00000 -s 0x20000 -o prom.s31 prom
    conv -f s3 -i 0x20000 -s 0x20000 -o prom.s32 prom

-x seg,...
    Exclude the following segments from the output; the segment numbers can be determined using the -l option above.

-o oname
    Selects oname as the output file, default is standard output.

SEE ALSO
edown(1)