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

📄 int.s

📁 s3c2410平台下USB驱动的源代码:USB1.1协议及S3C2410 USB device实验
💻 S
📖 第 1 页 / 共 2 页
字号:
;/*
;***************************************************************************************************
;*                                               
;*		    		     			S3C44BOX ARM7TDMI MotherBoard                                   
;*                                        
;*                              (c) Copyright 2003-2015, Zhang Zhi-gang
;*                                          All Rights Reserved
;*          
;*                               S3C44BOX Initialization Program for 1.0
;*
;* File  Name 	: INT.S
;* By    Write	: Zhang Zhi-gang ( Barry Zhang )
;* First Write	: 2003-07-16 13:14
;* Last  Write	: 2004-02-24 13:14
;* where Write	: Room B201 Shenzhen International Tech-innovation Academy, Kejinan 10 Road ,
;*		   			High-Tech Industrial Park,Shenzhen,China.
;* Function		: Advance Initialize 
;*				1. Initialize ISR ,stacks			
;*				2. Copy code								
;*				3. Fill zeros into zero-initialized C-variables
;*				4. INT_Initialize
;***************************************************************************************************
;*/

;/*
;***************************************************************************************************
;*									ARM  &  THUMB
;* 				If assembled with TASM the variable {CONFIG} will be set to 16
;* 				If assembled with ARMASM the variable {CONFIG} will be set to 32
;* 				Set the variable THUMB to TRUE or false depending on whether the
;* 				file is being assembled with TASM or ARMASM.
;***************************************************************************************************
;*/

	GET		2410ADDR.S
	GET		INTDEF.S 
                       
    CODE32

	IMPORT		IsrUsbd
;//    IMPORT		TPLCD_LISR
;/*
;***************************************************************************************************
;*   										INTERRUPT TABLES
;*                                                    
;*	Define vector table used by INT_IRQ to branch to necessary ISR
;*
;***************************************************************************************************
;*/

    AREA INT_IRQ_segment, DATA, READWRITE

INT_IRQ_Vectors 
    DCD     0            ;// Vector 00
    DCD     0            ;// Vector 01
    DCD     0            ;// Vector 02
    DCD     0            ;// Vector 03
    DCD     0            ;// Vector 04
    DCD     0            ;// Vector 05
    DCD     0            ;// Vector 06
    DCD     0            ;// Vector 07
    DCD     0            ;// Vector 08
    DCD     0            ;// Vector 09
    DCD     0            ;// Vector 10
    DCD     0            ;// Vector 11
    DCD     0            ;// Vector 12
    DCD     0            ;// Vector 13
    DCD     0            ;// Vector 14
    DCD     0            ;// Vector 15
    DCD     0            ;// Vector 16
    DCD     0            ;// Vector 17
    DCD     0            ;// Vector 18
    DCD     0            ;// Vector 19
    DCD     0            ;// Vector 20
    DCD     0            ;// Vector 21
    DCD     0            ;// Vector 22
    DCD     0            ;// Vector 23
    DCD     0            ;// Vector 24
    DCD     INT_USBD_Shell            ;// Vector 25
    DCD     0            ;// Vector 26                
    DCD     0            ;// Vector 27
    DCD     INT_UART0_Shell             ;// Vector 28
    DCD     0           ;// Vector 29 
    DCD     0            ;// Vector 30 
    DCD     INT_ADC_Shell          ;// Vector 31 

    
    
                
