LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
FreeRTOSConfig.h
Go to the documentation of this file.
1 /*
2  FreeRTOS V7.1.0 - Copyright (C) 2011 Real Time Engineers Ltd.
3 
4 
5  ***************************************************************************
6  * *
7  * FreeRTOS tutorial books are available in pdf and paperback. *
8  * Complete, revised, and edited pdf reference manuals are also *
9  * available. *
10  * *
11  * Purchasing FreeRTOS documentation will not only help you, by *
12  * ensuring you get running as quickly as possible and with an *
13  * in-depth knowledge of how to use FreeRTOS, it will also help *
14  * the FreeRTOS project to continue with its mission of providing *
15  * professional grade, cross platform, de facto standard solutions *
16  * for microcontrollers - completely free of charge! *
17  * *
18  * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
19  * *
20  * Thank you for using FreeRTOS, and thank you for your support! *
21  * *
22  ***************************************************************************
23 
24 
25  This file is part of the FreeRTOS distribution.
26 
27  FreeRTOS is free software; you can redistribute it and/or modify it under
28  the terms of the GNU General Public License (version 2) as published by the
29  Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
30  >>>NOTE<<< The modification to the GPL is included to allow you to
31  distribute a combined work that includes FreeRTOS without being obliged to
32  provide the source code for proprietary components outside of the FreeRTOS
33  kernel. FreeRTOS is distributed in the hope that it will be useful, but
34  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
35  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
36  more details. You should have received a copy of the GNU General Public
37  License and the FreeRTOS license exception along with FreeRTOS; if not it
38  can be viewed here: http://www.freertos.org/a00114.html and also obtained
39  by writing to Richard Barry, contact details for whom are available on the
40  FreeRTOS WEB site.
41 
42  1 tab == 4 spaces!
43 
44  http://www.FreeRTOS.org - Documentation, latest information, license and
45  contact details.
46 
47  http://www.SafeRTOS.com - A version that is certified for use in safety
48  critical systems.
49 
50  http://www.OpenRTOS.com - Commercial support, development, porting,
51  licensing and training services.
52 */
53 
54 #ifndef FREERTOS_CONFIG_H
55 #define FREERTOS_CONFIG_H
56 
57 #ifndef __IASMARM__
58 /* For SystemCoreClock */
59 #include "board.h"
60 #endif
61 
62 /*-----------------------------------------------------------
63  * Application specific definitions.
64  *
65  * These definitions should be adjusted for your particular hardware and
66  * application requirements.
67  *
68  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
69  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
70  *----------------------------------------------------------*/
71 
72 #define configUSE_PREEMPTION 1
73 #define configUSE_IDLE_HOOK 1
74 #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 8 )
75 #define configUSE_TICK_HOOK 0
76 #define configCPU_CLOCK_HZ ( ( unsigned long ) SystemCoreClock )
77 #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
78 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
79 #ifdef __CODE_RED
80 #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16*1024 ) )
81 #else
82 #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 0 ) )
83 #endif
84 #define configMAX_TASK_NAME_LEN ( 20 )
85 #define configUSE_TRACE_FACILITY 1
86 #define configUSE_16_BIT_TICKS 0
87 #define configIDLE_SHOULD_YIELD 1
88 #define configUSE_CO_ROUTINES 0
89 #define configUSE_MUTEXES 1
90 
91 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
92 
93 #define configUSE_COUNTING_SEMAPHORES 1
94 #define configUSE_ALTERNATIVE_API 0
95 #define configCHECK_FOR_STACK_OVERFLOW 0
96 #define configUSE_RECURSIVE_MUTEXES 1
97 #define configQUEUE_REGISTRY_SIZE 10
98 #define configGENERATE_RUN_TIME_STATS 0
99 
100 /* Set the following definitions to 1 to include the API function, or zero
101 to exclude the API function. */
102 
103 #define INCLUDE_vTaskPrioritySet 1
104 #define INCLUDE_uxTaskPriorityGet 1
105 #define INCLUDE_vTaskDelete 1
106 #define INCLUDE_vTaskCleanUpResources 0
107 #define INCLUDE_vTaskSuspend 1
108 #define INCLUDE_vTaskDelayUntil 1
109 #define INCLUDE_vTaskDelay 1
110 #define INCLUDE_uxTaskGetStackHighWaterMark 1
111 
112 /* Use the system definition, if there is one */
113 #ifdef __NVIC_PRIO_BITS
114  #define configPRIO_BITS __NVIC_PRIO_BITS
115 #else
116  #define configPRIO_BITS 5 /* 32 priority levels */
117 #endif
118 
119 #if defined(CORE_M3)
120 /* The lowest interrupt priority that can be used in a call to a "set priority"
121 function. */
122 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x1f
123 
124 /* The highest interrupt priority that can be used by any interrupt service
125 routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
126 INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
127 PRIORITY THAN THIS! (higher priorities are lower numeric values. */
128 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
129 
130 /* Interrupt priorities used by the kernel port layer itself. These are generic
131 to all Cortex-M ports, and do not rely on any particular library functions. */
132 #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
133 #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
134 
135 #else
136 
137 #if defined(CORE_M4)
138 /* The lowest interrupt priority that can be used in a call to a "set priority"
139 function. */
140 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x3f
141 
142 /* The highest interrupt priority that can be used by any interrupt service
143 routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
144 INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
145 PRIORITY THAN THIS! (higher priorities are lower numeric values. */
146 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
147 
148 /* Interrupt priorities used by the kernel port layer itself. These are generic
149 to all Cortex-M ports, and do not rely on any particular library functions. */
150 #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
151 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
152 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
153 #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
154 
155 #else
156 #if defined(CORE_M0)
157 #error FreeRTOS CM0 support NOT YET DEFINED
158 
159 #else
160 #error FreeRTOS setup NOT DEFINED
161 #endif /* defined(CORE_M0) */
162 #endif /* defined(CORE_M4) */
163 #endif /* defined(CORE_M3) */
164 #endif /* FREERTOS_CONFIG_H */