...
µC/OS-III performs this check in more than 40 functions. Therefore, you can save a few hundred bytes of code space by disabling this check.
OS_CFG_
...
OBJ_
...
TYPE_
...
CHK_EN
Warning, this feature is DEPRECATED and will be removed in a future release of µC/OS
-III.When set to DEF_ENABLED
, OS_CFG_ISROBJ_POSTTYPE_DEFERREDCHK_EN
reduces interrupt latency since interrupts are not disabled during most critical sections of code within determines whether most of µC/OS-III . Instead, the scheduler is locked during the processing of these critical sections. The advantage of setting this to DEF_ENABLED
is that interrupt latency is lower, however, ISR to task response is slightly higher. functions should check to see if the function is manipulating the proper object. In other words, if attempting to post to a semaphore, is the user in fact passing a semaphore object or another object by mistake? It is recommended to set OS_CFG_ISROBJ_POSTTYPE_DEFERREDCHK_EN
to DEF_ENABLED
when enabling the following services, since setting this to DEF_DISABLED
would potentially make interrupt latency unacceptably high: until absolutely certain that the code is behaving correctly and the user code is always pointing to the proper objects. You would set this to DEF_DISABLED
to save code space as well as data space.
µC/OS-III
...
object type checking is done nearly 40 times, and it is possible to save a few hundred bytes of code space and processing time by disabling this check.
OS_CFG_
...
TS_EN
...
When OS_CFG_
...
TS_
...
The compromise to make is:
OS_CFG_ISR_POST_DEFERRED_EN
set to DEF_ENABLED
Short interrupt latency, longer ISR-to-task response.
OS_CFG_ISR_POST_DEFERRED_EN
set to DEF_DISABLED
Long interrupt latency (see table above), shorter ISR-to-task response.
OS_CFG_OBJ_TYPE_CHK_EN
OS_CFG_OBJ_TYPE_CHK_EN
determines whether most of µC/OS-III functions should check to see if the function is manipulating the proper object. In other words, if attempting to post to a semaphore, is the user in fact passing a semaphore object or another object by mistake? It is recommended to set OS_CFG_OBJ_TYPE_CHK_EN
to DEF_ENABLED
until absolutely certain that the code is behaving correctly and the user code is always pointing to the proper objects. You would set this to DEF_DISABLED
to save code space as well as data space.
µC/OS-III object type checking is done nearly 40 times, and it is possible to save a few hundred bytes of code space and processing time by disabling this check.
OS_CFG_TS_EN
When OS_CFG_TS_EN
is set to EN
is set to DEF_ENABLED
, it enables the timestamp facilities provided by µC/CPU. This allows the user and the kernel to measure the time between various events. For example, the time spent by a task pending on an object, the maximum interrupt disable time (if CPU_CFG_INT_DIS_MEAS_EN
is set to DEF_ENABLED
), the time the scheduler is locked, etc. This option is mostly useful in profiling and performance measurement contexts. To save space and processing time, set this option to DEF_DISABLED
.
Note that to use the timestamp facilities the µC/CPU Board Support Package should implement the functions described in cpu_bsp.c and cpu_bsp.h.
OS_CFG_PEND_MULTI_EN
Warning, this feature is DEPRECATED and will be removed in a future release of µC/OS-III.
When this option is set to DEF_ENABLED
, it allows the user to pend on multiple objects (message queues and semaphores only) at onceand cpu_bsp.h.
OS_CFG_PRIO_MAX
OS_CFG_PRIO_MAX
specifies the maximum number of priorities available in the application. Specifying OS_CFG_PRIO_MAX
to just the number of priorities the user intends to use, reduces the amount of RAM needed by µC/OS-III.
...
When OS_CFG_TMR_EN
is set to DEF_ENABLED
, it enables the timer management services. If your application does no require programmable timers, set this option to DEF_DISABLED
to reduce µC/OS-III's required code and data space.OS-III's required code and data space.
OS_CFG_TMR_DEL_EN
If your application needs to delete timers with OSTmrDel
once they're created, set ()
OS_CFG_TMR_DEL_EN
to DEF_ENABLED
, if not, set this option to DEF_DISABLED
. Critical applications should not delete kernel objects once the kernel is started.
Trace Options
OS_CFG_
...
TRACE_
...
EN
µC/OS-III has built-in trace points throughout the code to record all the kernel events and interrupts in real-time. These trace calls are disabled by default and enabled when this constant is set to DEF_ENABLED
. If you do not require this feature, set this option to DEF_DISABLED
. Critical applications should not delete kernel objects once the kernel is started.
µC/Trace Configuration
TRACE_CFG_EN
Although not specifically part of µC/OS-III, µC/Trace, a Windows-based RTOS Event Analyzer (i.e. tool) that is fully integrated in the latest version of µC/OS-III. µC/Trace functionality is enabled by setting TRACE_CFG_EN
to DEF_ENABLED
. You will need to have purchased the µC/Trace product in order to set TRACE_CFG_EN
to DEF_ENABLED
or else your compiler will complain about missing macros and functions. Consult the Micrium website for details and availability of this highly useful tool to not only reduce the required code and data space but also to eliminate the inherent overhead.
OS_CFG_TRACE_API_ENTER_EN
When this constant is set to DEF_ENABLED
the beginning of each API call in µC/OS-III will be recorded as part of the trace (it applies to SEGGER's SystemView only).
OS_CFG_TRACE_API_EXIT_EN
When this constant is set to DEF_ENABLED
the end of each API call in µC/OS-III will be recorded as part of the trace (it applies to SEGGER's SystemView only).