📄 c2xx_bpx.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_BPX.ASM PAGE 1
1 ;**************************************************************************
2 ; FILENAME: c2xxprog.asm - Generic name
3 ; c2xx_bpx.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 B0/1 RAM for algorithms and flash data buffer
9 ;
10 ; GLOBALS:
11 ;
12 ; unsigned * PRG_bufaddr Address of buffer for flash/program data
13 ; unsigned PRG_bufsize Size of program data buffer
14 ; unsigned PRG_devsize Size of programmable device
15 ; unsigned * PRG_paddr First programming address
16 ; unsigned PRG_page Programming page
17 ; unsigned PRG_length Length of programming data
18 ; unsigned PRG_status Status of programming functions
19 ;
20 ; PUBLIC FUNCTIONS:
21 ; PRG_init Initialize system for programming
22 ; PRG_program Program a block
23 ; PRG_erase Erase a programmable device
24 ; PRG_verify Verify a block
25 ;
26 ; PRIVIATE FUNCTIONS:
27 ; None
28 ;
29 ; USAGE/LIMITATIONS
30 ; The global and public function symbol values must be available in the
31 ; COFF file for the loader to work properly. The functions are not
32 ; intended to be called by another program.
33 ;
34 ; NOTES:
35 ; The program needs three memory sections to operate:
36 ; Actual location of these sections in the memory is defined in the
37 ; linker command file - *.cmd
38 ;
39 ; PRG_text Executable section for this program
40 ; PRG_parms Variable section for this program
41 ; PRG_data Data buffer used to hold programming data
42 ;
43 ; The size and location of each section is user defined. The
44 ; loader program will read the value of PRG_bufaddr and PRG_bufsize to
45 ; determine the location and size of the PRG_data section.
46 ;
47 ; JTAG loader command file format
48 ; PRG2xxw -[options] c2xxprog.out Flashcode.out
49 ; <JTAG loader) <Flash algorithm> <COFF file to be flashed>
50 ;
51 ; Source : TI Tools group, Houston
52 ; Version : 2.0
53 ; Modification History:
54 ; Modified for F2xx devices: Sam Saba, TI Houston 12/24/96
55 ; Added appropriate init code for PLL & WD disable - 15 Jan 97 (DAF)
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:22 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BPX.ASM PAGE 2
56 ; Added Conditional assembly for PLL Mult factor selection - 26 Feb 97 (DAF)
57 ; Modified for: Compatibility with -s option and new algorithms.
58 ; Ruben D. Perez, TI Houston 09/10/97
59 ; ***************************************************************************
60
61 ;
62 ; ***************************************************************************
63 ; INCLUDE FILES
64 ; ***************************************************************************
65 .mmregs
66 .include "svar20.h" ; Variable declarations
67 .include "C240_CFG.I" ; C240 clocking configuration file (DAF)
68 .ref GPGMJ ; References Flash algorithms GCLR or GERS or GPGMJ
69 ; ***************************************************************************
70 ; PUBLIC DECLARATIONS
71 ; ***************************************************************************
72 .global PRG_init, PRG_program, PRG_erase, PRG_verify, PRG_stop
73 .global PRG_bufaddr, PRG_bufsize, PRG_devsize, PRG_paddr, PRG_page
74 .global PRG_length, PRG_status,PARMS
75 .global PROTECT,SEG_ST,SEG_END
76 ; ***************************************************************************
77 ; PRIVATE DECLARATIONS
78 ; ***************************************************************************
79
80 00c8 BUFFER_SIZE .set 200 ;Size of program buffer size
81 ;Can be increased based available
82 ;memory
83
84 ffff DEVICE_SIZE .set 0ffffh ;Size of device to be programmed.
85 ;Default is maximum address range for
86 ;the F2xx
87
88 ; ***************************************************************************
89 ; Define the PRG_parm section
90 ; ***************************************************************************
91 0000 .sect "PRG_parm" ;Actual location in memory defined is
92 0000 PARMS: ;linker command file
93 0000 0000+ PRG_bufaddr .word PrgBuffer ;Address of buffer for program
94 0001 00c8 PRG_bufsize .word BUFFER_SIZE ;Tells host of buffer size
95 0002 ffff PRG_devsize .word DEVICE_SIZE ;Tells host of device size
96
97 * ;The following parameters will be redefined by
98 * ;PRG2xxw based on the flashcode.out
99 ;Algorithm Array variables
100 0003 0000 PRG_paddr .word 0 ;First address to program
101 0004 0000 PRG_page .word 0 ;Page to program
102 0005 0000 PRG_length .word 0 ;Length of block to program
103 0006 0000 PRG_status .word 0 ;Status of programming functions
104 0007 0000 Temp .word 0 ;Temp location for verify
105 0008 ff00 PROTECT .word 0FF00h ;Enable all 8 segments
106
107 ; ***************************************************************************
108 ; Define the PRG_data section
109 ; ***************************************************************************
110 0000 .sect "PRG_data" ;Flash code data buffer
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 6.60 Thu Sep 18 16:53:22 1997
Copyright (c) 1987-1995 Texas Instruments Incorporated
C2XX_BPX.ASM PAGE 3
111 0000 PrgBuffer .space BUFFER_SIZE*16 ;Initializes buffer for program data
112 0000 .sect "ary_var" ; Initialize buffer to 0x0000
113 0000 .space 16*16
114 ;
115 ; ***************************************************************************
116 ; Define the PRG_text section
117 ; ***************************************************************************
118 0000 .sect "PRG_text" ; Control and algorithm module
119
120 ; F**************************************************************************
121 ; Name: PRG_init
122 ;
123 ; Description
124 ; Initialize the F2xx device for programming
125 ;
126 ; Inputs
127 ; None
128 ; Outputs
129 ; int PRG_status Pass =0; Fail = 1;
130 ;
131 ; Notes: Can be used to include device specific initialization before executing
132 ; Flash algorithms in PRG_erase,PRG_program, PRG_verify and PRG_stop
133 ;
134 ; F**************************************************************************
135
136 0000 PRG_init:
137 0000 bce0 LDP #00E0h ;DAF
138
139 0001 ae2b SPLK #0041h,PLL_CNTL1 ;FIRST DISABLE PLL.
0002 0041
140
141 0003 ae2d SPLK #0060h,PLL_CNTL2 ;PLL_MF = 1.0 =20MHz
0004 0060
142
143 .if (PLL_MF_10 )
144 SPLK #0060h,PLL_CNTL2 ;PLL_MF = 1.0 =20MHz
145 .endif
146
147 .if (PLL_MF_15 )
148 SPLK #00AAh,PLL_CNTL2 ;PLL_MF = 1.5 =20MHz
149 .endif
150
151 .if (PLL_MF_20 )
152 0005 ae2d SPLK #00B1h,PLL_CNTL2 ;PLL_MF = 2.0 =20MHz
0006 00b1
153 .endif
154
155 .if (PLL_MF_25 )
156 SPLK #00CCh,PLL_CNTL2 ;PLL_MF = 2.5 =20MHz
157 .endif
158
159 .if (PLL_MF_30 )
160 SPLK #00D2h,PLL_CNTL2 ;PLL_MF = 3.0 =20MHz
161 .endif
162
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -