C.4 introduction to generating boot loader code, C-23 – Texas Instruments TMS320C2XX User Manual

Page 508

Advertising
background image

Introduction to Generating Boot Loader Code

C-23

Program Examples

C.4 Introduction to Generating Boot Loader Code

The ’C2xx on-chip boot loader boots software from an 8-bit external EPROM
to a 16-bit external RAM at reset. This section introduces to the procedure for
using Texas Instruments development tools to generate the code that will be
loaded into the EPROM.

Note:

The procedure in this section is given only as an example. This procedure
may have to be modified to suit different applications.

For more details, refer to the

TMS320C1x/C2x/C2xx/C5x Assembly

Language Tools User’s Guide (literature number SPRU018).

The process for generating boot loader code uses these basic steps:

1) Write the following code by using the TMS320C1x/C2x/C2xx/C5x

assembler:

-

The code that you wish to have loaded into the EPROM. Program
code is listed after a .text assembler directive (see any of the programs
in Section C.3).

-

A linker command file that defines the architecture of the particular
’C2xx device being used. Example C–15 shows a command file for
the ’C203. Note that the file declares the .text section at 0000h. This is
necessary because the boot loader transfers the code to the external
RAM beginning at address 0000h.

2) Assemble the code. Use the –v2xx option (for ’C2xx assembly) in the

assemble command.

3) Link the assembled file with the command file by using the

TMS320C1x/C2x/C2xx/C5x linker.

4) Write a hex conversion command file (an ASCII file) that contains options

and directives for the TMS320C1x/C2x/C2xx/C5x hex conversion utility.
Example C–16 shows such a file.

5) Use the hex conversion command file with the hex conversion utility to

generate the boot code in an ASCII hexadecimal format suitable for load-
ing into an EPROM programmer. The command file in Example C–16 se-
lects the Intel

format.

Advertising