]> begriffs open source - cmsis-freertos/blob - Config/ARMCA/FreeRTOSConfig.h
Cleanup files from the previous structure
[cmsis-freertos] / Config / ARMCA / FreeRTOSConfig.h
1 /*
2  * FreeRTOS Kernel V10.3.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
29 #ifndef FREERTOS_CONFIG_H
30 #define FREERTOS_CONFIG_H
31
32 /*-----------------------------------------------------------
33  * Application specific definitions.
34  *
35  * These definitions should be adjusted for your particular hardware and
36  * application requirements.
37  *
38  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
39  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
40  *
41  * See http://www.freertos.org/a00110.html
42  *----------------------------------------------------------*/
43
44 #if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__))
45 #include <stdint.h>
46 #endif
47
48 /* Constants that describe the hardware and memory usage. */
49 #define configCPU_CLOCK_HZ                    100000000UL
50 #define configTICK_RATE_HZ                    ((TickType_t)1000)
51 #define configTOTAL_HEAP_SIZE                 ((size_t)4096)
52 #define configMINIMAL_STACK_SIZE              ((uint16_t)256)
53 #define configSUPPORT_DYNAMIC_ALLOCATION      1
54 #define configSUPPORT_STATIC_ALLOCATION       0
55
56 /* Constants related to the behaviour or the scheduler. */
57 #define configMAX_PRIORITIES                  5
58 #define configUSE_PREEMPTION                  1
59 #define configUSE_TIME_SLICING                1
60 #define configIDLE_SHOULD_YIELD               1
61 #define configMAX_TASK_NAME_LEN               (10)
62 #define configUSE_16_BIT_TICKS                0
63
64 /* Software timer definitions. */
65 #define configUSE_TIMERS                      0
66 #define configTIMER_TASK_PRIORITY             2
67 #define configTIMER_QUEUE_LENGTH              5
68 #define configTIMER_TASK_STACK_DEPTH          (configMINIMAL_STACK_SIZE * 2)
69
70 /* Constants that build features in or out. */
71 #define configUSE_MUTEXES                     1
72 #define configUSE_RECURSIVE_MUTEXES           1
73 #define configUSE_COUNTING_SEMAPHORES         1
74 #define configUSE_QUEUE_SETS                  1
75 #define configUSE_TASK_NOTIFICATIONS          1
76 #define configUSE_TRACE_FACILITY              1
77 #define configUSE_TICKLESS_IDLE               1
78 #define configUSE_APPLICATION_TASK_TAG        0
79 #define configUSE_NEWLIB_REENTRANT            0
80 #define configUSE_CO_ROUTINES                 0
81
82 /* Constants provided for debugging and optimisation assistance. */
83 #define configCHECK_FOR_STACK_OVERFLOW        0
84 #define configQUEUE_REGISTRY_SIZE             0
85 #define configASSERT( x )                     if( ( x ) == 0 ) { for( ;; ); }
86
87 /* Constants that define which hook (callback) functions should be used. */
88 #define configUSE_IDLE_HOOK                   0
89 #define configUSE_TICK_HOOK                   0
90 #define configUSE_DAEMON_TASK_STARTUP_HOOK    0
91 #define configUSE_MALLOC_FAILED_HOOK          0
92
93 /* Cortex A9 port configuration. */
94
95 /* Configure interrupt controller specific definitions */
96 #define configINTERRUPT_CONTROLLER_BASE_ADDRESS         0x2C000000
97 #define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET 0x1000
98 #define configUNIQUE_INTERRUPT_PRIORITIES               32
99
100 /*
101  * The FreeRTOS Cortex-A port implements a full interrupt nesting model.
102  *
103  * Interrupts that are assigned a priority at or below
104  * configMAX_API_CALL_INTERRUPT_PRIORITY (which counter-intuitively in the ARM
105  * generic interrupt controller [GIC] means a priority that has a numerical
106  * value above configMAX_API_CALL_INTERRUPT_PRIORITY) can call FreeRTOS safe API
107  * functions and will nest.
108  *
109  * Interrupts that are assigned a priority above
110  * configMAX_API_CALL_INTERRUPT_PRIORITY (which in the GIC means a numerical
111  * value below configMAX_API_CALL_INTERRUPT_PRIORITY) cannot call any FreeRTOS
112  * API functions, will nest, and will not be masked by FreeRTOS critical
113  * sections (although it is necessary for interrupts to be globally disabled
114  * extremely briefly as the interrupt mask is updated in the GIC).
115  *
116  * FreeRTOS functions that can be called from an interrupt are those that end in
117  * "FromISR".  FreeRTOS maintains a separate interrupt safe API to enable
118  * interrupt entry to be shorter, faster, simpler and smaller.
119  */
120 #define configMAX_API_CALL_INTERRUPT_PRIORITY   25
121
122 /* Set the following definitions to 1 to include the API function, or zero
123  * to exclude the API function.  NOTE:  Setting an INCLUDE_ parameter to 0 is
124  * only necessary if the linker does not automatically remove functions that are
125  * not referenced anyway. */
126 #define INCLUDE_vTaskPrioritySet              1
127 #define INCLUDE_uxTaskPriorityGet             1
128 #define INCLUDE_vTaskDelete                   1
129 #define INCLUDE_vTaskSuspend                  1
130 #define INCLUDE_xTaskDelayUntil               1
131 #define INCLUDE_vTaskDelay                    1
132 #define INCLUDE_xTaskGetIdleTaskHandle        1
133 #define INCLUDE_xTaskAbortDelay               1
134 #define INCLUDE_xQueueGetMutexHolder          1
135 #define INCLUDE_xSemaphoreGetMutexHolder      1
136 #define INCLUDE_xTaskGetHandle                1
137 #define INCLUDE_uxTaskGetStackHighWaterMark   1
138 #define INCLUDE_uxTaskGetStackHighWaterMark2  1
139 #define INCLUDE_eTaskGetState                 1
140 #define INCLUDE_xTaskResumeFromISR            1
141 #define INCLUDE_xTimerPendFunctionCall        1
142 #define INCLUDE_xTaskGetSchedulerState        1
143 #define INCLUDE_xTaskGetCurrentTaskHandle     1
144
145 #if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__))
146 /*
147  * The application must provide a function that configures a peripheral to
148  * create the FreeRTOS tick interrupt, then define configSETUP_TICK_INTERRUPT()
149  * in FreeRTOSConfig.h to call the function.
150  */
151 void vConfigureTickInterrupt( void );
152 void vClearTickInterrupt    ( void );
153
154 /* Map the FreeRTOS port timer configuration functions to their implementations */
155 #define configSETUP_TICK_INTERRUPT()          vConfigureTickInterrupt()
156 #define configCLEAR_TICK_INTERRUPT()          vClearTickInterrupt()
157
158 /* Map the FreeRTOS IRQ and SVC/SWI handlers to the names used in the C startup
159 code (which is where the vector table is defined). */
160 #define FreeRTOS_IRQ_Handler                  IRQ_Handler
161 #define FreeRTOS_SWI_Handler                  SWI_Handler
162 #endif
163
164 #endif /* FREERTOS_CONFIG_H */