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