os_dbg.c Static
os_dbg.c
is provided in µC/OS-III as some debuggers are not able to read the values of #define
constants. Specifically, os_dbg.c
contains ROM variables initialized to #define
constants so that users can read them with any debugger.
Below is a list of ROM variables provided in os_dbg.c
, along with their descriptions. These variables use approximately 100 bytes of code space.
The application code can examine these variables and you do not need to access them in a critical region as they reside in code space and are therefore not changeable.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_DbgEn | CPU_INT08U | OS_CFG_DBG_EN |
When 1, this variable indicates that ROM variables in os_dbg.c
will be compiled. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_ArgChkEn | CPU_INT08U | OS_CFG_ARG_CHK_EN |
When 1, this variable indicates that run-time argument checking is enabled. This means that µC/OS-III will check the validity of the values of arguments passed to functions. The feature is enabled in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_AppHooksEn | CPU_INT08U | OS_CFG_APP_HOOKS_EN |
When 1, the variable indicates whether application hooks will be available to the application programmer, and the pointers listed below are declared. This value is set in os_cfg.h
.
OS_AppTaskCreateHookPtr;
OS_AppTaskDelHookPtr;
OS_AppTaskReturnHookPtr;
OS_AppIdleTaskHookPtr;
OS_AppStatTaskHookPtr;
OS_AppTaskSwHookPtr;
OS_AppTimeTickHookPtr
;
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_EndiannessTest | CPU_INT32U | 0x12345678 |
This variable allows a kernel awareness debugger or µC/Probe to determine the endianness of the CPU. This is easily done by looking at the lowest address in memory where this variable is saved. If the value is 0x78 then the CPU is a little endian machine. If it’s 0x12, it is a big endian machine.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_CalledFromISRChkEn | CPU_INT08U | OS_CFG_CALLED_FROM_ISR_CHK_EN |
When 1, this variable indicates that µC/OS-III will perform run-time checking to see if a function that is not supposed to be called from an ISR, is called from an ISR. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_FlagEn | CPU_INT08U | OS_CFG_FLAG_EN |
When 1, this variable indicates that µC/OS-III’s event flag services are available to the application programmer. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_FlagDelEn | CPU_INT08U | OS_CFG_FLAG_DEL_EN |
When 1, this variable indicates that the OSFlagDel()
function is available to the application programmer. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_FlagModeClrEn | CPU_INT08U | OS_CFG_FLAG_MODE_CLR_EN |
When 1, this variable indicates that you can either clear or set flags when posting and pending on event flags. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_FlagPendAbortEn | CPU_INT08U | OS_CFG_FLAG_PEND_ABORT_EN |
When 1, this variable indicates that the OSFlagPendAbort()
function is available to the application programmer. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_FlagGrpSize | CPU_INT16U | sizeof(OS_FLAG_GRP) |
This variable indicates the memory footprint (in RAM) of an event flag group (in bytes). This data type is declared in os.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_FlagWidth | CPU_INT16U | sizeof(OS_FLAGS) |
This variable indicates the word width (in bytes) of event flags. If event flags are declared as CPU_INT08U
, this variable will be 1, if declared as a CPU_INT16U
, this variable will be 2, etc. This OS_FLAGS
data type is declared in os_type.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MemEn | CPU_INT08U | OS_CFG_MEM_EN |
When 1, this variable indicates that µC/OS-III’s memory management services are available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MemSize | CPU_INT16U | sizeof(OS_MEM) |
This variable indicates the RAM footprint (in bytes) of a memory partition control block, OS_MEM
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MsgEn | CPU_INT08U | OS_MSG_EN |
When 1, this variable indicates that the application either enabled message queues, or task message queues, or both. This value is set in os_cfg.h
by ORing
the value of OS_CFG_Q_EN
and OS_CFG_TASK_Q_EN
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MsgSize | CPU_INT16U | sizeof(OS_MSG) |
This variable indicates the RAM footprint (in bytes) of an OS_MSG
data structure.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MsgPoolSize | CPU_INT16U | sizeof(OS_MSG_POOL) |
This variable indicates the RAM footprint (in bytes) of an OS_MSG_POOL
data structure.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MsgQSize | CPU_INT16U | sizeof(OS_MSG_Q) |
This variable indicates the RAM footprint (in number of bytes) of an OS_MSG_Q
data type.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MutexEn | CPU_INT08U | OS_CFG_MUTEX_EN |
When 1, this variable indicates that µC/OS-III’s mutual exclusion semaphore management services are available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MutexDelEn | CPU_INT08U | OS_CFG_MUTEX_DEL_EN |
When 1, this variable indicates that the function OSMutexDel()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MutexPendAbortEn | CPU_INT08U | OS_CFG_MUTEX_PEND_ABORT_EN |
When 1, the variable indicates that the function OSMutexPendAbort()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_MutexSize | CPU_INT16U | sizeof(OS_MUTEX) |
This variable indicates the RAM footprint (in number of bytes) of an OS_MUTEX
data type.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_ObjTypeChkEn | CPU_INT08U | OS_CFG_OBJ_TYPE_CHK_EN |
When 1, this variable indicates that µC/OS-III will check for valid object types at run time. µC/OS-III will make sure the application is accessing a semaphore if calling OSSem???()
functions, accessing a message queue when calling OSQ???()
functions, etc. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_PendListSize | CPU_INT16U | sizeof(OS_PEND_LIST) |
This variable indicates the RAM footprint (in bytes) of an OS_PEND_LIST
data type.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_PendObjSize | CPU_INT16U | sizeof(OS_PEND_OBJ) |
This variable indicates the RAM footprint (in bytes) of an OS_PEND_OBJ
data type.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_PrioMax | CPU_INT16U | OS_CFG_PRIO_MAX |
This variable indicates the maximum number of priorities that the application will support.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_PtrSize | CPU_INT16U | sizeof(void *) |
This variable indicates the size (in bytes) of a pointer.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_QEn | CPU_INT08U | OS_CFG_Q_EN |
When 1, this variable indicates that µC/OS-III’s message queue services are available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_QDelEn | CPU_INT08U | OS_CFG_Q_DEL_EN |
When 1, this variable indicates that the function OSQDel()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_QFlushEn | CPU_INT08U | OS_CFG_Q_FLUSH_EN |
When 1, this variable indicates that the function OSQFlush()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_QPendAbortEn | CPU_INT08U | OS_CFG_Q_PEND_ABORT_EN |
When 1, this variable indicates that the function OSQPendAbort()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_QSize | CPU_INT16U |
This variable indicates the RAM footprint (in number of bytes) of an OS_Q
data type.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_SchedRoundRobinEn | CPU_INT08U | OS_CFG_SCHED_ROUND_ROBIN_EN |
When 1, this variable indicates that the µC/OS-III round-robin scheduling feature is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_SemEn | CPU_INT08U | OS_CFG_SEM_EN |
When 1, this variable indicates that µC/OS-III’s semaphore management services are available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_SemDelEn | CPU_INT08U | OS_CFG_SEM_DEL_EN |
When 1, this variable indicates that the function OSSemDel()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_SemPendAbortEn | CPU_INT08U | OS_CFG_SEM_PEND_ABORT_EN |
When 1, this variable indicates that the function OSSemPendAbort()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_SemSetEn | CPU_INT08U | OS_CFG_SEM_SET_EN |
When 1, this variable indicates that the function OSSemSet()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_SemSize | CPU_INT16U | sizeof(OS_SEM) |
This variable indicates the RAM footprint (in bytes) of an OS_SEM
data type.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_RdyList | CPU_INT16U | sizeof(OS_RDY_LIST) |
This variable indicates the RAM footprint (in bytes) of the OS_RDY_LIST
data type.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_RdyListSize | CPU_INT32U | sizeof(OSRdyList) |
This variable indicates the RAM footprint (in bytes) of the ready list.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_StkWidth | CPU_INT08U | sizeof(CPU_STK) |
This variable indicates the word size of a stack entry (in bytes). If a stack entry is declared as CPU_INT08U
, this value will be 1, if a stack entry is declared as CPU_INT16U
, the value will be 2, etc.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_StatTaskEn | CPU_INT08U | OS_CFG_STAT_TASK_EN |
When 1, this variable indicates that µC/OS-III’s statistic task is enabled. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_StatTaskStkChkEn | CPU_INT08U | OS_CFG_STAT_TASK_STK_CHK_EN |
When 1, this variable indicates that µC/OS-III will perform run-time stack checking by walking the stack of each task to determine the usage of each. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TaskChangePrioEn | CPU_INT08U | OS_CFG_TASK_CHANGE_PRIO_EN |
When 1, this variable indicates that the function OSTaskChangePrio()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TaskDelEn | CPU_INT08U | OS_CFG_TASK_DEL_EN |
When 1, this variable indicates that the function OSTaskDel()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TaskQEn | CPU_INT08U | OS_CFG_TASK_Q_EN |
When 1, this variable indicates that OSTaskQ???()
services are available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TaskQPendAbortEn | CPU_INT08U | OS_CFG_TASK_Q_PEND_ABORT_EN |
When 1, this variable indicates that the function OSTaskQPendAbort()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TaskProfileEn | CPU_INT08U | OS_CFG_TASK_PROFILE_EN |
When 1, this variable indicates that task profiling is enabled, and that µC/OS-III will perform run-time performance measurements on a per-task basis. Specifically, when 1, µC/OS-III will keep track of how many context switches each task makes, how long a task disables interrupts, how long a task locks the scheduler, and more. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TaskRegTblSize | CPU_INT16U | OS_CFG_TASK_REG_TBL_SIZE |
This variable indicates how many entries each task register table can accept.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TaskSemPendAbortEn | CPU_INT08U | OS_CFG_TASK_SEM_PEND_ABORT_EN |
When 1, this variable indicates that the function OSTaskSemPendAbort()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TaskSuspendEn | CPU_INT08U | OS_CFG_TASK_SUSPEND_EN |
When 1, this variable indicates that the function OSTaskSuspend()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TCBSize | CPU_INT16U | sizeof(OS_TCB) |
This variable indicates the RAM footprint (in bytes) of an OS_TCB
data structure.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TimeDlyHMSMEn | CPU_INT08U | OS_CFG_TIME_DLY_HMSM_EN |
When 1, this variable indicates that the function OSTimeDlyHMSM()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TimeDlyResumeEn | CPU_INT08U | OS_CFG_TIME_DLY_RESUME_EN |
When 1, this variable indicates that the function OSTimeDlyResume()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TLS_TblSize | CPU_INT16U | OS_CFG_TLS_TBL_SIZE |
Indicates the size of the .TLS_Tbl[]
in an OS_TCB
in number of bytes. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TmrEn | CPU_INT08U | OS_CFG_TMR_EN |
When 1, this variable indicates that OSTmr???()
services are available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TmrDelEn | CPU_INT08U | OS_CFG_TMR_DEL_EN |
When 1, this variable indicates that the function OSTmrDel()
is available to the application. This value is set in os_cfg.h
.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_TmrSize | CPU_INT16U | sizeof(OS_TMR) |
This variable indicates the RAM footprint (in bytes) of an OS_TMR
data structure.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_VersionNbr | CPU_INT16U | OS_VERSION |
This variable indicates the current version of µC/OS-III multiplied by 10000. For example version 3.02.00 will show as 30200.
ROM Variable | Data Type | Value |
---|---|---|
OSDbg_DataSize | CPU_INT32U | Size of all RAM variables |
This variable indicates the RAM footprint (in bytes) of the internal µC/OS-III variables for the current configuration.