-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathsrec2bin.1
More file actions
77 lines (77 loc) · 1.87 KB
/
srec2bin.1
File metadata and controls
77 lines (77 loc) · 1.87 KB
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
.Dd March 5, 2015
.Dt srec2bin 1
.Os kk_srec
.Sh NAME
.Nm srec2bin
.Nd Convert Motorola SREC encoded data to binary
.Sh SYNOPSIS
.Nm
.Op Fl a Ar address_offset | Fl A
.Op Fl i Ar input_file.srec
.Op Fl o Ar output_file.bin
.Op Fl v
.Sh DESCRIPTION
.Nm
reads Motorola SREC encoded data from standard input and writes the
decoded binary data to standard output.
.Sh OPTIONS
.Bl -tag -width -indent
.It Fl a Ar address_offset
Set the address of the first byte output to
.Ar address_offset
- by default the output respects the addres read from the input, but
with many SREC files produced by compilers the data have an offset
(possibly mega- or gigabytes), which may cause the output file to be
unnecessarily large. The offset specified by this parameter is
subtracted from all addresses read from the file.
.It Fl A
Autodetect the address offset (see
.Ar -a
above), i.e., the first output byte written will have the address of the
first byte of input - this option should almost always be used!
.It Fl i Ar file
Read the Motorola SREC input from
.Ar file
instead of standard input
.It Fl o Ar file
Write the binary output to
.Ar file
instead of standard output
.It Fl v
Print extra status messages to standard error
.El
.Sh EXAMPLES
Read Motorola SREC from
.Ar input.srec
and write the binary output to
.Ar output.bin
such that the first byte of input is written as the first byte
of output (even if the input specifies an address offset):
.Pp
.Bd -ragged -offset indent
.Nm
.Fl A
.Fl i
.Ar input.srec
.Fl o
.Ar output.bin
.Ed
.Pp
Read Motorola SREC from
.Ar input.srec
and write the binary output to
.Ar output.bin
such that the offset
.Ar 0x8000000
is subtracted from input addresses:
.Bd -ragged -offset indent
.Nm
.Fl a
.Ar 0x8000000
.Fl i
.Ar input.srec
.Fl o
.Ar output.bin
.Ed
.Sh AUTHOR
.An "Kimmo Kulovesi" Aq http://arkku.com