]> begriffs open source - cmsis-freertos/blob - Demo/CORTEX_A2F200_SoftConsole/FreeRTOSConfig.h
osEventFlagsWait: Fix flag comparison
[cmsis-freertos] / Demo / CORTEX_A2F200_SoftConsole / FreeRTOSConfig.h
1 /*
2  * FreeRTOS Kernel V10.2.1
3  * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of
6  * this software and associated documentation files (the "Software"), to deal in
7  * the Software without restriction, including without limitation the rights to
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9  * the Software, and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in all
13  * copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  *
22  * http://www.FreeRTOS.org
23  * http://aws.amazon.com/freertos
24  *
25  * 1 tab == 4 spaces!
26  */
27
28
29 /*
30  * The following #error directive is to remind users that a batch file must be
31  * executed prior to this project being built.  The batch file *cannot* be
32  * executed from within the IDE!  Once it has been executed, re-open or refresh
33  * the Eclipse project and remove the #error line below.
34  */
35 #error Ensure CreateProjectDirectoryStructure.bat has been executed before building.  See comment immediately above.
36
37
38 #ifndef FREERTOS_CONFIG_H
39 #define FREERTOS_CONFIG_H
40
41 #include <stdint.h>
42 #include <stddef.h>
43
44 /*-----------------------------------------------------------
45  * Application specific definitions.
46  *
47  * These definitions should be adjusted for your particular hardware and
48  * application requirements.
49  *
50  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
51  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
52  *
53  * See http://www.freertos.org/a00110.html
54  *----------------------------------------------------------*/
55
56 extern uint32_t SystemFrequency;
57
58 #define configUSE_PREEMPTION                    1
59 #define configUSE_IDLE_HOOK                             1
60 #define configUSE_TICK_HOOK                             0
61 #define configCPU_CLOCK_HZ                              ( SystemFrequency )
62 #define configTICK_RATE_HZ                              ( ( TickType_t ) 1000 )
63 #define configMAX_PRIORITIES                    ( 5 )
64 #define configMINIMAL_STACK_SIZE                ( ( unsigned short ) 90 )
65 #define configTOTAL_HEAP_SIZE                   ( ( size_t ) ( 30 * 1024 ) )
66 #define configMAX_TASK_NAME_LEN                 ( 10 )
67 #define configUSE_TRACE_FACILITY                1
68 #define configUSE_16_BIT_TICKS                  0
69 #define configIDLE_SHOULD_YIELD                 1
70 #define configUSE_MUTEXES                               1
71 #define configQUEUE_REGISTRY_SIZE               0
72 #define configGENERATE_RUN_TIME_STATS   1
73 #define configCHECK_FOR_STACK_OVERFLOW  2
74 #define configUSE_RECURSIVE_MUTEXES             1
75 #define configUSE_MALLOC_FAILED_HOOK    1
76 #define configUSE_APPLICATION_TASK_TAG  0
77 #define configUSE_COUNTING_SEMAPHORES   0
78
79 /* Co-routine definitions. */
80 #define configUSE_CO_ROUTINES           0
81 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
82
83 /* Software timer definitions. */
84 #define configUSE_TIMERS                                1
85 #define configTIMER_TASK_PRIORITY               ( 2 )
86 #define configTIMER_QUEUE_LENGTH                10
87 #define configTIMER_TASK_STACK_DEPTH    ( configMINIMAL_STACK_SIZE * 2 )
88
89 /* Set the following definitions to 1 to include the API function, or zero
90 to exclude the API function. */
91 #define INCLUDE_vTaskPrioritySet                1
92 #define INCLUDE_uxTaskPriorityGet               1
93 #define INCLUDE_vTaskDelete                             1
94 #define INCLUDE_vTaskCleanUpResources   1
95 #define INCLUDE_vTaskSuspend                    1
96 #define INCLUDE_vTaskDelayUntil                 1
97 #define INCLUDE_vTaskDelay                              1
98
99 /* This demo makes use of one or more example stats formatting functions.  These
100 format the raw data provided by the uxTaskGetSystemState() function in to human
101 readable ASCII form.  See the notes in the implementation of vTaskList() within
102 FreeRTOS/Source/tasks.c for limitations. */
103 #define configUSE_STATS_FORMATTING_FUNCTIONS    1
104
105 void vMainConfigureTimerForRunTimeStats( void );
106 unsigned long ulGetRunTimeCounterValue( void );
107 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vMainConfigureTimerForRunTimeStats()
108 #define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()
109
110 /* Use the system definition, if there is one */
111 #ifdef __NVIC_PRIO_BITS
112         #define configPRIO_BITS       __NVIC_PRIO_BITS
113 #else
114         #define configPRIO_BITS       5        /* 31 priority levels */
115 #endif
116
117 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY                 0x1f
118 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY    5
119
120 /* The lowest priority. */
121 #define configKERNEL_INTERRUPT_PRIORITY         ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
122 /* Priority 5, or 160 as only the top three bits are implemented. */
123 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
124 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
125 #define configMAX_SYSCALL_INTERRUPT_PRIORITY    ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
126
127 #define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
128
129 #define vPortSVCHandler SVC_Handler
130 #define xPortPendSVHandler PendSV_Handler
131 #define vPortSVCHandler SVC_Handler
132 #define xPortSysTickHandler SysTick_Handler
133
134 /* MAC address configuration. */
135 #define configMAC_ADDR0 0x00
136 #define configMAC_ADDR1 0x12
137 #define configMAC_ADDR2 0x13
138 #define configMAC_ADDR3 0x10
139 #define configMAC_ADDR4 0x15
140 #define configMAC_ADDR5 0x11
141
142 /* IP address configuration. */
143 #define configIP_ADDR0          192
144 #define configIP_ADDR1          168
145 #define configIP_ADDR2          0
146 #define configIP_ADDR3          200
147
148 /* Netmask configuration. */
149 #define configNET_MASK0         255
150 #define configNET_MASK1         255
151 #define configNET_MASK2         255
152 #define configNET_MASK3         0
153
154 #endif /* FREERTOS_CONFIG_H */
155