]> begriffs open source - cmsis-freertos/blob - Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h
Updated pack to FreeRTOS 10.4.4
[cmsis-freertos] / Demo / CORTEX_MPU_Simulator_Keil_GCC / FreeRTOSConfig.h
1 /*
2  * FreeRTOS V202107.00
3  * Copyright (C) 2020 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 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /*-----------------------------------------------------------
37  * Application specific definitions.
38  *
39  * These definitions should be adjusted for your particular hardware and
40  * application requirements.
41  *
42  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
43  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
44  *
45  * See http://www.freertos.org/a00110.html
46  *----------------------------------------------------------*/
47
48 /* The MPU version of port.c includes and excludes functions depending on the
49 settings within this file.  Therefore, to ensure all the functions in port.c
50 build, this configuration file has all options turned on. */
51
52 #define configUSE_PREEMPTION                                    1
53 #define configTICK_RATE_HZ                                              ( 1000 )
54 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
55 #define configUSE_QUEUE_SETS                                    1
56 #define configUSE_IDLE_HOOK                                             1
57 #define configUSE_TICK_HOOK                                             1
58 #define configCPU_CLOCK_HZ                                              48000000
59 #define configMAX_PRIORITIES                                    ( 5 )
60 #define configMINIMAL_STACK_SIZE                                ( ( unsigned short ) 120 )
61 #define configTOTAL_HEAP_SIZE                                   ( ( size_t ) ( 16 * 1024 ) )
62 #define configMAX_TASK_NAME_LEN                                 ( 10 )
63 #define configUSE_TRACE_FACILITY                                1
64 #define configUSE_16_BIT_TICKS                                  0
65 #define configIDLE_SHOULD_YIELD                                 1
66 #define configUSE_MUTEXES                                               1
67 #define configQUEUE_REGISTRY_SIZE                               5
68 #define configCHECK_FOR_STACK_OVERFLOW                  2
69 #define configUSE_RECURSIVE_MUTEXES                             1
70 #define configUSE_MALLOC_FAILED_HOOK                    1
71 #define configUSE_APPLICATION_TASK_TAG                  1
72 #define configUSE_COUNTING_SEMAPHORES                   1
73 #define configSUPPORT_STATIC_ALLOCATION                 0
74 #define configUSE_TICKLESS_IDLE                                 0
75 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 2
76
77 /* Run time stats gathering definitions. */
78 #define configGENERATE_RUN_TIME_STATS                   1
79 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
80 #define portGET_RUN_TIME_COUNTER_VALUE()                0
81
82 /* This demo makes use of one or more example stats formatting functions.  These
83 format the raw data provided by the uxTaskGetSystemState() function in to human
84 readable ASCII form.  See the notes in the implementation of vTaskList() within
85 FreeRTOS/Source/tasks.c for limitations. */
86 #define configUSE_STATS_FORMATTING_FUNCTIONS    0
87
88 /* Co-routine definitions. */
89 #define configUSE_CO_ROUTINES                    0
90 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
91
92 /* Software timer definitions. */
93 #define configUSE_TIMERS                                1
94 #define configTIMER_TASK_PRIORITY               ( 2 )
95 #define configTIMER_QUEUE_LENGTH                5
96 #define configTIMER_TASK_STACK_DEPTH    ( configMINIMAL_STACK_SIZE )
97
98 /* Set the following definitions to 1 to include the API function, or zero
99 to exclude the API function. */
100 #define INCLUDE_vTaskPrioritySet                        1
101 #define INCLUDE_uxTaskPriorityGet                       1
102 #define INCLUDE_vTaskDelete                                     1
103 #define INCLUDE_vTaskCleanUpResources           1
104 #define INCLUDE_vTaskSuspend                            1
105 #define INCLUDE_vTaskDelayUntil                         1
106 #define INCLUDE_vTaskDelay                                      1
107 #define INCLUDE_eTaskGetState                           1
108 #define INCLUDE_xTimerPendFunctionCall          1
109 #define INCLUDE_xSemaphoreGetMutexHolder        1
110 #define INCLUDE_xTaskGetHandle                          1
111 #define INCLUDE_xTaskGetCurrentTaskHandle       1
112 #define INCLUDE_xTaskGetIdleTaskHandle          1
113 #define INCLUDE_xTaskAbortDelay                         1
114 #define INCLUDE_xTaskGetSchedulerState          1
115 #define INCLUDE_xTaskGetIdleTaskHandle          1
116 #define INCLUDE_uxTaskGetStackHighWaterMark 1
117 #define INCLUDE_uxTaskGetStackHighWaterMark2 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                4        /* 15 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                 0xf
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 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
141 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
142 #define configMAX_SYSCALL_INTERRUPT_PRIORITY     ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
143
144
145 /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
146 standard names. */
147 #define xPortPendSVHandler PendSV_Handler
148 #define vPortSVCHandler SVC_Handler
149 #define xPortSysTickHandler SysTick_Handler
150
151 /* Normal assert() semantics without relying on the provision of an assert.h
152 header file. */
153 #define configASSERT( x ) if( ( x ) == 0UL ) { portDISABLE_INTERRUPTS(); for( ;; ); }
154
155 /* LED not used at present, so just increment a variable to keep a count of the
156 number of times the LED would otherwise have been toggled. */
157 #define configTOGGLE_LED()      ulLED++
158
159 /* Definitions for the messages that can be sent to the check task. */
160 #define configREG_TEST_1_STILL_EXECUTING        ( 0 )
161 #define configREG_TEST_2_STILL_EXECUTING        ( 1 )
162 #define configTIMER_STILL_EXECUTING                     ( 2 )
163 #define configPRINT_SYSTEM_STATUS                       ( 3 )
164
165 /* Parameters that are passed into the third and fourth register check tasks
166 solely for the purpose of ensuring parameters are passed into tasks correctly. */
167 #define configREG_TEST_TASK_1_PARAMETER ( ( void * ) 0x11112222 )
168 #define configREG_TEST_TASK_3_PARAMETER ( ( void * ) 0x12345678 )
169 #define configREG_TEST_TASK_4_PARAMETER ( ( void * ) 0x87654321 )
170
171 #ifdef __cplusplus
172 }
173 #endif
174
175 #endif /* FREERTOS_CONFIG_H */
176