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

4.115am
Last change on this file since c2cefaa was c2cefaa, checked in by Joel Sherrill <joel@…>, on Oct 27, 2016 at 11:35:41 PM

develenv: Fix build errors for real

  • Property mode set to 100644
File size: 4.9 KB
RevLine 
[489740f]1.. comment SPDX-License-Identifier: CC-BY-SA-4.0
2
[c2cefaa]3.. _rtems-specific-utilities:
4
[c0d6eff]5RTEMS Specific Utilities
6########################
7
[9b53679]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
[c0d6eff]12components, or an RTEMS based application.
13
[9b53679]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.
[c0d6eff]18
[9b53679]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:
[c0d6eff]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
[9b53679]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
[c0d6eff]56environment variables.
57
[9b53679]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:
[c0d6eff]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
[9b53679]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.
[c0d6eff]74
75packhex - Compress Hexadecimal File
76===================================
77
78**SYNOPSIS**
79
[9b53679]80.. code-block:: c
[c0d6eff]81
82    packhex <source >destination
83
84**DESCRIPTION**
85
[9b53679]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
[c0d6eff]92allows.
93
94**OPTIONS**
95
96This command has no options.
97
98**EXAMPLES**
99
[9b53679]100Assume the current directory contains the Motorola Srecord file
101download.sr. Then executing the command:
102
103.. code-block:: c
[c0d6eff]104
105    packhex <download.sr >packed.sr
106
[9b53679]107will generate the file packed.sr which is usually smaller than download.sr.
[c0d6eff]108
109**CREDITS**
110
[9b53679]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.
[c0d6eff]114
115unhex - Convert Hexadecimal File into Binary Equivalent
116=======================================================
117
118**SYNOPSIS**
119
[9b53679]120.. code-block:: c
[c0d6eff]121
[9b53679]122    unhex [-valF] [-o file] [file [file ...] ]
[c0d6eff]123
124**DESCRIPTION**
125
[9b53679]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.
[c0d6eff]131
132**OPTIONS**
133
134This command has the following options:
135
136``v``
137    Verbose
138
139``a base``
[9b53679]140    First byte of output corresponds with base address
[c0d6eff]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
[9b53679]153The following command will create a binary equivalent file for the two Motorola
154S record files in the specified output file binary.bin:
[c0d6eff]155
[9b53679]156.. code-block:: c
[c0d6eff]157
[9b53679]158    unhex -o binary.bin downloadA.sr downloadB.sr
Note: See TracBrowser for help on using the repository browser.