User guide

Nios II IDE Help System
Choosing and Configuring an Operating System
By default, the Nios II IDE uses the hardware abstraction layer (HAL) single-threaded runtime
environment. You can optionally include a real-time operating system (RTOS) as part of your
Nios II system library project. Altera provides the MicroC/OS-II RTOS, and other vendors can
provide their own OS as a plug-in.
You add and configure OS options using the System Library page of the Properties dialog
box.
To configure a system library for the Micro-C/OS II RTOS:
1. Right-click the Nios II C/C++ application project in the Nios II C/C++ Projects
view.
2. Click System Library Properties. The Properties dialog box appears.
3. Click System Library in the left-hand pane of the Properties dialog box.
4. Select MicroC/OS-II in the RTOS drop-down list.
5. Click Apply to save the new RTOS setting. A warning appears to confirm that you
really want to reset the RTOS options to their defaults.
6. Click Yes.
7. Click RTOS Options. The MicroC/OS-II RTOS Options dialog box appears. The
Nios II Software Developer's Handbook briefly describes the RTOS options. For full
details on configuring the MicroC/OS-II kernel, see Chapter 17: MicroC/OS-II
Configuration Manual of the book MicroC/OS-II: The Real-Time Kernel, Second
Edition by Jean Labrosse (CMP Books).
Important: HAL support for MicroC/OS-II requires Enable code for Event
Flags and Enable code for Mutex Semiphores to be on. Do not turn these
options off.
8. Click OK to save the settings and close the MicroC/OS-II RTOS Options dialog
box.
9. Click OK to close the Properties dialog box.
The system library will include the MicroC/OS-II kernel the next time you build the project.
Your program code can use the MicroC/OS-II API.
Related Nios II IDE Help Topics
MicroC/OS-II RTOS
System Library Page (Properties Dialog Box)
Related Topics on the Web
Nios II literature web page
Using MicroC/OS-II RTOS with the Nios II Processor Tutorial at
www.altera.com/literature/tt/tt_nios2_MicroC_OSII_tutorial.pdf —Contains step-by-
48