www.ti.com
3.1
The C2000 Hex Utility
The C2000 Hex Utility
To use the features of the bootloader, you must generate a data stream and boot table as described in
. The hex conversion utility tool, included with the 28x code generation tools, can generate
the required data stream including the required boot table. This section describes the hex2000 utility. An
example of a file conversion performed by hex2000 is described in
.
The hex utility supports creation of the boot table required for the SCI, SPI, I
2
C, eCAN, and parallel I/O
loaders. That is, the hex utility adds the required information to the file such as the key value, reserved
bits, entry point, address, block start address, block length and terminating value. The contents of the boot
table vary slightly depending on the boot mode and the options selected when running the hex conversion
utility. The actual file format required by the host (ASCII, binary, hex, etc.) will differ from one specific
application to another and some additional conversion may be required.
To build the boot table, follow these steps:
1. Assemble or compile the code.
This creates the object files that will then be used by the linker to create a single output file.
2. Link the file.
The linker combines all of the object files into a single output file in common object file format (COFF).
The specified linker command file is used by the linker to allocate the code sections to different
memory blocks. Each block of the boot table data corresponds to an initialized section in the COFF file.
Uninitialized sections are not converted by the hex conversion utility. The following options may be
useful:
The linker -m option can be used to generate a map file. This map file will show all of the sections that
were created, their location in memory and their length. It can be useful to check this file to make sure
that the initialized sections are where you expect them to be.
The linker -w option is also very useful. This option will tell you if the linker has assigned a section to a
memory region on its own. For example, if you have a section in your code called ramfuncs.
3. Run the hex conversion utility.
Choose the appropriate options for the desired boot mode and run the hex conversion utility to convert
the COFF file produced by the linker to a boot table.
See the TMS320C28x Assembly Language Tools User's Guide (SPRU513) and the TMS320C28x
Optimizing C/C++ Compiler User's Guide (SPRU514) for more information on the compiling and linking
process.
summarizes the hex conversion utility options available for the bootloader. See the
TMS320C28x Assembly Language Tools User's Guide (SPRU513) for a detailed description of the
hex2000 operations used to generate a boot table. Updates will be made to support the I
2
C boot. See the
Codegen release notes for the latest information.
Building the Boot Table
50
SPRU722C – November 2004 – Revised October 2006