-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathbin2ihex.1
79 lines (79 loc) · 1.6 KB
/
bin2ihex.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.Dd August 7, 2019
.Dt bin2ihex 1
.Os kk_ihex
.Sh NAME
.Nm bin2ihex
.Nd Convert binary data to Intel HEX
.Sh SYNOPSIS
.Nm
.Op Fl a Ar address_offset
.Op Fl i Ar input_file.bin
.Op Fl o Ar output_file.hex
.Op Fl v
.Sh DESCRIPTION
.Nm
reads binary data from standard input and writes the Intel HEX encoded
data to standard output.
.Sh OPTIONS
.Bl -tag -width -indent
.It Fl a Ar address_offset
Set the address of the first input byte to
.Ar address_offset
(default 0)
.It Fl i Ar file
Read the binary input from
.Ar file
instead of standard input
.It Fl o Ar file
Write the Intel HEX output to
.Ar file
instead of standard output
.It Fl b Ar length
Set each output line to be formed by encoding
.Ar length
input bytes into IHEX (default 32)
.It Fl v
Print extra status messages to standard error
.El
.Sh EXAMPLES
Read binary data from
.Ar input.bin
and write the Intel HEX output to
.Ar output.hex
.Pp
.Bd -ragged -offset indent
.Nm
.Fl i
.Ar input.bin
.Fl o
.Ar output.hex
.Ed
.Pp
Read binary data from
.Ar input.bin
and write the Intel HEX output to
.Ar output.hex
such that the first byte of the input will have the address
.Ar 0x8000000
in the output (e.g., for creating an image with the correct addresses for flashing
to a ROM):
.Bd -ragged -offset indent
.Nm
.Fl a
.Ar 0x8000000
.Fl i
.Ar input.bin
.Fl o
.Ar output.hex
.Ed
.Pp
Note that the address offset does not make the resulting output significantly
larger, but conversion back to binary with
.Xr ihex2bin 1
must be done with the same
.Fl a
argument to obtain a binary file identical to the original.
.Sh SEE ALSO
.Xr ihex2bin 1
.Sh AUTHOR
.An "Kimmo Kulovesi" Aq https://arkku.com