]> git.sur5r.net Git - freertos/blob - Source/include/portable.h
Add in first STM32 demo.
[freertos] / Source / include / portable.h
1 /*\r
2         FreeRTOS.org V4.3.1 - Copyright (C) 2003-2007 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         See http:www.FreeRTOS.org for documentation, latest information, license\r
28         and contact details.  Please ensure to read the configuration and relevant\r
29         port sections of the online documentation.\r
30 \r
31         Also see http://www.SafeRTOS.com for an IEC 61508 compliant version along\r
32         with commercial development and support options.\r
33         ***************************************************************************\r
34 */\r
35 \r
36 /*-----------------------------------------------------------\r
37  * Portable layer API.  Each function must be defined for each port.\r
38  *----------------------------------------------------------*/\r
39 \r
40 #ifndef PORTABLE_H\r
41 #define PORTABLE_H\r
42 \r
43 /* Include the macro file relevant to the port being used. */\r
44 \r
45 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT\r
46         #include "..\..\source\portable\owatcom\16bitdos\pc\portmacro.h"\r
47         typedef void ( __interrupt __far *pxISR )();\r
48 #endif\r
49 \r
50 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT\r
51         #include "..\..\source\portable\owatcom\16bitdos\flsh186\portmacro.h"\r
52         typedef void ( __interrupt __far *pxISR )();\r
53 #endif\r
54 \r
55 #ifdef GCC_MEGA_AVR\r
56         #include "../portable/GCC/ATMega323/portmacro.h"\r
57 #endif\r
58 \r
59 #ifdef IAR_MEGA_AVR\r
60         #include "../portable/IAR/ATMega323/portmacro.h"\r
61 #endif\r
62 \r
63 #ifdef MPLAB_PIC24_PORT\r
64         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
65 #endif\r
66 \r
67 #ifdef MPLAB_DSPIC_PORT\r
68         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
69 #endif\r
70 \r
71 #ifdef MPLAB_PIC18F_PORT\r
72         #include "..\..\source\portable\MPLAB\PIC18F\portmacro.h"\r
73 #endif\r
74 \r
75 #ifdef _FEDPICC\r
76         #include "libFreeRTOS/Include/portmacro.h"\r
77 #endif\r
78 \r
79 #ifdef SDCC_CYGNAL\r
80         #include "../../Source/portable/SDCC/Cygnal/portmacro.h"\r
81 #endif\r
82 \r
83 #ifdef GCC_ARM7\r
84         #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"\r
85 #endif\r
86 \r
87 #ifdef ROWLEY_LPC23xx\r
88         #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"\r
89 #endif\r
90 \r
91 #ifdef GCC_MSP430\r
92         #include "../../Source/portable/GCC/MSP430F449/portmacro.h"\r
93 #endif\r
94 \r
95 #ifdef ROWLEY_MSP430\r
96         #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"\r
97 #endif\r
98 \r
99 #ifdef KEIL_ARM7\r
100         #include "..\..\Source\portable\Keil\ARM7\portmacro.h"\r
101 #endif\r
102 \r
103 #ifdef SAM7_GCC\r
104         #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"\r
105 #endif\r
106 \r
107 #ifdef SAM7_IAR\r
108         #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"\r
109 #endif\r
110 \r
111 #ifdef LPC2000_IAR\r
112         #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"\r
113 #endif\r
114 \r
115 #ifdef STR71X_IAR\r
116         #include "..\..\Source\portable\IAR\STR71x\portmacro.h"\r
117 #endif\r
118 \r
119 #ifdef STR75X_IAR\r
120         #include "..\..\Source\portable\IAR\STR75x\portmacro.h"\r
121 #endif\r
122         \r
123 #ifdef STR75X_GCC\r
124         #include "..\..\Source\portable\GCC\STR75x\portmacro.h"\r
125 #endif\r
126 \r
127 #ifdef STR91X_IAR\r
128         #include "..\..\Source\portable\IAR\STR91x\portmacro.h"\r
129 #endif\r
130         \r
131 #ifdef GCC_H8S\r
132         #include "../../Source/portable/GCC/H8S2329/portmacro.h"\r
133 #endif\r
134 \r
135 #ifdef GCC_AT91FR40008\r
136         #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"\r
137 #endif\r
138 \r
139 #ifdef RVDS_ARMCM3_LM3S102\r
140         #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"\r
141 #endif\r
142 \r
143 #ifdef GCC_ARMCM3_LM3S102\r
144         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
145 #endif\r
146 \r
147 #ifdef IAR_ARM_CM3\r
148         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
149 #endif\r
150 \r
151 #ifdef IAR_ARMCM3_LM\r
152         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
153 #endif\r
154         \r
155 #ifdef HCS12_CODE_WARRIOR\r
156         #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"\r
157 #endif  \r
158 \r
159 #ifdef MICROBLAZE_GCC\r
160         #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"\r
161 #endif\r
162 \r
163 #ifdef TERN_EE\r
164         #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"\r
165 #endif\r
166 \r
167 #ifdef GCC_HCS12\r
168         #include "../../Source/portable/GCC/HCS12/portmacro.h"\r
169 #endif\r
170 \r
171 #ifdef GCC_MCF5235\r
172     #include "../../Source/portable/GCC/MCF5235/portmacro.h"\r
173 #endif\r
174 \r
175 #ifdef BCC_INDUSTRIAL_PC_PORT\r
176         /* A short file name has to be used in place of the normal\r
177         FreeRTOSConfig.h when using the Borland compiler. */\r
178         #include "frconfig.h"\r
179         #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"\r
180     typedef void ( __interrupt __far *pxISR )();\r
181 #endif\r
182 \r
183 #ifdef BCC_FLASH_LITE_186_PORT\r
184         /* A short file name has to be used in place of the normal\r
185         FreeRTOSConfig.h when using the Borland compiler. */\r
186         #include "frconfig.h"\r
187         #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"\r
188     typedef void ( __interrupt __far *pxISR )();\r
189 #endif\r
190 \r
191 #ifdef GCC_AVR32_PORT\r
192         #include "portmacro.h"\r
193 #endif\r
194 \r
195 #ifdef IAR_AVR32_PORT\r
196         #include "portmacro.h"\r
197 #endif\r
198 \r
199 /*\r
200  * Setup the stack of a new task so it is ready to be placed under the\r
201  * scheduler control.  The registers have to be placed on the stack in\r
202  * the order that the port expects to find them.\r
203  */\r
204 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );\r
205 \r
206 /*\r
207  * Map to the memory management routines required for the port.\r
208  */\r
209 void *pvPortMalloc( size_t xSize );\r
210 void vPortFree( void *pv );\r
211 void vPortInitialiseBlocks( void );\r
212 \r
213 /*\r
214  * Setup the hardware ready for the scheduler to take control.  This generally\r
215  * sets up a tick interrupt and sets timers for the correct tick frequency.\r
216  */\r
217 portBASE_TYPE xPortStartScheduler( void );\r
218 \r
219 /*\r
220  * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so\r
221  * the hardware is left in its original condition after the scheduler stops\r
222  * executing.\r
223  */\r
224 void vPortEndScheduler( void );\r
225 \r
226 \r
227 #endif /* PORTABLE_H */\r
228 \r