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

📄 asm_defs.inc

📁 MMI层OBJ不能完全编译
💻 INC
📖 第 1 页 / 共 2 页
字号:
;************************************************************************
;*                                                                       
;*               Copyright Mentor Graphics Corporation 2005              
;*                         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                
;*                                                                       
;*      asm_defs.inc               Nucleus PLUS - ARM926 DM320 Code Composer v. 1.15.1 
;*                                                                       
;* COMPONENT                                                             
;*                                                                       
;*      IN - Initialization                                              
;*                                                                       
;* DESCRIPTION                                                           
;*                                                                       
;*      This file contains the target processor dependent initialization 
;*      values used in int.s, tct.s, and tmt.s                      
;*                                                                       
;************************************************************************

;***********************************
;* TARGET BUILD OPTIONS            *
;***********************************

;NU_ROM_SUPPORT          .equ    0           ; Set to 1 for support to run from ROM
NU_FIQ_SUPPORT          .equ    0           ; Set to 1 to enable FIQ nested interrupt
                                            ; handling / functionality
NU_THUMB_SUPPORT        .equ    1           ; Set to 1 for thumb support
NU_PROFILE_PLUS         .equ    0           ; Set to 1 to enable Nucleus Profiler
NU_TEST2_SUPPORT        .equ    0           ; Set to 1 to run timing test 2
NU_TEST3_SUPPORT        .equ    0           ; Set to 1 to run timing test 3


;**********************************
;* NUCLEUS SYSTEM CONSTANTS       *
;**********************************

HISR_STACK_SIZE         .equ    2048        ; Define timer HISR stack size
SYSTEM_STACK_SIZE       .equ    2048        ; Define the system stack size
IRQ_STACK_SIZE          .equ    256         ; Define the IRQ stack size
FIQ_STACK_SIZE          .equ    512         ; Define the FIQ stack size
ABORT_STACK_SIZE        .equ    256         ; Define the ABORT stack size
UNDEF_STACK_SIZE        .equ    256         ; Define the UNDEF stack size
INT_STACK_SIZE          .equ    72          ; Size of interrupt stack frame (in bytes)
SOL_STACK_SIZE          .equ    48          ; Size of solicited stack frame (in bytes)
HISR_PRIORITY           .equ    2           ; Timer HISR has priority of 2 (lowest)

;***********************************
;* TARGET INITIALIZATION CONSTANTS *
;***********************************

; CPSR bit / mask constants

LOCKOUT                 .equ    0x000000C0  ; Interrupt lockout value
LOCK_MSK                .equ    0x000000C0  ; Value to mask lockout bits
MODE_MASK               .equ    0x0000001F  ; Processor Mode Mask
SUP_MODE                .equ    0x00000013  ; Supervisor Mode (SVC)
;USR_MODE                .equ    0x00000010  ; User Mode(USR)
IRQ_MODE                .equ    0x00000012  ; Interrupt Mode (IRQ)
FIQ_MODE                .equ    0x00000011  ; Fast Interrupt Mode (FIQ)
UNDEF_MODE              .equ    0x0000001B  ; Undefined Instruction Mode (UNDEF)
;ABT_MODE                .equ    0x00000017  ; Abort Instruction Mode (ABT)
;IRQ_BIT                 .equ    0x00000080  ; IRQ bit of CPSR and SPSR
;FIQ_BIT                 .equ    0x00000040  ; FIQ bit of CPSR and SPSR
THUMB_BIT               .equ    0x00000020  ; THUMB Mode bit in CPSR and SPSR


;******************************
;* NUCLEUS TIMER CONSTANTS    *
;******************************

; Define timer interrupt mode (FIQ or IRQ)

;TIMER_INTERRUPT_MODE    .equ    IRQ_MODE

; This Nucleus timer is based off of the TIMER 0 interrupt.

;CNTL_TIMER_BASE         .equ    0x00030000  ; Define base for all timer registers
;TIMER_MODE              .equ    0x02        ; Set the timer mode to free running
;TMPS0_OFFSET            .equ    0x0004      ; Timer Prescale Register Offset
;TIMER_PRESCALE          .equ    5           ; Set the prescale value
;TMVAL_OFFSET            .equ    0x0006      ; Timer 0 Value Register Offset
;LOAD_TIM_OFFSET         .equ    0x04        ; Offset of timer load register from base
;TIMER_ENABLE            .equ    0x20        ; Must set this before a timer 
                                            ; is used (pg 6-5)
;TIMER_CLOCK             .equ    27000000    ; Clock used by timer
;TIMER_TICKS_PER_SEC     .equ    100         ; Number of Timer ticks per second


; Calculate timer count value based on timer clock, timer prescale and the number
; of timer ticks per second (100 = 10 ms timer interrupt)
; The equation for this count value is:  count = (CLOCK/PRESCALE) * .010 seconds 

;TIMER_COUNT             .equ    ((TIMER_CLOCK/TIMER_PRESCALE) / TIMER_TICKS_PER_SEC)
;TIMER_LOAD_VAL          .equ    TIMER_COUNT ; 32-bit count
;TIMER_RESET             .equ    0x00000000  ; Timer reset value

; Timer interrupt bits
;TIMER_IRQ               .equ    30          ; Timer IRQ interrupt bit
;TIMER_MASK              .equ    0x40000000  ; Timer mask
;TIMER_ILR               .equ    0x0000      ; Timer interrupt level register

;ENABLE_TIMER_CLK        .equ    0x80        ; Enables clock of MPU timer connected to TIPB

; Clock Controller Bits

;CLOCK_PLLA_VAL          .equ    0x00C1      ; PLLA: 0x00C1 -> 27 * 13 / 2 = 175.5 MHz 
;CLOCK_PLLB_VAL          .equ    0x0071      ; PLLB: 0x0071 -> 27 * 8 / 2 = 108 MHz 
;CLOCK_SEL2_VAL          .equ    0x0101      ; SEL2: 0x0101 -> AXL, DSP = PLLA, SDR, ARM = PLLB 
;CLOCK_BYP_VAL           .equ    0x0000      ; 0x0000 -> No PLL Bypass 
;CLOCK_DIV0_VAL          .equ    0x0003      ; 0x0100 -> ARM clock is PLLB and AHB = ARM / 2 
;CLOCK_DIV1_VAL          .equ    0x0300      ; 0x0000 -> SDRAM clock = PLLB, AXL clock = PLLA 
;CLOCK_DIV2_VAL          .equ    0x0300      ; 0x0100 -> DSP clock = PLLA/2 
;CLOCK_MOD0_VAL          .equ    0x0DF7      ; Enable all except EXHOST and ETM 
;CLOCK_MOD1_VAL          .equ    0x0FFF      ; Enable all clocks 
;CLOCK_MOD2_VAL          .equ    0x7FFF      ; Enable all clocks except TEST 
;CLOCK_CTL_BASE          .equ    0x00030880  ; Clock Controller base address

; Clock Controller Register Offsets

;CLOCK_PLLA              .equ    0x00        ; PLLA Offset of Clock Control Register
;CLOCK_PLLB              .equ    0x02        ; PLLB Offset of Clock Control Register
;CLOCK_CTL               .equ    0x04        ; Clock Control Register Offset
;CLOCK_SEL2              .equ    0x08        ; Clock Select 2 Register Offset
;CLOCK_DIV0              .equ    0x0A        ; Clock 0 Divider Register Offset
;CLOCK_DIV1              .equ    0x0C        ; Clock 1 Divider Register Offset
;CLOCK_DIV2              .equ    0x0E        ; Clock 2 Divider Register Offset
;CLOCK_BYPASS            .equ    0x14        ; Clock Bypass Register Offset
;CLOCK_MOD0              .equ    0x18        ; Clock Mod0 Register Offset
;CLOCK_MOD1              .equ    0x1A        ; Clock Mod1 Register Offset
;CLOCK_MOD2              .equ    0x1C        ; Clock Mod2 Register Offset

;CLOCK_CTL_TIMER0        .equ    0x02

;TIMER0_ARM              .equ    0x20        ; Timer 0 bit

;GIO_REGISTER_BASE       .equ    0x00030580  ; GIO Register Base address


;***********************************
;* NUCLEUS INTERRUPT CONSTANTS     *
;***********************************

; The following are the vector numbers associated with each source.

;INT_IRQ0_TIMER0         .equ    0           ; Timer 0 Interrupt
;INT_IRQ1_TIMER1         .equ    1           ; Timer 1 Interrupt           
;INT_IRQ2_TIMER2         .equ    2           ; Timer 2 Interrupt
;INT_IRQ3_TIMER3         .equ    3           ; Timer 3 Interrupt
;INT_IRQ4_CCDVD0			.equ    4           ; VDINT0 register (CCD Controller)
;INT_IRQ5_CCDVD1			.equ    5           ; VDINT1 register (CCD Controller)
;INT_IRQ6_CCDWEN         .equ    6           ; CCD WEN Interrupt
;INT_IRQ7_VENC           .equ    7           ; VENC Interrupt
;INT_IRQ8_SERIAL0        .equ    8           ; Serial 0 Interrupt
;INT_IRQ9_SERIAL1        .equ    9           ; Serial 1 Interrupt
;INT_IRQ10_EXTERNAL_HOST .equ    10          ; External Host Interrupt
;INT_IRQ11_IMGBUD        .equ    11          ; Image Buffer Interrupt
;INT_IRQ12_UART0         .equ    12          ; UART 0 Interrupt
;INT_IRQ13_UART1         .equ    13          ; UART 1 Interrupt
;INT_IRQ14_USB0          .equ    14          ; USB 0 Interrupt
;INT_IRQ15_USB1          .equ    15          ; USB 1 Interrupt
;INT_IRQ16_VLYNQ         .equ    16          ; VLYNQ Interrupt
;INT_IRQ17_MTC0          .equ    17          ; MTC 0 Interrupt
;INT_IRQ18_MTC1          .equ    18          ; MTC 1 Interrupt
;INT_IRQ19_SDMMCMS       .equ    19          ; SD/MMC or MS Host Interrupt
;INT_IRQ20_SDIOMS		.equ	20			; SDIO or MS DMA Interrupt
;INT_IRQ21_GIO_0         .equ    21          ; GPIO 0 Interrupt
;INT_IRQ22_GIO_1         .equ    22          ; GPIO 1 Interrupt
;INT_IRQ23_GIO_2         .equ    23          ; GPIO 2 Interrupt
;INT_IRQ24_GIO_3         .equ    24          ; GPIO 3 Interrupt
;INT_IRQ25_GIO_4         .equ    25          ; GPIO 4 Interrupt
;INT_IRQ26_GIO_5         .equ    26          ; GPIO 5 Interrupt
;INT_IRQ27_GIO_6         .equ    27          ; GPIO 6 Interrupt
;INT_IRQ28_GIO_7         .equ    28          ; GPIO 7 Interrupt
;INT_IRQ29_GIO_8         .equ    29          ; GPIO 8 Interrupt
;INT_IRQ30_GIO_9         .equ    30          ; GPIO 9 Interrupt
;INT_IRQ31_GIO_10        .equ    31          ; GPIO 10 Interrupt
;INT_IRQ32_GIO_11        .equ    32          ; GPIO 11 Interrupt
;INT_IRQ33_GIO_12        .equ    33          ; GPIO 12 Interrupt           
;INT_IRQ34_GIO_13        .equ    34          ; GPIO 13 Interrupt
;INT_IRQ35_GIO_14        .equ    35          ; GPIO 14 Interrupt
;INT_IRQ36_GIO_15        .equ    36          ; GPIO 15 Interrupt
;INT_IRQ37_PREV0         .equ    37          ; Preview 0 Interrupt
;INT_IRQ38_PREV1         .equ    38          ; Preview 1 Interrupt
;INT_IRQ39_WDT           .equ    39          ; Watchdog Timer Interrupt
;INT_IRQ40_I2C           .equ    40          ; I2C Interrupt
;INT_IRQ41_CLKC          .equ    41          ; CLKC Interrupt
;INT_IRQ42_E2ICE			.equ	42			; Embedded ICE Interrupt
;INT_IRQ43_ARMCOMRX		.equ    43			; ARM COMM Receive
;INT_IRQ44_ARMCOMTX		.equ    44			; ARM COMM Transmit
;INT_IRQ45_RESERVED      .equ    45          ; Reserved


;***********************************
;* TARGET INTERRUPT CONSTANTS      *
;***********************************    

; The following can be found in the MPU Private Peripherals Chapter under
; interrupt handler level 1 and level 2 registers

INT_BASE_ADDRESS        .equ    0x00030500  ; Interrupt base address
;INT_FIQ0                .equ    0x00        ; Base address for FIQ handler 0
;INT_FIQ1                .equ    0x02        ; Base address for FIQ handler 1
;INT_FIQ2                .equ    0x04        ; Base address for FIQ handler 2
;INT_IRQ0                .equ    0x08        ; IRQ 0 pending interrupt register
;INT_IRQ1                .equ    0x0A        ; IRQ 1 pending interrupt register
;INT_IRQ2                .equ    0x0C        ; IRQ 2 pending interrupt register
;INT_FIQ_ENTRY0          .equ    0x10        ; Lowest 16 bits of entry address to highest priority reg
;INT_FIQ_ENTRY1          .equ    0x12        ; Highest 16 bits of entry address to highest priority reg
;INT_IRQ_ENTRY0          .equ    0x18        ; Lowest 16 bits of entry address to highest priority reg
;INT_IRQ_ENTRY1          .equ    0x1A        ; Highest 16 bits of entry address to highest priority reg
;INT_FISEL0              .equ    0x20        ; Base address for interrupt select register
;INT_FISEL1              .equ    0x22        ; Base address for interrupt select register
;INT_FISEL2              .equ    0x24        ; Base address for interrupt select register
;INT_EINT0               .equ    0x28        ; Enable interrupt bank 0 register
;INT_EINT1               .equ    0x2A        ; Enable interrupt bank 1 register
;INT_EINT2               .equ    0x2C        ; Enable interrupt bank 2 register
;INT_RAW                 .equ    0x30        ; Make sure the interrupt we get is IRQ
;INTPRIOR0_OFFSET        .equ    0x40        ; Interrupt Priority Offset

⌨️ 快捷键说明

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