📄 int_pid.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_pid.s Nucleus PLUS\ARM PID\ADS 1.13.24 */
;/* */
;/* 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 */
;/* */
;/* int_defs.s Intialization constants */
;/* */
;/* HISTORY */
;/* */
;/* NAME DATE REMARKS */
;/* */
;/* W. Lamie 08-27-1994 Created initial version 1.0 */
;/* D. Lamie 08-27-1994 Verified version 1.0 */
;/* M. Trippi 07-11-1996 New NUCLEUS.H and TMT.S created */
;/* version 1.2 */
;/* M. Trippi 02-18-1997 Released version 1.3 */
;/* M. Manning 03-04-1997 Released version 1.4 */
;/* J. Bolton 08-26-1997 Released version 1.5 */
;/* J. Bolton 10-08-1997 Released version 1.6 */
;/* M. Kyle Craig 02-05-1999 Revised version 1.11.17 */
;/* George Clark 02-05-1999 Verified and Released 1.11.17 */
;/* B. Whatley 08-12-1999 Verified and Released 1.11.18 */
;/* D. Phillips 01-18-2000 Updated port to new structuring */
;/* scheme */
;/* B. Whatley 01-25-2001 Verified and Released 1.13.20 */
;/* Added int_defs.s file */
;/* D. Driscoll 05-10-2001 Verified and Released 1.13.21 */
;/* Add code to allow FLASHING of */
;/* image. Updated IRQ handeling */
;/* C. Sheppard 10-15-2001 Released version 1.13.22 */
;/* J. Pregeant 04-17-2002 Released version 1.13.23 */
;/* J. Pregeant 08-16-2002 Released version 1.13.24 */
;/*************************************************************************/
;
;/*************************************************************************/
;/* INCLUDE FILE */
;/*************************************************************************/
;/* Define constants used in low-level initialization. */
INCLUDE int_defs.s
;/*************************************************************************/
;/* COMPILE-TIME SWITCHES */
;/*************************************************************************/
;/* NOTE: Define "INCLUDE_PROVIEW" to include hooks for Nucleus ProView
; support. To do this use the -pd option on assembler line for TCT.S:
; -pd "INCLUDE_PROVIEW SETL {TRUE}" */
;/* NOTE: Define "NU_INT_ROM_SUPPORT" to run out of Flash.
; To do this use the -pd option on the assembler line:
; -pd "NU_INT_ROM_SUPPORT SETL {TRUE}" */
;/* NOTE: Define "NU_ARM9_SUPPORT" to run out of Flash.
; To do this use the -pd option on the assembler line:
; -pd "NU_ARM9_SUPPORT SETL {TRUE}" */
; For ARM ports there are three methods of debugging.
; The assembler argument shown must be added to the line where
; int_pid.s is assembled and the library re-built for these to work.
;
; 1) Using the Embedded ICE or Multi-ICE.
; - set NU_CLMON_SUPPORT = FALSE
; - Add assembler argument: <NONE>
;
; 2) Using CLMON monitor in conjunction with Nucleus UDB.
; - set NU_CLMON_SUPPORT = TRUE
; - Add assembler argument:
; -pd "NU_CLMON_SUPPORT SETL {TRUE}"
; 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.
GBLL THUMB
GBLL ARM
[ {CONFIG} = 16
THUMB SETL {TRUE}
ARM SETL {FALSE}
; If assembling with TASM go into 32 bit mode as the Armulator will
; start up the program in ARM state.
CODE32
|
THUMB SETL {FALSE}
ARM SETL {TRUE}
]
;/* Define the global NU_CLMON_SUPPORT if necessary */
IF (:LNOT: :DEF: NU_CLMON_SUPPORT)
GBLL NU_CLMON_SUPPORT
NU_CLMON_SUPPORT SETL {FALSE}
ENDIF
;/* Define the global NU_INT_ROM_SUPPORT if necessary */
IF (:LNOT: :DEF: NU_INT_ROM_SUPPORT)
GBLL NU_INT_ROM_SUPPORT
NU_INT_ROM_SUPPORT SETL {TRUE}
ENDIF
;/* Define the global NU_INT_FIQ_DEMO if using the FIQ demo */
IF (:LNOT: :DEF: NU_INT_FIQ_DEMO)
GBLL NU_INT_FIQ_DEMO
NU_INT_FIQ_DEMO SETL {FALSE}
ENDIF
;/* If NU_INT_ROM_SUPPORT is {TRUE}, ensure all
; monitor support is disabled */
IF NU_INT_ROM_SUPPORT
NU_CLMON_SUPPORT SETL {FALSE}
;/* Import INT_Reset function. Necessary to keep linker from discarding
; int_rom.s file when linking FLASH image. */
IMPORT INT_Reset
ENDIF ;/* NU_INT_ROM_SUPPORT */
;/* Define the global NU_ARM9_SUPPORT if necessary */
IF (:LNOT: :DEF: NU_ARM9_SUPPORT)
GBLL NU_ARM9_SUPPORT
NU_ARM9_SUPPORT SETL {FALSE}
ENDIF
AREA Heap, DATA, NOINIT
; Create dummy variable used to locate bottom of heap
;分配一段内存单元,并用0初始化。%是space的同义词
bottom_of_heap SPACE 1
;/*************************************************************************/
;/* EXTERNAL VARIABLE/FUNCTION DECLARATIONS */
;/*************************************************************************/
;/* Define the global system stack variable. This is setup by the
; initialization routine. */
IMPORT TCD_System_Stack
IMPORT TCT_System_Limit
IF NU_ARM9_SUPPORT
IMPORT Initialise940
ENDIF
;
;
;/* Define the global data structures that need to be initialized by this
; routine. These structures are used to define the system timer management
; HISR. */
IMPORT TMD_HISR_Stack_Ptr
IMPORT TMD_HISR_Stack_Size
IMPORT TMD_HISR_Priority
IMPORT INT_Timer_Initialize
;/* Define extern function references. */
IMPORT INC_Initialize
IMPORT TCT_Interrupt_Context_Save
IMPORT TCT_Interrupt_Context_Restore
IMPORT TCC_Dispatch_LISR
IMPORT TMT_Timer_Interrupt
IF NU_INT_FIQ_DEMO
IMPORT FIQ_LISR
ENDIF
;/*************************************************************************/
;/* GLOBAL VARIABLE DECLARATIONS */
;/*************************************************************************/
AREA INT_DATA, DATA, READWRITE ;声明一段可读写的数据区
;/* Define the initialization flag that indicates whether or not all of the
; default vectors have been loaded during initialization. */
EXPORT INT_Loaded_Flag
INT_Loaded_Flag DCD &00000000
;/*************************************************************************/
;/* INTERRUPT TABLES */
;/*************************************************************************/
;
; Define vector table used by INT_IRQ to branch to necessary ISR
; 分配中断向量表
INT_IRQ_Vectors
DCD INT_Interrupt_Shell ; Vector 0
DCD INT_Interrupt_Shell ; Vector 1
DCD INT_Interrupt_Shell ; Vector 2
DCD INT_Interrupt_Shell ; Vector 4
DCD INT_Interrupt_Shell ; Vector 3
DCD INT_Interrupt_Shell ; Vector 5
DCD INT_Interrupt_Shell ; Vector 6
DCD INT_Interrupt_Shell ; Vector 7
DCD INT_Interrupt_Shell ; Vector 8
DCD INT_Interrupt_Shell ; Vector 9
DCD INT_Timer_Interrupt ; Vector 10
DCD INT_Interrupt_Shell ; Vector 11
DCD INT_Interrupt_Shell ; Vector 12
DCD INT_Interrupt_Shell ; Vector 13
DCD INT_Interrupt_Shell ; Vector 14
DCD INT_Interrupt_Shell ; Vector 15
DCD INT_Interrupt_Shell ; Vector 16
DCD INT_Interrupt_Shell ; Vector 17
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -