Texas Instruments TMS320F20x/F24x DSP Preliminary, Assembly Source Listings and Program Examples

Models: TMS320F20x/F24x DSP

1 108
Download 108 pages 2.5 Kb
Page 87
Image 87
A-35

PRELIMINARY

Sample Assembly Code to Erase and Reprogram the TMS320F206

prg_error:

********************************************************

** If here, then an error has occurred during

**

** programming. In an actual application, the system

**

**

takes some action to indicate that service is

**

**

required.

**

********************************************************

B prg_error ;Error while programming.

prg_done:

**********************************************************

*********

** If here, then flash has been successfully programmed. **

**********************************************************

B

prg_done

;Done programming.

A.3.2 Linker Command File for TMS320F206 Sample Assembly Code /********************************************************************************/

/*

Filename: ASMEXAMP.CMD

*/

/*

Description: Linker command file for 'F206 example of on±chip

*/

/*

flash programming from assembly. This command file links the example to addr */

/*

0x8000 of the on±chip SARAM so that the debugger can be used to set

*/

/*

breakpoints. Another benefit of linking the example to SARAM is that the

*/

/*

code can be modified to operate on either flash module0, or module1, or

*/

/*

both.

*/

/*

Notes:

*/

/*

1. This example expects the 'F206 SARAM to be mapped in both data space

*/

/*

and program space (DON=PON=1).

*/

/*

2. The object modules for the standard flash algos are expected to be in

*/

/*

a subdirectory (ALGOS) of the path of this file.

*/

/********************************************************************************/

/* Rev1.03/98 RDP */ /********************************************************************************/

/*****************************Command Line Options*******************************/ ±e .text

±o asmexamp.out ±m asmexamp.map

/**************************Input Files*******************************************/

asmexamp.obj

/*User assembly code that calls flash algos.

*/

algos\spgm20.obj

/*Standard Programming algorithm.

*/

algos\sclr20.obj

/*Standard Clear algorithm.

*/

algos\sera20.obj

/*Standard Erase algorithm.

*/

algos\sflw20.obj

/*Standard Flash±write algorithm.

*/

algos\sutils20.obj

/*Subroutines used by standard algos.

*/

/*****************************Memory Map*****************************************/

MEMORY

{

PAGE 0: /* PM ± Program memory */

FLASH0: origin = 0x0000, length = 0x3fff

FLASH1: origin = 0x4000, length = 0x3fff

PSARAM: origin = 0x8000, length = 0x400 /*Use 1K of SARAM for PROGRAM */

B0: origin = 0xff00, length = 0x1ff

PRELIMINARY

Assembly Source Listings and Program Examples

A-35

Page 87
Image 87
Texas Instruments TMS320F20x/F24x DSP manual Preliminary, Sample Assembly Code to Erase and Reprogram the TMS320F206, A-35