2.3.2 Example: Preparing a COFF File For eCAN Bootloading
This section shows how to convert a COFF file into a format suitable for CAN based bootloading. This example
assumes that the host sending the data stream is capable of reading an ASCII hex format file. An example
COFF file named GPIO34TOG.out has been used for the conversion.
Build the project and link using the -m linker option to generate a map file. Examine the .map file
produced by the linker. The information shown in
has been copied from the example map file
(GPIO34TOG.map). This shows the section allocation map for the code. The map file includes the following
information:
•
Output Section
This is the name of the output section specified with the SECTIONS directive in the linker command file.
•
Origin
The first origin listed for each output section is the starting address of that entire output section. The following
origin values are the starting address of that portion of the output section.
•
Length
The first length listed for each output section is the length for that entire output section. The following length
values are the lengths associated with that portion of the output section.
•
Attributes/input sections
This lists the input files that are part of the section or any value associated with an output section.
See the
TMS320C28x Assembly Language Tools User's Guide
for detailed information on generating a linker
command file and a memory map.
that are initialized need to be loaded into the DSP in order for the code
to execute properly. In this case, the codestart, ramfuncs, .cinit, myreset, and .text sections need to be loaded.
The other sections are uninitialized and will not be included in the loading process. The map file also indicates
the size of each section and the starting address. For example, the .text section has 0x155 words and starts at
0x3FA000.
Example 2-8. GPIO34TOG Map File
output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
codestart
0 00000000 00000002
00000000 00000002 DSP280x_CodeStartBranch.obj (codestart)
.pinit 0 00000002 00000000
.switch 0 00000002 00000000 UNINITIALIZED
ramfuncs 0 00000002 00000016
00000002 00000016 DSP280x_SysCtrl.obj (ramfuncs)
.cinit 0 00000018 00000019
00000018 0000000e rts2800_ml.lib : exit.obj (.cinit)
00000026 0000000a : _lock.obj (.cinit)
00000030 00000001 --HOLE-- [fill = 0]
myreset 0 00000032 00000002
00000032 00000002 DSP280x_CodeStartBranch.obj (myreset)
IQmath 0 003fa000 00000000 UNINITIALIZED
.text 0 003fa000 00000155
003fa000 00000046 rts2800_ml.lib : boot.obj (.text)
To load the code using the CAN bootloader, the host must send the data in the format that the bootloader
understands. That is, the data must be sent as blocks of data with a size, starting address followed by the data.
A block size of 0 indicates the end of the data. The HEX2000.exe utility can be used to convert the COFF file
into a format that includes this boot information. The following command syntax has been used to convert the
application into an ASCII hex format file that includes all of the required information for the bootloader.
Boot ROM
238
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......