source: rtems-docs/develenv/utilities.rst @ 11e1a6f

4.115
Last change on this file since 11e1a6f was c0d6eff6, checked in by Amar Takhar <verm@…>, on 01/16/16 at 19:53:40

Split document.

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