2 * FreeRTOS Kernel <DEVELOPMENT BRANCH>
\r
3 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
5 * SPDX-License-Identifier: MIT
\r
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
8 * this software and associated documentation files (the "Software"), to deal in
\r
9 * the Software without restriction, including without limitation the rights to
\r
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
11 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
12 * subject to the following conditions:
\r
14 * The above copyright notice and this permission notice shall be included in all
\r
15 * copies or substantial portions of the Software.
\r
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
24 * https://www.FreeRTOS.org
\r
25 * https://github.com/FreeRTOS
\r
29 #ifndef INC_FREERTOS_H
\r
30 #define INC_FREERTOS_H
\r
33 * Include the generic headers required for the FreeRTOS port being used.
\r
38 * If stdint.h cannot be located then:
\r
39 * + If using GCC ensure the -nostdint options is *not* being used.
\r
40 * + Ensure the project's include path includes the directory in which your
\r
41 * compiler stores stdint.h.
\r
42 * + Set any compiler options necessary for it to support C99, as technically
\r
43 * stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any
\r
45 * + The FreeRTOS download includes a simple stdint.h definition that can be
\r
46 * used in cases where none is provided by the compiler. The files only
\r
47 * contains the typedefs required to build FreeRTOS. Read the instructions
\r
48 * in FreeRTOS/source/stdint.readme for more information.
\r
50 #include <stdint.h> /* READ COMMENT ABOVE. */
\r
58 /* Application specific configuration options. */
\r
59 #include "FreeRTOSConfig.h"
\r
61 /* Basic FreeRTOS definitions. */
\r
62 #include "projdefs.h"
\r
64 /* Definitions specific to the port being used. */
\r
65 #include "portable.h"
\r
67 /* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */
\r
68 #ifndef configUSE_NEWLIB_REENTRANT
\r
69 #define configUSE_NEWLIB_REENTRANT 0
\r
72 /* Required if struct _reent is used. */
\r
73 #if ( configUSE_NEWLIB_REENTRANT == 1 )
\r
75 /* Note Newlib support has been included by popular demand, but is not
\r
76 * used by the FreeRTOS maintainers themselves. FreeRTOS is not
\r
77 * responsible for resulting newlib operation. User must be familiar with
\r
78 * newlib and must provide system-wide implementations of the necessary
\r
79 * stubs. Be warned that (at the time of writing) the current newlib design
\r
80 * implements a system-wide malloc() that must be provided with locks.
\r
82 * See the third party link http://www.nadler.com/embedded/newlibAndFreeRTOS.html
\r
83 * for additional information. */
\r
86 #define configUSE_C_RUNTIME_TLS_SUPPORT 1
\r
88 #ifndef configTLS_BLOCK_TYPE
\r
89 #define configTLS_BLOCK_TYPE struct _reent
\r
92 #ifndef configINIT_TLS_BLOCK
\r
93 #define configINIT_TLS_BLOCK( xTLSBlock ) _REENT_INIT_PTR( &( xTLSBlock ) )
\r
96 #ifndef configSET_TLS_BLOCK
\r
97 #define configSET_TLS_BLOCK( xTLSBlock ) _impure_ptr = &( xTLSBlock )
\r
100 #ifndef configDEINIT_TLS_BLOCK
\r
101 #define configDEINIT_TLS_BLOCK( xTLSBlock ) _reclaim_reent( &( xTLSBlock ) )
\r
103 #endif /* if ( configUSE_NEWLIB_REENTRANT == 1 ) */
\r
105 #ifndef configUSE_C_RUNTIME_TLS_SUPPORT
\r
106 #define configUSE_C_RUNTIME_TLS_SUPPORT 0
\r
109 #if ( ( configUSE_NEWLIB_REENTRANT == 0 ) && ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) )
\r
111 #ifndef configTLS_BLOCK_TYPE
\r
112 #error Missing definition: configTLS_BLOCK_TYPE must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1.
\r
115 #ifndef configINIT_TLS_BLOCK
\r
116 #error Missing definition: configINIT_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1.
\r
119 #ifndef configSET_TLS_BLOCK
\r
120 #error Missing definition: configSET_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1.
\r
123 #ifndef configDEINIT_TLS_BLOCK
\r
124 #error Missing definition: configDEINIT_TLS_BLOCK must be defined in FreeRTOSConfig.h when configUSE_C_RUNTIME_TLS_SUPPORT is set to 1.
\r
126 #endif /* if ( ( configUSE_NEWLIB_REENTRANT == 0 ) && ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) ) */
\r
129 * Check all the required application specific macros have been defined.
\r
130 * These macros are application specific and (as downloaded) are defined
\r
131 * within FreeRTOSConfig.h.
\r
134 #ifndef configMINIMAL_STACK_SIZE
\r
135 #error Missing definition: configMINIMAL_STACK_SIZE must be defined in FreeRTOSConfig.h. configMINIMAL_STACK_SIZE defines the size (in words) of the stack allocated to the idle task. Refer to the demo project provided for your port for a suitable value.
\r
138 #ifndef configMAX_PRIORITIES
\r
139 #error Missing definition: configMAX_PRIORITIES must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details.
\r
142 #if configMAX_PRIORITIES < 1
\r
143 #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
\r
146 #ifndef configUSE_PREEMPTION
\r
147 #error Missing definition: configUSE_PREEMPTION must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
150 #ifndef configUSE_IDLE_HOOK
\r
151 #error Missing definition: configUSE_IDLE_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0. See the Configuration section of the FreeRTOS API documentation for details.
\r
154 #ifndef configUSE_TICK_HOOK
\r
155 #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.
\r
158 #ifndef configUSE_16_BIT_TICKS
\r
159 #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.
\r
162 #ifndef INCLUDE_vTaskPrioritySet
\r
163 #define INCLUDE_vTaskPrioritySet 0
\r
166 #ifndef INCLUDE_uxTaskPriorityGet
\r
167 #define INCLUDE_uxTaskPriorityGet 0
\r
170 #ifndef INCLUDE_vTaskDelete
\r
171 #define INCLUDE_vTaskDelete 0
\r
174 #ifndef INCLUDE_vTaskSuspend
\r
175 #define INCLUDE_vTaskSuspend 0
\r
178 #ifdef INCLUDE_xTaskDelayUntil
\r
179 #ifdef INCLUDE_vTaskDelayUntil
\r
181 /* INCLUDE_vTaskDelayUntil was replaced by INCLUDE_xTaskDelayUntil. Backward
\r
182 * compatibility is maintained if only one or the other is defined, but
\r
183 * there is a conflict if both are defined. */
\r
184 #error INCLUDE_vTaskDelayUntil and INCLUDE_xTaskDelayUntil are both defined. INCLUDE_vTaskDelayUntil is no longer required and should be removed
\r
188 #ifndef INCLUDE_xTaskDelayUntil
\r
189 #ifdef INCLUDE_vTaskDelayUntil
\r
191 /* If INCLUDE_vTaskDelayUntil is set but INCLUDE_xTaskDelayUntil is not then
\r
192 * the project's FreeRTOSConfig.h probably pre-dates the introduction of
\r
193 * xTaskDelayUntil and setting INCLUDE_xTaskDelayUntil to whatever
\r
194 * INCLUDE_vTaskDelayUntil is set to will ensure backward compatibility.
\r
196 #define INCLUDE_xTaskDelayUntil INCLUDE_vTaskDelayUntil
\r
200 #ifndef INCLUDE_xTaskDelayUntil
\r
201 #define INCLUDE_xTaskDelayUntil 0
\r
204 #ifndef INCLUDE_vTaskDelay
\r
205 #define INCLUDE_vTaskDelay 0
\r
208 #ifndef INCLUDE_xTaskGetIdleTaskHandle
\r
209 #define INCLUDE_xTaskGetIdleTaskHandle 0
\r
212 #ifndef INCLUDE_xTaskAbortDelay
\r
213 #define INCLUDE_xTaskAbortDelay 0
\r
216 #ifndef INCLUDE_xQueueGetMutexHolder
\r
217 #define INCLUDE_xQueueGetMutexHolder 0
\r
220 #ifndef INCLUDE_xSemaphoreGetMutexHolder
\r
221 #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
\r
224 #ifndef INCLUDE_xTaskGetHandle
\r
225 #define INCLUDE_xTaskGetHandle 0
\r
228 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
\r
229 #define INCLUDE_uxTaskGetStackHighWaterMark 0
\r
232 #ifndef INCLUDE_uxTaskGetStackHighWaterMark2
\r
233 #define INCLUDE_uxTaskGetStackHighWaterMark2 0
\r
236 #ifndef INCLUDE_eTaskGetState
\r
237 #define INCLUDE_eTaskGetState 0
\r
240 #ifndef INCLUDE_xTaskResumeFromISR
\r
241 #define INCLUDE_xTaskResumeFromISR 1
\r
244 #ifndef INCLUDE_xTimerPendFunctionCall
\r
245 #define INCLUDE_xTimerPendFunctionCall 0
\r
248 #ifndef INCLUDE_xTaskGetSchedulerState
\r
249 #define INCLUDE_xTaskGetSchedulerState 0
\r
252 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
\r
253 #define INCLUDE_xTaskGetCurrentTaskHandle 1
\r
256 #if ( defined( configUSE_CO_ROUTINES ) && configUSE_CO_ROUTINES != 0 )
\r
257 #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 .
\r
260 #ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
\r
261 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
\r
264 #ifndef configUSE_APPLICATION_TASK_TAG
\r
265 #define configUSE_APPLICATION_TASK_TAG 0
\r
268 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
\r
269 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
\r
272 #ifndef configUSE_RECURSIVE_MUTEXES
\r
273 #define configUSE_RECURSIVE_MUTEXES 0
\r
276 #ifndef configUSE_MUTEXES
\r
277 #define configUSE_MUTEXES 0
\r
280 #ifndef configUSE_TIMERS
\r
281 #define configUSE_TIMERS 0
\r
284 #ifndef configUSE_COUNTING_SEMAPHORES
\r
285 #define configUSE_COUNTING_SEMAPHORES 0
\r
288 #ifndef configUSE_ALTERNATIVE_API
\r
289 #define configUSE_ALTERNATIVE_API 0
\r
292 #ifndef portCRITICAL_NESTING_IN_TCB
\r
293 #define portCRITICAL_NESTING_IN_TCB 0
\r
296 #ifndef configMAX_TASK_NAME_LEN
\r
297 #define configMAX_TASK_NAME_LEN 16
\r
300 #ifndef configIDLE_SHOULD_YIELD
\r
301 #define configIDLE_SHOULD_YIELD 1
\r
304 #if configMAX_TASK_NAME_LEN < 1
\r
305 #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
\r
308 #ifndef configASSERT
\r
309 #define configASSERT( x )
\r
310 #define configASSERT_DEFINED 0
\r
312 #define configASSERT_DEFINED 1
\r
315 /* configPRECONDITION should be defined as configASSERT.
\r
316 * The CBMC proofs need a way to track assumptions and assertions.
\r
317 * A configPRECONDITION statement should express an implicit invariant or
\r
318 * assumption made. A configASSERT statement should express an invariant that must
\r
319 * hold explicit before calling the code. */
\r
320 #ifndef configPRECONDITION
\r
321 #define configPRECONDITION( X ) configASSERT( X )
\r
322 #define configPRECONDITION_DEFINED 0
\r
324 #define configPRECONDITION_DEFINED 1
\r
327 #ifndef portMEMORY_BARRIER
\r
328 #define portMEMORY_BARRIER()
\r
331 #ifndef portSOFTWARE_BARRIER
\r
332 #define portSOFTWARE_BARRIER()
\r
335 /* The timers module relies on xTaskGetSchedulerState(). */
\r
336 #if configUSE_TIMERS == 1
\r
338 #ifndef configTIMER_TASK_PRIORITY
\r
339 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
\r
340 #endif /* configTIMER_TASK_PRIORITY */
\r
342 #ifndef configTIMER_QUEUE_LENGTH
\r
343 #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
\r
344 #endif /* configTIMER_QUEUE_LENGTH */
\r
346 #ifndef configTIMER_TASK_STACK_DEPTH
\r
347 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
\r
348 #endif /* configTIMER_TASK_STACK_DEPTH */
\r
350 #endif /* configUSE_TIMERS */
\r
352 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
\r
353 #define portSET_INTERRUPT_MASK_FROM_ISR() 0
\r
356 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
\r
357 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) ( uxSavedStatusValue )
\r
360 #ifndef portCLEAN_UP_TCB
\r
361 #define portCLEAN_UP_TCB( pxTCB ) ( void ) ( pxTCB )
\r
364 #ifndef portPRE_TASK_DELETE_HOOK
\r
365 #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
\r
368 #ifndef portSETUP_TCB
\r
369 #define portSETUP_TCB( pxTCB ) ( void ) ( pxTCB )
\r
372 #ifndef configQUEUE_REGISTRY_SIZE
\r
373 #define configQUEUE_REGISTRY_SIZE 0U
\r
376 #if ( configQUEUE_REGISTRY_SIZE < 1 )
\r
377 #define vQueueAddToRegistry( xQueue, pcName )
\r
378 #define vQueueUnregisterQueue( xQueue )
\r
379 #define pcQueueGetName( xQueue )
\r
382 #ifndef configUSE_MINI_LIST_ITEM
\r
383 #define configUSE_MINI_LIST_ITEM 1
\r
386 #ifndef portPOINTER_SIZE_TYPE
\r
387 #define portPOINTER_SIZE_TYPE uint32_t
\r
390 /* Remove any unused trace macros. */
\r
393 /* Used to perform any necessary initialisation - for example, open a file
\r
394 * into which trace is to be written. */
\r
395 #define traceSTART()
\r
400 /* Use to close a trace, for example close a file into which trace has been
\r
405 #ifndef traceTASK_SWITCHED_IN
\r
407 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
\r
408 * to the task control block of the selected task. */
\r
409 #define traceTASK_SWITCHED_IN()
\r
412 #ifndef traceINCREASE_TICK_COUNT
\r
414 /* Called before stepping the tick count after waking from tickless idle
\r
416 #define traceINCREASE_TICK_COUNT( x )
\r
419 #ifndef traceLOW_POWER_IDLE_BEGIN
\r
420 /* Called immediately before entering tickless idle. */
\r
421 #define traceLOW_POWER_IDLE_BEGIN()
\r
424 #ifndef traceLOW_POWER_IDLE_END
\r
425 /* Called when returning to the Idle task after a tickless idle. */
\r
426 #define traceLOW_POWER_IDLE_END()
\r
429 #ifndef traceTASK_SWITCHED_OUT
\r
431 /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
\r
432 * to the task control block of the task being switched out. */
\r
433 #define traceTASK_SWITCHED_OUT()
\r
436 #ifndef traceTASK_PRIORITY_INHERIT
\r
438 /* Called when a task attempts to take a mutex that is already held by a
\r
439 * lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task
\r
440 * that holds the mutex. uxInheritedPriority is the priority the mutex holder
\r
441 * will inherit (the priority of the task that is attempting to obtain the
\r
443 #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
\r
446 #ifndef traceTASK_PRIORITY_DISINHERIT
\r
448 /* Called when a task releases a mutex, the holding of which had resulted in
\r
449 * the task inheriting the priority of a higher priority task.
\r
450 * pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
\r
451 * mutex. uxOriginalPriority is the task's configured (base) priority. */
\r
452 #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
\r
455 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
\r
457 /* Task is about to block because it cannot read from a
\r
458 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
459 * upon which the read was attempted. pxCurrentTCB points to the TCB of the
\r
460 * task that attempted the read. */
\r
461 #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
\r
464 #ifndef traceBLOCKING_ON_QUEUE_PEEK
\r
466 /* Task is about to block because it cannot read from a
\r
467 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
468 * upon which the read was attempted. pxCurrentTCB points to the TCB of the
\r
469 * task that attempted the read. */
\r
470 #define traceBLOCKING_ON_QUEUE_PEEK( pxQueue )
\r
473 #ifndef traceBLOCKING_ON_QUEUE_SEND
\r
475 /* Task is about to block because it cannot write to a
\r
476 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
\r
477 * upon which the write was attempted. pxCurrentTCB points to the TCB of the
\r
478 * task that attempted the write. */
\r
479 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
\r
482 #ifndef configCHECK_FOR_STACK_OVERFLOW
\r
483 #define configCHECK_FOR_STACK_OVERFLOW 0
\r
486 #ifndef configRECORD_STACK_HIGH_ADDRESS
\r
487 #define configRECORD_STACK_HIGH_ADDRESS 0
\r
490 #ifndef configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H
\r
491 #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 0
\r
494 /* The following event macros are embedded in the kernel API calls. */
\r
496 #ifndef traceMOVED_TASK_TO_READY_STATE
\r
497 #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
\r
500 #ifndef tracePOST_MOVED_TASK_TO_READY_STATE
\r
501 #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
\r
504 #ifndef traceQUEUE_CREATE
\r
505 #define traceQUEUE_CREATE( pxNewQueue )
\r
508 #ifndef traceQUEUE_CREATE_FAILED
\r
509 #define traceQUEUE_CREATE_FAILED( ucQueueType )
\r
512 #ifndef traceCREATE_MUTEX
\r
513 #define traceCREATE_MUTEX( pxNewQueue )
\r
516 #ifndef traceCREATE_MUTEX_FAILED
\r
517 #define traceCREATE_MUTEX_FAILED()
\r
520 #ifndef traceGIVE_MUTEX_RECURSIVE
\r
521 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
\r
524 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
\r
525 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
\r
528 #ifndef traceTAKE_MUTEX_RECURSIVE
\r
529 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
\r
532 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
\r
533 #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
\r
536 #ifndef traceCREATE_COUNTING_SEMAPHORE
\r
537 #define traceCREATE_COUNTING_SEMAPHORE()
\r
540 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
\r
541 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
\r
544 #ifndef traceQUEUE_SET_SEND
\r
545 #define traceQUEUE_SET_SEND traceQUEUE_SEND
\r
548 #ifndef traceQUEUE_SEND
\r
549 #define traceQUEUE_SEND( pxQueue )
\r
552 #ifndef traceQUEUE_SEND_FAILED
\r
553 #define traceQUEUE_SEND_FAILED( pxQueue )
\r
556 #ifndef traceQUEUE_RECEIVE
\r
557 #define traceQUEUE_RECEIVE( pxQueue )
\r
560 #ifndef traceQUEUE_PEEK
\r
561 #define traceQUEUE_PEEK( pxQueue )
\r
564 #ifndef traceQUEUE_PEEK_FAILED
\r
565 #define traceQUEUE_PEEK_FAILED( pxQueue )
\r
568 #ifndef traceQUEUE_PEEK_FROM_ISR
\r
569 #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
\r
572 #ifndef traceQUEUE_RECEIVE_FAILED
\r
573 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
\r
576 #ifndef traceQUEUE_SEND_FROM_ISR
\r
577 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
\r
580 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
\r
581 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
\r
584 #ifndef traceQUEUE_RECEIVE_FROM_ISR
\r
585 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
\r
588 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
\r
589 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
\r
592 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
\r
593 #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
\r
596 #ifndef traceQUEUE_DELETE
\r
597 #define traceQUEUE_DELETE( pxQueue )
\r
600 #ifndef traceTASK_CREATE
\r
601 #define traceTASK_CREATE( pxNewTCB )
\r
604 #ifndef traceTASK_CREATE_FAILED
\r
605 #define traceTASK_CREATE_FAILED()
\r
608 #ifndef traceTASK_DELETE
\r
609 #define traceTASK_DELETE( pxTaskToDelete )
\r
612 #ifndef traceTASK_DELAY_UNTIL
\r
613 #define traceTASK_DELAY_UNTIL( x )
\r
616 #ifndef traceTASK_DELAY
\r
617 #define traceTASK_DELAY()
\r
620 #ifndef traceTASK_PRIORITY_SET
\r
621 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
\r
624 #ifndef traceTASK_SUSPEND
\r
625 #define traceTASK_SUSPEND( pxTaskToSuspend )
\r
628 #ifndef traceTASK_RESUME
\r
629 #define traceTASK_RESUME( pxTaskToResume )
\r
632 #ifndef traceTASK_RESUME_FROM_ISR
\r
633 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
\r
636 #ifndef traceTASK_INCREMENT_TICK
\r
637 #define traceTASK_INCREMENT_TICK( xTickCount )
\r
640 #ifndef traceTIMER_CREATE
\r
641 #define traceTIMER_CREATE( pxNewTimer )
\r
644 #ifndef traceTIMER_CREATE_FAILED
\r
645 #define traceTIMER_CREATE_FAILED()
\r
648 #ifndef traceTIMER_COMMAND_SEND
\r
649 #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
\r
652 #ifndef traceTIMER_EXPIRED
\r
653 #define traceTIMER_EXPIRED( pxTimer )
\r
656 #ifndef traceTIMER_COMMAND_RECEIVED
\r
657 #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
\r
660 #ifndef traceMALLOC
\r
661 #define traceMALLOC( pvAddress, uiSize )
\r
665 #define traceFREE( pvAddress, uiSize )
\r
668 #ifndef traceEVENT_GROUP_CREATE
\r
669 #define traceEVENT_GROUP_CREATE( xEventGroup )
\r
672 #ifndef traceEVENT_GROUP_CREATE_FAILED
\r
673 #define traceEVENT_GROUP_CREATE_FAILED()
\r
676 #ifndef traceEVENT_GROUP_SYNC_BLOCK
\r
677 #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
\r
680 #ifndef traceEVENT_GROUP_SYNC_END
\r
681 #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) ( xTimeoutOccurred )
\r
684 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
\r
685 #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
\r
688 #ifndef traceEVENT_GROUP_WAIT_BITS_END
\r
689 #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) ( xTimeoutOccurred )
\r
692 #ifndef traceEVENT_GROUP_CLEAR_BITS
\r
693 #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
\r
696 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
\r
697 #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
\r
700 #ifndef traceEVENT_GROUP_SET_BITS
\r
701 #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
\r
704 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
\r
705 #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
\r
708 #ifndef traceEVENT_GROUP_DELETE
\r
709 #define traceEVENT_GROUP_DELETE( xEventGroup )
\r
712 #ifndef tracePEND_FUNC_CALL
\r
713 #define tracePEND_FUNC_CALL( xFunctionToPend, pvParameter1, ulParameter2, ret )
\r
716 #ifndef tracePEND_FUNC_CALL_FROM_ISR
\r
717 #define tracePEND_FUNC_CALL_FROM_ISR( xFunctionToPend, pvParameter1, ulParameter2, ret )
\r
720 #ifndef traceQUEUE_REGISTRY_ADD
\r
721 #define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName )
\r
724 #ifndef traceTASK_NOTIFY_TAKE_BLOCK
\r
725 #define traceTASK_NOTIFY_TAKE_BLOCK( uxIndexToWait )
\r
728 #ifndef traceTASK_NOTIFY_TAKE
\r
729 #define traceTASK_NOTIFY_TAKE( uxIndexToWait )
\r
732 #ifndef traceTASK_NOTIFY_WAIT_BLOCK
\r
733 #define traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait )
\r
736 #ifndef traceTASK_NOTIFY_WAIT
\r
737 #define traceTASK_NOTIFY_WAIT( uxIndexToWait )
\r
740 #ifndef traceTASK_NOTIFY
\r
741 #define traceTASK_NOTIFY( uxIndexToNotify )
\r
744 #ifndef traceTASK_NOTIFY_FROM_ISR
\r
745 #define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
\r
748 #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
\r
749 #define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
\r
752 #ifndef traceSTREAM_BUFFER_CREATE_FAILED
\r
753 #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer )
\r
756 #ifndef traceSTREAM_BUFFER_CREATE_STATIC_FAILED
\r
757 #define traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer )
\r
760 #ifndef traceSTREAM_BUFFER_CREATE
\r
761 #define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer )
\r
764 #ifndef traceSTREAM_BUFFER_DELETE
\r
765 #define traceSTREAM_BUFFER_DELETE( xStreamBuffer )
\r
768 #ifndef traceSTREAM_BUFFER_RESET
\r
769 #define traceSTREAM_BUFFER_RESET( xStreamBuffer )
\r
772 #ifndef traceBLOCKING_ON_STREAM_BUFFER_SEND
\r
773 #define traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer )
\r
776 #ifndef traceSTREAM_BUFFER_SEND
\r
777 #define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent )
\r
780 #ifndef traceSTREAM_BUFFER_SEND_FAILED
\r
781 #define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer )
\r
784 #ifndef traceSTREAM_BUFFER_SEND_FROM_ISR
\r
785 #define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent )
\r
788 #ifndef traceBLOCKING_ON_STREAM_BUFFER_RECEIVE
\r
789 #define traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer )
\r
792 #ifndef traceSTREAM_BUFFER_RECEIVE
\r
793 #define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength )
\r
796 #ifndef traceSTREAM_BUFFER_RECEIVE_FAILED
\r
797 #define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer )
\r
800 #ifndef traceSTREAM_BUFFER_RECEIVE_FROM_ISR
\r
801 #define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
\r
804 #ifndef configGENERATE_RUN_TIME_STATS
\r
805 #define configGENERATE_RUN_TIME_STATS 0
\r
808 #if ( configGENERATE_RUN_TIME_STATS == 1 )
\r
810 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
\r
811 #error If configGENERATE_RUN_TIME_STATS is defined then portCONFIGURE_TIMER_FOR_RUN_TIME_STATS must also be defined. portCONFIGURE_TIMER_FOR_RUN_TIME_STATS should call a port layer function to setup a peripheral timer/counter that can then be used as the run time counter time base.
\r
812 #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
\r
814 #ifndef portGET_RUN_TIME_COUNTER_VALUE
\r
815 #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
\r
816 #error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined. See the examples provided and the FreeRTOS web site for more information.
\r
817 #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
\r
818 #endif /* portGET_RUN_TIME_COUNTER_VALUE */
\r
820 #endif /* configGENERATE_RUN_TIME_STATS */
\r
822 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
\r
823 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
\r
826 #ifndef configUSE_MALLOC_FAILED_HOOK
\r
827 #define configUSE_MALLOC_FAILED_HOOK 0
\r
830 #ifndef portPRIVILEGE_BIT
\r
831 #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
\r
834 #ifndef portYIELD_WITHIN_API
\r
835 #define portYIELD_WITHIN_API portYIELD
\r
838 #ifndef portSUPPRESS_TICKS_AND_SLEEP
\r
839 #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
\r
842 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
\r
843 #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
\r
846 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
\r
847 #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
\r
850 #ifndef configUSE_TICKLESS_IDLE
\r
851 #define configUSE_TICKLESS_IDLE 0
\r
854 #ifndef configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING
\r
855 #define configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING( x )
\r
858 #ifndef configPRE_SLEEP_PROCESSING
\r
859 #define configPRE_SLEEP_PROCESSING( x )
\r
862 #ifndef configPOST_SLEEP_PROCESSING
\r
863 #define configPOST_SLEEP_PROCESSING( x )
\r
866 #ifndef configUSE_QUEUE_SETS
\r
867 #define configUSE_QUEUE_SETS 0
\r
870 #ifndef portTASK_USES_FLOATING_POINT
\r
871 #define portTASK_USES_FLOATING_POINT()
\r
874 #ifndef portALLOCATE_SECURE_CONTEXT
\r
875 #define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
\r
878 #ifndef portDONT_DISCARD
\r
879 #define portDONT_DISCARD
\r
882 #ifndef configUSE_TIME_SLICING
\r
883 #define configUSE_TIME_SLICING 1
\r
886 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
\r
887 #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
\r
890 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
\r
891 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
\r
894 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
\r
895 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
\r
898 #ifndef configUSE_TRACE_FACILITY
\r
899 #define configUSE_TRACE_FACILITY 0
\r
902 #ifndef mtCOVERAGE_TEST_MARKER
\r
903 #define mtCOVERAGE_TEST_MARKER()
\r
906 #ifndef mtCOVERAGE_TEST_DELAY
\r
907 #define mtCOVERAGE_TEST_DELAY()
\r
910 #ifndef portASSERT_IF_IN_ISR
\r
911 #define portASSERT_IF_IN_ISR()
\r
914 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
\r
915 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
\r
918 #ifndef configAPPLICATION_ALLOCATED_HEAP
\r
919 #define configAPPLICATION_ALLOCATED_HEAP 0
\r
922 #ifndef configUSE_TASK_NOTIFICATIONS
\r
923 #define configUSE_TASK_NOTIFICATIONS 1
\r
926 #ifndef configTASK_NOTIFICATION_ARRAY_ENTRIES
\r
927 #define configTASK_NOTIFICATION_ARRAY_ENTRIES 1
\r
930 #if configTASK_NOTIFICATION_ARRAY_ENTRIES < 1
\r
931 #error configTASK_NOTIFICATION_ARRAY_ENTRIES must be at least 1
\r
934 #ifndef configUSE_POSIX_ERRNO
\r
935 #define configUSE_POSIX_ERRNO 0
\r
938 #ifndef configUSE_SB_COMPLETED_CALLBACK
\r
940 /* By default per-instance callbacks are not enabled for stream buffer or message buffer. */
\r
941 #define configUSE_SB_COMPLETED_CALLBACK 0
\r
944 #ifndef portTICK_TYPE_IS_ATOMIC
\r
945 #define portTICK_TYPE_IS_ATOMIC 0
\r
948 #ifndef configSUPPORT_STATIC_ALLOCATION
\r
949 /* Defaults to 0 for backward compatibility. */
\r
950 #define configSUPPORT_STATIC_ALLOCATION 0
\r
953 #ifndef configSUPPORT_DYNAMIC_ALLOCATION
\r
954 /* Defaults to 1 for backward compatibility. */
\r
955 #define configSUPPORT_DYNAMIC_ALLOCATION 1
\r
958 #if ( ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION != 1 ) )
\r
959 #error configUSE_STATS_FORMATTING_FUNCTIONS cannot be used without dynamic allocation, but configSUPPORT_DYNAMIC_ALLOCATION is not set to 1.
\r
962 #if ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 )
\r
963 #if ( ( configUSE_TRACE_FACILITY != 1 ) && ( configGENERATE_RUN_TIME_STATS != 1 ) )
\r
964 #error configUSE_STATS_FORMATTING_FUNCTIONS is 1 but the functions it enables are not used because neither configUSE_TRACE_FACILITY or configGENERATE_RUN_TIME_STATS are 1. Set configUSE_STATS_FORMATTING_FUNCTIONS to 0 in FreeRTOSConfig.h.
\r
968 #ifndef configSTACK_DEPTH_TYPE
\r
970 /* Defaults to uint16_t for backward compatibility, but can be overridden
\r
971 * in FreeRTOSConfig.h if uint16_t is too restrictive. */
\r
972 #define configSTACK_DEPTH_TYPE uint16_t
\r
975 #ifndef configRUN_TIME_COUNTER_TYPE
\r
977 /* Defaults to uint32_t for backward compatibility, but can be overridden in
\r
978 * FreeRTOSConfig.h if uint32_t is too restrictive. */
\r
980 #define configRUN_TIME_COUNTER_TYPE uint32_t
\r
983 #ifndef configMESSAGE_BUFFER_LENGTH_TYPE
\r
985 /* Defaults to size_t for backward compatibility, but can be overridden
\r
986 * in FreeRTOSConfig.h if lengths will always be less than the number of bytes
\r
988 #define configMESSAGE_BUFFER_LENGTH_TYPE size_t
\r
991 /* Sanity check the configuration. */
\r
992 #if ( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
\r
993 #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
\r
996 #if ( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )
\r
997 #error configUSE_MUTEXES must be set to 1 to use recursive mutexes
\r
1000 #ifndef configINITIAL_TICK_COUNT
\r
1001 #define configINITIAL_TICK_COUNT 0
\r
1004 #if ( portTICK_TYPE_IS_ATOMIC == 0 )
\r
1006 /* Either variables of tick type cannot be read atomically, or
\r
1007 * portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
\r
1008 * the tick count is returned to the standard critical section macros. */
\r
1009 #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
\r
1010 #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
\r
1011 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
\r
1012 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
\r
1015 /* The tick type can be read atomically, so critical sections used when the
\r
1016 * tick count is returned can be defined away. */
\r
1017 #define portTICK_TYPE_ENTER_CRITICAL()
\r
1018 #define portTICK_TYPE_EXIT_CRITICAL()
\r
1019 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
\r
1020 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) ( x )
\r
1021 #endif /* if ( portTICK_TYPE_IS_ATOMIC == 0 ) */
\r
1023 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
\r
1024 * V8 if desired. */
\r
1025 #ifndef configENABLE_BACKWARD_COMPATIBILITY
\r
1026 #define configENABLE_BACKWARD_COMPATIBILITY 1
\r
1029 #ifndef configPRINTF
\r
1031 /* configPRINTF() was not defined, so define it away to nothing. To use
\r
1032 * configPRINTF() then define it as follows (where MyPrintFunction() is
\r
1033 * provided by the application writer):
\r
1035 * void MyPrintFunction(const char *pcFormat, ... );
\r
1036 #define configPRINTF( X ) MyPrintFunction X
\r
1038 * Then call like a standard printf() function, but placing brackets around
\r
1039 * all parameters so they are passed as a single parameter. For example:
\r
1040 * configPRINTF( ("Value = %d", MyVariable) ); */
\r
1041 #define configPRINTF( X )
\r
1046 /* The application writer has not provided their own MAX macro, so define
\r
1047 * the following generic implementation. */
\r
1048 #define configMAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
\r
1053 /* The application writer has not provided their own MIN macro, so define
\r
1054 * the following generic implementation. */
\r
1055 #define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
\r
1058 #if configENABLE_BACKWARD_COMPATIBILITY == 1
\r
1059 #define eTaskStateGet eTaskGetState
\r
1060 #define portTickType TickType_t
\r
1061 #define xTaskHandle TaskHandle_t
\r
1062 #define xQueueHandle QueueHandle_t
\r
1063 #define xSemaphoreHandle SemaphoreHandle_t
\r
1064 #define xQueueSetHandle QueueSetHandle_t
\r
1065 #define xQueueSetMemberHandle QueueSetMemberHandle_t
\r
1066 #define xTimeOutType TimeOut_t
\r
1067 #define xMemoryRegion MemoryRegion_t
\r
1068 #define xTaskParameters TaskParameters_t
\r
1069 #define xTaskStatusType TaskStatus_t
\r
1070 #define xTimerHandle TimerHandle_t
\r
1071 #define xCoRoutineHandle CoRoutineHandle_t
\r
1072 #define pdTASK_HOOK_CODE TaskHookFunction_t
\r
1073 #define portTICK_RATE_MS portTICK_PERIOD_MS
\r
1074 #define pcTaskGetTaskName pcTaskGetName
\r
1075 #define pcTimerGetTimerName pcTimerGetName
\r
1076 #define pcQueueGetQueueName pcQueueGetName
\r
1077 #define vTaskGetTaskInfo vTaskGetInfo
\r
1078 #define xTaskGetIdleRunTimeCounter ulTaskGetIdleRunTimeCounter
\r
1080 /* Backward compatibility within the scheduler code only - these definitions
\r
1081 * are not really required but are included for completeness. */
\r
1082 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
\r
1083 #define pdTASK_CODE TaskFunction_t
\r
1084 #define xListItem ListItem_t
\r
1085 #define xList List_t
\r
1087 /* For libraries that break the list data hiding, and access list structure
\r
1088 * members directly (which is not supposed to be done). */
\r
1089 #define pxContainer pvContainer
\r
1090 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
\r
1092 #if ( configUSE_ALTERNATIVE_API != 0 )
\r
1093 #error The alternative API was deprecated some time ago, and was removed in FreeRTOS V9.0 0
\r
1096 /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even
\r
1097 * if floating point hardware is otherwise supported by the FreeRTOS port in use.
\r
1098 * This constant is not supported by all FreeRTOS ports that include floating
\r
1099 * point support. */
\r
1100 #ifndef configUSE_TASK_FPU_SUPPORT
\r
1101 #define configUSE_TASK_FPU_SUPPORT 1
\r
1104 /* Set configENABLE_MPU to 1 to enable MPU support and 0 to disable it. This is
\r
1105 * currently used in ARMv8M ports. */
\r
1106 #ifndef configENABLE_MPU
\r
1107 #define configENABLE_MPU 0
\r
1110 /* Set configENABLE_FPU to 1 to enable FPU support and 0 to disable it. This is
\r
1111 * currently used in ARMv8M ports. */
\r
1112 #ifndef configENABLE_FPU
\r
1113 #define configENABLE_FPU 1
\r
1116 /* Set configENABLE_MVE to 1 to enable MVE support and 0 to disable it. This is
\r
1117 * currently used in ARMv8M ports. */
\r
1118 #ifndef configENABLE_MVE
\r
1119 #define configENABLE_MVE 0
\r
1122 /* Set configENABLE_TRUSTZONE to 1 enable TrustZone support and 0 to disable it.
\r
1123 * This is currently used in ARMv8M ports. */
\r
1124 #ifndef configENABLE_TRUSTZONE
\r
1125 #define configENABLE_TRUSTZONE 1
\r
1128 /* Set configRUN_FREERTOS_SECURE_ONLY to 1 to run the FreeRTOS ARMv8M port on
\r
1129 * the Secure Side only. */
\r
1130 #ifndef configRUN_FREERTOS_SECURE_ONLY
\r
1131 #define configRUN_FREERTOS_SECURE_ONLY 0
\r
1134 #ifndef configRUN_ADDITIONAL_TESTS
\r
1135 #define configRUN_ADDITIONAL_TESTS 0
\r
1139 /* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
\r
1140 * dynamically allocated RAM, in which case when any task is deleted it is known
\r
1141 * that both the task's stack and TCB need to be freed. Sometimes the
\r
1142 * FreeRTOSConfig.h settings only allow a task to be created using statically
\r
1143 * allocated RAM, in which case when any task is deleted it is known that neither
\r
1144 * the task's stack or TCB should be freed. Sometimes the FreeRTOSConfig.h
\r
1145 * settings allow a task to be created using either statically or dynamically
\r
1146 * allocated RAM, in which case a member of the TCB is used to record whether the
\r
1147 * stack and/or TCB were allocated statically or dynamically, so when a task is
\r
1148 * deleted the RAM that was allocated dynamically is freed again and no attempt is
\r
1149 * made to free the RAM that was allocated statically.
\r
1150 * tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a
\r
1151 * task to be created using either statically or dynamically allocated RAM. Note
\r
1152 * that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with
\r
1153 * a statically allocated stack and a dynamically allocated TCB.
\r
1155 * The following table lists various combinations of portUSING_MPU_WRAPPERS,
\r
1156 * configSUPPORT_DYNAMIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION and
\r
1157 * when it is possible to have both static and dynamic allocation:
\r
1158 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
\r
1159 * | MPU | Dynamic | Static | Available Functions | Possible Allocations | Both Dynamic and | Need Free |
\r
1160 * | | | | | | Static Possible | |
\r
1161 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
\r
1162 * | 0 | 0 | 1 | xTaskCreateStatic | TCB - Static, Stack - Static | No | No |
\r
1163 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1164 * | 0 | 1 | 0 | xTaskCreate | TCB - Dynamic, Stack - Dynamic | No | Yes |
\r
1165 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1166 * | 0 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
\r
1167 * | | | | xTaskCreateStatic | 2. TCB - Static, Stack - Static | | |
\r
1168 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1169 * | 1 | 0 | 1 | xTaskCreateStatic, | TCB - Static, Stack - Static | No | No |
\r
1170 * | | | | xTaskCreateRestrictedStatic | | | |
\r
1171 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1172 * | 1 | 1 | 0 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
\r
1173 * | | | | xTaskCreateRestricted | 2. TCB - Dynamic, Stack - Static | | |
\r
1174 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
\r
1175 * | 1 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
\r
1176 * | | | | xTaskCreateStatic, | 2. TCB - Dynamic, Stack - Static | | |
\r
1177 * | | | | xTaskCreateRestricted, | 3. TCB - Static, Stack - Static | | |
\r
1178 * | | | | xTaskCreateRestrictedStatic | | | |
\r
1179 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
\r
1181 #define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE \
\r
1182 ( ( ( portUSING_MPU_WRAPPERS == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) || \
\r
1183 ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) )
\r
1186 * In line with software engineering best practice, FreeRTOS implements a strict
\r
1187 * data hiding policy, so the real structures used by FreeRTOS to maintain the
\r
1188 * state of tasks, queues, semaphores, etc. are not accessible to the application
\r
1189 * code. However, if the application writer wants to statically allocate such
\r
1190 * an object then the size of the object needs to be known. Dummy structures
\r
1191 * that are guaranteed to have the same size and alignment requirements of the
\r
1192 * real objects are used for this purpose. The dummy list and list item
\r
1193 * structures below are used for inclusion in such a dummy structure.
\r
1195 struct xSTATIC_LIST_ITEM
\r
1197 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1198 TickType_t xDummy1;
\r
1200 TickType_t xDummy2;
\r
1201 void * pvDummy3[ 4 ];
\r
1202 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1203 TickType_t xDummy4;
\r
1206 typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
\r
1208 #if ( configUSE_MINI_LIST_ITEM == 1 )
\r
1209 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
\r
1210 struct xSTATIC_MINI_LIST_ITEM
\r
1212 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1213 TickType_t xDummy1;
\r
1215 TickType_t xDummy2;
\r
1216 void * pvDummy3[ 2 ];
\r
1218 typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
\r
1219 #else /* if ( configUSE_MINI_LIST_ITEM == 1 ) */
\r
1220 typedef struct xSTATIC_LIST_ITEM StaticMiniListItem_t;
\r
1221 #endif /* if ( configUSE_MINI_LIST_ITEM == 1 ) */
\r
1223 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
\r
1224 typedef struct xSTATIC_LIST
\r
1226 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1227 TickType_t xDummy1;
\r
1229 UBaseType_t uxDummy2;
\r
1231 StaticMiniListItem_t xDummy4;
\r
1232 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
\r
1233 TickType_t xDummy5;
\r
1238 * In line with software engineering best practice, especially when supplying a
\r
1239 * library that is likely to change in future versions, FreeRTOS implements a
\r
1240 * strict data hiding policy. This means the Task structure used internally by
\r
1241 * FreeRTOS is not accessible to application code. However, if the application
\r
1242 * writer wants to statically allocate the memory required to create a task then
\r
1243 * the size of the task object needs to be known. The StaticTask_t structure
\r
1244 * below is provided for this purpose. Its sizes and alignment requirements are
\r
1245 * guaranteed to match those of the genuine structure, no matter which
\r
1246 * architecture is being used, and no matter how the values in FreeRTOSConfig.h
\r
1247 * are set. Its contents are somewhat obfuscated in the hope users will
\r
1248 * recognise that it would be unwise to make direct use of the structure members.
\r
1250 typedef struct xSTATIC_TCB
\r
1253 #if ( portUSING_MPU_WRAPPERS == 1 )
\r
1254 xMPU_SETTINGS xDummy2;
\r
1256 StaticListItem_t xDummy3[ 2 ];
\r
1257 UBaseType_t uxDummy5;
\r
1259 uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
\r
1260 #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
\r
1263 #if ( portCRITICAL_NESTING_IN_TCB == 1 )
\r
1264 UBaseType_t uxDummy9;
\r
1266 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1267 UBaseType_t uxDummy10[ 2 ];
\r
1269 #if ( configUSE_MUTEXES == 1 )
\r
1270 UBaseType_t uxDummy12[ 2 ];
\r
1272 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
\r
1275 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
\r
1276 void * pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
\r
1278 #if ( configGENERATE_RUN_TIME_STATS == 1 )
\r
1279 configRUN_TIME_COUNTER_TYPE ulDummy16;
\r
1281 #if ( ( configUSE_NEWLIB_REENTRANT == 1 ) || ( configUSE_C_RUNTIME_TLS_SUPPORT == 1 ) )
\r
1282 configTLS_BLOCK_TYPE xDummy17;
\r
1284 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
\r
1285 uint32_t ulDummy18[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
\r
1286 uint8_t ucDummy19[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
\r
1288 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )
\r
1289 uint8_t uxDummy20;
\r
1292 #if ( INCLUDE_xTaskAbortDelay == 1 )
\r
1293 uint8_t ucDummy21;
\r
1295 #if ( configUSE_POSIX_ERRNO == 1 )
\r
1301 * In line with software engineering best practice, especially when supplying a
\r
1302 * library that is likely to change in future versions, FreeRTOS implements a
\r
1303 * strict data hiding policy. This means the Queue structure used internally by
\r
1304 * FreeRTOS is not accessible to application code. However, if the application
\r
1305 * writer wants to statically allocate the memory required to create a queue
\r
1306 * then the size of the queue object needs to be known. The StaticQueue_t
\r
1307 * structure below is provided for this purpose. Its sizes and alignment
\r
1308 * requirements are guaranteed to match those of the genuine structure, no
\r
1309 * matter which architecture is being used, and no matter how the values in
\r
1310 * FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope
\r
1311 * users will recognise that it would be unwise to make direct use of the
\r
1312 * structure members.
\r
1314 typedef struct xSTATIC_QUEUE
\r
1316 void * pvDummy1[ 3 ];
\r
1321 UBaseType_t uxDummy2;
\r
1324 StaticList_t xDummy3[ 2 ];
\r
1325 UBaseType_t uxDummy4[ 3 ];
\r
1326 uint8_t ucDummy5[ 2 ];
\r
1328 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
\r
1332 #if ( configUSE_QUEUE_SETS == 1 )
\r
1336 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1337 UBaseType_t uxDummy8;
\r
1341 typedef StaticQueue_t StaticSemaphore_t;
\r
1344 * In line with software engineering best practice, especially when supplying a
\r
1345 * library that is likely to change in future versions, FreeRTOS implements a
\r
1346 * strict data hiding policy. This means the event group structure used
\r
1347 * internally by FreeRTOS is not accessible to application code. However, if
\r
1348 * the application writer wants to statically allocate the memory required to
\r
1349 * create an event group then the size of the event group object needs to be
\r
1350 * know. The StaticEventGroup_t structure below is provided for this purpose.
\r
1351 * Its sizes and alignment requirements are guaranteed to match those of the
\r
1352 * genuine structure, no matter which architecture is being used, and no matter
\r
1353 * how the values in FreeRTOSConfig.h are set. Its contents are somewhat
\r
1354 * obfuscated in the hope users will recognise that it would be unwise to make
\r
1355 * direct use of the structure members.
\r
1357 typedef struct xSTATIC_EVENT_GROUP
\r
1359 TickType_t xDummy1;
\r
1360 StaticList_t xDummy2;
\r
1362 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1363 UBaseType_t uxDummy3;
\r
1366 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
\r
1369 } StaticEventGroup_t;
\r
1372 * In line with software engineering best practice, especially when supplying a
\r
1373 * library that is likely to change in future versions, FreeRTOS implements a
\r
1374 * strict data hiding policy. This means the software timer structure used
\r
1375 * internally by FreeRTOS is not accessible to application code. However, if
\r
1376 * the application writer wants to statically allocate the memory required to
\r
1377 * create a software timer then the size of the queue object needs to be known.
\r
1378 * The StaticTimer_t structure below is provided for this purpose. Its sizes
\r
1379 * and alignment requirements are guaranteed to match those of the genuine
\r
1380 * structure, no matter which architecture is being used, and no matter how the
\r
1381 * values in FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in
\r
1382 * the hope users will recognise that it would be unwise to make direct use of
\r
1383 * the structure members.
\r
1385 typedef struct xSTATIC_TIMER
\r
1388 StaticListItem_t xDummy2;
\r
1389 TickType_t xDummy3;
\r
1391 TaskFunction_t pvDummy6;
\r
1392 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1393 UBaseType_t uxDummy7;
\r
1399 * In line with software engineering best practice, especially when supplying a
\r
1400 * library that is likely to change in future versions, FreeRTOS implements a
\r
1401 * strict data hiding policy. This means the stream buffer structure used
\r
1402 * internally by FreeRTOS is not accessible to application code. However, if
\r
1403 * the application writer wants to statically allocate the memory required to
\r
1404 * create a stream buffer then the size of the stream buffer object needs to be
\r
1405 * known. The StaticStreamBuffer_t structure below is provided for this
\r
1406 * purpose. Its size and alignment requirements are guaranteed to match those
\r
1407 * of the genuine structure, no matter which architecture is being used, and
\r
1408 * no matter how the values in FreeRTOSConfig.h are set. Its contents are
\r
1409 * somewhat obfuscated in the hope users will recognise that it would be unwise
\r
1410 * to make direct use of the structure members.
\r
1412 typedef struct xSTATIC_STREAM_BUFFER
\r
1414 size_t uxDummy1[ 4 ];
\r
1415 void * pvDummy2[ 3 ];
\r
1417 #if ( configUSE_TRACE_FACILITY == 1 )
\r
1418 UBaseType_t uxDummy4;
\r
1420 #if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
\r
1421 void * pvDummy5[ 2 ];
\r
1423 } StaticStreamBuffer_t;
\r
1425 /* Message buffers are built on stream buffers. */
\r
1426 typedef StaticStreamBuffer_t StaticMessageBuffer_t;
\r
1428 /* *INDENT-OFF* */
\r
1429 #ifdef __cplusplus
\r
1434 #endif /* INC_FREERTOS_H */
\r