Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.
Processor SDK RTOS OSAL
Starting in v4.3, Processor SDK documentation is no longer hosted on processors wiki.
Please bookmark the new links:
- Linux, RT-Linux: http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/index.html
- RTOS: http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index.html
- Android: http://software-dl.ti.com/processor-sdk-android/esd/docs/latest/android/index.html
|RTOS Software Developer Guide||→||OSAL|
The OSAL library provides operating system abstraction layer API sample implementations that are required for processor SDK drivers. Scope of APIs supported in the module is limited to support OS services required for RTOS or bare metal drivers
- Supported Operating Systems
- Supported SOCs
- Please refer to component release notes
Operating System Extension
Porting of OSAL component will enable extending PDK components to additional OS environment. Reference top level API header file includes:
Application Integration Details
Baremetal or No-OS Use case
Reference library path to be included in application build environment:
SysBIOS based application
Any RTSC application that needs to use osal library, should have below RTSC configuration lines before any other processor sdk components (e.g., board, gpio, uart etc).
/* set the operating system type, * supported types are "tirtos" and "nonos" */ var osType = "tirtos"; /* set the soc type * (applicable only when osTYpe * is "nonos" only) */ var socType = "am572x"; /* Setup the OSAL Library */ var Osal = xdc.loadPackage('ti.osal'); Osal.Settings.osType = osType; Osal.Settings.socType = socType;
This sysbios example OSAL_BasicExample_<board>_<coretype>TestProject tests Hwi, Timer, Delay, Semaphores etc and prints output on UART console.
This sysbios based example tests Hwi, Timer, Semaphores etc.
evmAM335x evmAM437x idkAM571x idkAM574x evmAM572x evmK2G evmK2H evmOMAPL137 lcdkOMAPL138
Run pdkProjectCreate to create the OSAL_BasicExample_<evm>_<device>TestProject Load the project on to CCS and build the same. Build the example Load the OSAL_BasicExample_<evm>_<device>TestProject Run the example
Testing the example
The output for each of the tests (Hwi, Timer, Delay, Semaphores etc) can be seen on the UART console. After a successful run, "All tests have PASSED" will be displayed on the screen.
This baremetal example 'osal_baremetal_test' tests Hwi, Timer, Semaphores etc and prints output on UART console.
evmAM572x evmAM335x evmAM437x evmDRA72x evmDRA75x evmDRA78x iceK2G idkAM574x idkAM572x idkAM571x idkAM437x
OSAL tests are built using makefiles. The below steps are used to build the baremetal test binaries.
cd pdk_<ver>/packages/ Run pdksetupenv.bat Run "make osal" Find the executable at ti/<pdk>/packages/ti/binary/osal_baremetal_test/bin Load the executable on the board Before running the executable, please make sure you have the UART connected and notice the test output on the UART console. Osal prints out the results there.
Testing the example
The output for each of the tests (Hwi, Timer, Delay, Semaphores, etc) can be seen on the UART console. After a successful run, "All tests have passed" will be displayed on the screen.
The output of osal example looks like below. The below sample output is from idkAM571x on the UART console.
HWI tests have passed. TimerTestLog: got 100 ticks from timer id = 1 TimerTestLog: got 100 ticks from timer id = 2
Timer tests have passed.
Running Osal_Delay test:..........
Osal_Delay tests have passed.
Clock tests have passed.
Semaphore tests have passed.
Semaphore Statistics: PeakSemObjs = 5, numMaxSemObjs = 100, numFreeSemObjs = 97
Hwi Statistics: PeakHwiObjs = 3, numMaxHwiObjs = 100, numFreeHwiObjs = 98
Timer Statistics: PeakTimerObjs = 2, numMaxTimerObjs = 100, numFreeTimerObjs = 99
All tests have passed.
|Operating System Abstraction Layer Library Summary|
|Project Type||Eclipse RTSC|
|Linker Sections||.vecs , .switch, .args, .cio|