]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/RX600_RX63N-RSK_Renesas/RTOSDemo/Renesas-Files/board/rskrx63n/vecttbl.c
e528b1fd5598f73529e1e079f6741bec4d61eda3
[freertos] / FreeRTOS / Demo / RX600_RX63N-RSK_Renesas / RTOSDemo / Renesas-Files / board / rskrx63n / vecttbl.c
1 /***********************************************************************************************************************\r
2 * DISCLAIMER\r
3 * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No \r
4 * other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all \r
5 * applicable laws, including copyright laws. \r
6 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING\r
7 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, \r
8 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM \r
9 * EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES \r
10 * SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS \r
11 * SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\r
12 * Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of \r
13 * this software. By using this software, you agree to the additional terms and conditions found by accessing the \r
14 * following link:\r
15 * http://www.renesas.com/disclaimer \r
16 *\r
17 * Copyright (C) 2012 Renesas Electronics Corporation. All rights reserved.    \r
18 ***********************************************************************************************************************/\r
19 /***********************************************************************************************************************\r
20 * File Name        : vecttbl.c\r
21 * Device(s)    : RX\r
22 * Description  : Definition of the fixed vector table\r
23 ***********************************************************************************************************************/\r
24 /***********************************************************************************************************************\r
25 * History : DD.MM.YYYY Version  Description\r
26 *         : 26.10.2011 1.00     First Release\r
27 *         : 17.02.2012 1.10     Made function names compliant with CS v4.0\r
28 *         : 13.03.2012 1.20     ID Code is now specified in r_bsp_config.h. It is still used here in Fixed_Vectors[].\r
29 ***********************************************************************************************************************/\r
30 \r
31 /***********************************************************************************************************************\r
32 Includes   <System Includes> , "Project Includes"\r
33 ***********************************************************************************************************************/\r
34 #include <stdint.h>\r
35 #include <machine.h>\r
36 #include "platform.h"\r
37 \r
38 /***********************************************************************************************************************\r
39 * Function name: PowerON_Reset_PC\r
40 * Description  : The reset vector points to this function.  Code execution starts in this function after reset.\r
41 * Arguments    : none\r
42 * Return value : none\r
43 ***********************************************************************************************************************/\r
44 extern void PowerON_Reset_PC(void);                                                                                                                \r
45 \r
46 /***********************************************************************************************************************\r
47 * Function name: excep_supervisor_inst_isr\r
48 * Description  : Supervisor Instruction Violation ISR\r
49 * Arguments    : none\r
50 * Return Value : none\r
51 ***********************************************************************************************************************/\r
52 #pragma interrupt (excep_supervisor_inst_isr)\r
53 void excep_supervisor_inst_isr(void)\r
54 {\r
55     /* Add your own code here to handle this exception */\r
56     nop();\r
57 }\r
58 \r
59 /***********************************************************************************************************************\r
60 * Function name: excep_undefined_inst_isr\r
61 * Description  : Undefined instruction exception ISR\r
62 * Arguments    : none\r
63 * Return Value : none\r
64 ***********************************************************************************************************************/\r
65 #pragma interrupt (excep_undefined_inst_isr)\r
66 void excep_undefined_inst_isr(void)\r
67 {\r
68     /* Add your own code here to handle this exception */\r
69     nop();\r
70 }\r
71 \r
72 /***********************************************************************************************************************\r
73 * Function name: excep_floating_point_isr\r
74 * Description  : Floating point exception ISR\r
75 * Arguments    : none\r
76 * Return Value : none\r
77 ***********************************************************************************************************************/\r
78 #pragma interrupt (excep_floating_point_isr)\r
79 void excep_floating_point_isr(void)\r
80 {\r
81     /* Add your own code here to handle this exception */\r
82     nop();\r
83 }\r
84 \r
85 /***********************************************************************************************************************\r
86 * Function name: non_maskable_isr\r
87 * Description  : Non-maskable interrupt ISR\r
88 * Arguments    : none\r
89 * Return Value : none\r
90 ***********************************************************************************************************************/\r
91 #pragma interrupt (non_maskable_isr)\r
92 void non_maskable_isr(void)\r
93 {\r
94     /* Add your own code here to handle this exception */\r
95     nop();\r
96 }\r
97 \r
98 /***********************************************************************************************************************\r
99 * Function name: undefined_interrupt_source_isr\r
100 * Description  : All undefined interrupt vectors point to this function.\r
101 *                Set a breakpoint in this function to determine which source is creating unwanted interrupts.\r
102 * Arguments    : none\r
103 * Return Value : none\r
104 ***********************************************************************************************************************/\r
105 #pragma interrupt (undefined_interrupt_source_isr)\r
106 void undefined_interrupt_source_isr(void)\r
107 {\r
108     /* Add your own code here to handle this exception */\r
109     nop();\r
110 }\r
111 \r
112 /***********************************************************************************************************************\r
113 * Function name: bus_error_isr\r
114 * Description  : By default, this demo code enables the Bus Error Interrupt. This interrupt will fire if the user tries \r
115 *                to access code or data from one of the reserved areas in the memory map, including the areas covered \r
116 *                by disabled chip selects. A nop() statement is included here as a convenient place to set a breakpoint \r
117 *                during debugging and development, and further handling should be added by the user for their \r
118 *                application.\r
119 * Arguments    : none\r
120 * Return value : none\r
121 ***********************************************************************************************************************/\r
122 #pragma interrupt (bus_error_isr(vect=VECT(BSC,BUSERR)))\r
123 void bus_error_isr (void)\r
124 {\r
125     /* \r
126         To find the address that was accessed when the bus error occured, read the register BSC.BERSR2.WORD.  The upper \r
127         13 bits of this register contain the upper 13-bits of the offending address (in 512K byte units)\r
128     */\r
129     \r
130     /* Add your own code here to handle this interrupt */\r
131     nop();\r
132 }\r
133 \r
134 /***********************************************************************************************************************\r
135 * The following array fills in the fixed vector table and the code\r
136 * protecction ID bytes.\r
137 ***********************************************************************************************************************/\r
138 #pragma section C FIXEDVECT\r
139 \r
140 void* const Fixed_Vectors[] = {\r
141     \r
142 /* 0xffffff90 through 0xffffff9f: Reserved area - must be all 0xFF */\r
143   (void *)0xFFFFFFFF,   /* 0xffffff90 - Reserved */\r
144   (void *)0xFFFFFFFF,   /* 0xffffff94 - Reserved */\r
145   (void *)0xFFFFFFFF,   /* 0xffffff98 - Reserved */\r
146 \r
147 /* The 32-bit area immediately below (0xffffff9c through 0xffffff9f) is a special area that allows the ROM to be \r
148    protected from reading or writing by a parallel programmer. Please refer to the HW manual for appropriate settings.\r
149    The default (all 0xff) places no restrictions and therefore allows reads and writes by a parallel programmer. */\r
150   (void *)0xFFFFFFFF,   /* 0xffffff9C - ROM Code Protection */\r
151 \r
152 /* The memory are immediately below (0xffffffa0 through 0xffffffaf) is a special area that allows the on-chip firmware \r
153    to be protected. See the section "ID Code Protection" in the HW manual for details on how to enable protection.  \r
154    Setting the four long words below to non-0xFF values will enable protection.  Do this only after carefully review \r
155    the HW manual */\r
156    \r
157 /* 0xffffffA0 through 0xffffffaf: ID Code Protection. The ID code is specified using macros in r_bsp_config.h.  */\r
158   (void *) ID_CODE_LONG_1,  /* 0xffffffA0 - Control code and ID code */\r
159   (void *) ID_CODE_LONG_2,  /* 0xffffffA4 - ID code (cont.) */\r
160   (void *) ID_CODE_LONG_3,  /* 0xffffffA8 - ID code (cont.) */\r
161   (void *) ID_CODE_LONG_4,  /* 0xffffffAC - ID code (cont.) */\r
162   \r
163 /* 0xffffffB0 through 0xffffffcf: Reserved area */\r
164   (void *) 0xFFFFFFFF,  /* 0xffffffB0 - Reserved */\r
165   (void *) 0xFFFFFFFF,  /* 0xffffffB4 - Reserved */\r
166   (void *) 0xFFFFFFFF,  /* 0xffffffB8 - Reserved */\r
167   (void *) 0xFFFFFFFF,  /* 0xffffffBC - Reserved */\r
168   (void *) 0xFFFFFFFF,  /* 0xffffffC0 - Reserved */\r
169   (void *) 0xFFFFFFFF,  /* 0xffffffC4 - Reserved */\r
170   (void *) 0xFFFFFFFF,  /* 0xffffffC8 - Reserved */\r
171   (void *) 0xFFFFFFFF,  /* 0xffffffCC - Reserved */\r
172 \r
173 /* Fixed vector table */\r
174   (void *) excep_supervisor_inst_isr,         /* 0xffffffd0  Exception(Supervisor Instruction) */\r
175   (void *) undefined_interrupt_source_isr,    /* 0xffffffd4  Reserved */\r
176   (void *) undefined_interrupt_source_isr,    /* 0xffffffd8  Reserved */\r
177   (void *) excep_undefined_inst_isr,          /* 0xffffffdc  Exception(Undefined Instruction) */\r
178   (void *) undefined_interrupt_source_isr,    /* 0xffffffe0  Reserved */\r
179   (void *) excep_floating_point_isr,          /* 0xffffffe4  Exception(Floating Point) */\r
180   (void *) undefined_interrupt_source_isr,    /* 0xffffffe8  Reserved */\r
181   (void *) undefined_interrupt_source_isr,    /* 0xffffffec  Reserved */\r
182   (void *) undefined_interrupt_source_isr,    /* 0xfffffff0  Reserved */\r
183   (void *) undefined_interrupt_source_isr,    /* 0xfffffff4  Reserved */\r
184   (void *) non_maskable_isr,                  /* 0xfffffff8  NMI */\r
185   (void *) PowerON_Reset_PC                   /* 0xfffffffc  RESET */\r
186 };\r