Texas Instruments TMS320F20x/F24x DSP Computer Drive User Manual


 
Using the Algorithms With C Code to Erase and Reprogram the ’F240
PRELIMINARY
A-49
Assembly Source Listings and Program Examples
PRELIMINARY
/************************Command Line Options**************************/
–cr /*Use Ram init model. */
–heap 0x0 /*No heap needed for this example. */
–stack 0x96 /*150 word stack is enough for this example. */
–x /*Force re–reading of libraries. */
–l c:\dsptools\fix\rts2xx.lib
–o sample24.out
–m sample24.map
/*****************************Input Files******************************/
sample24.obj /*User C–code with calls to erase() and program() */
c240init.obj /*C–callabe asm function to init ’240 regs */
wdtoff.obj /*C–callable asm function to disable the wdt */
flash.obj /*C–callable interface to standard algorithms. */
algos\spgm20.obj /*Standard Programming algorithms. */
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 algorithms. */
/*****************************Memory Map*******************************/
MEMORY
{
PAGE 0: /* PM – Program memory */
FLASH0: origin = 0x0000, length = 0x4000
EXTRAM: origin = 0x8000, length = 0x400 /*Use 1K of EXT SRAM for PROGRAM*/
B0: origin = 0xfe00, length = 0x100
PAGE 1: /* DM – Data memory */
BLK_B2: origin = 0x60, length = 0x20 /*BLOCK B2 */
DSRAM: origin = 0x8000, length = 0x4000 /*External data RAM */
B0DAT: origin = 0x200, length = 0x100 /*B0 RAM */
/*(Used for pgm data buffer)*/
B1: origin = 0x300, length = 0x100 /* B1 RAM (Used for algo vars )*/
}
/*************************Section Allocation***************************/
SECTIONS
{
.text :{} > EXTRAM PAGE 0 /* sample.c */
/*All these sections are for flash programming.*/
PRG_text : {} > EXTRAM PAGE 0 /**erase() and program()*****/
/*****from flash.asm file****/
fl_prg : {} > EXTRAM PAGE 0 /**Programming Algorithm*****/
fl_clr : {} > EXTRAM PAGE 0 /******Clear Algorithm*******/
fl_ers : {} > EXTRAM PAGE 0 /******Erase Algorithm*******/
fl_wrt : {} > EXTRAM PAGE 0 /****Flash–write Algorithm***/
DLY : {} > EXTRAM PAGE 0 /******Delay Subroutine******/
REG : {} > EXTRAM PAGE 0 /*******Regs Subroutine******/
ARY : {} > EXTRAM PAGE 0 /******Array Subroutine******/
PRG_data : {} > B1 PAGE 1 /*Reserved in flash.asm for**/
/***flash algo variables.****/
PRG_parm : {} > B1 PAGE 1 /*Reserved in flash.asm for**/
/*parameter passing to algos*/
/*End of sections for flash programming. */