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 <tr><td colspan="3" bgcolor=#F0F0F0>**OSAL**</td></tr> <tr> <td>Osal_setHwAttrs, Osal_getHwAttrs, Osal_getStaticMemStatus, Osal_getCoreId <td>NONE <td>NOT needed anymore </tr> <tr><td colspan="3" bgcolor=#F0F0F0>**Queue**</td></tr> <tr> <td>Osal_Queue_construct, Osal_Queue_handle, Osal_Queue_empty, Osal_Queue_get, Osal_Queue_put <td>NONE <td>NOT supported in MCU+ SDK. Use direct OS APIs for queue or write your own implementation instead. </tr> <tr><td colspan="3" bgcolor=#F0F0F0>**RegisterIntr**</td></tr> <tr> <td>Osal_RegisterInterrupt_initParams <td>\ref HwiP_Params_init <td>Single \ref KERNEL_DPL_HWI_PAGE API in MCU+ SDK to setup HWI </tr> <tr> <td>Osal_RegisterInterrupt, Osal_RegisterInterruptDirect <td>\ref HwiP_construct <td>Single \ref KERNEL_DPL_HWI_PAGE API in MCU+ SDK to setup HWI </tr> <tr> <td>Osal_DeleteInterrupt <td>\ref HwiP_disableInt <td>Single \ref KERNEL_DPL_HWI_PAGE API in MCU+ SDK to setup HWI </tr> <tr> <td>Osal_EnableInterrupt <td>\ref HwiP_enableInt <td>Single \ref KERNEL_DPL_HWI_PAGE API in MCU+ SDK to setup HWI </tr> <tr> <td>Osal_DisableInterrupt <td>\ref HwiP_disableInt <td>Single \ref KERNEL_DPL_HWI_PAGE API in MCU+ SDK to setup HWI </tr> <tr> <td>Osal_ClearInterrupt <td>\ref HwiP_clearInt <td>Single \ref KERNEL_DPL_HWI_PAGE API in MCU+ SDK to setup HWI </tr> <tr><td colspan="3" bgcolor=#F0F0F0>**Semaphore**</td></tr> <tr> <td>SemaphoreP_create <td>\ref SemaphoreP_constructMutex, \ref SemaphoreP_constructBinary, \ref SemaphoreP_constructCounting <td>Static allocation friendly API. Distinct API for mutex vs binary semaphore. </tr> <tr> <td>SemaphoreP_delete <td>\ref SemaphoreP_destruct <td>Static allocation friendly API </tr> <tr> <td>SemaphoreP_Params_init <td>NONE <td>NOT needed </tr> <tr> <td>SemaphoreP_pend <td>\ref SemaphoreP_pend <td>NO CHANGE </tr> <tr> <td>SemaphoreP_post <td>\ref SemaphoreP_post <td>NO CHANGE </tr> <tr> <td>SemaphoreP_postFromClock, SemaphoreP_postFromISR <td>\ref SemaphoreP_post <td>Single API for all variants </tr> <tr> <td>SemaphoreP_getCount <td>NONE <td>NOT needed </tr> <tr> <td>SemaphoreP_reset <td>NONE <td>Use \ref SemaphoreP_pend with timeout as 0 to reset sempahore. </tr> <tr><td colspan="3" bgcolor=#F0F0F0>**SWI**</td></tr> <tr> <td>SwiP_create, SwiP_delete, SwiP_Params_init, SwiP_post <td>NONE <td>SysBIOS specific API, see \ref KERNEL_FREERTOS_PAGE for equivalent API in FreeRTOS. </tr> <tr><td colspan="3" bgcolor=#F0F0F0>**Task**</td></tr> <tr> <td> TaskP_create <td>\ref TaskP_construct <td>Static allocation friendly API </tr> <tr> <td>TaskP_delete <td>\ref TaskP_destruct <td>Static allocation friendly API </tr> <tr> <td>TaskP_Params_init <td>\ref TaskP_Params_init <td>NO CHANGE </tr> <tr> <td>TaskP_sleep <td>\ref ClockP_sleep <td>API rename </tr> <tr> <td>TaskP_sleepInMsecs <td>\ref ClockP_usleep <td>API rename </tr> <tr> <td>TaskP_yield <td>\ref TaskP_yield <td>NO CHANGE </tr> <tr> <td>TaskP_setPrio, TaskP_self, TaskP_selfmacro, TaskP_isTerminated, OS_start <td>NONE <td>NOT needed </tr> <tr> <td>NONE <td>\ref TaskP_exit <td>New APIs to complete functionality </tr> <tr><td colspan="3" bgcolor=#F0F0F0>**Timer**</td></tr> <tr> <td>TimerP_create <td>\ref TimerP_setup <td>Takes timer base address as input in MCU+ SDK and HWI register should be done from application. </tr> <tr> <td>TimerP_delete <td>NONE <td>NOT needed. Stop the timer when done. </tr> <tr> <td>TimerP_setPeriodMicroSecs <td>\ref TimerP_setup <td>Separate API not needed. </tr> <tr> <td>TimerP_Params_init <td>\ref TimerP_Params_init <td>NO CHANGE </tr> <tr> <td>TimerP_start <td>\ref TimerP_start <td>Takes timer base address as input in MCU+ SDK </tr> <tr> <td>TimerP_stop <td>\ref TimerP_stop <td>Takes timer base address as input in MCU+ SDK </tr> <tr> <td>TimerP_ClearInterrupt <td>\ref TimerP_clearOverflowInt <td>Takes timer base address as input in MCU+ SDK </tr> <tr> <td>TimerP_getTimeInUsecs <td>\ref ClockP_getTimeUsec <td>API rename </tr> <tr> <td>NONE <td>\ref TimerP_getCount, \ref TimerP_getReloadCount, \ref TimerP_isOverflowed <td>New APIs to complete functionality </tr> |