1
0
mirror of https://github.com/azure-rtos/threadx synced 2025-01-16 07:42:57 +08:00

add utilities and update TraceX install link

This commit is contained in:
Scott Larson 2020-10-01 13:46:52 -07:00
parent 1b5816a206
commit 236374f704
11 changed files with 4070 additions and 0 deletions

View File

@ -102,6 +102,7 @@ Professional support plans (https://azure.microsoft.com/en-us/support/options/)
The following are references to additional Azure RTOS and Azure IoT in general:
| | |
|---|---|
| TraceX Installer | https://aka.ms/azrtos-tracex-installer |
| Azure RTOS Documenation and Guides: | https://docs.microsoft.com/azure/rtos |
| Azure RTOS Website: | https://azure.microsoft.com/services/rtos/ |
| Azure RTOS Sales Questions: | https://azure-rtos.ms-iot-contact.com/ |

View File

@ -0,0 +1,649 @@
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** FreeRTOS compatibility Kit */
/** */
/**************************************************************************/
/**************************************************************************/
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
#ifndef FREERTOS_H
#define FREERTOS_H
#include <stdint.h>
#include <tx_api.h>
#include <FreeRTOSConfig.h>
//// Hard coded configurations and other preprocessor definitions for compatibility.
#define portCRITICAL_NESTING_IN_TCB 0
#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
#define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )
#define portSETUP_TCB( pxTCB ) ( void ) pxTCB
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
#define portPRIVILEGE_BIT ((UBaseType_t)0x00)
#define portYIELD_WITHIN_API portYIELD
#define portSUPPRESS_TICKS_AND_SLEEP(xExpectedIdleTime)
#define portTASK_USES_FLOATING_POINT()
#define portALLOCATE_SECURE_CONTEXT(ulSecureStackSize)
#define portDONT_DISCARD
#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()
#define mtCOVERAGE_TEST_MARKER()
#define mtCOVERAGE_TEST_DELAY()
#define portASSERT_IF_IN_ISR()
#define portTICK_TYPE_IS_ATOMIC 1
#define portTICK_TYPE_ENTER_CRITICAL()
#define portTICK_TYPE_EXIT_CRITICAL()
#define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0
#define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR(x) (void) x
#if (configENABLE_BACKWARD_COMPATIBILITY == 1)
#define eTaskStateGet eTaskGetState
#define portTickType TickType_t
#define xTaskHandle TaskHandle_t
#define xQueueHandle QueueHandle_t
#define xSemaphoreHandle SemaphoreHandle_t
#define xQueueSetHandle QueueSetHandle_t
#define xQueueSetMemberHandle QueueSetMemberHandle_t
#define xTimeOutType TimeOut_t
#define xMemoryRegion MemoryRegion_t
#define xTaskParameters TaskParameters_t
#define xTaskStatusType TaskStatus_t
#define xTimerHandle TimerHandle_t
#define xCoRoutineHandle CoRoutineHandle_t
#define pdTASK_HOOK_CODE TaskHookFunction_t
#define portTICK_RATE_MS portTICK_PERIOD_MS
#define pcTaskGetTaskName pcTaskGetName
#define pcTimerGetTimerName pcTimerGetName
#define pcQueueGetQueueName pcQueueGetName
#define vTaskGetTaskInfo vTaskGetInfo
#define tmrTIMER_CALLBACK TimerCallbackFunction_t
#define pdTASK_CODE TaskFunction_t
#define xListItem ListItem_t
#define xList List_t
#define pxContainer pvContainer
#endif // (#if configENABLE_BACKWARD_COMPATIBILITY == 1)
#define tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE ( ( ( portUSING_MPU_WRAPPERS == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) || \
( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) )
//// Trace is not supported.
#define traceSTART()
#define traceEND()
//// Other
#define vQueueAddToRegistry(xQueue, pcName)
#define vQueueUnregisterQueue(xQueue)
// Assertion failure macro invoked on internal errors.
#ifndef TX_FREERTOS_ASSERT_FAIL
#define TX_FREERTOS_ASSERT_FAIL()
#endif
// Assertion check macro used to check for invalid arguments.
#ifndef configASSERT
#define configASSERT(x)
#endif
#ifndef configSTACK_DEPTH_TYPE
#define configSTACK_DEPTH_TYPE uint16_t
#endif
typedef LONG BaseType_t;
typedef ULONG UBaseType_t;
typedef UINT StackType_t;
#ifndef TX_FREERTOS_AUTO_INIT
#define TX_FREERTOS_AUTO_INIT 0
#endif
#ifndef configMINIMAL_STACK_SIZE
#error "configMINIMAL_STACK_SIZE must be defined in FreeRTOSConfig.h"
#endif
#ifndef configUSE_16_BIT_TICKS
#define configUSE_16_BIT_TICKS 0
#endif
#if (configUSE_16_BIT_TICKS == 1)
typedef uint16_t TickType_t;
#define portMAX_DELAY (TickType_t) (0xffffU)
#else
typedef uint32_t TickType_t;
#define portMAX_DELAY (TickType_t) (0xffffffffUL)
#define portTICK_TYPE_IS_ATOMIC 1 // TODO - is this needed.
#endif
typedef void (*TaskFunction_t)(void *);
typedef enum
{
eNoAction = 0,
eSetBits,
eIncrement,
eSetValueWithOverwrite,
eSetValueWithoutOverwrite,
} eNotifyAction;
typedef enum
{
eRunning = 0,
eReady,
eBlocked,
eSuspended,
eDeleted,
eInvalid
} eTaskState;
#define TXFR_NOTIFYACTION_VALID(x) (((int)x >= (int)eNoAction) && ((int)x <= (int)eSetValueWithoutOverwrite))
typedef struct txfr_queueset txfr_queueset_t;
typedef struct txfr_task txfr_task_t;
// Task related structures and type definitions.
struct txfr_task {
txfr_task_t *p_next;
TX_THREAD thread;
TaskFunction_t p_task_func;
void *p_task_arg;
uint32_t task_notify_val;
uint32_t task_notify_val_pend;
uint32_t *p_notify_val_ret;
TX_SEMAPHORE notification_sem;
uint8_t notification_pending;
uint8_t clear_on_pend;
uint32_t clear_mask;
uint8_t allocated;
};
typedef txfr_task_t StaticTask_t;
typedef txfr_task_t* TaskHandle_t;
// Semaphore related structures and type definitions.
typedef struct txfr_sem {
TX_SEMAPHORE sem;
TX_MUTEX mutex;
UBaseType_t max_count;
uint8_t allocated;
uint8_t is_mutex;
txfr_queueset_t *p_set;
} txfr_sem_t;
typedef txfr_sem_t *SemaphoreHandle_t;
typedef txfr_sem_t StaticSemaphore_t;
// Queue related structures and type definitions.
typedef struct txfr_queue {
ULONG id;
uint8_t allocated;
txfr_queueset_t *p_set;
uint8_t *p_mem;
TX_SEMAPHORE read_sem;
TX_SEMAPHORE write_sem;
uint8_t *p_write;
uint8_t *p_read;
UBaseType_t queue_length;
UBaseType_t msg_size;
} txfr_queue_t;
typedef txfr_queue_t *QueueHandle_t;
typedef txfr_queue_t StaticQueue_t;
// Event group related structures and type definitions.
typedef TickType_t EventBits_t;
typedef struct txfr_event {
TX_EVENT_FLAGS_GROUP event;
uint8_t allocated;
} txfr_event_t;
typedef txfr_event_t *EventGroupHandle_t;
typedef txfr_event_t StaticEventGroup_t;
// Timers related structures and type definitions.
typedef struct txfr_timer txfr_timer_t;
typedef txfr_timer_t *TimerHandle_t;
typedef txfr_timer_t StaticTimer_t;
typedef void (*TimerCallbackFunction_t)(TimerHandle_t xTimer);
struct txfr_timer {
TX_TIMER timer;
uint32_t period;
uint8_t one_shot;
uint8_t allocated;
void *id;
TimerCallbackFunction_t callback;
};
// Queue set related structures and type definitions.
struct txfr_queueset {
TX_QUEUE queue;
};
typedef txfr_queueset_t *QueueSetHandle_t;
typedef void *QueueSetMemberHandle_t;
// Common definitions.
#define errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ( -1 )
#define errQUEUE_BLOCKED ( -4 )
#define errQUEUE_YIELD ( -5 )
#define pdFALSE ((BaseType_t)0)
#define pdTRUE ((BaseType_t)1)
#define pdPASS (pdTRUE)
#define pdFAIL (pdFALSE)
#define errQUEUE_EMPTY ((BaseType_t)0)
#define errQUEUE_FULL ((BaseType_t)0)
// Initialize the adaptation layer.
UINT tx_freertos_init(void);
#define tskIDLE_PRIORITY ((UBaseType_t)0U)
#define taskYIELD() tx_thread_relinquish()
#define taskYIELD_FROM_ISR()
void *pvPortMalloc(size_t xWantedSize);
void vPortFree(void *pv);
void vPortEnterCritical(void);
void vPortExitCritical(void);
////
// Task API
#ifndef taskENTER_CRITICAL_FROM_ISR
#define taskENTER_CRITICAL_FROM_ISR() __get_interrupt_state(); __disable_interrupt();
#endif
#ifndef taskEXIT_CRITICAL_FROM_ISR
#define taskEXIT_CRITICAL_FROM_ISR(x) __set_interrupt_state(x);
#endif
#ifndef portDISABLE_INTERRUPTS
#define portDISABLE_INTERRUPTS() __disable_interrupt()
#endif
#ifndef portENABLE_INTERRUPTS
#define portENABLE_INTERRUPTS() __enable_interrupt()
#endif
#define taskENTER_CRITICAL() portENTER_CRITICAL()
#define taskEXIT_CRITICAL() portEXIT_CRITICAL()
#define portENTER_CRITICAL() vPortEnterCritical()
#define portEXIT_CRITICAL() vPortExitCritical()
#define taskDISABLE_INTERRUPTS() portDISABLE_INTERRUPTS()
#define taskENABLE_INTERRUPTS() portENABLE_INTERRUPTS()
#define taskSCHEDULER_SUSPENDED ((BaseType_t)0)
#define taskSCHEDULER_NOT_STARTED ((BaseType_t)1)
#define taskSCHEDULER_RUNNING ((BaseType_t)2)
void vTaskStartScheduler(void);
BaseType_t xTaskGetSchedulerState(void);
void vTaskSuspendAll(void);
BaseType_t xTaskResumeAll(void);
TaskHandle_t xTaskCreateStatic(TaskFunction_t pxTaskCode,
const char *const pcName,
const configSTACK_DEPTH_TYPE ulStackDepth,
void *const pvParameters,
UBaseType_t uxPriority,
StackType_t *const puxStackBuffer,
StaticTask_t *const pxTaskBuffer);
BaseType_t xTaskCreate(TaskFunction_t pvTaskCode,
const char * const pcName,
const configSTACK_DEPTH_TYPE usStackDepth,
void *pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask);
UBaseType_t uxTaskGetNumberOfTasks(void);
void vTaskDelete(TaskHandle_t xTask);
void vTaskDelay(const TickType_t xTicksToDelay);
void vTaskDelayUntil(TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement);
TaskHandle_t xTaskGetCurrentTaskHandle(void);
void vTaskSuspend(TaskHandle_t xTaskToSuspend);
void vTaskResume(TaskHandle_t xTaskToResume);
BaseType_t xTaskResumeFromISR(TaskHandle_t xTaskToResume);
BaseType_t xTaskAbortDelay(TaskHandle_t xTask);
UBaseType_t uxTaskPriorityGet(const TaskHandle_t xTask);
UBaseType_t uxTaskPriorityGetFromISR(const TaskHandle_t xTask);
void vTaskPrioritySet(TaskHandle_t xTask,
UBaseType_t uxNewPriority);
char *pcTaskGetName(TaskHandle_t xTaskToQuery);
eTaskState eTaskGetState(TaskHandle_t xTask);
TickType_t xTaskGetTickCount(void);
TickType_t xTaskGetTickCountFromISR(void);
////
// Task notification API.
BaseType_t xTaskNotifyGive(TaskHandle_t xTaskToNotify);
void vTaskNotifyGiveFromISR(TaskHandle_t xTaskToNotify,
BaseType_t *pxHigherPriorityTaskWoken);
uint32_t ulTaskNotifyTake(BaseType_t xClearCountOnExit,
TickType_t xTicksToWait);
BaseType_t xTaskNotifyWait(uint32_t ulBitsToClearOnEntry,
uint32_t ulBitsToClearOnExit,
uint32_t *pulNotificationValue,
TickType_t xTicksToWait );
BaseType_t xTaskNotify(TaskHandle_t xTaskToNotify,
uint32_t ulValue,
eNotifyAction eAction);
BaseType_t xTaskNotifyFromISR(TaskHandle_t xTaskToNotify,
uint32_t ulValue,
eNotifyAction eAction,
BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xTaskNotifyAndQuery(TaskHandle_t xTaskToNotify,
uint32_t ulValue,
eNotifyAction eAction,
uint32_t *pulPreviousNotifyValue);
#define xTaskGenericNotify(a, b, c, d) xTaskNotifyAndQuery(a, b, c, d)
BaseType_t xTaskNotifyAndQueryFromISR(TaskHandle_t xTaskToNotify,
uint32_t ulValue,
eNotifyAction eAction,
uint32_t *pulPreviousNotifyValue,
BaseType_t *pxHigherPriorityTaskWoken);
#define xTaskGenericNotifyFromISR(a, b, c, d, e) xTaskNotifyAndQueryFromISR(a, b, c, d, e)
BaseType_t xTaskNotifyStateClear(TaskHandle_t xTask);
uint32_t ulTaskNotifyValueClear(TaskHandle_t xTask,
uint32_t ulBitsToClear);
////
// Semaphore API.
#define semBINARY_SEMAPHORE_QUEUE_LENGTH ((uint8_t)1U)
#define semSEMAPHORE_QUEUE_ITEM_LENGTH ((uint8_t)0U)
#define semGIVE_BLOCK_TIME ((TickType_t)0U)
SemaphoreHandle_t xSemaphoreCreateCounting(UBaseType_t uxMaxCount,
UBaseType_t uxInitialCount);
SemaphoreHandle_t xSemaphoreCreateCountingStatic(UBaseType_t uxMaxCount,
UBaseType_t uxInitialCount,
StaticSemaphore_t *pxSemaphoreBuffer);
SemaphoreHandle_t xSemaphoreCreateBinary(void);
SemaphoreHandle_t xSemaphoreCreateBinaryStatic(StaticSemaphore_t *pxSemaphoreBuffer);
SemaphoreHandle_t xSemaphoreCreateMutex(void);
SemaphoreHandle_t xSemaphoreCreateMutexStatic(StaticSemaphore_t *pxMutexBuffer);
SemaphoreHandle_t xSemaphoreCreateRecursiveMutex(void);
SemaphoreHandle_t xSemaphoreCreateRecursiveMutexStatic(StaticSemaphore_t *pxMutexBuffer);
void vSemaphoreDelete(SemaphoreHandle_t xSemaphore);
BaseType_t xSemaphoreTake(SemaphoreHandle_t xSemaphore, TickType_t xTicksToWait);
BaseType_t xSemaphoreTakeFromISR(SemaphoreHandle_t xSemaphore, BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xSemaphoreTakeRecursive(SemaphoreHandle_t xMutex, TickType_t xTicksToWait);
BaseType_t xSemaphoreGive(SemaphoreHandle_t xSemaphore);
BaseType_t xSemaphoreGiveFromISR(SemaphoreHandle_t xSemaphore, BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xSemaphoreGiveRecursive(SemaphoreHandle_t xMutex);
UBaseType_t uxSemaphoreGetCount(SemaphoreHandle_t xSemaphore);
TaskHandle_t xSemaphoreGetMutexHolder(SemaphoreHandle_t xMutex);
TaskHandle_t xSemaphoreGetMutexHolderFromISR(SemaphoreHandle_t xMutex);
////
// Queue API.
QueueHandle_t xQueueCreate(UBaseType_t uxQueueLength, UBaseType_t uxItemSize);
QueueHandle_t xQueueCreateStatic(UBaseType_t uxQueueLength,
UBaseType_t uxItemSize,
uint8_t *pucQueueStorageBuffer,
StaticQueue_t *pxQueueBuffer );
void vQueueDelete(QueueHandle_t xQueue);
BaseType_t xQueueSend(QueueHandle_t xQueue,
const void * pvItemToQueue,
TickType_t xTicksToWait);
BaseType_t xQueueSendFromISR(QueueHandle_t xQueue,
const void * pvItemToQueue,
BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xQueueSendToBack(QueueHandle_t xQueue,
const void * pvItemToQueue,
TickType_t xTicksToWait);
BaseType_t xQueueSendToBackFromISR(QueueHandle_t xQueue,
const void * pvItemToQueue,
BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xQueueSendToFront(QueueHandle_t xQueue,
const void * pvItemToQueue,
TickType_t xTicksToWait);
BaseType_t xQueueSendToFrontFromISR(QueueHandle_t xQueue,
const void * pvItemToQueue,
BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xQueueReceive(QueueHandle_t xQueue,
void *pvBuffer,
TickType_t xTicksToWait);
BaseType_t xQueueReceiveFromISR(QueueHandle_t xQueue,
void *pvBuffer,
BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xQueuePeek(QueueHandle_t xQueue,
void *pvBuffer,
TickType_t xTicksToWait);
BaseType_t xQueuePeekFromISR(QueueHandle_t xQueue,
void *pvBuffer);
UBaseType_t uxQueueMessagesWaiting(QueueHandle_t xQueue);
UBaseType_t uxQueueMessagesWaitingFromISR(QueueHandle_t xQueue);
UBaseType_t uxQueueSpacesAvailable(QueueHandle_t xQueue);
BaseType_t xQueueIsQueueEmptyFromISR(const QueueHandle_t xQueue);
BaseType_t xQueueIsQueueFullFromISR(const QueueHandle_t xQueue);
BaseType_t xQueueReset(QueueHandle_t xQueue);
BaseType_t xQueueOverwrite(QueueHandle_t xQueue,
const void * pvItemToQueue);
BaseType_t xQueueOverwriteFromISR(QueueHandle_t xQueue,
const void * pvItemToQueue,
BaseType_t *pxHigherPriorityTaskWoken);
////
// Event group API.
EventGroupHandle_t xEventGroupCreate(void);
EventGroupHandle_t xEventGroupCreateStatic(StaticEventGroup_t *pxEventGroupBuffer);
void vEventGroupDelete(EventGroupHandle_t xEventGroup);
EventBits_t xEventGroupWaitBits(const EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToWaitFor,
const BaseType_t xClearOnExit,
const BaseType_t xWaitForAllBits,
TickType_t xTicksToWait);
EventBits_t xEventGroupSetBits(EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet);
BaseType_t xEventGroupSetBitsFromISR(EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet,
BaseType_t *pxHigherPriorityTaskWoken);
EventBits_t xEventGroupClearBits(EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToClear);
BaseType_t xEventGroupClearBitsFromISR(EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToClear);
EventBits_t xEventGroupGetBits(EventGroupHandle_t xEventGroup);
EventBits_t xEventGroupGetBitsFromISR(EventGroupHandle_t xEventGroup);
////
// Software timer API.
#ifndef pdMS_TO_TICKS
#ifndef configTICK_RATE_HZ
#error "configTICK_RATE_HZ must be defined in FreeRTOSConfig.h"
#endif // #ifndef configTICK_RATE_HZ
#define pdMS_TO_TICKS(xTimeInMs) ((TickType_t) (((TickType_t) (xTimeInMs) * (TickType_t)configTICK_RATE_HZ) / (TickType_t)1000))
#endif // #ifndef pdMS_TO_TICKS
TimerHandle_t xTimerCreate(const char * const pcTimerName,
const TickType_t xTimerPeriod,
const UBaseType_t uxAutoReload,
void * const pvTimerID,
TimerCallbackFunction_t pxCallbackFunction);
TimerHandle_t xTimerCreateStatic(const char * const pcTimerName,
const TickType_t xTimerPeriod,
const UBaseType_t uxAutoReload,
void * const pvTimerID,
TimerCallbackFunction_t pxCallbackFunction,
StaticTimer_t *pxTimerBuffer);
BaseType_t xTimerDelete(TimerHandle_t xTimer, TickType_t xBlockTime);
BaseType_t xTimerIsTimerActive(TimerHandle_t xTimer);
BaseType_t xTimerStart(TimerHandle_t xTimer,
TickType_t xBlockTime);
BaseType_t xTimerStop(TimerHandle_t xTimer,
TickType_t xBlockTime);
BaseType_t xTimerChangePeriod(TimerHandle_t xTimer,
TickType_t xNewPeriod,
TickType_t xBlockTime);
BaseType_t xTimerReset(TimerHandle_t xTimer,
TickType_t xBlockTime);
BaseType_t xTimerStartFromISR(TimerHandle_t xTimer,
BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xTimerStopFromISR(TimerHandle_t xTimer,
BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xTimerChangePeriodFromISR(TimerHandle_t xTimer,
TickType_t xNewPeriod,
BaseType_t *pxHigherPriorityTaskWoken);
BaseType_t xTimerResetFromISR(TimerHandle_t xTimer,
BaseType_t *pxHigherPriorityTaskWoken);
void *pvTimerGetTimerID(TimerHandle_t xTimer);
void vTimerSetTimerID(TimerHandle_t xTimer, void *pvNewID);
void vTimerSetReloadMode(TimerHandle_t xTimer,
const UBaseType_t uxAutoReload);
const char * pcTimerGetName(TimerHandle_t xTimer);
TickType_t xTimerGetPeriod(TimerHandle_t xTimer);
TickType_t xTimerGetExpiryTime(TimerHandle_t xTimer);
UBaseType_t uxTimerGetReloadMode(TimerHandle_t xTimer);
////
// Queue set API.
QueueSetHandle_t xQueueCreateSet(const UBaseType_t uxEventQueueLength);
BaseType_t xQueueAddToSet(QueueSetMemberHandle_t xQueueOrSemaphore,
QueueSetHandle_t xQueueSet);
BaseType_t xQueueRemoveFromSet(QueueSetMemberHandle_t xQueueOrSemaphore,
QueueSetHandle_t xQueueSet);
QueueSetMemberHandle_t xQueueSelectFromSet(QueueSetHandle_t xQueueSet,
const TickType_t xTicksToWait);
QueueSetMemberHandle_t xQueueSelectFromSetFromISR(QueueSetHandle_t xQueueSet);
#endif /* FREERTOS_H */

View File

@ -0,0 +1,92 @@
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** FreeRTOS compatibility Kit */
/** */
/**************************************************************************/
/**************************************************************************/
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
/* #define configENABLE_FPU 0 */
/* #define configENABLE_MPU 0 */
/* #define configUSE_PREEMPTION 1 */
/* #define configSUPPORT_STATIC_ALLOCATION 1 */
/* #define configSUPPORT_DYNAMIC_ALLOCATION 1 */
/* #define configUSE_IDLE_HOOK 0 */
/* #define configUSE_TICK_HOOK 0 */
/* #define configCPU_CLOCK_HZ (SystemCoreClock) */
#define configTICK_RATE_HZ (1000u)
#define configMAX_PRIORITIES (32u)
#define configMINIMAL_STACK_SIZE (512u)
#define configTOTAL_HEAP_SIZE (1024u * 128u)
/* #define configMAX_TASK_NAME_LEN (16) */
/* #define configUSE_TRACE_FACILITY 0 */
#define configUSE_16_BIT_TICKS 0
/* #define configUSE_MUTEXES 1 */
/* #define configQUEUE_REGISTRY_SIZE 0 */
/* #define configUSE_RECURSIVE_MUTEXES 1 */
/* #define configUSE_COUNTING_SEMAPHORES 1 */
/* #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 */
/* #define configMESSAGE_BUFFER_LENGTH_TYPE size_t */
#define configSTACK_DEPTH_TYPE uint16_t
/* #define configUSE_CO_ROUTINES 0 */
/* #define configMAX_CO_ROUTINE_PRIORITIES (2) */
/* Software timer definitions. */
/* #define configUSE_TIMERS 1 */
/* #define configTIMER_TASK_PRIORITY (2) */
/* #define configTIMER_QUEUE_LENGTH 10 */
/* #define configTIMER_TASK_STACK_DEPTH 256 */
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
/* #define INCLUDE_vTaskPrioritySet 1 */
/* #define INCLUDE_uxTaskPriorityGet 1 */
#define INCLUDE_vTaskDelete 1 /* Set to 0 to disable task deletion and the idle task. */
/* #define INCLUDE_vTaskCleanUpResources 0 */
/* #define INCLUDE_vTaskSuspend 1 */
/* #define INCLUDE_vTaskDelayUntil 1 */
/* #define INCLUDE_vTaskDelay 1 */
/* #define INCLUDE_xTaskGetSchedulerState 1 */
/* #define INCLUDE_xTimerPendFunctionCall 1 */
/* #define INCLUDE_xQueueGetMutexHolder 1 */
/* #define INCLUDE_uxTaskGetStackHighWaterMark 0 */
/* #define INCLUDE_eTaskGetState 1 */
/* Define to a macro invoked to check for invalid arguments. */
#define configASSERT(x)
/* #define configASSERT(x) if ((x) == 0) {taskDISABLE_INTERRUPTS(); for(;;) {};} */
/* Define to a macro invoked on internal assertion failures from within the adaptation layer. */
#define TX_FREERTOS_ASSERT_FAIL()
/* #define TX_FREERTOS_ASSERT_FAIL() {taskDISABLE_INTERRUPTS(); for(;;) {};} */
/* Set to 1 to support auto initialization, see documentation for details. */
#define TX_FREERTOS_AUTO_INIT 0
#endif /* #ifndef FREERTOS_CONFIG_H */

View File

@ -0,0 +1,34 @@
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** FreeRTOS compatibility Kit */
/** */
/**************************************************************************/
/**************************************************************************/
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
#ifndef EVENT_GROUPS_H
#define EVENT_GROUPS_H
/* This file is intentionally left empty for backward compatibility. */
#endif /* EVENT_GROUPS_H */

View File

@ -0,0 +1,34 @@
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** FreeRTOS compatibility Kit */
/** */
/**************************************************************************/
/**************************************************************************/
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
#ifndef QUEUE_H
#define QUEUE_H
/* This file is intentionally left empty for backward compatibility. */
#endif /* QUEUE_H */

View File

@ -0,0 +1,337 @@
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
Introduction
------------
Welcome to the FreeRTOS adaptation layer for ThreadX documentation. This document will go over configuration, initialization and usage of the adaptation layer as well as important guidelines and limitations.
Files
-----
The adaptation layer is comprised of the following files:
- tx_freertos.c
- FreeRTOS.h
- event_groups.h
- queue.h
- semphr.h
- task.h
- timers.h
The main source file for the adaptation layer is “tx_freertos.c” as well as “FreeRTOS.h” the other headers are provided for compatibility with FreeRTOS.
In addition, the following configuration file must be available within the project. A template of the configuration file is provided in the source distribution.
- FreeRTOSConfig.h
ThreadX Configuration
---------------------
A few ThreadX configurations should be looked at prior to using the adaptation layer. Please note that if a configuration is changed within `tx_user.h` the preprocessor definition `TX_INCLUDE_USER_DEFINE_FILE` should be defined at the compiler command line. This is to ensure that `tx_user.h` is properly included from `tx_port.h`.
## Thread Extension:
The adaptation layer requires a custom field within the `TX_THREAD` data structure to store a reference to the adaptation layer thread-related data. The following preprocessor definitions should be added to `tx_user.h`. Failure to add this configuration will result in a compilation error.
`#define TX_THREAD_USER_EXTENSION VOID *txfr_thread_ptr;`
## Timer Processing Task:
To better emulate the FreeRTOS timer behaviour it is recommended, but not necessary, to enable processing of ThreadX timers within a task instead of within an ISR. To do so the `TX_TIMER_PROCESS_IN_ISR` preprocessor definition should NOT be defined within `tx_user.h` or `tx_port.h` It is also recommended, but not required to have the timer task priority set at priority 0, which is the highest priority within ThreadX, like this:
`#define TX_TIMER_THREAD_PRIORITY 0`
If desired to reduce resource usage, timer processing can be done within the timer tick ISR by defining `TX_TIMER_PROCESS_IN_ISR` within `tx_user.h`. This wont have any negative side effect but may change the sequencing of timer firing compared to FreeRTOS.
Adaptation Layer Setup and Configuration
----------------------------------------
To include the adaptation layer in a ThreadX project it is sufficient to add to the makefile or project the `tx_freertos.c` source file as well as create or copy the `FreeRTOSConfig.h` configuration file. The configuration can be taken from an existing project but care should be taken to ensure that it contains no extraneous declarations and definitions that may cause compilation errors. A template of the configuration file can be found within the config_template directory. Every uncommented definitions within the template configuration file are understood by the adaptation layer while every other configuration definitions are ignored. The various FreeRTOS headers can be found at the root of the adaptation layer source directory.
For simplicity only a selected set of the usual configuration defines are supported by the adaptation layer. All other configurations not explicitly listed are ignored. In addition a few additional definitions can be added to `FreeRTOSConfig.h` to tune the behaviour of the adaptation layer.
| Name | Default Value | Description |
|------|---------------|-------------|
| configUSE_16_BIT_TICKS | 0 | Set to 1 to use 16-bit tick |
| configSTACK_DEPTH_TYPE | uint16_t | Use to override the type used to specify stack depth |
| configTICK_RATE_HZ | - | Set the kernel tick rate, used by the pdMS_TO_TICKS() macro |
| configMAX_PRIORITIES | - | Maximum number of priorities. Must be less than or equal to the configured number of ThreadX priorities. |
| configMINIMAL_STACK_SIZE | 512u | Minimum stack size, used as the stack size of the idle task if `TX_FREERTOS_IDLE_STACK` is not defined.
| configTOTAL_HEAP_SIZE | - | Amount of internal memory allocated to the adaptation layer when creating FreeRTOS objects. Can be set to 0 to disable dynamic allocation. |
| INCLUDE_vTaskDelete | 1 | Set to 0 to disable the task delete API. When disabled the adaptation layer will not create the idle task to save resources. |
| TX_FREERTOS_IDLE_STACK | 512u | Stack size of the idle task. |
| TX_FREERTOS_ASSERT_FAIL | | Define to a macro invoked on internal assertion failures from within the adaptation layer |
| configASSERT | | Define to a macro invoked for invalid arguments |
## Initialization
Unless auto-initialization is used, see below, early initialization should proceed as is usual for any ThreadX application. The adaptation layer should be initialized upon reaching `tx_application_define()` by calling `tx_freertos_init()`. Internally `tx_freertos_init()` will initialize a ThreadX byte pool that will be used by the adaptation layer to allocate and free kernel objects.
FreeRTOS tasks and objects can be created from within `tx_application_define()`. Usually, at least the initial application task should be created.
Heres an example of a minimal initialization of the adaptation layer.
```cpp
VOID tx_application_define(VOID * first_unused_memory)
{
BaseType_t error;
TaskHandle_t task_handle;
tx_freertos_init();
error = xTaskCreate(first_thread_entry, "Initial Task", STACK_SIZE, NULL, 10, &task_handle);
if(error != pdPASS) {
// Handle error.
}
}
```
It is also possible to initialize the FreeRTOS adaptation layer later once ThreadX is started as long as `tx_freertos_init()` is called before attempting to create any FreeRTOS kernel objects or tasks.
## Auto-initialization
The default method of initializing the adaptation layer requires some modifications to the application to initialize ThreadX and the adaptation layer prior to using the FreeRTOS API. An alternative method is available when modifications to the application isn't desirable. To do so the following configuration should be added and set to one in FreeRTOSConfig.h:
`#define TX_FREERTOS_AUTO_INIT 1`
Additionally the following preprocessor definition should be added to `tx_user.h`:
`#define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION return;`
When both of those configurations are done, the adaptation layer will be initialized automatically by the first call to an object create function, no other call is allowed prior to starting the kernel by calling `vTaskStartScheduler()`.
## Port Macros
Four port macros to manipulate ISRs are required by the adaptation layer. Default implementations are provided for IAR. They can be defined in `FreeRTOSConfig.h` if needed.
`taskENTER_CRITICAL_FROM_ISR()`
`taskEXIT_CRITICAL_FROM_ISR`
`portDISABLE_INTERRUPTS`
`portENABLE_INTERRUPTS`
Usage Guidelines and Limitations
--------------------------------
While the adaptation layer attempts to emulate the behaviour and feature set of FreeRTOS it must be understood that some limitations and deviations exist. Every application developer using the adaptation layer should review this document, especially the exhaustive list of supported API presented later in this document along with important deviations in behaviour from FreeRTOS. In addition, the following general guidelines should be followed.
## Usage of FreeRTOS API Calls Within a Native ThreadX Thread
The scenario of using FreeRTOS calls within a thread created using `tx_thread_create()` is not supported. While it is not explicitly disallowed by the adaptation layer some FreeRTOS API may function erratically when they are called from outside a FreeRTOS task.
## Usage of ThreadX Native API Calls Within a FreeRTOS Task
Similarly to the above scenario, usage of native ThreadX calls from within a task created using `xTaskCreate()` or `xTaskCreateStatic()` is not recommended, with exceptions. It is possible to use any of the ThreadX synchronizations objects, such as Semaphore, Mutexes, Queues and event flags directly from within a FreeRTOS task. It is not supported to use any of the ThreadX thread manipulation functions, however.
## Mix of ThreadX Threads and FreeRTOS Tasks
It is possible to mix native ThreadX threads and FreeRTOS threads in the same applications assuming that previous two guidelines are followed.
## Idle Task and Idle Priority
ThreadX by its design does not have an idle task. FreeRTOS, however, does have an idle task, and it is responsible for performing the final cleanup and freeing of memory when deleting a task. The adaptation layer creates, during initialization, an idle task to perform the same duty. The idle task has the lowest possible priority allowed by ThreadX namely `TX_MAX_PRIORITIES 1`. The idle task will only run if there is a deleted thread to cleanup, otherwise it will be waiting on an internal semaphore posted from the adaptation layer `vTaskDelete()` function.
## Task Yielding and Preemption From ISR
When returning from an ISR, ThreadX will automatically switch to the highest priority task ready to run. As such the `taskYIELD_FROM_ISR()` macro has no effect and yielding will always occur if a higher priority task was made ready to run within and ISR. `taskYIELD()` however works as expected yielding control to the next ready-to-run task with the same priority as the current task.
## Task Deletion and the Idle Task
FreeRTOS uses the Idle task, which is created during initialization, to cleanup deleted threads. The Threadx adaptation layer mimics this behaviour by deleting and freeing any resources allocated to a task within an internal idle task. If the `vTaskDelete()` call is disabled by setting `INCLUDE_vTaskDelete` to 0, the idle task will not be created and the task delete functionality wont be available.
## Returning From a Task
FreeRTOS does not allow simply returning from a task while this behaviour is permitted within ThreadX. The adaptation layer allows returning from a task when `vTaskDelete()` is available although for portability it is recommended to always explicitly delete tasks. When `vTaskDelete()` is disabled by setting `INCLUDE_vTaskDelete` to 0, returning from a task will cause an assertion failure.
## Memory Management and Heap Configuration
The total memory size available to the adaptation layer when creating FreeRTOS kernel objects dynamically is configurable through the `configTOTAL_HEAP_SIZE` definition located in `FreeRTOSConfig.h` configuration file. An area of memory of the specified size is created internally and managed using a ThreadX byte pool. Setting `configTOTAL_HEAP_SIZE` to 0 will effectively disable dynamic allocation of kernel objects.
## Tickless Mode
Tickless mode, which can be selected using `configUSE_TICKLESS_IDLE` is not supported by the adaptation layer or ThreadX.
API Support by Category
-----------------------
This release of the FreeRTOS adaptation layer for ThreadX broadly supports the following API groups:
- Task creation, control and utilities
- Semaphores and Mutexes
- Queues
- Queue Sets
- Direct to Task Notifications
- Software Timers
- Event Groups
The tables that follow list the individual along with any notable limitations or deviations from the FreeRTOS behaviour of each API or API group.
## Task
The task API represents the core of the adaptation layer enabling creation and control of FreeRTOS tasks using underlying ThreadX threads. FreeRTOS priorities are transparently mapped to ThreadX priorities in reverse orders since under FreeRTOS increasing priority values means an increasing task priority which is the reverse of the ThreadX convention.
### Macros
| Name | Notes |
|------|-------|
| taskSCHEDULER_SUSPENDED
| taskSCHEDULER_NOT_STARTED
| taskSCHEDULER_RUNNING
| taskENTER_CRITICAL()
| taskEXIT_CRITICAL()
| taskENTER_CRITICAL_FROM_ISR()
| taskEXIT_CRITICAL_FROM_ISR()
| taskDISABLE_INTERRUPTS()
| taskENABLE_INTERRUPTS()
| tskIDLE_PRIORITY
| taskYIELD()
| taskYIELD_FROM_ISR() | Has no effect, ThreadX will automatically pre-empt when a higher priority task is available to run upon returning from an ISR. |
### Functions
| Names | Notes |
|-------|-------|
| vTaskStartScheduler() | Has no effect if `TX_FREERTOS_AUTO_INIT` is undefined or set to 0, scheduler is started automatically when returning from `tx_application_define().` Otherwise this call will start the scheduler for the first time. |
| xTaskGetSchedulerState()
| vTaskSuspendAll()
| xTaskResumeAll() | Always return pdFALSE since pre-emption is handled automatically by ThreadX. |
| xTaskCreateStatic()
| xTaskCreate()
| uxTaskGetNumberOfTasks() | Only returns the number of task created by either `xTaskCreate()` or `xTaskcreateStatic()`. Task created internally by ThreadX or by the application using `tx_thread_create()` are not counted. |
| vTaskDelete()
| vTaskDelay()
| vTaskDelayUntil() | The implementation of `vTaskDelayUntil()` cannot perform a wait in an atomic fashion. As such there might be additional jitter when using this function with the adaptation layer. The implementation will, however, not accumulate any drift. |
| xTaskGetCurrentTaskHandle() | This will only work when called from a task created by either `xTaskCreate()` or `xTaskcreateStatic()`. |
| vTaskSuspend()
| vTaskResume()
| xTaskResumeFromISR()
| xTaskAbortDelay()
| uxTaskPriorityGet()
| uxTaskPriorityGetFromISR()
| vTaskPrioritySet()
| pcTaskGetName()
| eTaskGetState()
| uxTaskGetStackHighWaterMark() | Not implemented. |
| uxTaskGetStackHighWaterMark2() | Not implemented. |
| xTaskCallApplicationTaskHook() | Not implemented. |
| xTaskGetIdleTaskHandle() | Not implemented since the idle task is not a FreeRTOS task. |
| uxTaskGetSystemState() | Not implemented. |
| vTaskList() | Not implemented. |
| vTaskGetRunTimeStats() | Not implemented. |
| xTaskGetIdleRunTimeCounter() | Not implemented since the idle task is not free-running but waiting for delete events. |
## Task Notification
Task notifications are fully implemented.
| Name | Notes |
|------|-------|
| xTaskNotifyGive()
| vTaskNotifyGiveFromISR()
| ulTaskNotifyTake()
| xTaskNotifyWait()
| xTaskNotify()
| xTaskNotifyFromISR()
| xTaskNotifyAndQuery()
| xTaskGenericNotify()
| xTaskNotifyAndQueryFromISR()
| xTaskGenericNotifyFromISR()
| xTaskNotifyStateClear()
| ulTaskNotifyValueClear()
## Semaphore and Mutex
Semaphores, either counting or binary as well as Mutexes are fully implemented. Mutexes under the adaptation layer cannot be taken or given from an ISR as this is not allowed in ThreadX as well as recent version of FreeRTOS. Due to differences between ThreadX and FreeRTOS it is possible that the ordering task wakeup may slightly differ.
| Name | Notes |
|------|-------|
| xSemaphoreCreateCounting()
| xSemaphoreCreateCountingStatic()
| xSemaphoreCreateBinary()
| xSemaphoreCreateBinaryStatic()
| xSemaphoreCreateMutex()
| xSemaphoreCreateMutexStatic()
| xSemaphoreCreateRecursiveMutex()
| xSemaphoreCreateRecursiveMutexStatic()
| vSemaphoreDelete()
| xSemaphoreTake()
| xSemaphoreTakeFromISR() | Its not possible to take a mutex from an ISR. |
| xSemaphoreTakeRecursive()
| xSemaphoreGive()
| xSemaphoreGiveFromISR()
| xSemaphoreGiveRecursive() | Its not possible to give a mutex from an ISR. |
| uxSemaphoreGetCount()
| xSemaphoreGetMutexHolder()
| xSemaphoreGetMutexHolderFromISR()
| vSemaphoreCreateBinary() | Not implemented since its marked as deprecated in the FreeRTOS documentation. |
## Queue
The FreeRTOS queue API is implemented with the help of ThreadX semaphores and is designed to mimic the behaviour of FreeRTOS queues. Due to differences between ThreadX and FreeRTOS it is possible that the ordering task wakeup may slightly differ.
| Name | Notes |
|------|-------|
| xQueueCreate() |
| xQueueCreateStatic() |
| vQueueDelete()
| xQueueSend()
| xQueueSendFromISR()
| xQueueSendToBack()
| xQueueSendToBackFromISR()
| xQueueSendToFront() |
| xQueueSendToFrontFromISR() |
| xQueueReceive()
| xQueueReceiveFromISR()
| xQueuePeek() |
| xQueuePeekFromISR() |
| uxQueueMessagesWaiting() |
| uxQueueMessagesWaitingFromISR() |
| uxQueueSpacesAvailable() |
| xQueueIsQueueEmptyFromISR()
| xQueueIsQueueFullFromISR()
| xQueueReset()
| xQueueOverwrite() |
| xQueueOverwriteFromISR() |
| pcQueueGetName() | Not implemented. |
## Queue Sets
Queue sets are implemented with support for adding queues, semaphores and mutexes to a set. Due to the way ThreadX deliver messages, it is possible that the order of events returned by `xQueueSelectFromSet()` and `xQueueSelectFromSetFromISR()` differs from the order they would be returned by FreeRTOS.
| Name | Notes |
|------|-------|
| xQueueCreateSet()
| xQueueAddToSet()
| xQueueRemoveFromSet()
| xQueueSelectFromSet()
| xQueueSelectFromSetFromISR()
## Event Group
Event groups are implemented using ThreadXs event flags. It is important to note however that `xEventGroupSync()` is not atomic.
| Name | Notes|
|------|-------|
| xEventGroupCreate()
| xEventGroupCreateStatic()
| vEventGroupDelete()
| xEventGroupWaitBits()
| xEventGroupSetBits()
| xEventGroupSetBitsFromISR()
| xEventGroupClearBits()
| xEventGroupClearBitsFromISR()
| xEventGroupGetBits()
| xEventGroupGetBitsFromISR()
| xEventGroupSync() | Not atomic. |
## Timer
The timer API is fully implemented except for the pend function all functionality provided by `xTimerPendFunctionCall()` and `xTimerPendFunctionCallFromISR()`. Also since the timer handling thread is not a FreeRTOS task, `xTimerGetTimerDaemonTaskHandle()` is not supported as well.
| Name | Notes |
|------|-------|
| xTimerCreate()
| xTimerCreateStatic()
| xTimerDelete()
| xTimerIsTimerActive()
| xTimerStart()
| xTimerStop()
| xTimerChangePeriod()
| xTimerReset()
| xTimerStartFromISR()
| xTimerStopFromISR()
| xTimerChangePeriodFromISR()
| xTimerResetFromISR()
| pvTimerGetTimerID()
| vTimerSetTimerID()
| vTimerSetReloadMode()
| pcTimerGetName()
| xTimerGetPeriod()
| xTimerGetExpiryTime()
| uxTimerGetReloadMode()
| xTimerPendFunctionCall() | Not implemented. |
| xTimerPendFunctionCallFromISR() | Not implemented. |
| xTimerGetTimerDaemonTaskHandle() | Not implemented. |
Document Revision History
-------------------------
| Version | Release | Notes |
|---------|---------|-------|
| 1 | 2020-09-30 | - Initial release. |

View File

@ -0,0 +1,11 @@
Copyright (c) Microsoft Corporation. All rights reserved.
This software is licensed under the Microsoft Software License Terms for Microsoft Azure RTOS. Full text of the license can be found in the LICENSE file at https://aka.ms/AzureRTOS_EULA and in the root directory of this software.
FreeRTOS Adaptation Layer for ThreadX Revision History
--------------
09-30-2020 6.1 Initial release.

View File

@ -0,0 +1,35 @@
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** FreeRTOS compatibility Kit */
/** */
/**************************************************************************/
/**************************************************************************/
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
#ifndef SEMPHR_H
#define SEMPHR_H
/* This file is intentionally left empty for backward compatibility. */
#endif

View File

@ -0,0 +1,34 @@
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** FreeRTOS compatibility Kit */
/** */
/**************************************************************************/
/**************************************************************************/
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
#ifndef TASK_H
#define TASK_H
/* This file is intentionally left empty for backward compatibility. */
#endif /* TASK_H */

View File

@ -0,0 +1,34 @@
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* This software is licensed under the Microsoft Software License */
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
/* and in the root directory of this software. */
/* */
/**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** ThreadX Component */
/** */
/** FreeRTOS compatibility Kit */
/** */
/**************************************************************************/
/**************************************************************************/
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* */
/**************************************************************************/
#ifndef TIMERS_H
#define TIMERS_H
/* This file is intentionally left empty for backward compatibility. */
#endif /* TIMERS_H */

File diff suppressed because it is too large Load Diff