]> git.sur5r.net Git - freertos/blob - Source/include/portable.h
Add MB91460 port and demo files.
[freertos] / Source / include / portable.h
1 /*\r
2         FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.\r
3 \r
4         This file is part of the FreeRTOS.org distribution.\r
5 \r
6         FreeRTOS.org is free software; you can redistribute it and/or modify\r
7         it under the terms of the GNU General Public License as published by\r
8         the Free Software Foundation; either version 2 of the License, or\r
9         (at your option) any later version.\r
10 \r
11         FreeRTOS.org is distributed in the hope that it will be useful,\r
12         but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14         GNU General Public License for more details.\r
15 \r
16         You should have received a copy of the GNU General Public License\r
17         along with FreeRTOS.org; if not, write to the Free Software\r
18         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
19 \r
20         A special exception to the GPL can be applied should you wish to distribute\r
21         a combined work that includes FreeRTOS.org, without being obliged to provide\r
22         the source code for any proprietary components.  See the licensing section\r
23         of http:www.FreeRTOS.org for full details of how and when the exception\r
24         can be applied.\r
25 \r
26         ***************************************************************************\r
27 \r
28         Please ensure to read the configuration and relevant port sections of the \r
29         online documentation.\r
30 \r
31         +++ http://www.FreeRTOS.org +++\r
32         Documentation, latest information, license and contact details.  \r
33 \r
34         +++ http://www.SafeRTOS.com +++\r
35         A version that is certified for use in safety critical systems.\r
36 \r
37         +++ http://www.OpenRTOS.com +++\r
38         Commercial support, development, porting, licensing and training services.\r
39 \r
40         ***************************************************************************\r
41 */\r
42 \r
43 /*-----------------------------------------------------------\r
44  * Portable layer API.  Each function must be defined for each port.\r
45  *----------------------------------------------------------*/\r
46 \r
47 #ifndef PORTABLE_H\r
48 #define PORTABLE_H\r
49 \r
50 /* Include the macro file relevant to the port being used. */\r
51 \r
52 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT\r
53         #include "..\..\source\portable\owatcom\16bitdos\pc\portmacro.h"\r
54         typedef void ( __interrupt __far *pxISR )();\r
55 #endif\r
56 \r
57 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT\r
58         #include "..\..\source\portable\owatcom\16bitdos\flsh186\portmacro.h"\r
59         typedef void ( __interrupt __far *pxISR )();\r
60 #endif\r
61 \r
62 #ifdef GCC_MEGA_AVR\r
63         #include "../portable/GCC/ATMega323/portmacro.h"\r
64 #endif\r
65 \r
66 #ifdef IAR_MEGA_AVR\r
67         #include "../portable/IAR/ATMega323/portmacro.h"\r
68 #endif\r
69 \r
70 #ifdef MPLAB_PIC24_PORT\r
71         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
72 #endif\r
73 \r
74 #ifdef MPLAB_DSPIC_PORT\r
75         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
76 #endif\r
77 \r
78 #ifdef MPLAB_PIC18F_PORT\r
79         #include "..\..\source\portable\MPLAB\PIC18F\portmacro.h"\r
80 #endif\r
81 \r
82 #ifdef MPLAB_PIC32MX_PORT\r
83         #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"\r
84 #endif\r
85 \r
86 #ifdef _FEDPICC\r
87         #include "libFreeRTOS/Include/portmacro.h"\r
88 #endif\r
89 \r
90 #ifdef SDCC_CYGNAL\r
91         #include "../../Source/portable/SDCC/Cygnal/portmacro.h"\r
92 #endif\r
93 \r
94 #ifdef GCC_ARM7\r
95         #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"\r
96 #endif\r
97 \r
98 #ifdef GCC_ARM7_ECLIPSE\r
99         #include "portmacro.h"\r
100 #endif\r
101 \r
102 #ifdef ROWLEY_LPC23xx\r
103         #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"\r
104 #endif\r
105 \r
106 #ifdef GCC_MSP430\r
107         #include "../../Source/portable/GCC/MSP430F449/portmacro.h"\r
108 #endif\r
109 \r
110 #ifdef ROWLEY_MSP430\r
111         #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"\r
112 #endif\r
113 \r
114 #ifdef KEIL_ARM7\r
115         #include "..\..\Source\portable\Keil\ARM7\portmacro.h"\r
116 #endif\r
117 \r
118 #ifdef SAM7_GCC\r
119         #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"\r
120 #endif\r
121 \r
122 #ifdef SAM7_IAR\r
123         #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"\r
124 #endif\r
125 \r
126 #ifdef LPC2000_IAR\r
127         #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"\r
128 #endif\r
129 \r
130 #ifdef STR71X_IAR\r
131         #include "..\..\Source\portable\IAR\STR71x\portmacro.h"\r
132 #endif\r
133 \r
134 #ifdef STR75X_IAR\r
135         #include "..\..\Source\portable\IAR\STR75x\portmacro.h"\r
136 #endif\r
137         \r
138 #ifdef STR75X_GCC\r
139         #include "..\..\Source\portable\GCC\STR75x\portmacro.h"\r
140 #endif\r
141 \r
142 #ifdef STR91X_IAR\r
143         #include "..\..\Source\portable\IAR\STR91x\portmacro.h"\r
144 #endif\r
145         \r
146 #ifdef GCC_H8S\r
147         #include "../../Source/portable/GCC/H8S2329/portmacro.h"\r
148 #endif\r
149 \r
150 #ifdef GCC_AT91FR40008\r
151         #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"\r
152 #endif\r
153 \r
154 #ifdef RVDS_ARMCM3_LM3S102\r
155         #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"\r
156 #endif\r
157 \r
158 #ifdef GCC_ARMCM3_LM3S102\r
159         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
160 #endif\r
161 \r
162 #ifdef GCC_ARMCM3\r
163         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
164 #endif\r
165 \r
166 #ifdef IAR_ARM_CM3\r
167         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
168 #endif\r
169 \r
170 #ifdef IAR_ARMCM3_LM\r
171         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
172 #endif\r
173         \r
174 #ifdef HCS12_CODE_WARRIOR\r
175         #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"\r
176 #endif  \r
177 \r
178 #ifdef MICROBLAZE_GCC\r
179         #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"\r
180 #endif\r
181 \r
182 #ifdef TERN_EE\r
183         #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"\r
184 #endif\r
185 \r
186 #ifdef GCC_HCS12\r
187         #include "../../Source/portable/GCC/HCS12/portmacro.h"\r
188 #endif\r
189 \r
190 #ifdef GCC_MCF5235\r
191     #include "../../Source/portable/GCC/MCF5235/portmacro.h"\r
192 #endif\r
193 \r
194 #ifdef BCC_INDUSTRIAL_PC_PORT\r
195         /* A short file name has to be used in place of the normal\r
196         FreeRTOSConfig.h when using the Borland compiler. */\r
197         #include "frconfig.h"\r
198         #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"\r
199     typedef void ( __interrupt __far *pxISR )();\r
200 #endif\r
201 \r
202 #ifdef BCC_FLASH_LITE_186_PORT\r
203         /* A short file name has to be used in place of the normal\r
204         FreeRTOSConfig.h when using the Borland compiler. */\r
205         #include "frconfig.h"\r
206         #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"\r
207     typedef void ( __interrupt __far *pxISR )();\r
208 #endif\r
209 \r
210 #ifdef __GNUC__\r
211    #ifdef __AVR32_AVR32A__\r
212            #include "portmacro.h"\r
213    #endif\r
214 #endif\r
215 \r
216 #ifdef __ICCAVR32__\r
217    #ifdef __CORE__\r
218       #if __CORE__ == __AVR32A__\r
219               #include "portmacro.h"\r
220       #endif\r
221    #endif\r
222 #endif\r
223 \r
224 #ifdef __91467D\r
225         #include "portmacro.h"\r
226         #include "mb91467d.h"\r
227         #include <stddef.h>\r
228 #endif\r
229 \r
230 #ifdef __cplusplus\r
231 extern "C" {\r
232 #endif\r
233 /*\r
234  * Setup the stack of a new task so it is ready to be placed under the\r
235  * scheduler control.  The registers have to be placed on the stack in\r
236  * the order that the port expects to find them.\r
237  */\r
238 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );\r
239 \r
240 /*\r
241  * Map to the memory management routines required for the port.\r
242  */\r
243 void *pvPortMalloc( size_t xSize );\r
244 void vPortFree( void *pv );\r
245 void vPortInitialiseBlocks( void );\r
246 \r
247 /*\r
248  * Setup the hardware ready for the scheduler to take control.  This generally\r
249  * sets up a tick interrupt and sets timers for the correct tick frequency.\r
250  */\r
251 portBASE_TYPE xPortStartScheduler( void );\r
252 \r
253 /*\r
254  * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so\r
255  * the hardware is left in its original condition after the scheduler stops\r
256  * executing.\r
257  */\r
258 void vPortEndScheduler( void );\r
259 \r
260 #ifdef __cplusplus\r
261 }\r
262 #endif\r
263 \r
264 #endif /* PORTABLE_H */\r
265 \r