Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / platform / k32w / app / project_include / FreeRTOSConfig.h
1 /*
2  * FreeRTOS Kernel V10.2.0
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 #pragma once
29
30 /*-----------------------------------------------------------
31  * Application specific definitions.
32  *
33  * These definitions should be adjusted for your particular hardware and
34  * application requirements.
35  *
36  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
37  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
38  *
39  * See http://www.freertos.org/a00110.html.
40  *----------------------------------------------------------*/
41
42 #define configUSE_PREEMPTION 1
43 #define configUSE_TICKLESS_IDLE 0
44 #define configCPU_CLOCK_HZ (SystemCoreClock)
45 #define configTICK_RATE_HZ ((TickType_t) 100)
46 #define configMAX_PRIORITIES (8)
47 #define configMINIMAL_STACK_SIZE ((unsigned short) 90)
48 #define configMAX_TASK_NAME_LEN 20
49 #define configUSE_16_BIT_TICKS 0
50 #define configIDLE_SHOULD_YIELD 1
51 #define configUSE_TASK_NOTIFICATIONS 1
52 #define configUSE_MUTEXES 1
53 #define configUSE_RECURSIVE_MUTEXES 1
54 #define configUSE_COUNTING_SEMAPHORES 1
55 #define configUSE_ALTERNATIVE_API 0 /* Deprecated! */
56 #define configQUEUE_REGISTRY_SIZE 8
57 #define configUSE_QUEUE_SETS 0
58 #define configUSE_TIME_SLICING 0
59 #define configUSE_NEWLIB_REENTRANT 0
60 #define configENABLE_BACKWARD_COMPATIBILITY 1
61 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
62
63 /* Tasks.c additions (e.g. Thread Aware Debug capability) */
64 #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1
65
66 /* Used memory allocation (heap_x.c) */
67 #define configFRTOS_MEMORY_SCHEME 4
68
69 /* Memory allocation related definitions. */
70 #define configSUPPORT_STATIC_ALLOCATION 0
71 #define configSUPPORT_DYNAMIC_ALLOCATION 1
72 #define configTOTAL_HEAP_SIZE ((size_t)(gTotalHeapSize_c))
73 #define configAPPLICATION_ALLOCATED_HEAP 1
74
75 /* Hook function related definitions. */
76 #ifndef configUSE_IDLE_HOOK
77 #define configUSE_IDLE_HOOK 0
78 #endif
79 #define configUSE_TICK_HOOK 0
80 #define configCHECK_FOR_STACK_OVERFLOW 0
81 #ifndef configUSE_MALLOC_FAILED_HOOK
82 #define configUSE_MALLOC_FAILED_HOOK 0
83 #endif
84 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
85
86 /* Run time and task stats gathering related definitions. */
87 #define configGENERATE_RUN_TIME_STATS 0
88 #define configUSE_TRACE_FACILITY 1
89 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
90
91 /* Task aware debugging. */
92 #define configRECORD_STACK_HIGH_ADDRESS 1
93
94 /* Co-routine related definitions. */
95 #define configUSE_CO_ROUTINES 0
96 #define configMAX_CO_ROUTINE_PRIORITIES 2
97
98 /* Software timer related definitions. */
99 #define configUSE_TIMERS 1
100 #define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
101 #define configTIMER_QUEUE_LENGTH 10
102 #define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 4)
103
104 /* Define to trap errors during development. */
105 #define configASSERT(x)                                                                                                            \
106     if ((x) == 0)                                                                                                                  \
107     {                                                                                                                              \
108         taskDISABLE_INTERRUPTS();                                                                                                  \
109         for (;;)                                                                                                                   \
110             ;                                                                                                                      \
111     }
112
113 /* Optional functions - most linkers will remove unused functions anyway. */
114 #define INCLUDE_vTaskPrioritySet 1
115 #define INCLUDE_uxTaskPriorityGet 1
116 #define INCLUDE_vTaskDelete 1
117 #define INCLUDE_vTaskSuspend 1
118 #define INCLUDE_xResumeFromISR 1
119 #define INCLUDE_vTaskDelayUntil 1
120 #define INCLUDE_vTaskDelay 1
121 #define INCLUDE_xTaskGetSchedulerState 1
122 #define INCLUDE_xTaskGetCurrentTaskHandle 1
123 #define INCLUDE_uxTaskGetStackHighWaterMark 1
124 #define INCLUDE_xTaskGetIdleTaskHandle 0
125 #define INCLUDE_eTaskGetState 0
126 #define INCLUDE_xEventGroupSetBitFromISR 1
127 #define INCLUDE_xTimerPendFunctionCall 1
128 #define INCLUDE_xTaskAbortDelay 0
129 #define INCLUDE_xTaskGetHandle 0
130 #define INCLUDE_xTaskResumeFromISR 1
131 #define INCLUDE_xQueueGetMutexHolder 1
132
133 /* Interrupt nesting behaviour configuration. Cortex-M specific. */
134 #ifdef __NVIC_PRIO_BITS
135 /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
136 #define configPRIO_BITS __NVIC_PRIO_BITS
137 #else
138 #define configPRIO_BITS 3
139 #endif
140
141 /* The lowest interrupt priority that can be used in a call to a "set priority"
142 function. */
143 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x7
144
145 /* The highest interrupt priority that can be used by any interrupt service
146 routine that makes calls to interrupt safe FreeRTOS API functions.  DO NOT CALL
147 INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
148 PRIORITY THAN THIS! (higher priorities are lower numeric values. */
149 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 1
150
151 /* Interrupt priorities used by the kernel port layer itself.  These are generic
152 to all Cortex-M ports, and do not rely on any particular library functions. */
153 #define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))
154 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
155 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
156 #define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))
157
158 /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
159 standard names. */
160 #define vPortSVCHandler SVC_Handler
161 #define xPortPendSVHandler PendSV_Handler
162 #define xPortSysTickHandler SysTick_Handler