source: rtems-docs/develenv/utilities.rst @ 9b53679

4.115
Last change on this file since 9b53679 was 9b53679, checked in by Chris Johns <chrisj@…>, on 10/27/16 at 23:12:50

Fix develenv. Needs more fixes.

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