-
Notifications
You must be signed in to change notification settings - Fork 36
/
merge32bit.1
66 lines (66 loc) · 1.33 KB
/
merge32bit.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
.Dd December 13, 2019
.Dt merge32bit 1
.Os kk_ihex
.Sh NAME
.Nm merge32bit
.Nd Merges a 32-bit ROM image into four 8-bit files.
.Sh SYNOPSIS
.Nm
.Op Fl 0 Ar in0.bin
.Op Fl 1 Ar in1.bin
.Op Fl 2 Ar in2.bin
.Op Fl 3 Ar in3.bin
.Op Fl o Ar output32bit.bin
.Sh DESCRIPTION
.Nm
reads bytes alternately from four input files and writes them to a
single output file. Each 32-bit dword of output will thus have one
byte from each input file. The bytes are numbered from 0 to 3 by
address, i.e., the first byte of output is from input file 0
(little endian).
.Sh OPTIONS
.Bl -tag -width -indent
.It Fl 0 Ar byte0file
Read the first byte of each output word from
.Ar byte0file
.It Fl 1 Ar byte1file
Read the second byte of each output word from
.Ar byte1file
.It Fl 2 Ar byte2file
Read the third byte of each output word from
.Ar byte2file
.It Fl 3 Ar byte3file
Read the fourth byte of each output word from
.Ar byte3file
.It Fl i Ar file
Write the 32-bit output to
.Ar file
instead of standard output
.El
.Sh EXAMPLES
Write the output to
.Ar be32.bin
and read the bytes for each 32-bit output dword from the files
.Ar U1.bin
to
.Ar U4.bin
in big endian order:
.Pp
.Bd -ragged -offset indent
.Nm
.Fl o
.Ar be32.bin
.Fl 0
.Ar U4.bin
.Fl 1
.Ar U3.bin
.Fl 2
.Ar U2.bin
.Fl 3
.Ar U1.bin
.Ed
.Pp
.Sh SEE ALSO
.Xr split32bit 1
.Sh AUTHOR
.An "Kimmo Kulovesi" Aq https://arkku.com