📄 c2xx_bcx.lst
字号:
C:\TIC2XX\C2000\CGTOOLS\BIN\DSPA.EXE -S -l c2xx_bcx -v2xx
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Sat May 5 23:58:43 2001
Copyright (c) 1987-1999 Texas Instruments Incorporated
c2xx_bcx.asm PAGE 1
1 ;**************************************************************************
2 ; FILENAME: c2xxprog.asm - Generic name
3 ; c2xx_btx.asm
4 ;
5 ; DESCRIPTION:
6 ; Flash Programmer control module with flash algorithms -P
7 ; called by the JTAG loader, PRG2xxw.exe
8 ; Uses the on-chip SARAM for algorithms and flash data buffer
9 ;
10 ; GLOBALS:
11 ;
12 ; unsigned PRG_options Option selection word.
13 ;
14 ; unsigned * PRG_bufaddr Address of buffer for flash/program data
15 ; unsigned PRG_bufsize Size of program data buffer
16 ; unsigned PRG_devsize Size of programmable device
17 ; unsigned * PRG_paddr First programming address
18 ; unsigned PRG_page Programming page
19 ; unsigned PRG_length Length of programming data
20 ; unsigned PRG_status Status of programming functions
21 ;
22 ; PUBLIC FUNCTIONS:
23 ; PRG_init Initialize system for programming
24 ; PRG_program Program a block
25 ; PRG_erase Erase a programmable device
26 ; PRG_verify Verify a block
27 ;
28 ; PRIVIATE FUNCTIONS:
29 ; None
30 ;
31 ; USAGE/LIMITATIONS
32 ; The global and public function symbol values must be available in the
33 ; COFF file for the loader to work properly. The functions are not
34 ; intended to be called by another program.
35 ;
36 ; NOTES:
37 ; The program needs three memory sections to operate:
38 ; Actual location of these sections in the memory is defined in the
39 ; linker command file - *.cmd
40 ;
41 ; PRG_text Executable section for this program
42 ; PRG_parms Variable section for this program
43 ; PRG_data Data buffer used to hold programming data
44 ;
45 ; The size and location of each section is user defined. The
46 ; loader program will read the value of PRG_bufaddr and PRG_bufsize to
47 ; determine the location and size of the PRG_data section.
48 ;
49 ; JTAG loader command file format
50 ; PRG2xxw -[options] c2xxprog.out Flashcode.out
51 ; <JTAG loader) <Flash algorithm> <COFF file to be flashed>
52 ;
53 ; Source : TI Tools group, Houston
54 ; Version : 1.10
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Sat May 5 23:58:43 2001
Copyright (c) 1987-1999 Texas Instruments Incorporated
c2xx_bcx.asm PAGE 2
55 ;
56 ; Modification History:
57 ; ---------------------
58 ; -Modified for F2xx devices: Sam Saba, TI Houston 12/24/96
59 ; -Added appropriate init code for PLL & WD disable - 15 Jan 97 (DAF)
60 ; -Added Conditional assembly for PLL Mult factor selection - 26 Feb 97 (DAF)
61 ; -Modified for: Compatibility with -s option and new algorithms.
62 ; Ruben D. Perez, TI Houston 09/10/97
63 ; -Modified to suit 24x-Lite - 19 Mar 98 (DAF-19MAR)
64 ;
65 ; ***************************************************************************
66 ; INCLUDE FILES
67 ; ***************************************************************************
68
69 .INCLUDE ..\include\VAR.h ;Inlcudes VARIABLES USED TO PRECON.
70 .INCLUDE CLR_ALG.ASM ;CLEAR ROUTINE
71
72 ; ***************************************************************************
73 ; PUBLIC DECLARATIONS
74 ; ***************************************************************************
75 .global PRG_init, PRG_program, PRG_erase, PRG_verify, PRG_stop
76 .global PRG_bufaddr, PRG_bufsize, PRG_devsize, PRG_paddr, PRG_page
77 .global PRG_length, PRG_status,PRG_options,PARMS
78 .global PROTECT, SEG_ST,SEG_END
79
80
81 ; ***************************************************************************
82 ; PRIVATE DECLARATIONS
83 ; ***************************************************************************
84 00c8 BUFFER_SIZE .set 200 ;Size of program buffer size
85 ;Can be increased based available
86 ;memory
87
88 ffff DEVICE_SIZE .set 0ffffh ;Size of device to be programmed.
89 ;Default is maximum address range for
90 ;the F2xx
91
92 ; ***************************************************************************
93 ; Define the PRG_parm section
94 ; ***************************************************************************
95 0000 .sect "PRG_parm" ;Actual location in memory defined is
96 0000 PARMS: ;linker command file
97 0000 0000+ PRG_bufaddr .word PrgBuffer ;Address of buffer for program
98 0001 00c8 PRG_bufsize .word BUFFER_SIZE ;Tells host of buffer size
99 0002 ffff PRG_devsize .word DEVICE_SIZE ;Tells host of device size
100
101 * ;The following parameters will be redefined by
102 * ;PRG2xxw based on the flashcode.out
103 ;Algorithm Array variables
104 0003 0000 PRG_options .word 0h ;Default to disable all sectors.
105 ;This will be re-initiatlized by -s option.
106 0004 0000 PRG_paddr .word 0 ;First address to program
107 0005 0000 PRG_page .word 0 ;Page to program
108 0006 0000 PRG_length .word 0 ;Length of block to program
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Sat May 5 23:58:43 2001
Copyright (c) 1987-1999 Texas Instruments Incorporated
F10 'LF240x FLASH MEMORY PRECONDITION ROUTINE PAGE 3
109 0007 0000 PRG_status .word 0 ;Status of programming functions
110 0008 0000 Temp .word 0 ;Temp location for verify
111 0009 ff00 PROTECT .word 0FF00h ;Enable all 8 segments
112 000a 0000 SEG_ST .word 00000h ;Segment start address. Initialize to
113 ;segment0/flash0.
114 000b 3fff SEG_END .word 03FFFh ;Segment end address. Initialize to
115 ;segment7/flash0.
116
117 ;***************************************************************************
118 ; Define the PRG_data section
119 ;***************************************************************************
120 0000 .sect "PRG_data" ;Flash code data buffer
121 0000 PrgBuffer .space BUFFER_SIZE*16 ;Initializes buffer for program data
122 0000 .sect "ary_var" ; Initialize buffer to 0x0000
123 0000 .space 16*16
124 ;
125 ;***************************************************************************
126 ; Define the PRG_text section
127 ;***************************************************************************
128 0000 .sect "PRG_text" ; Control and algorithm module
129 ;**************************************************************************
130 ; Name: PRG_init
131 ;
132 ; Description
133 ; Initialize the F2xx device for programming
134 ;
135 ; Inputs
136 ; None
137 ; Outputs
138 ; int PRG_status Pass =0; Fail = 1;
139 ;
140 ; Notes: Can be used to include device specific initialization before executing
141 ; Flash algorithms in PRG_erase,PRG_program, PRG_verify and PRG_stop
142 ;
143 ;**************************************************************************
144
145 0000 PRG_init:
146 0000 bce0 LDP #0E0h
147 0001 ae18 SPLK #PLL_RATIO_CONST,7018h
0002 0200
148 0003 ae19 SPLK #000bh,7019h
0004 000b
149 0005 ae29 SPLK #6fh,7029h
0006 006f
150
151 0007 bc00+ ldp #PARMS ; Defines data page
152 0008 ae07+ splk #0,PRG_status
0009 0000
153 000a ae0c+ splk #0,ERROR
000b 0000
154 000c 7980 b PRG_stop
000d 006f+
155 ;
156 ;*************************************************************************
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Sat May 5 23:58:43 2001
Copyright (c) 1987-1999 Texas Instruments Incorporated
F10 'LF240x FLASH MEMORY PRECONDITION ROUTINE PAGE 4
157 ; Name: PRG_program
158 ;
159 ; Description
160 ; Transfers a block of data from RAM to Flash/programmable memory
161 ; PRG2xxw will execute this after PRG_init by default. If the command
162 ; line does not have any options -e or -v.
163 ; If the option specified is -e then the execution sequence will be:
164 ; PRG_init > PRG_erase > PRG_program and then PRG_stop
165 ; If the option specified is -v, then the execution sequence will be:
166 ; PRG_init > PRG_program, PRG_verify and then PRG_stop
167 ; Inputs
168 ; unsigned *PRG_paddr Pointer to first address to program
169 ; unsigned PRG_page Page to program, Program == 0, Data == 1
170 ; unsigned PRG_length Number of words to program
171 ; unsigned *PRG_bufaddr Pointer to program data buffer
172 ;
173 ; Outputs
174 ; int PRG_status Pass =0; Fail = 1;
175 ;
176 ; Notes:
177 ; The PRG_page value is setup by the host but not used in this case.
178 ; The assumption is that the programmable device is in program space.
179 ;**************************************************************************
180
181 000e bc00+ PRG_program: ldp #PARMS ;Point to data page
182 ;no calls for Flash algorithms
183 000f 690c+ lacl ERROR
184 0010 ba01 sub #1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -