OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ARM9_STR91X_IAR/] [91x_vect_IAR.s] - Blame information for rev 577

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 577 jeremybenn
;******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
2
;* File Name          : 91x_vect.s
3
;* Author             : MCD Application Team
4
;* Date First Issued  : 10/25/2005 :  Beta Version V0.1
5
;* Description        : This File used to initialize the exception and IRQ
6
;*                      vectors, and to enter/return to/from exceptions
7
;*                      handlers.
8
;*******************************************************************************
9
; History:
10
; 10/25/2005 :  Beta Version V0.1
11
;*******************************************************************************
12
; THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
13
; CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS
14
; A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
15
; OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
16
; OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
17
; CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18
;******************************************************************************/
19
 
20
#include "FreeRTOSConfig.h"
21
#include "ISR_Support.h"
22
 
23
    MODULE      ?RESET
24
        COMMON  INTVEC:CODE(2)
25
        CODE32
26
    EXPORT LINK
27
 
28
VectorAddress                   EQU    0xFFFFF030  ; VIC Vector address register address.
29
VectorAddressDaisy              EQU    0xFC000030  ; Daisy VIC Vector address register
30
                                          ; address.
31
LINK                                    EQU    0x0
32
 
33
I_Bit                                   EQU    0x80 ; when I bit is set, IRQ is disabled
34
F_Bit                                   EQU    0x40 ; when F bit is set, FIQ is disabled
35
 
36
;*******************************************************************************
37
;                                  MACRO
38
;*******************************************************************************
39
 
40
;*******************************************************************************
41
;            Import  the __program_start address from 91x_init.s
42
;*******************************************************************************
43
 
44
        IMPORT  __program_start
45
 
46
;*******************************************************************************
47
;                      Import exception handlers
48
;*******************************************************************************
49
 
50
                IMPORT  vPortYieldProcessor             ; FreeRTOS SWI handler
51
 
52
;*******************************************************************************
53
;            Export Peripherals IRQ handlers table address
54
;*******************************************************************************
55
 
56
;*******************************************************************************
57
;                        Exception vectors
58
;*******************************************************************************
59
 
60
        LDR     PC, Reset_Addr
61
        LDR     PC, Undefined_Addr
62
        LDR     PC, SWI_Addr
63
        LDR     PC, Prefetch_Addr
64
        LDR     PC, Abort_Addr
65
        NOP                             ; Reserved vector
66
        LDR     PC, IRQ_Addr
67
        LDR     PC, FIQ_Addr
68
 
69
;*******************************************************************************
70
;               Exception handlers address table
71
;*******************************************************************************
72
 
73
Reset_Addr      DCD     __program_start
74
Undefined_Addr  DCD     UndefinedHandler
75
SWI_Addr        DCD     vPortYieldProcessor
76
Prefetch_Addr   DCD     PrefetchAbortHandler
77
Abort_Addr      DCD     DataAbortHandler
78
                DCD     0               ; Reserved vector
79
IRQ_Addr        DCD     IRQHandler
80
FIQ_Addr        DCD     FIQHandler
81
 
82
 
83
;*******************************************************************************
84
;                         Exception Handlers
85
;*******************************************************************************
86
 
87
; - NOTE -
88
; The IRQ and SWI handlers are the only managed exception.
89
 
90
UndefinedHandler
91
                b       UndefinedHandler
92
 
93
PrefetchAbortHandler
94
                b       PrefetchAbortHandler
95
 
96
DataAbortHandler
97
                b       DataAbortHandler
98
 
99
FIQHandler
100
                b       FIQHandler
101
 
102
DefaultISR
103
                b       DefaultISR
104
 
105
 
106
;*******************************************************************************
107
;* Function Name  : IRQHandler
108
;* Description    : This function called when IRQ exception is entered.
109
;* Input          : none
110
;* Output         : none
111
;*******************************************************************************
112
 
113
IRQHandler
114
        portSAVE_CONTEXT                                        ; Save the context of the current task.
115
 
116
        LDR    r0, = VectorAddress
117
        LDR    r0, [r0]                                         ; Read the routine address
118
        LDR    r1, = VectorAddressDaisy
119
        LDR    r1, [r1]
120
        MOV        lr, pc
121
        bx         r0
122
        LDR    r0, = VectorAddress                      ; Write to the VectorAddress to clear the
123
        STR    r0, [r0]                                         ; respective interrupt in the internal interrupt
124
        LDR    r1, = VectorAddressDaisy         ; Write to the VectorAddressDaisy to clear the
125
        STR    r1,[r1]                                          ; respective interrupt in the internal interrupt
126
 
127
        portRESTORE_CONTEXT                                     ; Restore the context of the selected task.
128
 
129
 
130
        LTORG
131
 
132
        END
133
 
134
;******************* (C) COPYRIGHT 2003 STMicroelectronics *****END OF FILE****

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.