LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lpc43xx_m4_FreeRTOSConfig.h
Go to the documentation of this file.
1 /*
2  FreeRTOS V7.1.1 - 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 
55 #ifndef FREERTOS_CONFIG_H
56 #define FREERTOS_CONFIG_H
57 
58 #ifndef __IASMARM__
59 /* For SystemCoreClock */
60 #include "board.h"
61 #endif
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  * See http://www.freertos.org/a00110.html.
72  *----------------------------------------------------------*/
73 
74 #define configUSE_PREEMPTION 1
75 #define configUSE_IDLE_HOOK 1
76 #define configUSE_TICK_HOOK 0
77 #define configCPU_CLOCK_HZ ( SystemCoreClock )
78 #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
79 #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 8 )
80 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
81 #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 0 ) )
82 #define configMAX_TASK_NAME_LEN ( 10 )
83 #define configUSE_TRACE_FACILITY 1
84 #define configUSE_16_BIT_TICKS 0
85 #define configIDLE_SHOULD_YIELD 1
86 #define configUSE_MUTEXES 1
87 #define configQUEUE_REGISTRY_SIZE 8
88 #define configCHECK_FOR_STACK_OVERFLOW 2
89 #define configUSE_RECURSIVE_MUTEXES 1
90 #define configUSE_MALLOC_FAILED_HOOK 1
91 #define configUSE_APPLICATION_TASK_TAG 0
92 #define configUSE_COUNTING_SEMAPHORES 1
93 #define configGENERATE_RUN_TIME_STATS 0
94 
95 /* Co-routine definitions. */
96 #define configUSE_CO_ROUTINES 0
97 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
98 
99 /* Software timer definitions. This example uses I2C to write to the LEDs. As
100 this takes a finite time, and because a timer callback writes to an LED, the
101 priority of the timer task is kept to a minimum to ensure it does not disrupt
102 test tasks that check their own execution times. */
103 #define configUSE_TIMERS 0
104 #define configTIMER_TASK_PRIORITY ( 0 )
105 #define configTIMER_QUEUE_LENGTH 5
106 #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
107 
108 /* Set the following definitions to 1 to include the API function, or zero
109 to exclude the API function. */
110 #define INCLUDE_vTaskPrioritySet 1
111 #define INCLUDE_uxTaskPriorityGet 1
112 #define INCLUDE_vTaskDelete 1
113 #define INCLUDE_vTaskCleanUpResources 1
114 #define INCLUDE_vTaskSuspend 1
115 #define INCLUDE_vTaskDelayUntil 1
116 #define INCLUDE_vTaskDelay 1
117 #define INCLUDE_xTaskGetCurrentTaskHandle 1
118 
119 /* Cortex-M specific definitions. */
120 #ifdef __NVIC_PRIO_BITS
121  /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
122  #define configPRIO_BITS __NVIC_PRIO_BITS
123 #else
124  #define configPRIO_BITS 5 /* 32 priority levels */
125 #endif
126 
127 /* The lowest interrupt priority that can be used in a call to a "set priority"
128 function. */
129 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x1f
130 
131 /* The highest interrupt priority that can be used by any interrupt service
132 routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
133 INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
134 PRIORITY THAN THIS! (higher priorities are lower numeric values. */
135 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
136 
137 /* Interrupt priorities used by the kernel port layer itself. These are generic
138 to all Cortex-M ports, and do not rely on any particular library functions. */
139 #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
140 #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
141 
142 /* Normal assert() semantics without relying on the provision of an assert.h
143 header file. */
144 #define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
145 
146 /* FreeRTOS hooks to NVIC vectors */
147 #define xPortPendSVHandler PendSV_Handler
148 #define xPortSysTickHandler SysTick_Handler
149 #define vPortSVCHandler SVC_Handler
150 
151 #endif /* FREERTOS_CONFIG_H */
152