1 |
/* |
---|
2 |
FreeRTOS V5.4.1 - Copyright (C) 2009 Real Time Engineers Ltd. |
---|
3 |
|
---|
4 |
This file is part of the FreeRTOS distribution. |
---|
5 |
|
---|
6 |
FreeRTOS is free software; you can redistribute it and/or modify it under |
---|
7 |
the terms of the GNU General Public License (version 2) as published by the |
---|
8 |
Free Software Foundation and modified by the FreeRTOS exception. |
---|
9 |
**NOTE** The exception to the GPL is included to allow you to distribute a |
---|
10 |
combined work that includes FreeRTOS without being obliged to provide the |
---|
11 |
source code for proprietary components outside of the FreeRTOS kernel. |
---|
12 |
Alternative commercial license and support terms are also available upon |
---|
13 |
request. See the licensing section of http://www.FreeRTOS.org for full |
---|
14 |
license details. |
---|
15 |
|
---|
16 |
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT |
---|
17 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
18 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
19 |
more details. |
---|
20 |
|
---|
21 |
You should have received a copy of the GNU General Public License along |
---|
22 |
with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59 |
---|
23 |
Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
---|
24 |
|
---|
25 |
|
---|
26 |
*************************************************************************** |
---|
27 |
* * |
---|
28 |
* Looking for a quick start? Then check out the FreeRTOS eBook! * |
---|
29 |
* See http://www.FreeRTOS.org/Documentation for details * |
---|
30 |
* * |
---|
31 |
*************************************************************************** |
---|
32 |
|
---|
33 |
1 tab == 4 spaces! |
---|
34 |
|
---|
35 |
Please ensure to read the configuration and relevant port sections of the |
---|
36 |
online documentation. |
---|
37 |
|
---|
38 |
http://www.FreeRTOS.org - Documentation, latest information, license and |
---|
39 |
contact details. |
---|
40 |
|
---|
41 |
http://www.SafeRTOS.com - A version that is certified for use in safety |
---|
42 |
critical systems. |
---|
43 |
|
---|
44 |
http://www.OpenRTOS.com - Commercial support, development, porting, |
---|
45 |
licensing and training services. |
---|
46 |
*/ |
---|
47 |
|
---|
48 |
/*----------------------------------------------------------- |
---|
49 |
* Portable layer API. Each function must be defined for each port. |
---|
50 |
*----------------------------------------------------------*/ |
---|
51 |
|
---|
52 |
#ifndef PORTABLE_H |
---|
53 |
#define PORTABLE_H |
---|
54 |
|
---|
55 |
/* Include the macro file relevant to the port being used. */ |
---|
56 |
|
---|
57 |
#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT |
---|
58 |
#include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h" |
---|
59 |
typedef void ( __interrupt __far *pxISR )(); |
---|
60 |
#endif |
---|
61 |
|
---|
62 |
#ifdef OPEN_WATCOM_FLASH_LITE_186_PORT |
---|
63 |
#include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h" |
---|
64 |
typedef void ( __interrupt __far *pxISR )(); |
---|
65 |
#endif |
---|
66 |
|
---|
67 |
#ifdef GCC_MEGA_AVR |
---|
68 |
#include "../portable/GCC/ATMega323/portmacro.h" |
---|
69 |
#endif |
---|
70 |
|
---|
71 |
#ifdef IAR_MEGA_AVR |
---|
72 |
#include "../portable/IAR/ATMega323/portmacro.h" |
---|
73 |
#endif |
---|
74 |
|
---|
75 |
#ifdef MPLAB_PIC24_PORT |
---|
76 |
#include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h" |
---|
77 |
#endif |
---|
78 |
|
---|
79 |
#ifdef MPLAB_DSPIC_PORT |
---|
80 |
#include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h" |
---|
81 |
#endif |
---|
82 |
|
---|
83 |
#ifdef MPLAB_PIC18F_PORT |
---|
84 |
#include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h" |
---|
85 |
#endif |
---|
86 |
|
---|
87 |
#ifdef MPLAB_PIC32MX_PORT |
---|
88 |
#include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h" |
---|
89 |
#endif |
---|
90 |
|
---|
91 |
#ifdef _FEDPICC |
---|
92 |
#include "libFreeRTOS/Include/portmacro.h" |
---|
93 |
#endif |
---|
94 |
|
---|
95 |
#ifdef SDCC_CYGNAL |
---|
96 |
#include "../../Source/portable/SDCC/Cygnal/portmacro.h" |
---|
97 |
#endif |
---|
98 |
|
---|
99 |
//#ifdef GCC_ARM7 |
---|
100 |
//#include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h" |
---|
101 |
//#endif |
---|
102 |
|
---|
103 |
//#ifdef GCC_ARM7_ECLIPSE |
---|
104 |
// #include "portmacro.h" |
---|
105 |
//#endif |
---|
106 |
|
---|
107 |
//#ifdef ROWLEY_LPC23xx |
---|
108 |
#include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h" |
---|
109 |
// #warning "ROWLEY_LPC23xx" |
---|
110 |
|
---|
111 |
//#endif |
---|
112 |
|
---|
113 |
#ifdef IAR_MSP430 |
---|
114 |
#include "..\..\Source\portable\IAR\MSP430\portmacro.h" |
---|
115 |
#endif |
---|
116 |
|
---|
117 |
#ifdef GCC_MSP430 |
---|
118 |
#include "../../Source/portable/GCC/MSP430F449/portmacro.h" |
---|
119 |
#endif |
---|
120 |
|
---|
121 |
#ifdef ROWLEY_MSP430 |
---|
122 |
#include "../../Source/portable/Rowley/MSP430F449/portmacro.h" |
---|
123 |
#endif |
---|
124 |
|
---|
125 |
#ifdef ARM7_LPC21xx_KEIL_RVDS |
---|
126 |
#include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h" |
---|
127 |
#endif |
---|
128 |
|
---|
129 |
#ifdef SAM7_GCC |
---|
130 |
#include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h" |
---|
131 |
#endif |
---|
132 |
|
---|
133 |
#ifdef SAM7_IAR |
---|
134 |
#include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h" |
---|
135 |
#endif |
---|
136 |
|
---|
137 |
#ifdef SAM9XE_IAR |
---|
138 |
#include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h" |
---|
139 |
#endif |
---|
140 |
|
---|
141 |
#ifdef LPC2000_IAR |
---|
142 |
#include "..\..\Source\portable\IAR\LPC2000\portmacro.h" |
---|
143 |
#endif |
---|
144 |
|
---|
145 |
#ifdef STR71X_IAR |
---|
146 |
#include "..\..\Source\portable\IAR\STR71x\portmacro.h" |
---|
147 |
#endif |
---|
148 |
|
---|
149 |
#ifdef STR75X_IAR |
---|
150 |
#include "..\..\Source\portable\IAR\STR75x\portmacro.h" |
---|
151 |
#endif |
---|
152 |
|
---|
153 |
#ifdef STR75X_GCC |
---|
154 |
#include "..\..\Source\portable\GCC\STR75x\portmacro.h" |
---|
155 |
#endif |
---|
156 |
|
---|
157 |
#ifdef STR91X_IAR |
---|
158 |
#include "..\..\Source\portable\IAR\STR91x\portmacro.h" |
---|
159 |
#endif |
---|
160 |
|
---|
161 |
#ifdef GCC_H8S |
---|
162 |
#include "../../Source/portable/GCC/H8S2329/portmacro.h" |
---|
163 |
#endif |
---|
164 |
|
---|
165 |
#ifdef GCC_AT91FR40008 |
---|
166 |
#include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h" |
---|
167 |
#endif |
---|
168 |
|
---|
169 |
#ifdef RVDS_ARMCM3_LM3S102 |
---|
170 |
#include "../../Source/portable/RVDS/ARM_CM3/portmacro.h" |
---|
171 |
#endif |
---|
172 |
|
---|
173 |
#ifdef GCC_ARMCM3_LM3S102 |
---|
174 |
#include "../../Source/portable/GCC/ARM_CM3/portmacro.h" |
---|
175 |
#endif |
---|
176 |
|
---|
177 |
#ifdef GCC_ARMCM3 |
---|
178 |
#include "../../Source/portable/GCC/ARM_CM3/portmacro.h" |
---|
179 |
#endif |
---|
180 |
|
---|
181 |
#ifdef IAR_ARM_CM3 |
---|
182 |
#include "../../Source/portable/IAR/ARM_CM3/portmacro.h" |
---|
183 |
#endif |
---|
184 |
|
---|
185 |
#ifdef IAR_ARMCM3_LM |
---|
186 |
#include "../../Source/portable/IAR/ARM_CM3/portmacro.h" |
---|
187 |
#endif |
---|
188 |
|
---|
189 |
#ifdef HCS12_CODE_WARRIOR |
---|
190 |
#include "../../Source/portable/CodeWarrior/HCS12/portmacro.h" |
---|
191 |
#endif |
---|
192 |
|
---|
193 |
#ifdef MICROBLAZE_GCC |
---|
194 |
#include "../../Source/portable/GCC/MicroBlaze/portmacro.h" |
---|
195 |
#endif |
---|
196 |
|
---|
197 |
#ifdef TERN_EE |
---|
198 |
#include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h" |
---|
199 |
#endif |
---|
200 |
|
---|
201 |
#ifdef GCC_HCS12 |
---|
202 |
#include "../../Source/portable/GCC/HCS12/portmacro.h" |
---|
203 |
#endif |
---|
204 |
|
---|
205 |
#ifdef GCC_MCF5235 |
---|
206 |
#include "../../Source/portable/GCC/MCF5235/portmacro.h" |
---|
207 |
#endif |
---|
208 |
|
---|
209 |
#ifdef COLDFIRE_V2_GCC |
---|
210 |
#include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h" |
---|
211 |
#endif |
---|
212 |
|
---|
213 |
#ifdef COLDFIRE_V2_CODEWARRIOR |
---|
214 |
#include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h" |
---|
215 |
#endif |
---|
216 |
|
---|
217 |
#ifdef GCC_PPC405 |
---|
218 |
#include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h" |
---|
219 |
#endif |
---|
220 |
|
---|
221 |
#ifdef GCC_PPC440 |
---|
222 |
#include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h" |
---|
223 |
#endif |
---|
224 |
|
---|
225 |
#ifdef _16FX_SOFTUNE |
---|
226 |
#include "..\..\Source\portable\Softune\MB96340\portmacro.h" |
---|
227 |
#endif |
---|
228 |
|
---|
229 |
#ifdef BCC_INDUSTRIAL_PC_PORT |
---|
230 |
/* A short file name has to be used in place of the normal |
---|
231 |
FreeRTOSConfig.h when using the Borland compiler. */ |
---|
232 |
#include "frconfig.h" |
---|
233 |
#include "..\portable\BCC\16BitDOS\PC\prtmacro.h" |
---|
234 |
typedef void ( __interrupt __far *pxISR )(); |
---|
235 |
#endif |
---|
236 |
|
---|
237 |
#ifdef BCC_FLASH_LITE_186_PORT |
---|
238 |
/* A short file name has to be used in place of the normal |
---|
239 |
FreeRTOSConfig.h when using the Borland compiler. */ |
---|
240 |
#include "frconfig.h" |
---|
241 |
#include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h" |
---|
242 |
typedef void ( __interrupt __far *pxISR )(); |
---|
243 |
#endif |
---|
244 |
|
---|
245 |
#ifdef __GNUC__ |
---|
246 |
#ifdef __AVR32_AVR32A__ |
---|
247 |
#include "portmacro.h" |
---|
248 |
#endif |
---|
249 |
#endif |
---|
250 |
|
---|
251 |
#ifdef __ICCAVR32__ |
---|
252 |
#ifdef __CORE__ |
---|
253 |
#if __CORE__ == __AVR32A__ |
---|
254 |
#include "portmacro.h" |
---|
255 |
#endif |
---|
256 |
#endif |
---|
257 |
#endif |
---|
258 |
|
---|
259 |
#ifdef __91467D |
---|
260 |
#include "portmacro.h" |
---|
261 |
#endif |
---|
262 |
|
---|
263 |
#ifdef __96340 |
---|
264 |
#include "portmacro.h" |
---|
265 |
#endif |
---|
266 |
|
---|
267 |
|
---|
268 |
#ifdef __IAR_V850ES_Fx3__ |
---|
269 |
#include "../../Source/portable/IAR/V850ES/portmacro.h" |
---|
270 |
#endif |
---|
271 |
|
---|
272 |
#ifdef __IAR_V850ES_Jx3__ |
---|
273 |
#include "../../Source/portable/IAR/V850ES/portmacro.h" |
---|
274 |
#endif |
---|
275 |
|
---|
276 |
#ifdef __IAR_V850ES_Jx3_L__ |
---|
277 |
#include "../../Source/portable/IAR/V850ES/portmacro.h" |
---|
278 |
#endif |
---|
279 |
|
---|
280 |
#ifdef __IAR_V850ES_Jx2__ |
---|
281 |
#include "../../Source/portable/IAR/V850ES/portmacro.h" |
---|
282 |
#endif |
---|
283 |
|
---|
284 |
#ifdef __IAR_V850ES_Hx2__ |
---|
285 |
#include "../../Source/portable/IAR/V850ES/portmacro.h" |
---|
286 |
#endif |
---|
287 |
|
---|
288 |
#ifdef __IAR_78K0R_Kx3__ |
---|
289 |
#include "../../Source/portable/IAR/78K0R/portmacro.h" |
---|
290 |
#endif |
---|
291 |
|
---|
292 |
#ifdef __IAR_78K0R_Kx3L__ |
---|
293 |
#include "../../Source/portable/IAR/78K0R/portmacro.h" |
---|
294 |
#endif |
---|
295 |
|
---|
296 |
/* Catch all to ensure portmacro.h is included in the build. Newer demos |
---|
297 |
have the path as part of the project options, rather than as relative from |
---|
298 |
the project location. If portENTER_CRITICAL() has not been defined then |
---|
299 |
portmacro.h has not yet been included - as every portmacro.h provides a |
---|
300 |
portENTER_CRITICAL() definition. Check the demo application for your demo |
---|
301 |
to find the path to the correct portmacro.h file. */ |
---|
302 |
#ifndef portENTER_CRITICAL |
---|
303 |
#include "portmacro.h" |
---|
304 |
#endif |
---|
305 |
|
---|
306 |
#ifdef __cplusplus |
---|
307 |
extern "C" { |
---|
308 |
#endif |
---|
309 |
|
---|
310 |
/* |
---|
311 |
* Setup the stack of a new task so it is ready to be placed under the |
---|
312 |
* scheduler control. The registers have to be placed on the stack in |
---|
313 |
* the order that the port expects to find them. |
---|
314 |
* |
---|
315 |
*/ |
---|
316 |
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ); |
---|
317 |
|
---|
318 |
/* |
---|
319 |
* Map to the memory management routines required for the port. |
---|
320 |
*/ |
---|
321 |
void *pvPortMalloc( size_t xSize ); |
---|
322 |
void vPortFree( void *pv ); |
---|
323 |
void vPortInitialiseBlocks( void ); |
---|
324 |
|
---|
325 |
/* |
---|
326 |
* Setup the hardware ready for the scheduler to take control. This generally |
---|
327 |
* sets up a tick interrupt and sets timers for the correct tick frequency. |
---|
328 |
*/ |
---|
329 |
portBASE_TYPE xPortStartScheduler( void ); |
---|
330 |
|
---|
331 |
/* |
---|
332 |
* Undo any hardware/ISR setup that was performed by xPortStartScheduler() so |
---|
333 |
* the hardware is left in its original condition after the scheduler stops |
---|
334 |
* executing. |
---|
335 |
*/ |
---|
336 |
void vPortEndScheduler( void ); |
---|
337 |
|
---|
338 |
#ifdef __cplusplus |
---|
339 |
} |
---|
340 |
#endif |
---|
341 |
|
---|
342 |
#endif /* PORTABLE_H */ |
---|
343 |
|
---|