This chapter describes some of the structural aspects of µC/OS-II. You will learn:
- how How µC/OS-II handles access to critical sections of code,
- what What a task is, and how µC/OS-II knows about your tasks,
- how How tasks are scheduled,
- how How µC/OS-II determines the percent CPU your application is using,
- how How to write Interrupt Service Routines (ISRs),
- what What a clock tick is and how µC/OS-II handles it,
- how How to initialize µC/OS-II, and
- how How to start multitasking.
Contents of this Section
Table of Contents | ||
---|---|---|
|
...
This chapter also describes the application services listed in table 3.1. The code for OSSchedLock()
and OSSchedUnlock()
can be disabled by setting OS_SCHED_LOCK_EN
to 0 in OS_CFG.H
as shown in table 3.1. You should note that the other services cannot be ‘compiled out’ because they are an integral part of the core services offered by µC/OS-II.
Table 3.1 Core services configuration constants in OS_CFG.H
.
µC/OS-II
...
.
...
OS_ENTER_CRITICAL()
...
OS_EXIT_CRITICAL()
...
OSInit()
...
OSStart()
...
OSIntEnter()
...
OSIntExit()
...
OSSchedLock()
...
OS_SCHED_LOCK_EN
...
OSSchedUnlock()
...
OS_SCHED_LOCK_EN
...
OSVersion()
...
Figure 3.1 shows the µC/OS-II architecture and its relationship with the hardware. When you use µC/OS-II in an application, you are responsible for providing the Application Software and the µC/OS-II Configuration sections. This book and CD contain all the source code for the Processor-Independent Code section as well as the Processor-Specific Code section for the Intel 80x86, real mode, large model. If you intend to use µC/OS-II on a different processor, you need to either obtain a copy of a port for the processor you intend to use or write one yourself if the desired processor port is not available. Check the official µC/OS-II Web site at www.micrium.com for a list of available ports.
...