📄 c2xx_btx.lst
字号:
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:22 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BTX.ASM PAGE 1
1 ;**************************************************************************
2 ; FILENAME: c2xxprog.asm - Generic name
3 ; c2xx_bt0.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
55 ; Modification History:
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:22 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BTX.ASM PAGE 2
56 ; Modified for F2xx devices: Sam Saba, TI Houston 12/24/96
57 ; Added appropriate init code for PLL & WD disable - 15 Jan 97 (DAF)
58 ; Added Conditional assembly for PLL Mult factor selection - 26 Feb 97 (DAF)
59 ; Modified for: Compatibility with -s option and new algorithms.
60 ; Ruben D. Perez, TI Houston 09/10/97
61 ; H**************************************************************************
62
63 ;
64 ; ***************************************************************************
65 ; INCLUDE FILES
66 ; ***************************************************************************
67 .mmregs
68 .include "svar20.h" ; Variable declarations
69 .include "C240_CFG.I" ; C240 clocking configuration file (DAF)
70 .ref GPGMJ ; References Flash algorithms GCLR or GERS or GPGMJ
71 ; ***************************************************************************
72 ; PUBLIC DECLARATIONS
73 ; ***************************************************************************
74 .global PRG_init, PRG_program, PRG_erase, PRG_verify, PRG_stop
75 .global PRG_bufaddr, PRG_bufsize, PRG_devsize, PRG_paddr, PRG_page
76 .global PRG_length, PRG_status,PRG_options,PARMS
77 .global PROTECT, SEG_ST,SEG_END
78 ; ***************************************************************************
79 ; PRIVATE DECLARATIONS
80 ; ***************************************************************************
81
82 00c8 BUFFER_SIZE .set 200 ;Size of program buffer size
83 ;Can be increased based available
84 ;memory
85
86 ffff DEVICE_SIZE .set 0ffffh ;Size of device to be programmed.
87 ;Default is maximum address range for
88 ;the F2xx
89
90 ; ***************************************************************************
91 ; Define the PRG_parm section
92 ; ***************************************************************************
93 0000 .sect "PRG_parm" ;Actual location in memory defined is
94 0000 PARMS: ;linker command file
95 0000 0000+ PRG_bufaddr .word PrgBuffer ;Address of buffer for program
96 0001 00c8 PRG_bufsize .word BUFFER_SIZE ;Tells host of buffer size
97 0002 ffff PRG_devsize .word DEVICE_SIZE ;Tells host of device size
98
99 * ;The following parameters will be redefined by
100 * ;PRG2xxw based on the flashcode.out
101 ;Algorithm Array variables
102 0003 4000 PRG_options .word 04000h ;Default to flash0 only (0100000000000000b).
103 ;This will be re-initiatlized by -s option.
104 0004 0000 PRG_paddr .word 0 ;First address to program
105 0005 0000 PRG_page .word 0 ;Page to program
106 0006 0000 PRG_length .word 0 ;Length of block to program
107 0007 0000 PRG_status .word 0 ;Status of programming functions
108 0008 0000 Temp .word 0 ;Temp location for verify
109 0009 ff00 PROTECT .word 0FF00h ;Enable all 8 segments
110 000a 0000 SEG_ST .word 00000h ;Segment start address. Initialize to
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:22 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BTX.ASM PAGE 3
111 ;segment0/flash0.
112 000b 3fff SEG_END .word 03FFFh ;Segment end address. Initialize to
113 ;segment7/flash0.
114
115 ; ***************************************************************************
116 ; Define the PRG_data section
117 ; ***************************************************************************
118 0000 .sect "PRG_data" ;Flash code data buffer
119 0000 PrgBuffer .space BUFFER_SIZE*16 ;Initializes buffer for program data
120 0000 .sect "ary_var" ; Initialize buffer to 0x0000
121 0000 .space 16*16
122 ;
123 ; ***************************************************************************
124 ; Define the PRG_text section
125 ; ***************************************************************************
126 0000 .sect "PRG_text" ; Control and algorithm module
127
128 ; F**************************************************************************
129 ; Name: PRG_init
130 ;
131 ; Description
132 ; Initialize the F2xx device for programming
133 ;
134 ; Inputs
135 ; None
136 ; Outputs
137 ; int PRG_status Pass =0; Fail = 1;
138 ;
139 ; Notes: Can be used to include device specific initialization before executing
140 ; Flash algorithms in PRG_erase,PRG_program, PRG_verify and PRG_stop
141 ;
142 ; F**************************************************************************
143
144 0000 PRG_init:
145 0000 bce0 LDP #00E0h ;DAF
146
147 0001 ae2b SPLK #0041h,PLL_CNTL1 ;FIRST DISABLE PLL.
0002 0041
148
149 0003 ae2d SPLK #0060h,PLL_CNTL2 ;PLL_MF = 1.0 =20MHz
0004 0060
150
151 .if (PLL_MF_10 )
152 SPLK #0060h,PLL_CNTL2 ;PLL_MF = 1.0 =20MHz
153 .endif
154
155 .if (PLL_MF_15 )
156 SPLK #00AAh,PLL_CNTL2 ;PLL_MF = 1.5 =20MHz
157 .endif
158
159 .if (PLL_MF_20 )
160 0005 ae2d SPLK #00B1h,PLL_CNTL2 ;PLL_MF = 2.0 =20MHz
0006 00b1
161 .endif
162
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:22 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BTX.ASM PAGE 4
163 .if (PLL_MF_25 )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -