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