2 * FreeRTOS SMP Kernel V202110.00
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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:
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
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.
22 * https://www.FreeRTOS.org
23 * https://github.com/FreeRTOS
27 #ifndef INC_FREERTOS_H
28 #define INC_FREERTOS_H
31 * Include the generic headers required for the FreeRTOS port being used.
36 * If stdint.h cannot be located then:
37 * + If using GCC ensure the -nostdint options is *not* being used.
38 * + Ensure the project's include path includes the directory in which your
39 * compiler stores stdint.h.
40 * + Set any compiler options necessary for it to support C99, as technically
41 * stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any
43 * + The FreeRTOS download includes a simple stdint.h definition that can be
44 * used in cases where none is provided by the compiler. The files only
45 * contains the typedefs required to build FreeRTOS. Read the instructions
46 * in FreeRTOS/source/stdint.readme for more information.
48 #include <stdint.h> /* READ COMMENT ABOVE. */
56 /* Application specific configuration options. */
57 #include "FreeRTOSConfig.h"
59 /* Basic FreeRTOS definitions. */
62 /* Definitions specific to the port being used. */
65 /* Must be defaulted before configUSE_NEWLIB_REENTRANT is used below. */
66 #ifndef configUSE_NEWLIB_REENTRANT
67 #define configUSE_NEWLIB_REENTRANT 0
70 /* Required if struct _reent is used. */
71 #if ( configUSE_NEWLIB_REENTRANT == 1 )
76 * Check all the required application specific macros have been defined.
77 * These macros are application specific and (as downloaded) are defined
78 * within FreeRTOSConfig.h.
81 #ifndef configMINIMAL_STACK_SIZE
82 #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.
85 #ifndef configMAX_PRIORITIES
86 #error Missing definition: configMAX_PRIORITIES must be defined in FreeRTOSConfig.h. See the Configuration section of the FreeRTOS API documentation for details.
89 #if configMAX_PRIORITIES < 1
90 #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.
93 #ifndef configUSE_PREEMPTION
94 #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.
97 #ifndef configUSE_IDLE_HOOK
98 #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.
101 #ifndef configUSE_TICK_HOOK
102 #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 #ifndef configUSE_16_BIT_TICKS
106 #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.
109 #ifndef configUSE_CO_ROUTINES
110 #define configUSE_CO_ROUTINES 0
113 #ifndef INCLUDE_vTaskPrioritySet
114 #define INCLUDE_vTaskPrioritySet 0
117 #ifndef INCLUDE_uxTaskPriorityGet
118 #define INCLUDE_uxTaskPriorityGet 0
121 #ifndef INCLUDE_vTaskDelete
122 #define INCLUDE_vTaskDelete 0
125 #ifndef INCLUDE_vTaskSuspend
126 #define INCLUDE_vTaskSuspend 0
129 #ifdef INCLUDE_xTaskDelayUntil
130 #ifdef INCLUDE_vTaskDelayUntil
131 /* INCLUDE_vTaskDelayUntil was replaced by INCLUDE_xTaskDelayUntil. Backward
132 * compatibility is maintained if only one or the other is defined, but
133 * there is a conflict if both are defined. */
134 #error INCLUDE_vTaskDelayUntil and INCLUDE_xTaskDelayUntil are both defined. INCLUDE_vTaskDelayUntil is no longer required and should be removed
138 #ifndef INCLUDE_xTaskDelayUntil
139 #ifdef INCLUDE_vTaskDelayUntil
140 /* If INCLUDE_vTaskDelayUntil is set but INCLUDE_xTaskDelayUntil is not then
141 * the project's FreeRTOSConfig.h probably pre-dates the introduction of
142 * xTaskDelayUntil and setting INCLUDE_xTaskDelayUntil to whatever
143 * INCLUDE_vTaskDelayUntil is set to will ensure backward compatibility.
145 #define INCLUDE_xTaskDelayUntil INCLUDE_vTaskDelayUntil
149 #ifndef INCLUDE_xTaskDelayUntil
150 #define INCLUDE_xTaskDelayUntil 0
153 #ifndef INCLUDE_vTaskDelay
154 #define INCLUDE_vTaskDelay 0
157 #ifndef INCLUDE_xTaskGetIdleTaskHandle
158 #define INCLUDE_xTaskGetIdleTaskHandle 0
161 #ifndef INCLUDE_xTaskAbortDelay
162 #define INCLUDE_xTaskAbortDelay 0
165 #ifndef INCLUDE_xQueueGetMutexHolder
166 #define INCLUDE_xQueueGetMutexHolder 0
169 #ifndef INCLUDE_xSemaphoreGetMutexHolder
170 #define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder
173 #ifndef INCLUDE_xTaskGetHandle
174 #define INCLUDE_xTaskGetHandle 0
177 #ifndef INCLUDE_uxTaskGetStackHighWaterMark
178 #define INCLUDE_uxTaskGetStackHighWaterMark 0
181 #ifndef INCLUDE_uxTaskGetStackHighWaterMark2
182 #define INCLUDE_uxTaskGetStackHighWaterMark2 0
185 #ifndef INCLUDE_eTaskGetState
186 #define INCLUDE_eTaskGetState 0
189 #ifndef INCLUDE_xTaskResumeFromISR
190 #define INCLUDE_xTaskResumeFromISR 1
193 #ifndef INCLUDE_xTimerPendFunctionCall
194 #define INCLUDE_xTimerPendFunctionCall 0
197 #ifndef INCLUDE_xTaskGetSchedulerState
198 #define INCLUDE_xTaskGetSchedulerState 0
201 #ifndef INCLUDE_xTaskGetCurrentTaskHandle
202 #define INCLUDE_xTaskGetCurrentTaskHandle 0
205 #if configUSE_CO_ROUTINES != 0
206 #ifndef configMAX_CO_ROUTINE_PRIORITIES
207 #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.
211 #ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
212 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
215 #ifndef configUSE_APPLICATION_TASK_TAG
216 #define configUSE_APPLICATION_TASK_TAG 0
219 #ifndef configNUM_THREAD_LOCAL_STORAGE_POINTERS
220 #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
223 #ifndef configUSE_RECURSIVE_MUTEXES
224 #define configUSE_RECURSIVE_MUTEXES 0
227 #ifndef configUSE_MUTEXES
228 #define configUSE_MUTEXES 0
231 #ifndef configUSE_TIMERS
232 #define configUSE_TIMERS 0
235 #ifndef configUSE_COUNTING_SEMAPHORES
236 #define configUSE_COUNTING_SEMAPHORES 0
239 #ifndef configUSE_TASK_PREEMPTION_DISABLE
240 #define configUSE_TASK_PREEMPTION_DISABLE 0
243 #ifndef configUSE_CORE_AFFINITY
244 #define configUSE_CORE_AFFINITY 0
247 #ifndef configUSE_ALTERNATIVE_API
248 #define configUSE_ALTERNATIVE_API 0
251 #ifndef portCRITICAL_NESTING_IN_TCB
252 #define portCRITICAL_NESTING_IN_TCB 0
255 #ifndef configMAX_TASK_NAME_LEN
256 #define configMAX_TASK_NAME_LEN 16
259 #ifndef configIDLE_SHOULD_YIELD
260 #define configIDLE_SHOULD_YIELD 1
263 #if configMAX_TASK_NAME_LEN < 1
264 #error configMAX_TASK_NAME_LEN must be set to a minimum of 1 in FreeRTOSConfig.h
268 #define configASSERT( x )
269 #define configASSERT_DEFINED 0
271 #define configASSERT_DEFINED 1
274 /* configPRECONDITION should be defined as configASSERT.
275 * The CBMC proofs need a way to track assumptions and assertions.
276 * A configPRECONDITION statement should express an implicit invariant or
277 * assumption made. A configASSERT statement should express an invariant that must
278 * hold explicit before calling the code. */
279 #ifndef configPRECONDITION
280 #define configPRECONDITION( X ) configASSERT( X )
281 #define configPRECONDITION_DEFINED 0
283 #define configPRECONDITION_DEFINED 1
286 #ifndef portMEMORY_BARRIER
287 #define portMEMORY_BARRIER()
290 #ifndef portSOFTWARE_BARRIER
291 #define portSOFTWARE_BARRIER()
294 #ifndef configNUM_CORES
295 #define configNUM_CORES 1
298 #ifndef configRUN_MULTIPLE_PRIORITIES
299 #define configRUN_MULTIPLE_PRIORITIES 0
303 /* The timers module relies on xTaskGetSchedulerState(). */
304 #if configUSE_TIMERS == 1
306 #ifndef configTIMER_TASK_PRIORITY
307 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_PRIORITY must also be defined.
308 #endif /* configTIMER_TASK_PRIORITY */
310 #ifndef configTIMER_QUEUE_LENGTH
311 #error If configUSE_TIMERS is set to 1 then configTIMER_QUEUE_LENGTH must also be defined.
312 #endif /* configTIMER_QUEUE_LENGTH */
314 #ifndef configTIMER_TASK_STACK_DEPTH
315 #error If configUSE_TIMERS is set to 1 then configTIMER_TASK_STACK_DEPTH must also be defined.
316 #endif /* configTIMER_TASK_STACK_DEPTH */
318 #ifndef portTIMER_CALLBACK_ATTRIBUTE
319 #define portTIMER_CALLBACK_ATTRIBUTE
320 #endif /* portTIMER_CALLBACK_ATTRIBUTE */
322 #endif /* configUSE_TIMERS */
324 #ifndef portSET_INTERRUPT_MASK_FROM_ISR
325 #define portSET_INTERRUPT_MASK_FROM_ISR() 0
328 #ifndef portCLEAR_INTERRUPT_MASK_FROM_ISR
329 #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusValue ) ( void ) uxSavedStatusValue
332 #ifndef portCLEAN_UP_TCB
333 #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
336 #ifndef portPRE_TASK_DELETE_HOOK
337 #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
340 #ifndef portSETUP_TCB
341 #define portSETUP_TCB( pxTCB ) ( void ) pxTCB
344 #ifndef configQUEUE_REGISTRY_SIZE
345 #define configQUEUE_REGISTRY_SIZE 0U
348 #if ( configQUEUE_REGISTRY_SIZE < 1 )
349 #define vQueueAddToRegistry( xQueue, pcName )
350 #define vQueueUnregisterQueue( xQueue )
351 #define pcQueueGetName( xQueue )
354 #ifndef portPOINTER_SIZE_TYPE
355 #define portPOINTER_SIZE_TYPE uint32_t
358 /* Remove any unused trace macros. */
361 /* Used to perform any necessary initialisation - for example, open a file
362 * into which trace is to be written. */
368 /* Use to close a trace, for example close a file into which trace has been
373 #ifndef traceTASK_SWITCHED_IN
375 /* Called after a task has been selected to run. pxCurrentTCB holds a pointer
376 * to the task control block of the selected task. */
377 #define traceTASK_SWITCHED_IN()
380 #ifndef traceINCREASE_TICK_COUNT
382 /* Called before stepping the tick count after waking from tickless idle
384 #define traceINCREASE_TICK_COUNT( x )
387 #ifndef traceLOW_POWER_IDLE_BEGIN
388 /* Called immediately before entering tickless idle. */
389 #define traceLOW_POWER_IDLE_BEGIN()
392 #ifndef traceLOW_POWER_IDLE_END
393 /* Called when returning to the Idle task after a tickless idle. */
394 #define traceLOW_POWER_IDLE_END()
397 #ifndef traceTASK_SWITCHED_OUT
399 /* Called before a task has been selected to run. pxCurrentTCB holds a pointer
400 * to the task control block of the task being switched out. */
401 #define traceTASK_SWITCHED_OUT()
404 #ifndef traceTASK_PRIORITY_INHERIT
406 /* Called when a task attempts to take a mutex that is already held by a
407 * lower priority task. pxTCBOfMutexHolder is a pointer to the TCB of the task
408 * that holds the mutex. uxInheritedPriority is the priority the mutex holder
409 * will inherit (the priority of the task that is attempting to obtain the
411 #define traceTASK_PRIORITY_INHERIT( pxTCBOfMutexHolder, uxInheritedPriority )
414 #ifndef traceTASK_PRIORITY_DISINHERIT
416 /* Called when a task releases a mutex, the holding of which had resulted in
417 * the task inheriting the priority of a higher priority task.
418 * pxTCBOfMutexHolder is a pointer to the TCB of the task that is releasing the
419 * mutex. uxOriginalPriority is the task's configured (base) priority. */
420 #define traceTASK_PRIORITY_DISINHERIT( pxTCBOfMutexHolder, uxOriginalPriority )
423 #ifndef traceBLOCKING_ON_QUEUE_RECEIVE
425 /* Task is about to block because it cannot read from a
426 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
427 * upon which the read was attempted. pxCurrentTCB points to the TCB of the
428 * task that attempted the read. */
429 #define traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue )
432 #ifndef traceBLOCKING_ON_QUEUE_PEEK
434 /* Task is about to block because it cannot read from a
435 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
436 * upon which the read was attempted. pxCurrentTCB points to the TCB of the
437 * task that attempted the read. */
438 #define traceBLOCKING_ON_QUEUE_PEEK( pxQueue )
441 #ifndef traceBLOCKING_ON_QUEUE_SEND
443 /* Task is about to block because it cannot write to a
444 * queue/mutex/semaphore. pxQueue is a pointer to the queue/mutex/semaphore
445 * upon which the write was attempted. pxCurrentTCB points to the TCB of the
446 * task that attempted the write. */
447 #define traceBLOCKING_ON_QUEUE_SEND( pxQueue )
450 #ifndef configCHECK_FOR_STACK_OVERFLOW
451 #define configCHECK_FOR_STACK_OVERFLOW 0
454 #ifndef configRECORD_STACK_HIGH_ADDRESS
455 #define configRECORD_STACK_HIGH_ADDRESS 0
458 #ifndef configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H
459 #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 0
462 /* The following event macros are embedded in the kernel API calls. */
464 #ifndef traceMOVED_TASK_TO_READY_STATE
465 #define traceMOVED_TASK_TO_READY_STATE( pxTCB )
468 #ifndef tracePOST_MOVED_TASK_TO_READY_STATE
469 #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
472 #ifndef traceQUEUE_CREATE
473 #define traceQUEUE_CREATE( pxNewQueue )
476 #ifndef traceQUEUE_CREATE_FAILED
477 #define traceQUEUE_CREATE_FAILED( ucQueueType )
480 #ifndef traceCREATE_MUTEX
481 #define traceCREATE_MUTEX( pxNewQueue )
484 #ifndef traceCREATE_MUTEX_FAILED
485 #define traceCREATE_MUTEX_FAILED()
488 #ifndef traceGIVE_MUTEX_RECURSIVE
489 #define traceGIVE_MUTEX_RECURSIVE( pxMutex )
492 #ifndef traceGIVE_MUTEX_RECURSIVE_FAILED
493 #define traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex )
496 #ifndef traceTAKE_MUTEX_RECURSIVE
497 #define traceTAKE_MUTEX_RECURSIVE( pxMutex )
500 #ifndef traceTAKE_MUTEX_RECURSIVE_FAILED
501 #define traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex )
504 #ifndef traceCREATE_COUNTING_SEMAPHORE
505 #define traceCREATE_COUNTING_SEMAPHORE()
508 #ifndef traceCREATE_COUNTING_SEMAPHORE_FAILED
509 #define traceCREATE_COUNTING_SEMAPHORE_FAILED()
512 #ifndef traceQUEUE_SET_SEND
513 #define traceQUEUE_SET_SEND traceQUEUE_SEND
516 #ifndef traceQUEUE_SEND
517 #define traceQUEUE_SEND( pxQueue )
520 #ifndef traceQUEUE_SEND_FAILED
521 #define traceQUEUE_SEND_FAILED( pxQueue )
524 #ifndef traceQUEUE_RECEIVE
525 #define traceQUEUE_RECEIVE( pxQueue )
528 #ifndef traceQUEUE_PEEK
529 #define traceQUEUE_PEEK( pxQueue )
532 #ifndef traceQUEUE_PEEK_FAILED
533 #define traceQUEUE_PEEK_FAILED( pxQueue )
536 #ifndef traceQUEUE_PEEK_FROM_ISR
537 #define traceQUEUE_PEEK_FROM_ISR( pxQueue )
540 #ifndef traceQUEUE_RECEIVE_FAILED
541 #define traceQUEUE_RECEIVE_FAILED( pxQueue )
544 #ifndef traceQUEUE_SEND_FROM_ISR
545 #define traceQUEUE_SEND_FROM_ISR( pxQueue )
548 #ifndef traceQUEUE_SEND_FROM_ISR_FAILED
549 #define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue )
552 #ifndef traceQUEUE_RECEIVE_FROM_ISR
553 #define traceQUEUE_RECEIVE_FROM_ISR( pxQueue )
556 #ifndef traceQUEUE_RECEIVE_FROM_ISR_FAILED
557 #define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue )
560 #ifndef traceQUEUE_PEEK_FROM_ISR_FAILED
561 #define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue )
564 #ifndef traceQUEUE_DELETE
565 #define traceQUEUE_DELETE( pxQueue )
568 #ifndef traceTASK_CREATE
569 #define traceTASK_CREATE( pxNewTCB )
572 #ifndef traceTASK_CREATE_FAILED
573 #define traceTASK_CREATE_FAILED()
576 #ifndef traceTASK_DELETE
577 #define traceTASK_DELETE( pxTaskToDelete )
580 #ifndef traceTASK_DELAY_UNTIL
581 #define traceTASK_DELAY_UNTIL( x )
584 #ifndef traceTASK_DELAY
585 #define traceTASK_DELAY()
588 #ifndef traceTASK_PRIORITY_SET
589 #define traceTASK_PRIORITY_SET( pxTask, uxNewPriority )
592 #ifndef traceTASK_SUSPEND
593 #define traceTASK_SUSPEND( pxTaskToSuspend )
596 #ifndef traceTASK_RESUME
597 #define traceTASK_RESUME( pxTaskToResume )
600 #ifndef traceTASK_RESUME_FROM_ISR
601 #define traceTASK_RESUME_FROM_ISR( pxTaskToResume )
604 #ifndef traceTASK_INCREMENT_TICK
605 #define traceTASK_INCREMENT_TICK( xTickCount )
608 #ifndef traceTIMER_CREATE
609 #define traceTIMER_CREATE( pxNewTimer )
612 #ifndef traceTIMER_CREATE_FAILED
613 #define traceTIMER_CREATE_FAILED()
616 #ifndef traceTIMER_COMMAND_SEND
617 #define traceTIMER_COMMAND_SEND( xTimer, xMessageID, xMessageValueValue, xReturn )
620 #ifndef traceTIMER_EXPIRED
621 #define traceTIMER_EXPIRED( pxTimer )
624 #ifndef traceTIMER_COMMAND_RECEIVED
625 #define traceTIMER_COMMAND_RECEIVED( pxTimer, xMessageID, xMessageValue )
629 #define traceMALLOC( pvAddress, uiSize )
633 #define traceFREE( pvAddress, uiSize )
636 #ifndef traceEVENT_GROUP_CREATE
637 #define traceEVENT_GROUP_CREATE( xEventGroup )
640 #ifndef traceEVENT_GROUP_CREATE_FAILED
641 #define traceEVENT_GROUP_CREATE_FAILED()
644 #ifndef traceEVENT_GROUP_SYNC_BLOCK
645 #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )
648 #ifndef traceEVENT_GROUP_SYNC_END
649 #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
652 #ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK
653 #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )
656 #ifndef traceEVENT_GROUP_WAIT_BITS_END
657 #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred
660 #ifndef traceEVENT_GROUP_CLEAR_BITS
661 #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )
664 #ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR
665 #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )
668 #ifndef traceEVENT_GROUP_SET_BITS
669 #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )
672 #ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR
673 #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )
676 #ifndef traceEVENT_GROUP_DELETE
677 #define traceEVENT_GROUP_DELETE( xEventGroup )
680 #ifndef tracePEND_FUNC_CALL
681 #define tracePEND_FUNC_CALL( xFunctionToPend, pvParameter1, ulParameter2, ret )
684 #ifndef tracePEND_FUNC_CALL_FROM_ISR
685 #define tracePEND_FUNC_CALL_FROM_ISR( xFunctionToPend, pvParameter1, ulParameter2, ret )
688 #ifndef traceQUEUE_REGISTRY_ADD
689 #define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName )
692 #ifndef traceTASK_NOTIFY_TAKE_BLOCK
693 #define traceTASK_NOTIFY_TAKE_BLOCK( uxIndexToWait )
696 #ifndef traceTASK_NOTIFY_TAKE
697 #define traceTASK_NOTIFY_TAKE( uxIndexToWait )
700 #ifndef traceTASK_NOTIFY_WAIT_BLOCK
701 #define traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait )
704 #ifndef traceTASK_NOTIFY_WAIT
705 #define traceTASK_NOTIFY_WAIT( uxIndexToWait )
708 #ifndef traceTASK_NOTIFY
709 #define traceTASK_NOTIFY( uxIndexToNotify )
712 #ifndef traceTASK_NOTIFY_FROM_ISR
713 #define traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify )
716 #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR
717 #define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify )
720 #ifndef traceSTREAM_BUFFER_CREATE_FAILED
721 #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer )
724 #ifndef traceSTREAM_BUFFER_CREATE_STATIC_FAILED
725 #define traceSTREAM_BUFFER_CREATE_STATIC_FAILED( xReturn, xIsMessageBuffer )
728 #ifndef traceSTREAM_BUFFER_CREATE
729 #define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer )
732 #ifndef traceSTREAM_BUFFER_DELETE
733 #define traceSTREAM_BUFFER_DELETE( xStreamBuffer )
736 #ifndef traceSTREAM_BUFFER_RESET
737 #define traceSTREAM_BUFFER_RESET( xStreamBuffer )
740 #ifndef traceBLOCKING_ON_STREAM_BUFFER_SEND
741 #define traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer )
744 #ifndef traceSTREAM_BUFFER_SEND
745 #define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent )
748 #ifndef traceSTREAM_BUFFER_SEND_FAILED
749 #define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer )
752 #ifndef traceSTREAM_BUFFER_SEND_FROM_ISR
753 #define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent )
756 #ifndef traceBLOCKING_ON_STREAM_BUFFER_RECEIVE
757 #define traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer )
760 #ifndef traceSTREAM_BUFFER_RECEIVE
761 #define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength )
764 #ifndef traceSTREAM_BUFFER_RECEIVE_FAILED
765 #define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer )
768 #ifndef traceSTREAM_BUFFER_RECEIVE_FROM_ISR
769 #define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength )
772 #ifndef configGENERATE_RUN_TIME_STATS
773 #define configGENERATE_RUN_TIME_STATS 0
776 #if ( configGENERATE_RUN_TIME_STATS == 1 )
778 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
779 #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.
780 #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */
782 #ifndef portGET_RUN_TIME_COUNTER_VALUE
783 #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE
784 #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.
785 #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */
786 #endif /* portGET_RUN_TIME_COUNTER_VALUE */
788 #endif /* configGENERATE_RUN_TIME_STATS */
790 #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS
791 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
794 #ifndef configUSE_MALLOC_FAILED_HOOK
795 #define configUSE_MALLOC_FAILED_HOOK 0
798 #ifndef portPRIVILEGE_BIT
799 #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
802 #ifndef portSUPPRESS_TICKS_AND_SLEEP
803 #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime )
806 #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
807 #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP 2
810 #if configEXPECTED_IDLE_TIME_BEFORE_SLEEP < 2
811 #error configEXPECTED_IDLE_TIME_BEFORE_SLEEP must not be less than 2
814 #ifndef configUSE_TICKLESS_IDLE
815 #define configUSE_TICKLESS_IDLE 0
818 #ifndef configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING
819 #define configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING( x )
822 #ifndef configPRE_SLEEP_PROCESSING
823 #define configPRE_SLEEP_PROCESSING( x )
826 #ifndef configPOST_SLEEP_PROCESSING
827 #define configPOST_SLEEP_PROCESSING( x )
830 #ifndef configUSE_QUEUE_SETS
831 #define configUSE_QUEUE_SETS 0
834 #ifndef portTASK_USES_FLOATING_POINT
835 #define portTASK_USES_FLOATING_POINT()
838 #ifndef portALLOCATE_SECURE_CONTEXT
839 #define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
842 #ifndef portDONT_DISCARD
843 #define portDONT_DISCARD
846 #ifndef configUSE_TIME_SLICING
847 #define configUSE_TIME_SLICING 1
850 #ifndef configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
851 #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
854 #ifndef configUSE_STATS_FORMATTING_FUNCTIONS
855 #define configUSE_STATS_FORMATTING_FUNCTIONS 0
858 #ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID
859 #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
862 #ifndef configUSE_TRACE_FACILITY
863 #define configUSE_TRACE_FACILITY 0
866 #ifndef mtCOVERAGE_TEST_MARKER
867 #define mtCOVERAGE_TEST_MARKER()
870 #ifndef mtCOVERAGE_TEST_DELAY
871 #define mtCOVERAGE_TEST_DELAY()
874 #ifndef portASSERT_IF_IN_ISR
875 #define portASSERT_IF_IN_ISR()
878 #ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION
879 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
882 #ifndef configAPPLICATION_ALLOCATED_HEAP
883 #define configAPPLICATION_ALLOCATED_HEAP 0
886 #ifndef configUSE_TASK_NOTIFICATIONS
887 #define configUSE_TASK_NOTIFICATIONS 1
890 #ifndef configTASK_NOTIFICATION_ARRAY_ENTRIES
891 #define configTASK_NOTIFICATION_ARRAY_ENTRIES 1
894 #if configTASK_NOTIFICATION_ARRAY_ENTRIES < 1
895 #error configTASK_NOTIFICATION_ARRAY_ENTRIES must be at least 1
898 #ifndef configUSE_POSIX_ERRNO
899 #define configUSE_POSIX_ERRNO 0
902 #ifndef portTICK_TYPE_IS_ATOMIC
903 #define portTICK_TYPE_IS_ATOMIC 0
906 #ifndef configSUPPORT_STATIC_ALLOCATION
907 /* Defaults to 0 for backward compatibility. */
908 #define configSUPPORT_STATIC_ALLOCATION 0
911 #ifndef configSUPPORT_DYNAMIC_ALLOCATION
912 /* Defaults to 1 for backward compatibility. */
913 #define configSUPPORT_DYNAMIC_ALLOCATION 1
916 #ifndef configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
917 /* Defaults to 0 for backward compatibility. */
918 #define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
921 #ifndef configSTACK_DEPTH_TYPE
923 /* Defaults to uint16_t for backward compatibility, but can be overridden
924 * in FreeRTOSConfig.h if uint16_t is too restrictive. */
925 #define configSTACK_DEPTH_TYPE uint16_t
928 #ifndef configMESSAGE_BUFFER_LENGTH_TYPE
930 /* Defaults to size_t for backward compatibility, but can be overridden
931 * in FreeRTOSConfig.h if lengths will always be less than the number of bytes
933 #define configMESSAGE_BUFFER_LENGTH_TYPE size_t
936 /* Sanity check the configuration. */
937 #if ( configUSE_TICKLESS_IDLE != 0 )
938 #if ( INCLUDE_vTaskSuspend != 1 )
939 #error INCLUDE_vTaskSuspend must be set to 1 if configUSE_TICKLESS_IDLE is not set to 0
940 #endif /* INCLUDE_vTaskSuspend */
941 #endif /* configUSE_TICKLESS_IDLE */
943 #if ( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )
944 #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.
947 #if ( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )
948 #error configUSE_MUTEXES must be set to 1 to use recursive mutexes
951 #if( ( configRUN_MULTIPLE_PRIORITIES == 0 ) && ( configUSE_CORE_AFFINITY != 0 ) )
952 #error configRUN_MULTIPLE_PRIORITIES must be set to 1 to use core exclusion
955 #if( ( configRUN_MULTIPLE_PRIORITIES == 0 ) && ( configUSE_TASK_PREEMPTION_DISABLE != 0 ) )
956 #error configRUN_MULTIPLE_PRIORITIES must be set to 1 to use task preemption disable
959 #if( ( configUSE_PREEMPTION == 0 ) && ( configUSE_TASK_PREEMPTION_DISABLE != 0 ) )
960 #error configUSE_PREEMPTION must be set to 1 to use task preemption disable
963 #ifndef configINITIAL_TICK_COUNT
964 #define configINITIAL_TICK_COUNT 0
967 #if ( portTICK_TYPE_IS_ATOMIC == 0 )
969 /* Either variables of tick type cannot be read atomically, or
970 * portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when
971 * the tick count is returned to the standard critical section macros. */
972 #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()
973 #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()
974 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
975 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )
978 /* The tick type can be read atomically, so critical sections used when the
979 * tick count is returned can be defined away. */
980 #define portTICK_TYPE_ENTER_CRITICAL()
981 #define portTICK_TYPE_EXIT_CRITICAL()
982 #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
983 #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x
984 #endif /* if ( portTICK_TYPE_IS_ATOMIC == 0 ) */
986 /* Definitions to allow backward compatibility with FreeRTOS versions prior to
988 #ifndef configENABLE_BACKWARD_COMPATIBILITY
989 #define configENABLE_BACKWARD_COMPATIBILITY 1
994 /* configPRINTF() was not defined, so define it away to nothing. To use
995 * configPRINTF() then define it as follows (where MyPrintFunction() is
996 * provided by the application writer):
998 * void MyPrintFunction(const char *pcFormat, ... );
999 #define configPRINTF( X ) MyPrintFunction X
1001 * Then call like a standard printf() function, but placing brackets around
1002 * all parameters so they are passed as a single parameter. For example:
1003 * configPRINTF( ("Value = %d", MyVariable) ); */
1004 #define configPRINTF( X )
1009 /* The application writer has not provided their own MAX macro, so define
1010 * the following generic implementation. */
1011 #define configMAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
1016 /* The application writer has not provided their own MIN macro, so define
1017 * the following generic implementation. */
1018 #define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
1021 #if configENABLE_BACKWARD_COMPATIBILITY == 1
1022 #define eTaskStateGet eTaskGetState
1023 #define portTickType TickType_t
1024 #define xTaskHandle TaskHandle_t
1025 #define xQueueHandle QueueHandle_t
1026 #define xSemaphoreHandle SemaphoreHandle_t
1027 #define xQueueSetHandle QueueSetHandle_t
1028 #define xQueueSetMemberHandle QueueSetMemberHandle_t
1029 #define xTimeOutType TimeOut_t
1030 #define xMemoryRegion MemoryRegion_t
1031 #define xTaskParameters TaskParameters_t
1032 #define xTaskStatusType TaskStatus_t
1033 #define xTimerHandle TimerHandle_t
1034 #define xCoRoutineHandle CoRoutineHandle_t
1035 #define pdTASK_HOOK_CODE TaskHookFunction_t
1036 #define portTICK_RATE_MS portTICK_PERIOD_MS
1037 #define pcTaskGetTaskName pcTaskGetName
1038 #define pcTimerGetTimerName pcTimerGetName
1039 #define pcQueueGetQueueName pcQueueGetName
1040 #define vTaskGetTaskInfo vTaskGetInfo
1041 #define xTaskGetIdleRunTimeCounter ulTaskGetIdleRunTimeCounter
1043 /* Backward compatibility within the scheduler code only - these definitions
1044 * are not really required but are included for completeness. */
1045 #define tmrTIMER_CALLBACK TimerCallbackFunction_t
1046 #define pdTASK_CODE TaskFunction_t
1047 #define xListItem ListItem_t
1048 #define xList List_t
1050 /* For libraries that break the list data hiding, and access list structure
1051 * members directly (which is not supposed to be done). */
1052 #define pxContainer pvContainer
1053 #endif /* configENABLE_BACKWARD_COMPATIBILITY */
1055 #if ( configUSE_ALTERNATIVE_API != 0 )
1056 #error The alternative API was deprecated some time ago, and was removed in FreeRTOS V9.0 0
1059 /* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even
1060 * if floating point hardware is otherwise supported by the FreeRTOS port in use.
1061 * This constant is not supported by all FreeRTOS ports that include floating
1063 #ifndef configUSE_TASK_FPU_SUPPORT
1064 #define configUSE_TASK_FPU_SUPPORT 1
1067 /* Set configENABLE_MPU to 1 to enable MPU support and 0 to disable it. This is
1068 * currently used in ARMv8M ports. */
1069 #ifndef configENABLE_MPU
1070 #define configENABLE_MPU 0
1073 /* Set configENABLE_FPU to 1 to enable FPU support and 0 to disable it. This is
1074 * currently used in ARMv8M ports. */
1075 #ifndef configENABLE_FPU
1076 #define configENABLE_FPU 1
1079 /* Set configENABLE_TRUSTZONE to 1 enable TrustZone support and 0 to disable it.
1080 * This is currently used in ARMv8M ports. */
1081 #ifndef configENABLE_TRUSTZONE
1082 #define configENABLE_TRUSTZONE 1
1085 /* Set configRUN_FREERTOS_SECURE_ONLY to 1 to run the FreeRTOS ARMv8M port on
1086 * the Secure Side only. */
1087 #ifndef configRUN_FREERTOS_SECURE_ONLY
1088 #define configRUN_FREERTOS_SECURE_ONLY 0
1091 /* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
1092 * dynamically allocated RAM, in which case when any task is deleted it is known
1093 * that both the task's stack and TCB need to be freed. Sometimes the
1094 * FreeRTOSConfig.h settings only allow a task to be created using statically
1095 * allocated RAM, in which case when any task is deleted it is known that neither
1096 * the task's stack or TCB should be freed. Sometimes the FreeRTOSConfig.h
1097 * settings allow a task to be created using either statically or dynamically
1098 * allocated RAM, in which case a member of the TCB is used to record whether the
1099 * stack and/or TCB were allocated statically or dynamically, so when a task is
1100 * deleted the RAM that was allocated dynamically is freed again and no attempt is
1101 * made to free the RAM that was allocated statically.
1102 * tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE is only true if it is possible for a
1103 * task to be created using either statically or dynamically allocated RAM. Note
1104 * that if portUSING_MPU_WRAPPERS is 1 then a protected task can be created with
1105 * a statically allocated stack and a dynamically allocated TCB.
1107 * The following table lists various combinations of portUSING_MPU_WRAPPERS,
1108 * configSUPPORT_DYNAMIC_ALLOCATION and configSUPPORT_STATIC_ALLOCATION and
1109 * when it is possible to have both static and dynamic allocation:
1110 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1111 * | MPU | Dynamic | Static | Available Functions | Possible Allocations | Both Dynamic and | Need Free |
1112 * | | | | | | Static Possible | |
1113 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1114 * | 0 | 0 | 1 | xTaskCreateStatic | TCB - Static, Stack - Static | No | No |
1115 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1116 * | 0 | 1 | 0 | xTaskCreate | TCB - Dynamic, Stack - Dynamic | No | Yes |
1117 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1118 * | 0 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1119 * | | | | xTaskCreateStatic | 2. TCB - Static, Stack - Static | | |
1120 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1121 * | 1 | 0 | 1 | xTaskCreateStatic, | TCB - Static, Stack - Static | No | No |
1122 * | | | | xTaskCreateRestrictedStatic | | | |
1123 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1124 * | 1 | 1 | 0 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1125 * | | | | xTaskCreateRestricted | 2. TCB - Dynamic, Stack - Static | | |
1126 * +-----|---------|--------|-----------------------------|-----------------------------------|------------------|-----------|
1127 * | 1 | 1 | 1 | xTaskCreate, | 1. TCB - Dynamic, Stack - Dynamic | Yes | Yes |
1128 * | | | | xTaskCreateStatic, | 2. TCB - Dynamic, Stack - Static | | |
1129 * | | | | xTaskCreateRestricted, | 3. TCB - Static, Stack - Static | | |
1130 * | | | | xTaskCreateRestrictedStatic | | | |
1131 * +-----+---------+--------+-----------------------------+-----------------------------------+------------------+-----------+
1133 #define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE \
1134 ( ( ( portUSING_MPU_WRAPPERS == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) || \
1135 ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) )
1138 * In line with software engineering best practice, FreeRTOS implements a strict
1139 * data hiding policy, so the real structures used by FreeRTOS to maintain the
1140 * state of tasks, queues, semaphores, etc. are not accessible to the application
1141 * code. However, if the application writer wants to statically allocate such
1142 * an object then the size of the object needs to be known. Dummy structures
1143 * that are guaranteed to have the same size and alignment requirements of the
1144 * real objects are used for this purpose. The dummy list and list item
1145 * structures below are used for inclusion in such a dummy structure.
1147 struct xSTATIC_LIST_ITEM
1149 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1153 void * pvDummy3[ 4 ];
1154 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1158 typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
1160 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
1161 struct xSTATIC_MINI_LIST_ITEM
1163 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1167 void * pvDummy3[ 2 ];
1169 typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
1171 /* See the comments above the struct xSTATIC_LIST_ITEM definition. */
1172 typedef struct xSTATIC_LIST
1174 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1177 UBaseType_t uxDummy2;
1179 StaticMiniListItem_t xDummy4;
1180 #if ( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 1 )
1186 * In line with software engineering best practice, especially when supplying a
1187 * library that is likely to change in future versions, FreeRTOS implements a
1188 * strict data hiding policy. This means the Task structure used internally by
1189 * FreeRTOS is not accessible to application code. However, if the application
1190 * writer wants to statically allocate the memory required to create a task then
1191 * the size of the task object needs to be known. The StaticTask_t structure
1192 * below is provided for this purpose. Its sizes and alignment requirements are
1193 * guaranteed to match those of the genuine structure, no matter which
1194 * architecture is being used, and no matter how the values in FreeRTOSConfig.h
1195 * are set. Its contents are somewhat obfuscated in the hope users will
1196 * recognise that it would be unwise to make direct use of the structure members.
1198 typedef struct xSTATIC_TCB
1201 #if ( portUSING_MPU_WRAPPERS == 1 )
1202 xMPU_SETTINGS xDummy2;
1204 #if ( configUSE_CORE_AFFINITY == 1 && configNUM_CORES > 1 )
1205 UBaseType_t uxDummy25;
1207 StaticListItem_t xDummy3[ 2 ];
1208 UBaseType_t uxDummy5;
1210 BaseType_t xDummy23[ 2 ];
1211 uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];
1212 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
1213 BaseType_t xDummy24;
1215 #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
1218 #if ( portCRITICAL_NESTING_IN_TCB == 1 )
1219 UBaseType_t uxDummy9;
1221 #if ( configUSE_TRACE_FACILITY == 1 )
1222 UBaseType_t uxDummy10[ 2 ];
1224 #if ( configUSE_MUTEXES == 1 )
1225 UBaseType_t uxDummy12[ 2 ];
1227 #if ( configUSE_APPLICATION_TASK_TAG == 1 )
1230 #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
1231 void * pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
1233 #if ( configGENERATE_RUN_TIME_STATS == 1 )
1236 #if ( configUSE_NEWLIB_REENTRANT == 1 )
1237 struct _reent xDummy17;
1239 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
1240 uint32_t ulDummy18[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
1241 uint8_t ucDummy19[ configTASK_NOTIFICATION_ARRAY_ENTRIES ];
1243 #if ( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )
1247 #if ( INCLUDE_xTaskAbortDelay == 1 )
1250 #if ( configUSE_POSIX_ERRNO == 1 )
1256 * In line with software engineering best practice, especially when supplying a
1257 * library that is likely to change in future versions, FreeRTOS implements a
1258 * strict data hiding policy. This means the Queue structure used internally by
1259 * FreeRTOS is not accessible to application code. However, if the application
1260 * writer wants to statically allocate the memory required to create a queue
1261 * then the size of the queue object needs to be known. The StaticQueue_t
1262 * structure below is provided for this purpose. Its sizes and alignment
1263 * requirements are guaranteed to match those of the genuine structure, no
1264 * matter which architecture is being used, and no matter how the values in
1265 * FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope
1266 * users will recognise that it would be unwise to make direct use of the
1267 * structure members.
1269 typedef struct xSTATIC_QUEUE
1271 void * pvDummy1[ 3 ];
1276 UBaseType_t uxDummy2;
1279 StaticList_t xDummy3[ 2 ];
1280 UBaseType_t uxDummy4[ 3 ];
1281 uint8_t ucDummy5[ 2 ];
1283 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1287 #if ( configUSE_QUEUE_SETS == 1 )
1291 #if ( configUSE_TRACE_FACILITY == 1 )
1292 UBaseType_t uxDummy8;
1296 typedef StaticQueue_t StaticSemaphore_t;
1299 * In line with software engineering best practice, especially when supplying a
1300 * library that is likely to change in future versions, FreeRTOS implements a
1301 * strict data hiding policy. This means the event group structure used
1302 * internally by FreeRTOS is not accessible to application code. However, if
1303 * the application writer wants to statically allocate the memory required to
1304 * create an event group then the size of the event group object needs to be
1305 * know. The StaticEventGroup_t structure below is provided for this purpose.
1306 * Its sizes and alignment requirements are guaranteed to match those of the
1307 * genuine structure, no matter which architecture is being used, and no matter
1308 * how the values in FreeRTOSConfig.h are set. Its contents are somewhat
1309 * obfuscated in the hope users will recognise that it would be unwise to make
1310 * direct use of the structure members.
1312 typedef struct xSTATIC_EVENT_GROUP
1315 StaticList_t xDummy2;
1317 #if ( configUSE_TRACE_FACILITY == 1 )
1318 UBaseType_t uxDummy3;
1321 #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
1324 } StaticEventGroup_t;
1327 * In line with software engineering best practice, especially when supplying a
1328 * library that is likely to change in future versions, FreeRTOS implements a
1329 * strict data hiding policy. This means the software timer structure used
1330 * internally by FreeRTOS is not accessible to application code. However, if
1331 * the application writer wants to statically allocate the memory required to
1332 * create a software timer then the size of the queue object needs to be known.
1333 * The StaticTimer_t structure below is provided for this purpose. Its sizes
1334 * and alignment requirements are guaranteed to match those of the genuine
1335 * structure, no matter which architecture is being used, and no matter how the
1336 * values in FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in
1337 * the hope users will recognise that it would be unwise to make direct use of
1338 * the structure members.
1340 typedef struct xSTATIC_TIMER
1343 StaticListItem_t xDummy2;
1346 TaskFunction_t pvDummy6;
1347 #if ( configUSE_TRACE_FACILITY == 1 )
1348 UBaseType_t uxDummy7;
1354 * In line with software engineering best practice, especially when supplying a
1355 * library that is likely to change in future versions, FreeRTOS implements a
1356 * strict data hiding policy. This means the stream buffer structure used
1357 * internally by FreeRTOS is not accessible to application code. However, if
1358 * the application writer wants to statically allocate the memory required to
1359 * create a stream buffer then the size of the stream buffer object needs to be
1360 * known. The StaticStreamBuffer_t structure below is provided for this
1361 * purpose. Its size and alignment requirements are guaranteed to match those
1362 * of the genuine structure, no matter which architecture is being used, and
1363 * no matter how the values in FreeRTOSConfig.h are set. Its contents are
1364 * somewhat obfuscated in the hope users will recognise that it would be unwise
1365 * to make direct use of the structure members.
1367 typedef struct xSTATIC_STREAM_BUFFER
1369 size_t uxDummy1[ 4 ];
1370 void * pvDummy2[ 3 ];
1372 #if ( configUSE_TRACE_FACILITY == 1 )
1373 UBaseType_t uxDummy4;
1375 } StaticStreamBuffer_t;
1377 /* Message buffers are built on stream buffers. */
1378 typedef StaticStreamBuffer_t StaticMessageBuffer_t;
1386 #endif /* INC_FREERTOS_H */