[processor-sdk/pdk.git] / packages / ti / kernel / freertos / config / awr294x / r5f / FreeRTOSConfig.h
1 /*
2 * Copyright (C) 2018-2021 Texas Instruments Incorporated
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
34 #ifndef TI_FREERTOS_CONFIG_H
35 #define TI_FREERTOS_CONFIG_H
37 #include <ti/osal/DebugP.h>
38 #ifdef BUILD_MCU1_0
39 #include "FreeRTOSConfig_mcu1_0.h"
40 #endif
42 /*-----------------------------------------------------------
43 * Application specific definitions.
44 *
45 * These definitions should be adjusted for your particular hardware and
46 * application requirements.
47 *
48 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
49 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE AND IN THE
50 * FreeRTOS REFERENCE MANUAL.
51 *----------------------------------------------------------*/
53 /* Keep below as 1 if the most optmized task switching latency is needed.
54 * This disables tracing, logging, assert and other error checks.
55 * So unless every last cycle of task switching is important leave this as 0.
56 *
57 * This is not a FreeRTOS defined config and is defined by TI to quickly switch
58 * between optimized and not-so-optimized config
59 */
60 #define configOPTIMIZE_FOR_LATENCY (0)
62 #define configUSE_PREEMPTION (1)
63 #define configUSE_PORT_OPTIMISED_TASK_SELECTION (1)
64 #define configUSE_TICKLESS_IDLE (0)
65 #define configUSE_IDLE_HOOK (0)
66 #define configUSE_MALLOC_FAILED_HOOK (0)
67 #define configUSE_DAEMON_TASK_STARTUP_HOOK (0)
68 #define configUSE_TICK_HOOK (0)
69 #define configCPU_CLOCK_HZ (400 * 1000 * 1000)
70 #define configSYSTICK_CLOCK_HZ (200 * 1000 * 1000)
71 #define configTICK_RATE_HZ (1000)
72 #define configMAX_PRIORITIES (16)
73 #define configMINIMAL_STACK_SIZE (1024) /* in units of configSTACK_DEPTH_TYPE, not bytes */
74 #define configMAX_TASK_NAME_LEN (32)
75 #define configUSE_TRACE_FACILITY (1)
76 #define configUSE_STATS_FORMATTING_FUNCTIONS (0)
77 #define configUSE_16_BIT_TICKS (0)
78 #define configIDLE_SHOULD_YIELD (1)
79 #define configUSE_TASK_NOTIFICATIONS (1)
80 #define configTASK_NOTIFICATION_ARRAY_ENTRIES (1)
81 #define configUSE_MUTEXES (1)
82 #define configUSE_RECURSIVE_MUTEXES (1)
83 #define configUSE_COUNTING_SEMAPHORES (1)
84 #define configUSE_ALTERNATIVE_API (0)
86 /* when = 1, Need to provied below,
87 * void vApplicationStackOverflowHook( TaskHandle_t xTask,
88 * char *pcTaskName );
89 */
90 #if (configOPTIMIZE_FOR_LATENCY==0)
91 #define configCHECK_FOR_STACK_OVERFLOW (2)
92 #else
93 #define configCHECK_FOR_STACK_OVERFLOW (0)
94 #endif
95 #define configRECORD_STACK_HIGH_ADDRESS (1)
96 #define configQUEUE_REGISTRY_SIZE (0)
97 #define configUSE_QUEUE_SETS (0)
98 #define configUSE_TIME_SLICING (0) /* keep as 0 to get same functionality as SysBIOS6 */
99 #define configUSE_NEWLIB_REENTRANT (0)
100 #define configENABLE_BACKWARD_COMPATIBILITY (0)
101 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS (4)
102 #define configSTACK_DEPTH_TYPE UBaseType_t
103 #define configMESSAGE_BUFFER_LENGTH_TYPE size_t
104 #define configSUPPORT_STATIC_ALLOCATION (1) /* when = 1, need to provide below,
105 *
106 * void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer,
107 * StackType_t **ppxTimerTaskStackBuffer,
108 * uint32_t *pulTimerTaskStackSize );
109 *
110 * void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer,
111 * StackType_t **ppxIdleTaskStackBuffer,
112 * uint32_t *pulIdleTaskStackSize );
113 */
114 #define configSUPPORT_DYNAMIC_ALLOCATION (1)
115 #define configTOTAL_HEAP_SIZE (32*1024) /* not used when heap_3.c is the selected heap */
116 #define configAPPLICATION_ALLOCATED_HEAP (0)
118 /* run-time stats config */
119 #if (configOPTIMIZE_FOR_LATENCY==0)
120 #define configGENERATE_RUN_TIME_STATS (1)
121 #else
122 #define configGENERATE_RUN_TIME_STATS (0)
123 #endif
124 void vPortConfigTimerForRunTimeStats();
125 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vPortConfigTimerForRunTimeStats()
126 uint32_t uiPortGetRunTimeCounterValue();
127 #define portGET_RUN_TIME_COUNTER_VALUE() uiPortGetRunTimeCounterValue()
129 /* co-routine related config */
130 #define configUSE_CO_ROUTINES (0)
131 #define configMAX_CO_ROUTINE_PRIORITIES (0)
133 /* timer related config */
134 #define configUSE_TIMERS (1)
135 #define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
136 #define configTIMER_QUEUE_LENGTH (16)
137 #define configTIMER_TASK_STACK_DEPTH (256)
139 #define configMAX_SYSCALL_INTERRUPT_PRIORITY (0xE0U)
140 #define configKERNEL_INTERRUPT_PRIORITY (configMAX_SYSCALL_INTERRUPT_PRIORITY)
141 #define configMAX_API_CALL_INTERRUPT_PRIORITY (configMAX_SYSCALL_INTERRUPT_PRIORITY)
143 #if (configOPTIMIZE_FOR_LATENCY==0)
144 #define configASSERT(x) DebugP_assert( (uint32_t)(x))
145 #endif
147 /* MPU aware FreeRTOS, not supported as TI */
148 #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS (0)
149 #define configTOTAL_MPU_REGIONS (0)
150 #undef configTEX_S_C_B_FLASH
151 #undef configTEX_S_C_B_SRAM
152 #define configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY (0)
154 /* defines need for FreeRTOS+POSIX*/
155 #define configUSE_POSIX_ERRNO (1)
156 #define configUSE_APPLICATION_TASK_TAG (1)
158 /* include specific functions */
159 #define INCLUDE_vTaskDelete (1)
160 #define INCLUDE_vTaskDelay (1)
161 #define INCLUDE_vTaskSuspend (1)
162 #define INCLUDE_xTimerDelete (1)
163 #define INCLUDE_vSemaphoreDelete (1)
164 #define INCLUDE_xTaskGetCurrentTaskHandle (1)
166 /*
167 * This is not a FreeRTOS defined config and is defined by TI to enable
168 * copy of _freertosresetvectors to ATCM
169 */
170 #define configCOPY_RESET_VECTORS (0)
171 #define configMCU_ATCM_BASE (0x0UL)
173 #endif /* TI_FREERTOS_CONFIG_H */