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 VariableData TypeValue
OSDbg_DbgEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_ArgChkEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_AppHooksEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_EndiannessTestCPU_INT32U0x12345678

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 VariableData TypeValue
OSDbg_CalledFromISRChkEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_FlagEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_FlagDelEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_FlagModeClrEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_FlagPendAbortEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_FlagGrpSizeCPU_INT16Usizeof(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 VariableData TypeValue
OSDbg_FlagWidthCPU_INT16Usizeof(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 VariableData TypeValue
OSDbg_MemEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_MemSizeCPU_INT16Usizeof(OS_MEM)

This variable indicates the RAM footprint (in bytes) of a memory partition control block, OS_MEM.

ROM VariableData TypeValue
OSDbg_MsgEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_MsgSizeCPU_INT16Usizeof(OS_MSG)

This variable indicates the RAM footprint (in bytes) of an OS_MSG data structure.

ROM VariableData TypeValue
OSDbg_MsgPoolSizeCPU_INT16Usizeof(OS_MSG_POOL)

This variable indicates the RAM footprint (in bytes) of an OS_MSG_POOL data structure.

ROM VariableData TypeValue
OSDbg_MsgQSizeCPU_INT16Usizeof(OS_MSG_Q)

This variable indicates the RAM footprint (in number of bytes) of an OS_MSG_Q data type.

ROM VariableData TypeValue
OSDbg_MutexEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_MutexDelEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_MutexPendAbortEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_MutexSizeCPU_INT16Usizeof(OS_MUTEX)

This variable indicates the RAM footprint (in number of bytes) of an OS_MUTEX data type.

ROM VariableData TypeValue
OSDbg_ObjTypeChkEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_PendListSizeCPU_INT16Usizeof(OS_PEND_LIST)

This variable indicates the RAM footprint (in bytes) of an OS_PEND_LIST data type.

ROM VariableData TypeValue
OSDbg_PendObjSizeCPU_INT16Usizeof(OS_PEND_OBJ)

This variable indicates the RAM footprint (in bytes) of an OS_PEND_OBJ data type.

ROM VariableData TypeValue
OSDbg_PrioMaxCPU_INT16UOS_CFG_PRIO_MAX

This variable indicates the maximum number of priorities that the application will support.

ROM VariableData TypeValue
OSDbg_PtrSizeCPU_INT16Usizeof(void *)

This variable indicates the size (in bytes) of a pointer.

ROM VariableData TypeValue
OSDbg_QEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_QDelEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_QFlushEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_QPendAbortEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_QSizeCPU_INT16U 

This variable indicates the RAM footprint (in number of bytes) of an OS_Q data type.

ROM VariableData TypeValue
OSDbg_SchedRoundRobinEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_SemEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_SemDelEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_SemPendAbortEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_SemSetEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_SemSizeCPU_INT16Usizeof(OS_SEM)

This variable indicates the RAM footprint (in bytes) of an OS_SEM data type.

ROM VariableData TypeValue
OSDbg_RdyListCPU_INT16Usizeof(OS_RDY_LIST)

This variable indicates the RAM footprint (in bytes) of the OS_RDY_LIST data type.

ROM VariableData TypeValue
OSDbg_RdyListSizeCPU_INT32Usizeof(OSRdyList)

This variable indicates the RAM footprint (in bytes) of the ready list.

ROM VariableData TypeValue
OSDbg_StkWidthCPU_INT08Usizeof(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 VariableData TypeValue
OSDbg_StatTaskEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_StatTaskStkChkEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TaskChangePrioEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TaskDelEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TaskQEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TaskQPendAbortEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TaskProfileEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TaskRegTblSizeCPU_INT16UOS_CFG_TASK_REG_TBL_SIZE

This variable indicates how many entries each task register table can accept.

ROM VariableData TypeValue
OSDbg_TaskSemPendAbortEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TaskSuspendEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TCBSizeCPU_INT16Usizeof(OS_TCB)

This variable indicates the RAM footprint (in bytes) of an OS_TCB data structure.

ROM VariableData TypeValue
OSDbg_TimeDlyHMSMEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TimeDlyResumeEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TLS_TblSizeCPU_INT16UOS_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 VariableData TypeValue
OSDbg_TmrEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TmrDelEnCPU_INT08UOS_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 VariableData TypeValue
OSDbg_TmrSizeCPU_INT16Usizeof(OS_TMR)

This variable indicates the RAM footprint (in bytes) of an OS_TMR data structure.

ROM VariableData TypeValue
OSDbg_VersionNbrCPU_INT16UOS_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 VariableData TypeValue
OSDbg_DataSizeCPU_INT32USize of all RAM variables

This variable indicates the RAM footprint (in bytes) of the internal µC/OS-III variables for the current configuration.