This section describes the differences between Driver Porting Layer of MCU+ SDK and OSAL from the Processor SDK RTOS (PDK). This can be used as migration aid when moving from Processor SDK RTOS (PDK) to MCU+ SDK.
There are changes in functions names, structure names and macro names. The changes in function names are listed below.
PDK | MCU+ SDK | Change Description / Remarks |
---|---|---|
Address Translate | ||
NONE | Region based Address Translate | New in MCU+ SDK |
Cache | ||
CacheP_wb | CacheP_wb | NO CHANGE |
CacheP_Inv | CacheP_inv | API rename |
CacheP_wbInv | CacheP_wbInv | NO CHANGE |
CacheP_fenceCpu2Dma, CacheP_fenceDma2Cpu | NONE | NOT APPLICABLE for current supported SOCs |
NONE | CacheP_enable, CacheP_disable, CacheP_getEnabled, CacheP_wbAll, CacheP_wbInvAll, CacheP_init | New APIs to complete functionality |
Clock | ||
NONE | Clock | New in MCU+ SDK |
Cycle Profiler | ||
CycleprofilerP_init | CycleCounterP_reset | API rename |
CycleprofilerP_getTimeStamp | CycleCounterP_getCount32 | API rename |
Debug | ||
DebugP_assert | DebugP_assert | NO CHANGE |
DebugP_log0, DebugP_log1, DebugP_log2, DebugP_log3, DebugP_log4 | DebugP_log | Single API to replace multiple APIs |
Event Combiner | ||
EventCombinerP_disableEvent, EventCombinerP_enableEvent, EventCombinerP_clearEvent, EventCombinerP_dispatchPlug, EventCombinerP_dispatchUnplug, EventCombinerP_getHwi, EventCombinerP_getIntNum, EventCombinerP_SingleRegisterInt, EventCombinerP_GroupRegisterInt | Use APIs from HW Interrupts | Single HW Interrupts API in MCU+ SDK to setup HWI |
Event | ||
EventP_create | EventP_construct | Static allocation friendly API |
EventP_delete | EventP_destruct | Static allocation friendly API |
EventP_pend | EventP_waitBits | API change to make it more generic vs SysBIOS specific |
EventP_post | EventP_setBits | API rename |
EventP_getPostedEvents | EventP_getBits | API rename |
EventP_Params_init | NONE | NOT required anymore |
NONE | EventP_clearBits | New APIs to complete functionality |
HWI | ||
HwiP_create | HwiP_construct | Static allocation friendly API |
HwiP_delete | HwiP_destruct | Static allocation friendly API |
HwiP_disable | HwiP_disable | NO CHANGE |
HwiP_disableInterrupt | HwiP_disableInt | API rename |
HwiP_enableInterrupt | HwiP_enableInt | API rename |
HwiP_Params_init | HwiP_Params_init | NO CHANGE |
HwiP_restore | HwiP_restore | NO CHANGE |
HwiP_post | HwiP_post | NO CHANGE |
HwiP_createDirect | NONE | NOT supported as of now in MCU+ SDK, use HwiP_construct instead |
HwiP_getHandle, HwiP_getEventId | NONE | NOT needed |
NONE | HwiP_init, HwiP_inISR, HwiP_enable, HwiP_clearInt, HwiP_restoreInt, HwiP_setArgs | New APIs to complete functionality |
Memory | ||
MemoryP_ctrlAlloc, MemoryP_dataAlloc | HeapP_alloc | Use HeapP_construct to create "ctrl", "data" heaps as needed by application |
MemoryP_ctrlFree, MemoryP_dataFree | HeapP_free | Use HeapP_construct to create "ctrl", "data" heaps as needed by application |
MemoryP_getStats | HeapP_getHeapStats | |
NONE | HeapP_construct, HeapP_destruct, HeapP_getFreeHeapSize, HeapP_getMinimumEverFreeHeapSize | New APIs to complete functionality |
MPU ARMv7 | ||
NONE | MPU for ARMv7 (ARM M4) | New in MCU+ SDK |
OSAL | ||
Osal_setHwAttrs, Osal_getHwAttrs, Osal_getStaticMemStatus, Osal_getCoreId | NONE | NOT needed anymore |
Queue | ||
Osal_Queue_construct, Osal_Queue_handle, Osal_Queue_empty, Osal_Queue_get, Osal_Queue_put | NONE | NOT supported in MCU+ SDK. Use direct OS APIs for queue or write your own implementation instead. |
RegisterIntr | ||
Osal_RegisterInterrupt_initParams | HwiP_Params_init | Single HW Interrupts API in MCU+ SDK to setup HWI |
Osal_RegisterInterrupt, Osal_RegisterInterruptDirect | HwiP_construct | Single HW Interrupts API in MCU+ SDK to setup HWI |
Osal_DeleteInterrupt | HwiP_disableInt | Single HW Interrupts API in MCU+ SDK to setup HWI |
Osal_EnableInterrupt | HwiP_enableInt | Single HW Interrupts API in MCU+ SDK to setup HWI |
Osal_DisableInterrupt | HwiP_disableInt | Single HW Interrupts API in MCU+ SDK to setup HWI |
Osal_ClearInterrupt | HwiP_clearInt | Single HW Interrupts API in MCU+ SDK to setup HWI |
Semaphore | ||
SemaphoreP_create | SemaphoreP_constructMutex, SemaphoreP_constructBinary, SemaphoreP_constructCounting | Static allocation friendly API. Distinct API for mutex vs binary semaphore. |
SemaphoreP_delete | SemaphoreP_destruct | Static allocation friendly API |
SemaphoreP_Params_init | NONE | NOT needed |
SemaphoreP_pend | SemaphoreP_pend | NO CHANGE |
SemaphoreP_post | SemaphoreP_post | NO CHANGE |
SemaphoreP_postFromClock, SemaphoreP_postFromISR | SemaphoreP_post | Single API for all variants |
SemaphoreP_getCount | NONE | NOT needed |
SemaphoreP_reset | NONE | Use SemaphoreP_pend with timeout as 0 to reset sempahore. |
SWI | ||
SwiP_create, SwiP_delete, SwiP_Params_init, SwiP_post | NONE | SysBIOS specific API, see FreeRTOS for equivalent API in FreeRTOS. |
Task | ||
TaskP_create | TaskP_construct | Static allocation friendly API |
TaskP_delete | TaskP_destruct | Static allocation friendly API |
TaskP_Params_init | TaskP_Params_init | NO CHANGE |
TaskP_sleep | ClockP_sleep | API rename |
TaskP_sleepInMsecs | ClockP_usleep | API rename |
TaskP_yield | TaskP_yield | NO CHANGE |
TaskP_setPrio, TaskP_self, TaskP_selfmacro, TaskP_isTerminated, OS_start | NONE | NOT needed |
NONE | TaskP_exit | New APIs to complete functionality |
Timer | ||
TimerP_create | TimerP_setup | Takes timer base address as input in MCU+ SDK and HWI register should be done from application. |
TimerP_delete | NONE | NOT needed. Stop the timer when done. |
TimerP_setPeriodMicroSecs | TimerP_setup | Separate API not needed. |
TimerP_Params_init | TimerP_Params_init | NO CHANGE |
TimerP_start | TimerP_start | Takes timer base address as input in MCU+ SDK |
TimerP_stop | TimerP_stop | Takes timer base address as input in MCU+ SDK |
TimerP_ClearInterrupt | TimerP_clearOverflowInt | Takes timer base address as input in MCU+ SDK |
TimerP_getTimeInUsecs | ClockP_getTimeUsec | API rename |
NONE | TimerP_getCount, TimerP_getReloadCount, TimerP_isOverflowed | New APIs to complete functionality |