; //Define the order in which the interrupts will be executed by software (INT_IRQ) 
INT_IRQ_Priority
	;//DCD		Handler_GLOBAL					;// Vector 00 
    DCD     Handler_EINT0	             	;// Vector 00 
    DCD     Handler_EINT1	             	;// Vector 01 
    DCD     Handler_EINT2	             	;// Vector 02 
    DCD     Handler_EINT3	             	;// Vector 03      
    DCD     Handler_EINT4_7             	;// Vector 04 
    DCD     Handler_EINT8_23	             	;// Vector 05
    DCD     6 
    DCD     Handler_nBATT_FLT	             	;// Vector 07      
    DCD     Handler_TICK	             	;// Vector 08 
    DCD     Handler_WDT	             	;// Vector 09
    DCD     Handler_TIMER0		             	;// Vector 10
    DCD     Handler_TIMER1	             	;// Vector 11     
    DCD	    Handler_TIMER2	             	;// Vector 12
    DCD     Handler_TIMER3					;// Vector 13
    DCD     Handler_TIMER4	                ;// Vector 14
    DCD     Handler_UART2	                ;// Vector 15 	    
    DCD     Handler_LCD	                ;// Vector 16
    DCD     Handler_DMA0                  ;// Vector 17
    DCD     Handler_DMA1	                ;// Vector 18
    DCD     Handler_DMA2	                ;// Vector 19 	    
    DCD     Handler_DMA3		                ;// Vector 20
    DCD     Handler_SDI		                ;// Vector 21
    DCD     Handler_SPI0	                ;// Vector 22
    DCD     Handler_UART1	                ;// Vector 23
    DCD     24	    	
    DCD     Handler_USBD                     ;// Vector 25
    DCD     Handler_USBH                      ;//VECTOR 26
    DCD     Handler_IIC				;//VECTOR 27
    DCD     Handler_UART0			;//VECTOR 28
    DCD     Handler_SPI1			;//VECTOR  29
    DCD     Handler_RTC				;//VECTOR   30
    DCD     Handler_ADC				;//VECTOR   31
IRQ_PRIORITY_END



;/*
;***************************************************************************************************
;*										引入连接器生成的代码始末地址
;*
;***************************************************************************************************
;*/
	AREA INT_CODE, CODE, READONLY   
                  
	               
BSS_Start_Ptr      
	IMPORT	|Image$$ZI$$Base|
	DCD		|Image$$ZI$$Base|	
	               
BSS_End_Ptr                       		
	IMPORT	|Image$$ZI$$Limit| 
	DCD		|Image$$ZI$$Limit|
	               
ROM_Data_Start_Ptr                       	
	IMPORT	|Image$$RO$$Limit|	
	DCD		|Image$$RO$$Limit|
	
RAM_Start_Ptr                       		
	IMPORT	|Image$$RW$$Base| 	
	DCD		|Image$$RW$$Base|
	
;//Current_Thread                    	
;//        DCD     TCD_Current_Thread
;/*                                                                                                 
;***************************************************************************************************
;*                  						INT_Intialize                                                                                                                                             
;* 
;* Function   : Intialize
;* DESCRIPTION:
;*				This function sets up the global system stack variable and       
;*      		transfers control to the target independent initialization       
;*      		function INC_Initialize.  Responsibilities of this function      
;*      		include the following: 
;*					- Setup necessary processor/system control registers      
;*             		- Initialize the vector table                             
;*             		- Setup the system stack pointers                         
;*             		- Setup the timer interrupt                               
;*             		- Calculate the timer HISR stack and priority             
;*             		- Calculate the first available memory address            
;*             		- Transfer control to INC_Initialize to initialize all of 
;*               	  the system components.                                                                              
;*                                                                                                  
;* Returns    :                                                                                     
;*                                                                                                  
;***************************************************************************************************
;*/   		
 	
 	EXPORT	INT_Intialize
INT_Intialize


;/*
;***************************************************************************************************
;*									Copy the code from ROM to the RAM
;*
;***************************************************************************************************
;*/

    LDR    r0,ROM_Data_Start_Ptr           ;// Get the start of the
    LDR    r1,RAM_Start_Ptr                ;// Get the start of the
    LDR    r3,BSS_Start_Ptr                ;// Pickup the start of
    CMP    r0,r1                           ;// Check for any initial
                                           ;// variable values
    BEQ    INT_BSS_Clear                   ;// If none, zero memory

INT_ROM_Vars_Copy
    CMP    r1,r3                           ;// Check to set flags
    LDRCC  r2, [r0], #4                    ;// Get value from ROM
    STRCC  r2, [r1], #4                    ;// Put value in RAM
    BCC    INT_ROM_Vars_Copy               ;// Continue

INT_BSS_Clear
    LDR    r1,BSS_End_Ptr                  ;// Pickup the end of the BSS area
    MOV    r2,#0                           ;// Clear value in r2

INT_BSS_Clear_Loop
    CMP    r3,r1                           ;// Are the start and end equal?
    STRCC  r2,[r3],#4                      ;// Clear a word
    BCC    INT_BSS_Clear_Loop              ;// If so, continue with BSS clear


;/*
;***************************************************************************************************
;*								Initialize the system stack pointers
;*											初始化堆栈
;*
;***************************************************************************************************
;*/    
;// 初始化Sys模式下的堆栈 
	LDR		SP,=SYS_STACK

⌨️ 快捷键说明

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