]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h
Update version numbers in preparation for V8.2.0 release candidate 1.
[freertos] / FreeRTOS / Demo / CORTEX_M4F_Infineon_XMC4000_IAR / FreeRTOSConfig.h
1 /*\r
2     FreeRTOS V8.2.0rc1 - Copyright (C) 2014 Real Time Engineers Ltd.\r
3     All rights reserved\r
4 \r
5     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
6 \r
7     This file is part of the FreeRTOS distribution.\r
8 \r
9     FreeRTOS is free software; you can redistribute it and/or modify it under\r
10     the terms of the GNU General Public License (version 2) as published by the\r
11     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
12 \r
13     >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
14     >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
15     >>!   obliged to provide the source code for proprietary components     !<<\r
16     >>!   outside of the FreeRTOS kernel.                                   !<<\r
17 \r
18     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
19     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
20     FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
21     link: http://www.freertos.org/a00114.html\r
22 \r
23     1 tab == 4 spaces!\r
24 \r
25     ***************************************************************************\r
26      *                                                                       *\r
27      *    Having a problem?  Start by reading the FAQ "My application does   *\r
28      *    not run, what could be wrong?".  Have you defined configASSERT()?  *\r
29      *                                                                       *\r
30      *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
31      *                                                                       *\r
32     ***************************************************************************\r
33 \r
34     ***************************************************************************\r
35      *                                                                       *\r
36      *    FreeRTOS provides completely free yet professionally developed,    *\r
37      *    robust, strictly quality controlled, supported, and cross          *\r
38      *    platform software that is more than just the market leader, it     *\r
39      *    is the industry's de facto standard.                               *\r
40      *                                                                       *\r
41      *    Help yourself get started quickly while simultaneously helping     *\r
42      *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
43      *    tutorial book, reference manual, or both:                          *\r
44      *    http://www.FreeRTOS.org/Documentation                              *\r
45      *                                                                       *\r
46     ***************************************************************************\r
47 \r
48     ***************************************************************************\r
49      *                                                                       *\r
50      *   Investing in training allows your team to be as productive as       *\r
51      *   possible as early as possible, lowering your overall development    *\r
52      *   cost, and enabling you to bring a more robust product to market     *\r
53      *   earlier than would otherwise be possible.  Richard Barry is both    *\r
54      *   the architect and key author of FreeRTOS, and so also the world's   *\r
55      *   leading authority on what is the world's most popular real time     *\r
56      *   kernel for deeply embedded MCU designs.  Obtaining your training    *\r
57      *   from Richard ensures your team will gain directly from his in-depth *\r
58      *   product knowledge and years of usage experience.  Contact Real Time *\r
59      *   Engineers Ltd to enquire about the FreeRTOS Masterclass, presented  *\r
60      *   by Richard Barry:  http://www.FreeRTOS.org/contact\r
61      *                                                                       *\r
62     ***************************************************************************\r
63 \r
64     ***************************************************************************\r
65      *                                                                       *\r
66      *    You are receiving this top quality software for free.  Please play *\r
67      *    fair and reciprocate by reporting any suspected issues and         *\r
68      *    participating in the community forum:                              *\r
69      *    http://www.FreeRTOS.org/support                                    *\r
70      *                                                                       *\r
71      *    Thank you!                                                         *\r
72      *                                                                       *\r
73     ***************************************************************************\r
74 \r
75     http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
76     license and Real Time Engineers Ltd. contact details.\r
77 \r
78     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
79     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
80     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
81 \r
82     http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
83     Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
84 \r
85     http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
86     Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
87     licenses offer ticketed support, indemnification and commercial middleware.\r
88 \r
89     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
90     engineered and independently SIL3 certified version for use in safety and\r
91     mission critical applications that require provable dependability.\r
92 \r
93     1 tab == 4 spaces!\r
94 */\r
95 \r
96 \r
97 #ifndef FREERTOS_CONFIG_H\r
98 #define FREERTOS_CONFIG_H\r
99 \r
100 \r
101 /*-----------------------------------------------------------\r
102  * Application specific definitions.\r
103  *\r
104  * These definitions should be adjusted for your particular hardware and\r
105  * application requirements.\r
106  *\r
107  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
108  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.\r
109  *\r
110  * See http://www.freertos.org/a00110.html.\r
111  *----------------------------------------------------------*/\r
112 \r
113 /* Ensure stdint is only used by the compiler, and not the assembler. */\r
114 #ifdef __ICCARM__\r
115         #include <stdint.h>\r
116         extern uint32_t SystemCoreClock;\r
117 #endif /* __ICCARM__ */\r
118 \r
119 /* The following definition allows the startup files that ship with the IDE\r
120 to be used without modification when the chip used includes the PMU CM001\r
121 errata. */\r
122 #define WORKAROUND_PMU_CM001                                    1\r
123 \r
124 #define configUSE_PREEMPTION                                    1\r
125 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
126 #define configUSE_IDLE_HOOK                                             0\r
127 #define configUSE_TICK_HOOK                                             1\r
128 #define configCPU_CLOCK_HZ                                              ( SystemCoreClock )\r
129 #define configTICK_RATE_HZ                                              ( ( TickType_t ) 1000 )\r
130 #define configMAX_PRIORITIES                                    ( 5 )\r
131 #define configMINIMAL_STACK_SIZE                                ( ( unsigned short ) 130 )\r
132 #define configTOTAL_HEAP_SIZE                                   ( ( size_t ) ( 22800 ) )\r
133 #define configMAX_TASK_NAME_LEN                                 ( 10 )\r
134 #define configUSE_TRACE_FACILITY                                1\r
135 #define configUSE_16_BIT_TICKS                                  0\r
136 #define configIDLE_SHOULD_YIELD                                 1\r
137 #define configUSE_MUTEXES                                               1\r
138 #define configQUEUE_REGISTRY_SIZE                               8\r
139 #define configCHECK_FOR_STACK_OVERFLOW                  2\r
140 #define configUSE_RECURSIVE_MUTEXES                             1\r
141 #define configUSE_MALLOC_FAILED_HOOK                    1\r
142 #define configUSE_APPLICATION_TASK_TAG                  0\r
143 #define configUSE_COUNTING_SEMAPHORES                   1\r
144 #define configGENERATE_RUN_TIME_STATS                   0\r
145 #define configUSE_QUEUE_SETS                                    1\r
146 \r
147 /* Co-routine definitions. */\r
148 #define configUSE_CO_ROUTINES                   0\r
149 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
150 \r
151 /* Software timer definitions. */\r
152 #define configUSE_TIMERS                                1\r
153 #define configTIMER_TASK_PRIORITY               ( 2 )\r
154 #define configTIMER_QUEUE_LENGTH                5\r
155 #define configTIMER_TASK_STACK_DEPTH    ( configMINIMAL_STACK_SIZE * 2 )\r
156 \r
157 /* Set the following definitions to 1 to include the API function, or zero\r
158 to exclude the API function. */\r
159 #define INCLUDE_vTaskPrioritySet                1\r
160 #define INCLUDE_uxTaskPriorityGet               1\r
161 #define INCLUDE_vTaskDelete                             1\r
162 #define INCLUDE_vTaskCleanUpResources   1\r
163 #define INCLUDE_vTaskSuspend                    1\r
164 #define INCLUDE_vTaskDelayUntil                 1\r
165 #define INCLUDE_vTaskDelay                              1\r
166 \r
167 /* Cortex-M specific definitions. */\r
168 #ifdef __NVIC_PRIO_BITS\r
169         /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */\r
170         #define configPRIO_BITS                 __NVIC_PRIO_BITS\r
171 #else\r
172         #define configPRIO_BITS                 6        /* 63 priority levels */\r
173 #endif\r
174 \r
175 /* The lowest interrupt priority that can be used in a call to a "set priority"\r
176 function. */\r
177 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY                 0x3f\r
178 \r
179 /* The highest interrupt priority that can be used by any interrupt service\r
180 routine that makes calls to interrupt safe FreeRTOS API functions.  DO NOT CALL\r
181 INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER\r
182 PRIORITY THAN THIS! (higher priorities are lower numeric values. */\r
183 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY    5\r
184 \r
185 /* Interrupt priorities used by the kernel port layer itself.  These are generic\r
186 to all Cortex-M ports, and do not rely on any particular library functions. */\r
187 #define configKERNEL_INTERRUPT_PRIORITY                 ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )\r
188 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!\r
189 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */\r
190 #define configMAX_SYSCALL_INTERRUPT_PRIORITY    ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )\r
191 \r
192 /* Normal assert() semantics without relying on the provision of an assert.h\r
193 header file. */\r
194 #define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }\r
195 \r
196 /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS\r
197 standard names.  WORKAROUND_PMU_CM001 is defined at the top of this file. */\r
198 #if WORKAROUND_PMU_CM001 == 1\r
199         #define xPortPendSVHandler PendSV_Handler_Veneer\r
200 #else\r
201         #define xPortPendSVHandler PendSV_Handler\r
202 #endif\r
203 #define vPortSVCHandler SVC_Handler\r
204 #define xPortSysTickHandler SysTick_Handler\r
205 \r
206 /* Demo application specific settings. */\r
207 #ifdef __ICCARM__\r
208         #if defined( PART_XMC4500 )\r
209                 /* Hardware includes. */\r
210                 #include "XMC4500.h"\r
211                 #include "System_XMC4500.h"\r
212 \r
213                 /* Configure pin P3.9 for the LED. */\r
214                 #define configCONFIGURE_LED() ( PORT3->IOCR8 = 0x00008000 )\r
215                 /* To toggle the single LED */\r
216                 #define configTOGGLE_LED()      ( PORT3->OMR =  0x02000200 )\r
217         #elif defined( PART_XMC4400 )\r
218                 /* Hardware includes. */\r
219                 #include "XMC4400.h"\r
220                 #include "System_XMC4200.h"\r
221 \r
222                 /* Configure pin P5.2 for the LED. */\r
223                 #define configCONFIGURE_LED() ( PORT5->IOCR0 = 0x00800000 )\r
224                 /* To toggle the single LED */\r
225                 #define configTOGGLE_LED()      ( PORT5->OMR =  0x00040004 )\r
226         #elif defined( PART_XMC4200 )\r
227                 /* Hardware includes. */\r
228                 #include "XMC4200.h"\r
229                 #include "System_XMC4200.h"\r
230 \r
231                 /* Configure pin P2.1 for the LED. */\r
232                 #define configCONFIGURE_LED() PORT2->IOCR0 = 0x00008000; PORT2->HWSEL &= ~0x0000000cUL\r
233                 /* To toggle the single LED */\r
234                 #define configTOGGLE_LED()      ( PORT2->OMR =  0x00020002 )\r
235         #else\r
236                 #error Part number not specified in project options\r
237         #endif\r
238 #endif\r
239 \r
240 #endif /* FREERTOS_CONFIG_H */\r
241 \r