|
1 | 1 | /*
|
2 |
| - * FreeRTOS Kernel V10.5.0 |
| 2 | + * FreeRTOS Kernel V10.5.1+ |
3 | 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
4 | 4 | *
|
5 | 5 | * SPDX-License-Identifier: MIT
|
|
55 | 55 | #endif
|
56 | 56 | /* *INDENT-ON* */
|
57 | 57 |
|
| 58 | +/* Acceptable values for configTICK_TYPE_WIDTH_IN_BITS. */ |
| 59 | +#define TICK_TYPE_WIDTH_16_BITS 0 |
| 60 | +#define TICK_TYPE_WIDTH_32_BITS 1 |
| 61 | +#define TICK_TYPE_WIDTH_64_BITS 2 |
| 62 | + |
58 | 63 | /* Application specific configuration options. */
|
59 | 64 | #include "FreeRTOSConfig.h"
|
60 | 65 |
|
| 66 | +#if !defined( configUSE_16_BIT_TICKS ) && !defined( configTICK_TYPE_WIDTH_IN_BITS ) |
| 67 | + #error Missing definition: One of configUSE_16_BIT_TICKS and configTICK_TYPE_WIDTH_IN_BITS must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details. |
| 68 | +#endif |
| 69 | + |
| 70 | +#if defined( configUSE_16_BIT_TICKS ) && defined( configTICK_TYPE_WIDTH_IN_BITS ) |
| 71 | + #error Only one of configUSE_16_BIT_TICKS and configTICK_TYPE_WIDTH_IN_BITS must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details. |
| 72 | +#endif |
| 73 | + |
| 74 | +/* Define configTICK_TYPE_WIDTH_IN_BITS according to the |
| 75 | + * value of configUSE_16_BIT_TICKS for backward compatibility. */ |
| 76 | +#ifndef configTICK_TYPE_WIDTH_IN_BITS |
| 77 | + #if ( configUSE_16_BIT_TICKS == 1 ) |
| 78 | + #define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_16_BITS |
| 79 | + #else |
| 80 | + #define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_32_BITS |
| 81 | + #endif |
| 82 | +#endif |
| 83 | + |
61 | 84 | /* Basic FreeRTOS definitions. */
|
62 | 85 | #include "projdefs.h"
|
63 | 86 |
|
|
71 | 94 |
|
72 | 95 | /* Required if struct _reent is used. */
|
73 | 96 | #if ( configUSE_NEWLIB_REENTRANT == 1 )
|
74 |
| - #include <reent.h> |
| 97 | + |
| 98 | + #include "newlib-freertos.h" |
| 99 | + |
| 100 | +#endif /* if ( configUSE_NEWLIB_REENTRANT == 1 ) */ |
| 101 | + |
| 102 | +/* Must be defaulted before configUSE_PICOLIBC_TLS is used below. */ |
| 103 | +#ifndef configUSE_PICOLIBC_TLS |
| 104 | + #define configUSE_PICOLIBC_TLS 0 |
| 105 | +#endif |
| 106 | + |
| 107 | +#if ( configUSE_PICOLIBC_TLS == 1 ) |
| 108 | + |
| 109 | + #include "picolibc-freertos.h" |
| 110 | + |
| 111 | +#endif /* if ( configUSE_PICOLIBC_TLS == 1 ) */ |
| 112 | + |
| 113 | +#ifndef configUSE_C_RUNTIME_TLS_SUPPORT |
| 114 | + #define configUSE_C_RUNTIME_TLS_SUPPORT 0 |
75 | 115 | #endif
|
76 | 116 |
|
| 117 | +#if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) |
| 118 | + |
| 119 | + #ifndef configTLS_BLOCK_TYPE |
| 120 | + #error Missing definition: configTLS_BLOCK_TYPE must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1. |
| 121 | + #endif |
| 122 | + |
| 123 | + #ifndef configINIT_TLS_BLOCK |
| 124 | + #error Missing definition: configINIT_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1. |
| 125 | + #endif |
| 126 | + |
| 127 | + #ifndef configSET_TLS_BLOCK |
| 128 | + #error Missing definition: configSET_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1. |
| 129 | + #endif |
| 130 | + |
| 131 | + #ifndef configDEINIT_TLS_BLOCK |
| 132 | + #error Missing definition: configDEINIT_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1. |
| 133 | + #endif |
| 134 | +#endif /* if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) */ |
| 135 | + |
77 | 136 | /*
|
78 | 137 | * Check all the required application specific macros have been defined.
|
79 | 138 | * These macros are application specific and (as downloaded) are defined
|
|
104 | 163 | #error Missing definition: configUSE_TICK_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
|
105 | 164 | #endif
|
106 | 165 |
|
107 |
| -#ifndef configUSE_16_BIT_TICKS |
108 |
| - #error Missing definition: configUSE_16_BIT_TICKS must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details. |
| 166 | +#if ( ( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_16_BITS ) && \ |
| 167 | + ( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_32_BITS ) && \ |
| 168 | + ( configTICK_TYPE_WIDTH_IN_BITS != TICK_TYPE_WIDTH_64_BITS ) ) |
| 169 | + #error Macro configTICK_TYPE_WIDTH_IN_BITS is defined to incorrect value. See the Configuration section of the FreeRTOS API documentation for details. |
109 | 170 | #endif
|
110 | 171 |
|
111 | 172 | #ifndef INCLUDE_vTaskPrioritySet
|
|
195 | 256 | #endif
|
196 | 257 |
|
197 | 258 | #ifndef INCLUDE_xTaskGetCurrentTaskHandle
|
198 |
| - #define INCLUDE_xTaskGetCurrentTaskHandle 0 |
| 259 | + #define INCLUDE_xTaskGetCurrentTaskHandle 1 |
| 260 | +#endif |
| 261 | + |
| 262 | +#if ( defined( configUSE_CO_ROUTINES ) && configUSE_CO_ROUTINES != 0 ) |
| 263 | + #warning Co-routines have been removed from FreeRTOS-Kernel versions released after V10.5.1. You can view previous versions of the FreeRTOS Kernel at github.com/freertos/freertos-kernel/tree/V10.5.1 . |
199 | 264 | #endif
|
200 | 265 |
|
201 | 266 | #ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
|
|
820 | 885 | #define portDONT_DISCARD
|
821 | 886 | #endif
|
822 | 887 |
|
| 888 | +#ifndef portNORETURN |
| 889 | + #define portNORETURN |
| 890 | +#endif |
| 891 | + |
823 | 892 | #ifndef configUSE_TIME_SLICING
|
824 | 893 | #define configUSE_TIME_SLICING 1
|
825 | 894 | #endif
|
|
930 | 999 | #endif
|
931 | 1000 |
|
932 | 1001 | /* Sanity check the configuration. */
|
933 |
| -#if ( configUSE_TICKLESS_IDLE != 0 ) |
934 |
| - #if ( INCLUDE_vTaskSuspend != 1 ) |
935 |
| - #error INCLUDE_vTaskSuspend must be set to 1 if configUSE_TICKLESS_IDLE is not set to 0 |
936 |
| - #endif /* INCLUDE_vTaskSuspend */ |
937 |
| -#endif /* configUSE_TICKLESS_IDLE */ |
938 |
| - |
939 | 1002 | #if ( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
|
940 | 1003 | #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
|
941 | 1004 | #endif
|
|
1059 | 1122 | #define configENABLE_FPU 1
|
1060 | 1123 | #endif
|
1061 | 1124 |
|
| 1125 | +/* Set configENABLE_MVE to 1 to enable MVE support and 0 to disable it. This is |
| 1126 | + * currently used in ARMv8M ports. */ |
| 1127 | +#ifndef configENABLE_MVE |
| 1128 | + #define configENABLE_MVE 0 |
| 1129 | +#endif |
| 1130 | + |
1062 | 1131 | /* Set configENABLE_TRUSTZONE to 1 enable TrustZone support and 0 to disable it.
|
1063 | 1132 | * This is currently used in ARMv8M ports. */
|
1064 | 1133 | #ifndef configENABLE_TRUSTZONE
|
@@ -1218,7 +1287,7 @@ typedef struct xSTATIC_TCB
|
1218 | 1287 | #if ( configGENERATE_RUN_TIME_STATS == 1 )
|
1219 | 1288 | configRUN_TIME_COUNTER_TYPE ulDummy16;
|
1220 | 1289 | #endif
|
1221 |
| - #if ( ( configUSE_NEWLIB_REENTRANT == 1 ) || ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) ) |
| 1290 | + #if ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) |
1222 | 1291 | configTLS_BLOCK_TYPE xDummy17;
|
1223 | 1292 | #endif
|
1224 | 1293 | #if ( configUSE_TASK_NOTIFICATIONS == 1 )
|
|
0 commit comments