Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
228 andfri 1
/* Copyright (c) 2002, Marek Michalkiewicz <marekm@amelek.gda.pl>
2
   All rights reserved.
3
 
4
   Redistribution and use in source and binary forms, with or without
5
   modification, are permitted provided that the following conditions are met:
6
 
7
   * Redistributions of source code must retain the above copyright
8
     notice, this list of conditions and the following disclaimer.
9
 
10
   * Redistributions in binary form must reproduce the above copyright
11
     notice, this list of conditions and the following disclaimer in
12
     the documentation and/or other materials provided with the
13
     distribution.
14
 
15
   * Neither the name of the copyright holders nor the names of
16
     contributors may be used to endorse or promote products derived
17
     from this software without specific prior written permission.
18
 
19
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
   POSSIBILITY OF SUCH DAMAGE. */
30
 
31
/* $Id: gcrt1.S,v 1.8 2005/11/10 21:12:09 aesok Exp $ */
32
 
33
#if (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
34
#error "GCC version >= 3.3 required"
35
#endif
36
 
37
#include "vectors.h"
38
 
39
	.macro	vector number
40
	.if (. - __boot_vectors < _VECTORS_SIZE)
41
	.weak	__vector_boot_\number
42
	.set	__vector_boot_\number, __vector_default_\number
43
	XJMP	__vector_boot_\number
44
	.endif
45
	.endm
46
 
47
	.macro	vector_default number
48
	.if (. - __vector_defaults < _VECTORS_SIZE)
49
	.weak	__vector_default_\number
50
	.set	__vector_default_\number, .
51
	.word	0xffff
52
	.endif
53
	.endm
54
 
55
	.section .boot_vectors,"ax",@progbits
56
	.global	__boot_vectors
57
	.func	__boot_vectors
58
__boot_vectors:
59
	XJMP	__init
60
	vector	1
61
	vector	2
62
	vector	3
63
	vector	4
64
	vector	5
65
	vector	6
66
	vector	7
67
	vector	8
68
	vector	9
69
	vector	10
70
	vector	11
71
	vector	12
72
	vector	13
73
	vector	14
74
	vector	15
75
	vector	16
76
	vector	17
77
	vector	18
78
	vector	19
79
	vector	20
80
	vector	21
81
	vector	22
82
	vector	23
83
	vector	24
84
	vector	25
85
	vector	26
86
	vector	27
87
	vector	28
88
	vector	29
89
	vector	30
90
	vector	31
91
	vector	32
92
	vector	33
93
	vector	34
94
	vector	35
95
	vector	36
96
	vector	37
97
	vector	38
98
	vector	39
99
	vector	40
100
	vector	41
101
	vector	42
102
	vector	43
103
	vector	44
104
	vector	45
105
	vector	46
106
	vector	47
107
	vector	48
108
	vector	49
109
	vector	50
110
	vector	51
111
	vector	52
112
	vector	53
113
	vector	54
114
	vector	55
115
	vector	56
116
	.endfunc
117
 
118
	.section .app_vectors,"ax",@progbits
119
	.global __vector_default
120
	.set	__vector_default, __boot_vectors
121
	.func	__vector_defaults
122
__vector_defaults:
123
	.word	0xffff		; Application reset vector
124
	vector_default	1
125
	vector_default	2
126
	vector_default	3
127
	vector_default	4
128
	vector_default	5
129
	vector_default	6
130
	vector_default	7
131
	vector_default	8
132
	vector_default	9
133
	vector_default	10
134
	vector_default	11
135
	vector_default	12
136
	vector_default	13
137
	vector_default	14
138
	vector_default	15
139
	vector_default	16
140
	vector_default	17
141
	vector_default	18
142
	vector_default	19
143
	vector_default	20
144
	vector_default	21
145
	vector_default	22
146
	vector_default	23
147
	vector_default	24
148
	vector_default	25
149
	vector_default	26
150
	vector_default	27
151
	vector_default	28
152
	vector_default	29
153
	vector_default	30
154
	vector_default	31
155
	vector_default	32
156
	vector_default	33
157
	vector_default	34
158
	vector_default	35
159
	vector_default	36
160
	vector_default	37
161
	vector_default	38
162
	vector_default	39
163
	vector_default	40
164
	vector_default	41
165
	vector_default	42
166
	vector_default	43
167
	vector_default	44
168
	vector_default	45
169
	vector_default	46
170
	vector_default	47
171
	vector_default	48
172
	vector_default	49
173
	vector_default	50
174
	vector_default	51
175
	vector_default	52
176
	vector_default	53
177
	vector_default	54
178
	vector_default	55
179
	vector_default	56
180
	.endfunc