summaryrefslogtreecommitdiffstats
path: root/doc/develenv/utils.texi
blob: 1ddf4c906ed83c741da720749a2dee71b20c8b2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
@c
@c  COPYRIGHT (c) 1988-2002.
@c  On-Line Applications Research Corporation (OAR).
@c  All rights reserved.
@c
@c  $Id$
@c

@ifinfo
@node RTEMS Specific Utilities, RTEMS Specific Utilities C Language Specific Utilities, Sample Applications Paranoia Floating Point Application, Top
@end ifinfo
@chapter RTEMS Specific Utilities
@ifinfo
@menu
* RTEMS Specific Utilities C Language Specific Utilities::
* RTEMS Specific Utilities Ada Language Specific Utilities::
@end menu
@end ifinfo

This section describes the additional commands
available within the RTEMS Development Environment.  Although
some of these commands are of general use, most are included to
provide some capability necessary to perform a required function
in the development of the RTEMS executive, one of its support
components, or an RTEMS based application.  The commands have
been classified into the following categories for clarity:

@itemize @bullet
@item C Language Specific Utilities

@item Ada Language Specific Utilities
@end itemize

Some of the commands are implemented as C programs.
However, most commands are implemented as Bourne shell scripts.
Even if the current user has selected a different shell, the
scripts will automatically invoke the Bourne shell during their
execution lifetime.

The commands are presented in UNIX manual page style
for compatibility and convenience.  A standard set of paragraph
headers were used for all of the command descriptions.  If a
section contained no data, the paragraph header was omitted to
conserve space.  Each of the permissible paragraph headers and
their contents are described below:

@table @code
@item SYNOPSIS
describes the command syntax

@item DESCRIPTION
a full description of the command

@item OPTIONS
describes each of the permissible options for the command

@item NOTES
lists any special noteworthy comments about the command

@item ENVIRONMENT
describes all environment variables utilized by the command

@item EXAMPLES
illustrates the use of the command with specific examples

@item FILES
provides a list of major files that the command references

@item SEE ALSO
lists any relevant commands which can be consulted
@end table

Most environment variables referenced by the commands
are defined for the RTEMS Development Environment during the
login procedure.  During login, the user selects a default RTEMS
environment through the use of the Modules package.  This tool
effectively sets the environment variables to provide a
consistent development environment for a specific user.
Additional environment variables within the RTEMS environment
were set by the system administrator during installation.  When
specifying paths, a command description makes use of these
environment variables.

When referencing other commands in the SEE ALSO
paragraph, the following notation is used:   command(code).
Where command is the name of a related command, and code is a
section number.  Valid section numbers are as follows:

@table @code
@item 1 
Section 1 of the standard UNIX documentation

@item  1G 
Section 1 of the GNU documentation

@item  1R 
a manual page from this document, the RTEMS Development Environment Guide
@end table

For example, ls(1) means see the standard ls command
in section 1 of the UNIX documentation.  gcc020(1G) means see
the description of gcc020 in section 1 of the GNU documentation.

@ifinfo
@node RTEMS Specific Utilities C Language Specific Utilities, packhex - Compress Hexadecimal File, RTEMS Specific Utilities, RTEMS Specific Utilities
@end ifinfo
@section C Language Specific Utilities
@ifinfo
@menu
* packhex - Compress Hexadecimal File::
* unhex - Convert Hexadecimal File into Binary::
* size_rtems - report RTEMS size information::
@end menu
@end ifinfo

The C language utilities provide a powerful set of
tools which combine to allow operations within the RTEMS
Development Environment to be consistent and easy to use.  Much
effort was devoted to providing as close to the standard UNIX
and GNU style of operations as possible.  Each of these
utilities are described in the section below.

@ifinfo
@node packhex - Compress Hexadecimal File, unhex - Convert Hexadecimal File into Binary, RTEMS Specific Utilities C Language Specific Utilities, RTEMS Specific Utilities C Language Specific Utilities
@end ifinfo
@subsection packhex - Compress Hexadecimal File

@subheading SYNOPSIS

@example
packhex <source >destination
@end example

@subheading DESCRIPTION

