Visible to Intel only — GUID: mwh1416946949355
Ixiasoft
Visible to Intel only — GUID: mwh1416946949355
Ixiasoft
11.3.2. MicroC/OS-II Device Drivers
In addition to the HAL directory, a component can optionally provide a UCOSII directory that contains code specific to the MicroC/OS-II environment. Similar to the HAL directory, the UCOSII directory contains inc and src subdirectories.
When you create a MicroC/OS-II project, these directories are added to the search paths for source and include files.
The Nios® II Software Build Tools (SBT) copies the files to your BSP obj subdirectory.
You can use the UCOSII directory to provide code that is used only in a multi-threaded environment. Other than these additional search directories, the mechanism for providing MicroC/OS-II device drivers is identical to the process for any other device driver.
The HAL system initialization process calls the MicroC/OS-II function OSInit() before alt_sys_init(), which instantiates and initializes each device in the system. Therefore, the complete MicroC/OS-II API is available to device drivers, although the system is still running in single-threaded mode until the program calls OSStart() from within main().