User`s manual

Dynamic C Users Manual digi.com 83
5.10.4 How to Get a µC/OS-II Application Running
µC/OS-II is a highly configureable, real-time operating system. It can be customized using as many or as
few of the operating system’s features as needed. This section outlines:
The configuration constants used in µC/OS-II
How to override the default configuration supplied in UCOS2.LIB
The necessary steps to get an application running
It is assumed that the reader has a familiarity with µC/OS-II or has a µC/OS-II reference (MicroC/OS-II,
The Real-Time Kernel by Jean J. Labrosse is highly recommended).
5.10.4.1 Default Configuration
µC/OS-II usually relies on the include file os_cfg.h to get values for the configuration constants. In the
Dynamic C implementation of µC/OS-II, these constants, along with their default values, are in
os_cfg.lib. A default stack configuration is also supplied in os_cfg.lib. µC/OS-II for the Rabbit
uses a more intelligent stack allocation scheme than other µC/OS-II implementations to take better advan-
tage of unused memory.
The default configuration allows up to 10 normally created application tasks running at 64 ticks per sec-
ond. Each task has a 512-byte stack. There are 2 queues specified, and 10 events. An event is a queue,
mailbox or semaphore. You can define any combination of these three for a total of 10. If you want more
than 2 queues, however, you must change the default value of OS_MAX_QS.
Some of the default configuration constants are:
OS_MAX_EVENTS Max number of events (semaphores, queues, mailboxes)
Default is 10
OS_MAX_TASKS Maximum number of tasks (less stat and idle tasks)
Default is 10
OS_MAX_QS Max number of queues in system
Default is 2
OS_MAX_MEM_PART Max number of memory partitions
Default is 1
OS_TASK_CREATE_EN Enable normal task creation
Default is 1
OS_TASK_CREATE_EXT_EN Disable extended task creation
Default is 0
OS_TASK_DEL_EN Disable task deletion
Default is 0
OS_TASK_STAT_EN Disable statistics task creation
Default is 0
OS_Q_EN Enable queue usage
Default is 1