packhex accepts Intel Hexadecimal or Motorola Srecord
on its standard input and attempts to pack as many contiguous
bytes as possible into a single hexadecimal record.  Many
programs output hexadecimal records which are less than 80 bytes
long (for human viewing).  The overhead required by each
unnecessary record is significant and packhex can often reduce
the size of the download image by 20%.  packhex attempts to
output records which are as long as the hexadecimal format
allows.

@subheading OPTIONS

This command has no options.

@subheading EXAMPLES

Assume the current directory contains the Motorola
Srecord file download.sr. Then executing the command:

@example
packhex <download.sr >packed.sr
@end example

will generate the file packed.sr which is usually
smaller than download.sr.

@subheading CREDITS

The source for packhex first appeared in the May 1993
issue of Embedded Systems magazine.  The code was downloaded
from their BBS.  Unfortunately, the author's name was not
provided in the listing.

@ifinfo
@node unhex - Convert Hexadecimal File into Binary, size_rtems - report RTEMS size information, packhex - Compress Hexadecimal File, RTEMS Specific Utilities C Language Specific Utilities
@end ifinfo
@subsection unhex - Convert Hexadecimal File into Binary Equivalent

@subheading SYNOPSIS

@example
unhex [-valF] [-o file] [file [file ...] ]
@end example

@subheading DESCRIPTION

unhex accepts Intel Hexadecimal, Motorola Srecord, or
TI 'B' records and converts them to their binary equivalent.
The output may sent to standout or may be placed in a specified
file with the -o option.  The designated output file may not be
an input file.  Multiple input files may be specified with their
outputs logically concatenated into the output file.

@subheading OPTIONS

This command has the following options:

@table @code
@item v
Verbose

@item a base
First byte of output corresponds with base
address

@item l
Linear Output

@item o file
Output File

@item F k_bits
Fill holes in input with 0xFFs up to k_bits * 1024 bits
@end table

@subheading EXAMPLES

The following command will create a binary equivalent
file for the two Motorola S record files in the specified output
file binary.bin:

@example
unhex -o binary.bin downloadA.sr downloadB.sr
@end example

@ifinfo
@node size_rtems - report RTEMS size information, RTEMS Specific Utilities Ada Language Specific Utilities, unhex - Convert Hexadecimal File into Binary, RTEMS Specific Utilities C Language Specific Utilities
@end ifinfo
@subsection size_rtems - report RTEMS size information

@subheading SYNOPSIS

@example
size_rtems
@end example

@subheading DESCRIPTION

size_rtems analyzes RTEMS and determines all of the
critical sizing information which is reported in the related
documentation.

@subheading EXAMPLES

To generate the RTEMS size report for the currently
configured processor, execute the following command:

@example
size_rtems
@end example

Although the actual size information will differ, a
report of the following format will be output:

@example
     RTEMS SIZE REPORT

CODE  DATA    BSS
==================
MANAGERS: 15988 0       0
CORE    : 4568  0       0
CPU     : 364   0       0
OVERALL : 20556 0       0
MINIMUM : 8752  0       0

init    : 1592  0       0
tasks   : 2440  0       0
intr    : 64    0       0
clock   : 2252  0       0
sem     : 876   0       0
msg     : 1624  0       0
event   : 604   0       0
signal  : 212   0       0
part    : 872   0       0
region  : 844   0       0
dpmem   : 532   0       0
timer   : 424   0       0
io      : 288   0       0
fatal   : 40    0       0
rtmon   : 764   0       0
mp      : 2984  0       0

sem     : 4     0       0
msg     : 4     0       0
event   : 4     0       0
signal  : 4     0       0
part    : 4     0       0
region  : 4     0       0
timer   : 4     0       0
dpmem   : 4     0       0
io      : 4     0       0
rtmon   : 4     0       0
mp      : 8     0       0
@end example

@subheading SEE ALSO

gsize020(1G), gsize386(1G), gsize960(1G)


@ifinfo
@node RTEMS Specific Utilities Ada Language Specific Utilities, Command and Variable Index, size_rtems - report RTEMS size information, RTEMS Specific Utilities
@end ifinfo
@section Ada Language Specific Utilities

The Ada language utilities provide a powerful set of
tools which combine to allow operations within the RTEMS
Development Environment to be consistent and easy to use.  Much
effort was devoted to providing as close to the standard UNIX
and GNU style of operations as possible.  Each of these
utilities are described in the section below.

NOTE:  The Ada implementation is not included in this
release.