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