]> git.sur5r.net Git - freertos/blob - Source/include/portable.h
Update to V5.0.0.
[freertos] / Source / include / portable.h
1 /*\r
2         FreeRTOS.org V5.0.0 - 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     *                                                                         *\r
29     * SAVE TIME AND MONEY!  We can port FreeRTOS.org to your own hardware,    *\r
30     * and even write all or part of your application on your behalf.          *\r
31     * See http://www.OpenRTOS.com for details of the services we provide to   *\r
32     * expedite your project.                                                  *\r
33     *                                                                         *\r
34     ***************************************************************************\r
35     ***************************************************************************\r
36 \r
37         Please ensure to read the configuration and relevant port sections of the\r
38         online documentation.\r
39 \r
40         http://www.FreeRTOS.org - Documentation, latest information, license and \r
41         contact details.\r
42 \r
43         http://www.SafeRTOS.com - A version that is certified for use in safety \r
44         critical systems.\r
45 \r
46         http://www.OpenRTOS.com - Commercial support, development, porting, \r
47         licensing and training services.\r
48 */\r
49 \r
50 /*-----------------------------------------------------------\r
51  * Portable layer API.  Each function must be defined for each port.\r
52  *----------------------------------------------------------*/\r
53 \r
54 #ifndef PORTABLE_H\r
55 #define PORTABLE_H\r
56 \r
57 /* Include the macro file relevant to the port being used. */\r
58 \r
59 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT\r
60         #include "..\..\source\portable\owatcom\16bitdos\pc\portmacro.h"\r
61         typedef void ( __interrupt __far *pxISR )();\r
62 #endif\r
63 \r
64 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT\r
65         #include "..\..\source\portable\owatcom\16bitdos\flsh186\portmacro.h"\r
66         typedef void ( __interrupt __far *pxISR )();\r
67 #endif\r
68 \r
69 #ifdef GCC_MEGA_AVR\r
70         #include "../portable/GCC/ATMega323/portmacro.h"\r
71 #endif\r
72 \r
73 #ifdef IAR_MEGA_AVR\r
74         #include "../portable/IAR/ATMega323/portmacro.h"\r
75 #endif\r
76 \r
77 #ifdef MPLAB_PIC24_PORT\r
78         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
79 #endif\r
80 \r
81 #ifdef MPLAB_DSPIC_PORT\r
82         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
83 #endif\r
84 \r
85 #ifdef MPLAB_PIC18F_PORT\r
86         #include "..\..\source\portable\MPLAB\PIC18F\portmacro.h"\r
87 #endif\r
88 \r
89 #ifdef MPLAB_PIC32MX_PORT\r
90         #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"\r
91 #endif\r
92 \r
93 #ifdef _FEDPICC\r
94         #include "libFreeRTOS/Include/portmacro.h"\r
95 #endif\r
96 \r
97 #ifdef SDCC_CYGNAL\r
98         #include "../../Source/portable/SDCC/Cygnal/portmacro.h"\r
99 #endif\r
100 \r
101 #ifdef GCC_ARM7\r
102         #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"\r
103 #endif\r
104 \r
105 #ifdef GCC_ARM7_ECLIPSE\r
106         #include "portmacro.h"\r
107 #endif\r
108 \r
109 #ifdef ROWLEY_LPC23xx\r
110         #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"\r
111 #endif\r
112 \r
113 #ifdef GCC_MSP430\r
114         #include "../../Source/portable/GCC/MSP430F449/portmacro.h"\r
115 #endif\r
116 \r
117 #ifdef ROWLEY_MSP430\r
118         #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"\r
119 #endif\r
120 \r
121 #ifdef KEIL_ARM7\r
122         #include "..\..\Source\portable\Keil\ARM7\portmacro.h"\r
123 #endif\r
124 \r
125 #ifdef SAM7_GCC\r
126         #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"\r
127 #endif\r
128 \r
129 #ifdef SAM7_IAR\r
130         #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"\r
131 #endif\r
132 \r
133 #ifdef LPC2000_IAR\r
134         #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"\r
135 #endif\r
136 \r
137 #ifdef STR71X_IAR\r
138         #include "..\..\Source\portable\IAR\STR71x\portmacro.h"\r
139 #endif\r
140 \r
141 #ifdef STR75X_IAR\r
142         #include "..\..\Source\portable\IAR\STR75x\portmacro.h"\r
143 #endif\r
144         \r
145 #ifdef STR75X_GCC\r
146         #include "..\..\Source\portable\GCC\STR75x\portmacro.h"\r
147 #endif\r
148 \r
149 #ifdef STR91X_IAR\r
150         #include "..\..\Source\portable\IAR\STR91x\portmacro.h"\r
151 #endif\r
152         \r
153 #ifdef GCC_H8S\r
154         #include "../../Source/portable/GCC/H8S2329/portmacro.h"\r
155 #endif\r
156 \r
157 #ifdef GCC_AT91FR40008\r
158         #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"\r
159 #endif\r
160 \r
161 #ifdef RVDS_ARMCM3_LM3S102\r
162         #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"\r
163 #endif\r
164 \r
165 #ifdef GCC_ARMCM3_LM3S102\r
166         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
167 #endif\r
168 \r
169 #ifdef GCC_ARMCM3\r
170         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
171 #endif\r
172 \r
173 #ifdef IAR_ARM_CM3\r
174         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
175 #endif\r
176 \r
177 #ifdef IAR_ARMCM3_LM\r
178         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
179 #endif\r
180         \r
181 #ifdef HCS12_CODE_WARRIOR\r
182         #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"\r
183 #endif  \r
184 \r
185 #ifdef MICROBLAZE_GCC\r
186         #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"\r
187 #endif\r
188 \r
189 #ifdef TERN_EE\r
190         #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"\r
191 #endif\r
192 \r
193 #ifdef GCC_HCS12\r
194         #include "../../Source/portable/GCC/HCS12/portmacro.h"\r
195 #endif\r
196 \r
197 #ifdef GCC_MCF5235\r
198     #include "../../Source/portable/GCC/MCF5235/portmacro.h"\r
199 #endif\r
200 \r
201 #ifdef GCC_PPC405\r
202         #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"\r
203 #endif\r
204 \r
205 \r
206 #ifdef BCC_INDUSTRIAL_PC_PORT\r
207         /* A short file name has to be used in place of the normal\r
208         FreeRTOSConfig.h when using the Borland compiler. */\r
209         #include "frconfig.h"\r
210         #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"\r
211     typedef void ( __interrupt __far *pxISR )();\r
212 #endif\r
213 \r
214 #ifdef BCC_FLASH_LITE_186_PORT\r
215         /* A short file name has to be used in place of the normal\r
216         FreeRTOSConfig.h when using the Borland compiler. */\r
217         #include "frconfig.h"\r
218         #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"\r
219     typedef void ( __interrupt __far *pxISR )();\r
220 #endif\r
221 \r
222 #ifdef __GNUC__\r
223    #ifdef __AVR32_AVR32A__\r
224            #include "portmacro.h"\r
225    #endif\r
226 #endif\r
227 \r
228 #ifdef __ICCAVR32__\r
229    #ifdef __CORE__\r
230       #if __CORE__ == __AVR32A__\r
231               #include "portmacro.h"\r
232       #endif\r
233    #endif\r
234 #endif\r
235 \r
236 #ifdef __91467D\r
237         #include "portmacro.h"\r
238 #endif\r
239 \r
240 #ifdef __96340\r
241         #include "portmacro.h"\r
242 #endif\r
243 \r
244 #ifdef __cplusplus\r
245 extern "C" {\r
246 #endif\r
247 /*\r
248  * Setup the stack of a new task so it is ready to be placed under the\r
249  * scheduler control.  The registers have to be placed on the stack in\r
250  * the order that the port expects to find them.\r
251  */\r
252 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );\r
253 \r
254 /*\r
255  * Map to the memory management routines required for the port.\r
256  */\r
257 void *pvPortMalloc( size_t xSize );\r
258 void vPortFree( void *pv );\r
259 void vPortInitialiseBlocks( void );\r
260 \r
261 /*\r
262  * Setup the hardware ready for the scheduler to take control.  This generally\r
263  * sets up a tick interrupt and sets timers for the correct tick frequency.\r
264  */\r
265 portBASE_TYPE xPortStartScheduler( void );\r
266 \r
267 /*\r
268  * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so\r
269  * the hardware is left in its original condition after the scheduler stops\r
270  * executing.\r
271  */\r
272 void vPortEndScheduler( void );\r
273 \r
274 #ifdef __cplusplus\r
275 }\r
276 #endif\r
277 \r
278 #endif /* PORTABLE_H */\r
279 \r