source: rtems-docs/develenv/utilities.rst @ e52906b

5
Last change on this file since e52906b was e52906b, checked in by Sebastian Huber <sebastian.huber@…>, on 01/09/19 at 15:14:06

Simplify SPDX-License-Identifier comment

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