Specifications
In addition, the MicroC/OS-II implementation provides appropriate task locking to ensure that heap
accesses (calls to malloc() and free()) are also thread-safe.
Interrupt Service Routines for MicroC/OS-II
Implementing ISRs for MicroC/OS-II normally involves some housekeeping details, as described in
MicroC/OS-II: The Real-Time Kernel. However, because the Nios II implementation of MicroC/OS-II is
based on the HAL, several of these details are taken care of for you. The HAL performs the following
housekeeping tasks for your interrupt service routine (ISR):
• Saves and restores processor registers
• Calls OSIntEnter() and OSIntExit()
The HAL also allows you to write your ISR in C, rather than assembly language.
Related Information
Exception Handling on page 8-1
For more information about writing ISRs with the HAL.
Implementing MicroC/OS-II Projects for the Nios II Processor
To create a program based on MicroC/OS-II, start by setting the BSP properties so that it is a MicroC/OS-
II project. You can control the configuration of the MicroC/OS-II kernel using BSP settings with the Nios
II SBT for Eclipse, or on the Nios II command line.
• You do not need to edit header files (such as OS_CFG.h) or source code to configure the MicroC/OS-II
features. The project settings are reflected in the BSP's system.h file; OS_CFG.h simply includes system.h.
• MicroC/OS-II settings are identified by the prefix ucosii.
• The meaning of each setting is defined fully in MicroC/OS-II: The Real-Time Kernel.
Related Information
• Getting Started with the Graphical User Interface on page 2-1
• Nios II Software Build Tools on page 4-1
For more information about how to configure MicroC/OS-II with BSP settings
• Nios II Software Build Tools Reference on page 15-1
For more information, refer to a list of available MicroC/OS-II BSP settings in "Settings Managed by
the Software Build Tools".
Document Revision History for MicroC/OS-II Real-Time Operating System
Date Version Changes
May 2015 2015.05.14
• Maintenance release.
• Renamed to Nios II Classic.
May 2011 11.0.0 Introduction of Qsys system integration tool
February 2011 10.1.0 Removed “Referenced Documents” section.
July 2010 10.0.0 Maintenance release.
10-6
Interrupt Service Routines for MicroC/OS-II
NII5V2
2015.05.14
Altera Corporation
MicroC/OS-II Real-Time Operating System
Send Feedback