⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c2xx_bex.lst

📁 DSP F2407 烧写软件
💻 LST
📖 第 1 页 / 共 2 页
字号:
         0006 001b+ 
     146            ; 
     147            ; F**************************************************************************
     148            ; Name: PRG_program
     149            ; 
     150            ; Description
     151            ;   Transfers a block of data from RAM to Flash/programmable memory
     152            ;   PRG2xxw will execute this after PRG_init by default. If the command
     153            ;   line does not have any options -e or -v.
     154            ;   If the option specified is -e  then the execution sequence will be:
     155            ;   PRG_init > PRG_erase > PRG_program and then PRG_stop
     156            ;   If the option specified is -v, then the execution sequence will be:
     157            ;   PRG_init > PRG_program, PRG_verify and then PRG_stop
     158            ; Inputs
     159            ;   unsigned *PRG_paddr         Pointer to first address to program
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:10 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
c2xx_bex.asm                                                         PAGE    4

     160            ;   unsigned  PRG_page          Page to program, Program == 0, Data == 1
     161            ;   unsigned  PRG_length        Number of words to program
     162            ;   unsigned *PRG_bufaddr       Pointer to program data buffer
     163            ;
     164            ; Outputs
     165            ;   int PRG_status              Pass =0; Fail = 1;
     166            ;
     167            ; Notes:
     168            ;   The PRG_page value is setup by the host but not used in this case.
     169            ;   The assumption is that the programmable device is in program space.
     170            ; F**************************************************************************
     171             
     172 0007 7980  PRG_program:    B       PRG_verify      ; use the dummy end in PRG_verify
         0008 0016+ 
     173                                                    ; to set an error in this case 
     174                                                    ; since no program routine exists in
     175            ;                                       ; this file, the ERASE file.
     176            ; F**************************************************************************
     177            ; Name: PRG_erase
     178            ; 
     179            ; Description
     180            ;   Erase a programmed device. This module will be executed if the PRG2xxw
     181            ;   command line option specified is -e.
     182            ; Inputs
     183            ;   None:
     184            ;
     185            ; Outputs
     186            ;   int PRG_status      Pass =0; Fail = 1;
     187            ;
     188            ; Notes:
     189            ;   The erase is device specific. 
     190            ; F**************************************************************************
     191             
     192 0009       PRG_erase:    
     193 0009 7a80          CALL    INIT_DEVICE
         000a 001e+ 
     194            
     195            
     196 000b       CALL_ERASE:
     197 000b bc00+         LDP     #PRG_options              ;Get sector command from cmd line.
     198 000c 1003+         LACC    PRG_options               ;
     199             
     200 000d bc00!         LDP     #flashAlgoVars.SECTOR_CMD ; Store it in SECTOR_MASK.
     201 000e 900e!         SACL    flashAlgoVars.SECTOR_CMD              
     202            
     203 000f 7a80          CALL    ERASE_FLASH
         0010 0000! 
     204            
     205 0011       CHECK_ERROR:
     206 0011 100f!         LACC    flashAlgoVars.ALGO_STATUS ; Get the algo error code.
     207 0012 bc00+         LDP     #PRG_status
     208 0013 9007+         SACL    PRG_status                ; Copy the error back to the variable
     209                                                      ; which prg2xx looks at.
     210 0014 7980          b       PRG_stop
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:10 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
c2xx_bex.asm                                                         PAGE    5

         0015 001b+ 
     211            
     212            
     213            
     214            ; 
     215            ; F**************************************************************************
     216            ; Name: PRG_verify
     217            ; 
     218            ; Description
     219            ;   Verify a block of programmed data. This module will be excuted if the
     220            ;   command line option in PRG2xxw is -v.
     221            ; 
     222            ; Inputs                        Defined by host
     223            ;   unsigned *PRG_paddr         Pointer to first address to verify
     224            ;   unsigned  PRG_page          Page to verify, Program == 0, Data == 1
     225            ;   unsigned  PRG_length        Number of words to verify
     226            ;   unsigned *PRG_bufaddr       Pointer to verify data buffer
     227            ;
     228            ; Outputs
     229            ;   int PRG_status      Pass =0; Fail = 1;
     230            ;
     231            ; Notes:
     232            ;   The PRG_page value is setup by the host but not used in this case.
     233            ;   The assumption is that the programmable device is in program space.
     234            ; F**************************************************************************
     235             
     236 0016       PRG_verify:
     237 0016       err1:
     238 0016 bc00+                 ldp     #PARMS
     239 0017 ae07+ error:          splk    #1,PRG_status   ;
         0018 0001  
     240 0019 7980                  b       PRG_stop        ;Generate a breakpoint
         001a 001b+ 
     241            
     242            ; 
     243            ; F**************************************************************************
     244            ; Name: PRG_stop
     245            ; 
     246            ; Description
     247            ;       Exit routine for all programming functions.
     248            ; 
     249            ; Inputs
     250            ;       None
     251            ;
     252            ;
     253            ; Outputs
     254            ;       None
     255            ;
     256            ; Notes:
     257            ;       Exit point for all programming functions
     258            ;       The ESTOP opcode gets executed as a NOP when not in emulation
     259            ;       mode.  The "b $" will keep the program from running off if
     260            ;       not in emulation mode.
     261            ;
TMS320C24xx COFF Assembler Version 7.02  Tue Jul 29 10:56:10 2003
Copyright (c) 1987-2002  Texas Instruments Incorporated 
c2xx_bex.asm                                                         PAGE    6

     262            ; F**************************************************************************
     263 001b       PRG_stop:
     264            
     265               
     266 001b be90          .word   0BE90h                  ;SWI instruction
     267            
     268 001c 7980          b $
         001d 001c+ 
     269             
     270            
     271 001e       INIT_DEVICE
     272                    
     273 001e bce0      LDP    #0E0h
     274 001f ae18      SPLK    #PLL_RATIO_CONST,7018h
         0020 0000  
     275 0021 ae19      SPLK    #000Bh,7019h
         0022 000b  
     276 0023 ae29      SPLK    #6fh,7029h
         0024 006f  
     277 0025 ef00      RET
     278            
     279                           .end

 No Errors,  No Warnings

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -