[489740f] | 1 | .. comment SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
| 2 | |
---|
[c0d6eff6] | 3 | RTEMS Specific Utilities |
---|
| 4 | ######################## |
---|
| 5 | |
---|
[9b53679] | 6 | This section describes the additional commands available within the *RTEMS |
---|
| 7 | Development Environment*. Although some of these commands are of general use, |
---|
| 8 | most are included to provide some capability necessary to perform a required |
---|
| 9 | function in the development of the RTEMS executive, one of its support |
---|
[c0d6eff6] | 10 | components, or an RTEMS based application. |
---|
| 11 | |
---|
[9b53679] | 12 | Some of the commands are implemented as C programs. However, most commands are |
---|
| 13 | implemented as Bourne shell scripts. Even if the current user has selected a |
---|
| 14 | different shell, the scripts will automatically invoke the Bourne shell during |
---|
| 15 | their execution lifetime. |
---|
[c0d6eff6] | 16 | |
---|
[9b53679] | 17 | The commands are presented in UNIX manual page style for compatibility and |
---|
| 18 | convenience. A standard set of paragraph headers were used for all of the |
---|
| 19 | command descriptions. If a section contained no data, the paragraph header was |
---|
| 20 | omitted to conserve space. Each of the permissible paragraph headers and their |
---|
| 21 | contents 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] | 47 | Most environment variables referenced by the commands are defined for the RTEMS |
---|
| 48 | Development Environment during the login procedure. During login, the user |
---|
| 49 | selects a default RTEMS environment through the use of the Modules package. |
---|
| 50 | This tool effectively sets the environment variables to provide a consistent |
---|
| 51 | development environment for a specific user. Additional environment variables |
---|
| 52 | within the RTEMS environment were set by the system administrator during |
---|
| 53 | installation. When specifying paths, a command description makes use of these |
---|
[c0d6eff6] | 54 | environment variables. |
---|
| 55 | |
---|
[9b53679] | 56 | When referencing other commands in the SEE ALSO paragraph, the following |
---|
| 57 | notation is used: command(code). Where command is the name of a related |
---|
| 58 | command, 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] | 69 | For example, ``ls(1)`` means see the standard ls command in section 1 of the |
---|
| 70 | UNIX documentation. gcc020(1G) means see the description of gcc020 in section |
---|
| 71 | 1 of the GNU documentation. |
---|
[c0d6eff6] | 72 | |
---|
| 73 | packhex - Compress Hexadecimal File |
---|
| 74 | =================================== |
---|
| 75 | |
---|
| 76 | **SYNOPSIS** |
---|
| 77 | |
---|
[9b53679] | 78 | .. code-block:: c |
---|
[c0d6eff6] | 79 | |
---|
| 80 | packhex <source >destination |
---|
| 81 | |
---|
| 82 | **DESCRIPTION** |
---|
| 83 | |
---|
[9b53679] | 84 | packhex accepts Intel Hexadecimal or Motorola Srecord on its standard input and |
---|
| 85 | attempts to pack as many contiguous bytes as possible into a single hexadecimal |
---|
| 86 | record. Many programs output hexadecimal records which are less than 80 bytes |
---|
| 87 | long (for human viewing). The overhead required by each unnecessary record is |
---|
| 88 | significant and packhex can often reduce the size of the download image by 20%. |
---|
| 89 | packhex attempts to output records which are as long as the hexadecimal format |
---|
[c0d6eff6] | 90 | allows. |
---|
| 91 | |
---|
| 92 | **OPTIONS** |
---|
| 93 | |
---|
| 94 | This command has no options. |
---|
| 95 | |
---|
| 96 | **EXAMPLES** |
---|
| 97 | |
---|
[9b53679] | 98 | Assume the current directory contains the Motorola Srecord file |
---|
| 99 | download.sr. Then executing the command: |
---|
| 100 | |
---|
| 101 | .. code-block:: c |
---|
[c0d6eff6] | 102 | |
---|
| 103 | packhex <download.sr >packed.sr |
---|
| 104 | |
---|
[9b53679] | 105 | will generate the file packed.sr which is usually smaller than download.sr. |
---|
[c0d6eff6] | 106 | |
---|
| 107 | **CREDITS** |
---|
| 108 | |
---|
[9b53679] | 109 | The source for packhex first appeared in the May 1993 issue of Embedded Systems |
---|
| 110 | magazine. The code was downloaded from their BBS. Unfortunately, the author's |
---|
| 111 | name was not provided in the listing. |
---|
[c0d6eff6] | 112 | |
---|
| 113 | unhex - 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] | 124 | unhex accepts Intel Hexadecimal, Motorola Srecord, or TI 'B' records and |
---|
| 125 | converts them to their binary equivalent. The output may sent to standout or |
---|
| 126 | may be placed in a specified file with the -o option. The designated output |
---|
| 127 | file may not be an input file. Multiple input files may be specified with |
---|
| 128 | their outputs logically concatenated into the output file. |
---|
[c0d6eff6] | 129 | |
---|
| 130 | **OPTIONS** |
---|
| 131 | |
---|
| 132 | This 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] | 151 | The following command will create a binary equivalent file for the two Motorola |
---|
| 152 | S 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 |
---|