source: rtems-docs/develenv/utilities.rst @ 489740f

4.115
Last change on this file since 489740f was 489740f, checked in by Chris Johns <chrisj@…>, on 05/20/16 at 02:47:09

Set SPDX License Identifier in each source file.

  • Property mode set to 100644
File size: 4.9 KB
Line 
1.. comment SPDX-License-Identifier: CC-BY-SA-4.0
2
3RTEMS Specific Utilities
4########################
5
6This section describes the additional commands
7available within the *RTEMS Development Environment*.  Although
8some of these commands are of general use, most are included to
9provide some capability necessary to perform a required function
10in the development of the RTEMS executive, one of its support
11components, or an RTEMS based application.
12
13Some of the commands are implemented as C programs.
14However, most commands are implemented as Bourne shell scripts.
15Even if the current user has selected a different shell, the
16scripts will automatically invoke the Bourne shell during their
17execution lifetime.
18
19The commands are presented in UNIX manual page style
20for compatibility and convenience.  A standard set of paragraph
21headers were used for all of the command descriptions.  If a
22section contained no data, the paragraph header was omitted to
23conserve space.  Each of the permissible paragraph headers and
24their contents are described below:
25
26``SYNOPSIS``
27    describes the command syntax
28
29``DESCRIPTION``
30    a full description of the command
31
32``OPTIONS``
33    describes each of the permissible options for the command
34
35``NOTES``
36    lists any special noteworthy comments about the command
37
38``ENVIRONMENT``
39    describes all environment variables utilized by the command
40
41``EXAMPLES``
42    illustrates the use of the command with specific examples
43
44``FILES``
45    provides a list of major files that the command references
46
47``SEE ALSO``
48    lists any relevant commands which can be consulted
49
50Most environment variables referenced by the commands
51are defined for the RTEMS Development Environment during the
52login procedure.  During login, the user selects a default RTEMS
53environment through the use of the Modules package.  This tool
54effectively sets the environment variables to provide a
55consistent development environment for a specific user.
56Additional environment variables within the RTEMS environment
57were set by the system administrator during installation.  When
58specifying paths, a command description makes use of these
59environment variables.
60
61When referencing other commands in the SEE ALSO
62paragraph, the following notation is used:   command(code).
63Where command is the name of a related command, and code is a
64section number.  Valid section numbers are as follows:
65
66``1``
67    Section 1 of the standard UNIX documentation
68
69``1G``
70    Section 1 of the GNU documentation
71
72``1R``
73    a manual page from this document, the RTEMS Development Environment Guide
74
75For example, ls(1) means see the standard ls command
76in section 1 of the UNIX documentation.  gcc020(1G) means see
77the description of gcc020 in section 1 of the GNU documentation.
78
79.. COMMENT: packhex
80
81packhex - Compress Hexadecimal File
82===================================
83
84**SYNOPSIS**
85
86.. code:: c
87
88    packhex <source >destination
89
90**DESCRIPTION**
91
92packhex accepts Intel Hexadecimal or Motorola Srecord
93on its standard input and attempts to pack as many contiguous
94bytes as possible into a single hexadecimal record.  Many
95programs output hexadecimal records which are less than 80 bytes
96long (for human viewing).  The overhead required by each
97unnecessary record is significant and packhex can often reduce
98the size of the download image by 20%.  packhex attempts to
99output records which are as long as the hexadecimal format
100allows.
101
102**OPTIONS**
103
104This command has no options.
105
106**EXAMPLES**
107
108Assume the current directory contains the Motorola
109Srecord file download.sr. Then executing the command:
110.. code:: c
111
112    packhex <download.sr >packed.sr
113
114will generate the file packed.sr which is usually
115smaller than download.sr.
116
117**CREDITS**
118
119The source for packhex first appeared in the May 1993
120issue of Embedded Systems magazine.  The code was downloaded
121from their BBS.  Unfortunately, the author's name was not
122provided in the listing.
123
124.. COMMENT: unhex
125
126unhex - Convert Hexadecimal File into Binary Equivalent
127=======================================================
128
129**SYNOPSIS**
130
131.. code:: c
132
133    unhex \[-valF] \[-o file] \[file \[file ...] ]
134
135**DESCRIPTION**
136
137unhex accepts Intel Hexadecimal, Motorola Srecord, or
138TI 'B' records and converts them to their binary equivalent.
139The output may sent to standout or may be placed in a specified
140file with the -o option.  The designated output file may not be
141an input file.  Multiple input files may be specified with their
142outputs logically concatenated into the output file.
143
144**OPTIONS**
145
146This command has the following options:
147
148``v``
149    Verbose
150
151``a base``
152    First byte of output corresponds with base
153    address
154
155``l``
156    Linear Output
157
158``o file``
159    Output File
160
161``F k_bits``
162    Fill holes in input with 0xFFs up to k_bits * 1024 bits
163
164**EXAMPLES**
165
166The following command will create a binary equivalent
167file for the two Motorola S record files in the specified output
168file binary.bin:
169.. code:: c
170
171    unhex -o binary.bin downloadA.sr downloadB.sr
172
Note: See TracBrowser for help on using the repository browser.