📄 int.s
字号:
;************************************************************************
;*
;* Copyright Mentor Graphics Corporation 2002
;* All Rights Reserved.
;*
;* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS
;* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS
;* SUBJECT TO LICENSE TERMS.
;*
;************************************************************************
;************************************************************************
;*
;* FILE NAME VERSION
;*
;* int.s Nucleus PLUS\ARM925\Code Composer 1.14.1
;*
;* COMPONENT
;*
;* IN - Initialization
;*
;* DESCRIPTION
;*
;* This file contains the target processor dependent initialization
;* routines and data.
;*
;* DATA STRUCTURES
;*
;* INT_Vectors Interrupt vector table
;*
;* FUNCTIONS
;*
;* INT_Initialize Target initialization
;* INT_Vectors_Loaded Returns a NU_TRUE if all the
;* default vectors are loaded
;* INT_Setup_Vector Sets up an actual vector
;*
;* DEPENDENCIES
;*
;* nucleus.h System constants
;*
;* HISTORY
;*
;* NAME DATE REMARKS
;*
;* B. Ronquillo 08-28-2002 Released version 1.14.1
;*
;************************************************************************
;******************************
;* INCLUDE ASSEMBLY CONSTANTS *
;******************************
.include "D:\XWproject\Nucleus\source\Plus\Demo\asm_defs.inc"
.state32
;**********************************
;* EXTERNAL VARIABLE DECLARATIONS *
;**********************************
; Define the global data structures that need to be initialized by this
; routine. These structures are used to define the system timer management
; HISR.
;extern VOID *TCT_System_Limit
;extern VOID *TMD_HISR_Stack_Ptr;
;extern UNSIGNED TMD_HISR_Stack_Size;
;extern INT TMD_HISR_Priority;
;extern VOID *TCD_System_Stack;
.ref _TCT_System_Limit
.ref _TMD_HISR_Stack_Ptr
.ref _TMD_HISR_Stack_Size
.ref _TMD_HISR_Priority
.ref _TCD_System_Stack
; Linker produced symbols
.ref cinit
.ref _ld_bss_start
.ref _ld_bss_end
;**********************************
;* EXTERNAL FUNCTION DECLARATIONS *
;**********************************
; Define extern function references.
;VOID INC_Initialize(VOID *first_available_memory);
;VOID TCT_Interrupt_Context_Save(VOID);
;VOID TCT_Interrupt_Context_Restore(VOID);
;VOID TCC_Dispatch_LISR(INT vector_number);
;VOID TMT_Timer_Interrupt(void);
;VOID SDC_LISR(INT vector);
.ref _INC_Initialize
.ref _TCT_Interrupt_Context_Save
.ref _TCT_Interrupt_Context_Restore
.ref _TCC_Dispatch_LISR
.ref _TMT_Timer_Interrupt
.if $$isdefed("NU_FIQ_DEMO")
.ref _FIQ_LISR
.endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;; merging from intvecs_16.asm ;;;;;;;;;;;;;;;;
.global $INT_SetSupervisor
.global $INT_SetUser
.global $INT_EnableIRQ
.global $INT_EnableFIQ
.global $INT_SetIRQBit
.global $INT_ClearIRQBit
.global $INT_SetFIQBit
.global $INT_ClearFIQBit
.global $INT_Set_SVC_Stack
.global $INT_Set_Abort_Stack
.global $INT_Set_Udef_Stack
.global $INT_DisableFIQIRQ
.global $INT_RestoreFIQIRQ
;;;;;;;;;;;;;;;;;;; end of merge ;;;;;;;;;;;;;;;;
;**********************************
;* GLOBAL VARIABLE DECLARATIONS *
;**********************************
.bss
;INT INT_Loaded_Flag
.def INT_Loaded_Flag
INT_Loaded_Flag
.word 00000000h
;**********************************
;* SYSTEM STACK DECLARATIONS *
;**********************************
.sect "system_stack"
.align 4
.def INT_System_Stk_Limit
INT_System_Stk_Limit
.space SYSTEM_STACK_SIZE
.align 4
.def INT_System_Stack_SP
INT_System_Stack_SP
;**********************************
;* IRQ STACK DECLARATIONS *
;**********************************
.sect "irq_stack"
.align 4
.space IRQ_STACK_SIZE
.align 4
.def INT_IRQ_Stack_SP
INT_IRQ_Stack_SP
;**********************************
;* FIQ STACK DECLARATIONS *
;**********************************
.sect "fiq_stack"
.align 4
.space FIQ_STACK_SIZE
.align 4
.def INT_FIQ_Stack_SP
INT_FIQ_Stack_SP
;**********************************
;* TIMER HISR STACK DECLARATION *
;**********************************
.sect "hisr_stack"
.align 4
.def INT_HISR_Stack_Mem
INT_HISR_Stack_Mem
.space HISR_STACK_SIZE
;**********************************
;* AVAILABLE MEMORY DECLARATION *
;**********************************
.sect "avail_memory"
.align 4
.space 4
.def INT_First_Avail_Mem
INT_First_Avail_Mem
;**********************************
;* VECTOR TABLE *
;**********************************
.sect "vectors"
.def INT_Vectors
INT_Vectors
; .if $$isdefed("NU_ROM_SUPPORT")
; .ref INT_Reset
; B INT_Reset ; Flash Hardware Reset
; .else
LDR pc, INT_Initialize_Addr ; Reset
; .endif
LDR pc, INT_Undef_Inst_Addr ; Undefined Instruction
LDR pc, INT_Software_Addr ; Software Generated
LDR pc, INT_Software_Addr ; Software Generated
LDR pc, INT_Data_Abort_Addr ; Data Abort
LDR pc, INT_Reserved_Addr ; Reserved
LDR pc, INT_IRQ_Addr ; Standard External Interrupt
LDR pc, INT_FIQ_Addr ; Fast External Interrupt
INT_Initialize_Addr
.word _INT_Initialize
INT_Undef_Inst_Addr
.word _INT_Undef_Inst
INT_Software_Addr
.word _INT_Software
INT_Prefetch_Abort_Addr
.word _INT_Prefetch_Abort
INT_Data_Abort_Addr
.word _INT_Data_Abort
INT_Reserved_Addr
.word _INT_Reserved
INT_IRQ_Addr
.word _INT_IRQ
INT_FIQ_Addr
.word _INT_FIQ
; Define vector table used by INT_IRQ to branch to necessary ISR
INT_IRQ_Vectors:
.word _INT_IRQ_2 ; Vector 0
.word INT_Interrupt_Shell ; Vector 1
.word INT_Interrupt_Shell ; Vector 2
.word INT_Interrupt_Shell ; Vector 3
.word INT_Interrupt_Shell ; Vector 4
.word INT_Interrupt_Shell ; Vector 5
.word INT_Interrupt_Shell ; Vector 6
.word INT_Interrupt_Shell ; Vector 7
.word INT_Interrupt_Shell ; Vector 8
.word INT_Interrupt_Shell ; Vector 9
.word INT_Interrupt_Shell ; Vector 10
.word INT_Interrupt_Shell ; Vector 11
.word INT_Interrupt_Shell ; Vector 12
.word INT_Interrupt_Shell ; Vector 13
.word INT_Interrupt_Shell ; Vector 14
.word INT_Interrupt_Shell ; Vector 15
.word INT_Interrupt_Shell ; Vector 16
.word INT_Interrupt_Shell ; Vector 17
.word INT_Interrupt_Shell ; Vector 18
.word INT_Interrupt_Shell ; Vector 19
.word INT_Interrupt_Shell ; Vector 20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -