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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [CORTEX_LM3Sxxxx_IAR_Keil/] [startup_ewarm.c] - Blame information for rev 581

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 581 jeremybenn
//*****************************************************************************
2
//
3
// startup_ewarm.c - Boot code for Stellaris.
4
//
5
// Copyright (c) 2006-2007 Luminary Micro, Inc.  All rights reserved.
6
//
7
// Software License Agreement
8
//
9
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
10
// exclusively on LMI's microcontroller products.
11
//
12
// The software is owned by LMI and/or its suppliers, and is protected under
13
// applicable copyright laws.  All rights are reserved.  Any use in violation
14
// of the foregoing restrictions may subject the user to criminal sanctions
15
// under applicable laws, as well as to civil liability for the breach of the
16
// terms and conditions of this license.
17
//
18
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
22
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23
//
24
// This is part of revision 100 of the Stellaris Ethernet
25
// Applications Library.
26
//
27
//*****************************************************************************
28
 
29
//*****************************************************************************
30
//
31
// Enable the IAR extensions for this source file.
32
//
33
//*****************************************************************************
34
#pragma language=extended
35
 
36
//*****************************************************************************
37
//
38
// Forward declaration of the default fault handlers.
39
//
40
//*****************************************************************************
41
static void NmiSR(void);
42
static void FaultISR(void);
43
static void IntDefaultHandler(void);
44
 
45
//*****************************************************************************
46
//
47
// External declaration for the interrupt handler used by the application.
48
//
49
//*****************************************************************************
50
 
51
 
52
//*****************************************************************************
53
//
54
// The entry point for the application.
55
//
56
//*****************************************************************************
57
extern void __iar_program_start(void);
58
extern void xPortPendSVHandler(void);
59
extern void xPortSysTickHandler(void);
60
extern void vPortSVCHandler(void);
61
extern void vT2InterruptHandler( void );
62
extern void vT3InterruptHandler( void );
63
extern void vEMAC_ISR( void );
64
extern void Timer0IntHandler( void );
65
 
66
//*****************************************************************************
67
//
68
// Reserve space for the system stack.
69
//
70
//*****************************************************************************
71
#ifndef STACK_SIZE
72
#define STACK_SIZE                              120
73
#endif
74
static unsigned long pulStack[STACK_SIZE] @ ".noinit";
75
 
76
//*****************************************************************************
77
//
78
// A union that describes the entries of the vector table.  The union is needed
79
// since the first entry is the stack pointer and the remainder are function
80
// pointers.
81
//
82
//*****************************************************************************
83
typedef union
84
{
85
    void (*pfnHandler)(void);
86
    unsigned long ulPtr;
87
}
88
uVectorEntry;
89
 
90
//*****************************************************************************
91
//
92
// The minimal vector table for a Cortex M3.  Note that the proper constructs
93
// must be placed on this to ensure that it ends up at physical address
94
// 0x0000.0000.
95
//
96
//*****************************************************************************
97
__root const uVectorEntry __vector_table[] @ ".intvec" =
98
{
99
    { .ulPtr = (unsigned long)pulStack + sizeof(pulStack) },
100
                                            // The initial stack pointer
101
    __iar_program_start,                    // The reset handler
102
    NmiSR,                                  // The NMI handler
103
    FaultISR,                               // The hard fault handler
104
    IntDefaultHandler,                      // The MPU fault handler
105
    IntDefaultHandler,                      // The bus fault handler
106
    IntDefaultHandler,                      // The usage fault handler
107
    0,                                      // Reserved
108
    0,                                      // Reserved
109
    0,                                      // Reserved
110
    0,                                      // Reserved
111
    vPortSVCHandler,                        // SVCall handler
112
    IntDefaultHandler,                      // Debug monitor handler
113
    0,                                      // Reserved
114
    xPortPendSVHandler,                     // The PendSV handler
115
    xPortSysTickHandler,                    // The SysTick handler
116
    IntDefaultHandler,                      // GPIO Port A
117
    IntDefaultHandler,                      // GPIO Port B
118
    IntDefaultHandler,                      // GPIO Port C
119
    IntDefaultHandler,                      // GPIO Port D
120
    IntDefaultHandler,                      // GPIO Port E
121
    IntDefaultHandler,                      // UART0 Rx and Tx
122
    IntDefaultHandler,                      // UART1 Rx and Tx
123
    IntDefaultHandler,                      // SSI Rx and Tx
124
    IntDefaultHandler,                      // I2C Master and Slave
125
    IntDefaultHandler,                      // PWM Fault
126
    IntDefaultHandler,                      // PWM Generator 0
127
    IntDefaultHandler,                      // PWM Generator 1
128
    IntDefaultHandler,                      // PWM Generator 2
129
    IntDefaultHandler,                      // Quadrature Encoder
130
    IntDefaultHandler,                      // ADC Sequence 0
131
    IntDefaultHandler,                      // ADC Sequence 1
132
    IntDefaultHandler,                      // ADC Sequence 2
133
    IntDefaultHandler,                      // ADC Sequence 3
134
    IntDefaultHandler,                      // Watchdog timer
135
    Timer0IntHandler,                       // Timer 0 subtimer A
136
    IntDefaultHandler,                      // Timer 0 subtimer B
137
    IntDefaultHandler,                      // Timer 1 subtimer A
138
    IntDefaultHandler,                      // Timer 1 subtimer B
139
    vT2InterruptHandler,                      // Timer 2 subtimer A
140
    IntDefaultHandler,                      // Timer 2 subtimer B
141
    IntDefaultHandler,                      // Analog Comparator 0
142
    IntDefaultHandler,                      // Analog Comparator 1
143
    IntDefaultHandler,                      // Analog Comparator 2
144
    IntDefaultHandler,                      // System Control (PLL, OSC, BO)
145
    IntDefaultHandler,                      // FLASH Control
146
    IntDefaultHandler,                      // GPIO Port F
147
    IntDefaultHandler,                      // GPIO Port G
148
    IntDefaultHandler,                      // GPIO Port H
149
    IntDefaultHandler,                      // UART2 Rx and Tx
150
    IntDefaultHandler,                      // SSI1 Rx and Tx
151
    vT3InterruptHandler,                    // Timer 3 subtimer A
152
    IntDefaultHandler,                      // Timer 3 subtimer B
153
    IntDefaultHandler,                      // I2C1 Master and Slave
154
    IntDefaultHandler,                      // Quadrature Encoder 1
155
    IntDefaultHandler,                      // CAN0
156
    IntDefaultHandler,                      // CAN1
157
    IntDefaultHandler,                      // CAN2
158
    vEMAC_ISR,                                          // Ethernet
159
    IntDefaultHandler,                      // Hibernate
160
    IntDefaultHandler,                      // USB0
161
    IntDefaultHandler,                      // PWM Generator 3
162
    IntDefaultHandler,                      // uDMA Software Transfer
163
    IntDefaultHandler                       // uDMA Error
164
};
165
 
166
 
167
//*****************************************************************************
168
//
169
// This is the code that gets called when the processor receives a NMI.  This
170
// simply enters an infinite loop, preserving the system state for examination
171
// by a debugger.
172
//
173
//*****************************************************************************
174
static void
175
NmiSR(void)
176
{
177
    //
178
    // Enter an infinite loop.
179
    //
180
    while(1)
181
    {
182
    }
183
}
184
 
185
//*****************************************************************************
186
//
187
// This is the code that gets called when the processor receives a fault
188
// interrupt.  This simply enters an infinite loop, preserving the system state
189
// for examination by a debugger.
190
//
191
//*****************************************************************************
192
static void
193
FaultISR(void)
194
{
195
    //
196
    // Enter an infinite loop.
197
    //
198
    while(1)
199
    {
200
    }
201
}
202
 
203
//*****************************************************************************
204
//
205
// This is the code that gets called when the processor receives an unexpected
206
// interrupt.  This simply enters an infinite loop, preserving the system state
207
// for examination by a debugger.
208
//
209
//*****************************************************************************
210
static void
211
IntDefaultHandler(void)
212
{
213
    //
214
    // Go into an infinite loop.
215
    //
216
    while(1)
217
    {
218
    }
219
}

powered by: WebSVN 2.1.0

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