RTOS Debugger for MicroC/OS-II

Similar documents
RTOS Debugger for RTX-ARM

RTOS Debugger for MicroC/OS-III

RTOS Debugger for CMX

RTOS Debugger for ChibiOS/RT

RTOS Debugger for FreeRTOS

RTOS Debugger for ThreadX

RTOS Debugger for MQX

OS Awareness Manual Sciopta

RTOS Debugger for RTXC Quadros

OS Awareness Manual OSEK/ORTI

OS Awareness Manual OSE Epsilon

Hypervisor Awareness for Wind River Hypervisor

RTOS Debugger for RTXC Quadros

OS Awareness Manual OSE Delta

RTOS Debugger for Windows Standard

RTOS Debugger for LynxOS

OS Awareness Manual uclinux

RTOS Debugger for Windows CE6/EC7/EC2013

RTOS Debugger for RTX51 tiny

RTOS Debugger for psos+

RTOS Debugger for OS-9

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... TriCore... TriCore Monitor... 1

RTOS Debugger for QNX - Run Mode

Application Note for the SNOOPer Trace

Integration for CodeWright

TRACE32 Glossary Terms, Abbreviations, and Definitions... 2

TRACE32 Getting Started... ICD In-Circuit Debugger Getting Started... ICD Introduction... 1

RTOS Debugger for Linux - Run Mode

Run Mode Debugging Manual Symbian

API for Auxiliary Processing Unit

ARM Application Note for MXC Chips

TRACE32 Debugger Getting Started... ICD Tutorial About the Tutorial... 2

Introduction. This tutorial introduces the following SingleStep features:

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... NS NS32000 Monitor... 1

Putting it All Together

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... MCS08... MCS08 Debugger... 1

Integration for Rhapsody in C/C++

Trace Getting Started V8.02

Rudi Dienstbeck June 07, ARM TrustZone and Hypervisor Debugging

Native Process Debugger

Micriµm, Inc. µc/os-view

General Commands Reference Guide O

Simulator for TriCore

TRACE32 Documents... TRACE32 Instruction Set Simulators... Simulator for ARC... 1

Integration for CodeBlocks

_ V Renesas R8C In-Circuit Emulation. Contents. Technical Notes

Converter from GEL to PRACTICE

embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.0 Revision: 0 Date: September 18, 2017

Preemptive Scheduling

embos Real-Time Operating System embos plug-in for IAR C-Spy Debugger Document: UM01025 Software Version: 3.1 Revision: 0 Date: May 3, 2018

Tracking the Virtual World

2018/10/29 22:25 1/5 Linux Processes vs NuttX Tasks

Efficient and Large Scale Program Flow Tracing in Linux. Alexander Shishkin, Intel

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... Andes... Andes Debugger... 1

Advanced Debugging using the Ashling MPC5500 tools

Application Note for the Trace.Find Command

Eclipse-Based CodeWarrior Debugger

Renesas 78K/78K0R/RL78 Family In-Circuit Emulation

MPLAB SIM. MPLAB IDE Software Simulation Engine Microchip Technology Incorporated MPLAB SIM Software Simulation Engine

_ V Intel 8085 Family In-Circuit Emulation. Contents. Technical Notes

NEW CEIBO DEBUGGER. Menus and Commands

Integration for Visual Basic Interface

ARM Processors for Embedded Applications

ARM Cortex-M and RTOSs Are Meant for Each Other

Training Android Debugging

NEC 78K0- Family On-Chip Emulation

_ V ST STM8 Family On-Chip Emulation. Contents. Technical Notes

RTOS Debugger for Windows CE4/CE5

Process Context & Interrupts. New process can mess up information in old process. (i.e. what if they both use the same register?)

ZAP Cross Debuggers for Motorola Microcontrollers

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

Simulator for HC08/MSC08

Chapter 12 Visual Program Debugger

Contents. Cortex M On-Chip Emulation. Technical Notes V

NEWS 2018 CONTENTS SOURCE CODE COVERAGE WORKS WITHOUT CODE INSTRUMENTATION. English Edition

QorIQ Debugger and NEXUS Trace

This chapter introduces how to use the emulator of TOPICE quickly.

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... Blackfin... Blackfin Debugger General Note...

Support for RISC-V. Lauterbach GmbH. Bob Kupyn Lauterbach Markus Goehrle - Lauterbach GmbH

H8 C-SPY. User Guide WINDOWS WORKBENCH VERSION

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... XC XC800 Debugger... 1

Introduction to the ThreadX Debugger Plugin for the IAR Embedded Workbench C-SPYDebugger

Nios II. uc/os-ii porting with Nios II Altera Corporation

Evaluation Board. For NXP - Philips LPC All rights reserved

Training Simulator and Demo Software

April 4, 2001: Debugging Your C24x DSP Design Using Code Composer Studio Real-Time Monitor

General Commands Reference Guide G

Programming with μc/os-ii Operating System on the Ide68k Integrated Development Environment

Using SQL Developer. Oracle University and Egabi Solutions use only

Lab 3-2: Exploring the Heap

Using the Debugger. Michael Jantz Dr. Prasad Kulkarni

TRACE32 Documents... ICD In-Circuit Debugger... Processor Architecture Manuals... MMDSP... MMDSP Debugger General Note... 3

ICE Performance Analyzer User s Guide

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

x386 and x486 Monitor

Task Based Programming Revisited Real Time Operating Systems

What is this? How do UVMs work?

Simulator for H8/300, H8/300H and H8S

_ V PowerPC 4xx Family On-Chip Emulation. Contents. Technical Notes

1. Introduction Document organization and format Technical support Software Installation...3

Transcription:

RTOS Debugger for MicroC/OS-II TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents... RTOS Debuggers... RTOS Debugger for MicroC/OS-II... 1 Overview... 3 Brief Overview of Documents for New Users... 4 Supported Versions... 4 Configuration... 5 Manual Configuration 5 Automatic Configuration 7 Quick Configuration Guide 7 Hooks & Internals in µc/os-ii 7 Features... 9 Display of Kernel Resources 9 Task Stack Coverage 9 Task Related Breakpoints 10 Task Context Display 11 Dynamic Task Performance Measurement 11 Task Runtime Statistics 12 Task State Analysis 13 Function Runtime Statistics 14 µc/os-ii specific Menu 15 µc/os-ii Commands... 16 TASK.Event Display events 16 TASK.Flag Display flags 16 TASK.Memory Display memory partitions 17 TASK.PARtition Display space partitions 17 TASK.PROCess Display MPU processes 18 TASK.Task Display tasks 18 TASK.TASKState Mark task state words 19 TASK.TImer Display timers 19 µc/os-ii PRACTICE Functions... 20 Frequently-Asked Questions... 20 RTOS Debugger for MicroC/OS-II 1

RTOS Debugger for MicroC/OS-II 2

RTOS Debugger for MicroC/OS-II Overview Version 06-Nov-2017 The RTOS Debugger for µc/os-ii contains special extensions to the TRACE32 Debugger. This manual describes the additional features, such as additional commands and statistic evaluations. RTOS Debugger for MicroC/OS-II 3

Brief Overview of Documents for New Users Architecture-independent information: Debugger Basics - Training (training_debugger.pdf): Get familiar with the basic features of a TRACE32 debugger. T32Start (app_t32start.pdf): T32Start assists you in starting TRACE32 PowerView instances for different configurations of the debugger. T32Start is only available for Windows. General Commands (general_ref_<x>.pdf): Alphabetic list of debug commands. Architecture-specific information: Processor Architecture Manuals : These manuals describe commands that are specific for the processor architecture supported by your debug cable. To access the manual for your processor architecture, proceed as follows: - Choose Help menu > Processor Architecture Manual. RTOS Debuggers (rtos_<x>.pdf): TRACE32 PowerView can be extended for operating systemaware debugging. The appropriate RTOS manual informs you how to enable the OS-aware debugging. Supported Versions Currently µc/os-ii is supported for the following versions: µc/os-ii V2.5 to 2.92 on Andes, ARC, ARM, Blackfin, C16x, ColdFire, HC08/HC12, MIPS, NiosII, PowerPC, TMS320C28xx/C64xx, TriCore, V850 and Xtensa. µc/os-ii V2.92 with partitioning on PowerPC µc/os-ii wv2.92 with MPU and certification on ARM RTOS Debugger for MicroC/OS-II 4

Configuration The TASK.CONFIG command loads an extension definition file called ucos.t32 (directory ~~/demo/<processor>/kernel/ucos ). It contains all necessary extensions. Automatic configuration tries to locate the µc/os-ii internals automatically. For this purpose all symbol tables must be loaded and accessible at any time the RTOS debugger is used. If a system symbol is not available or if another address should be used for a specific system variable, then the corresponding argument must be set manually with the appropriate address. This can be done by manual configuration which can require some additional arguments. If you want do use the display functions On The Fly, i.e. displaying the OS objects, while the target is running, you need to have access to memory while running. In case of a ICE or FIRE, you have to map emulation or shadow memory to the address space of all used system tables. In case of ICD, you have to enable SYStem.MemAccess or SYStem.CpuAccess (CPU dependent). Manual Configuration Manual configuration for the µc/os RTOS debugger can be used to explicitly define some memory locations. It is recommended to use automatic configuration. Format: TASK.CONFIG ucos <magic_address> <args> <magic_address> <args> Specifies a memory location that contains the current running task. This address can be found at OSTCBCur. Specify 0 to automatically search for this symbol. <task_name_indirection> <task_name_offset> See below for details. Since µc/os-ii version 2.60, it supports task names. If you d like to have task names, use the OS internal mechanisms for this purpose. The µc/os-ii RTOS debugger detects those task names automatically. For versions before 2.60, you can implement task names in a way, that is supported by the µc/os RTOS debugger: OS_TASK_CREATE_EXT_EN must be defined to enable task names, and OSTCBExtPtr must point to the TCB extension of the task. RTOS Debugger for MicroC/OS-II 5

There are two possibilities to configure task names: 1. The TCB Extension contains the name itself. Specify 1 for the task name indirection. Specify additionally the offset, where the first character of the task name can be found in the TCB extension. E.g. OSTCBExtPtr points to struct struct { INT16U someval; char name[8]; INT16U someval2; } OSTCBExtPtr points to struct struct { char name[8]; INT16U someval; INT16U someval2; } OSTCBExtPtr points directly to name char name[] = Task1 ; task.config 0 1 2 task.config 0 1 0 task.config 0 1 0 2. The TCB Extension contains a pointer to the task name. Specify 2 for the task name indirection. Specify additionally the offset, where the pointer to the task name can be found in the TCB extension. E.g. OSTCBExtPtr points to struct struct { INT16U someval; char* name; INT16U someval2; } OSTCBExtPtr points to struct struct { char* name; INT16U someval; INT16U someval2; } task.config 0 2 2 task.config 0 2 0 Specifying 0 to both naming arguments means, that no task name is evaluated. NOTE: There is one exception on this. If the naming arguments are 0, or if they are committed, a special case is searched automatically: If the TCB Extension structure is named TASK_USER_DATA, and if it contains (not points to) the task name in a member variable called TaskName, then this is automatically found and configured. If, for any reason, this automatic evaluation leads to wrong displays, you can either configure it manually as described above, or disable it by task.config 0 0 1. RTOS Debugger for MicroC/OS-II 6

Automatic Configuration For system resource display and trace functionality, you can do an automatic configuration of the RTOS debugger. For this purpose it is necessary that all system internal symbols are loaded and accessible at any time, the RTOS debugger is used. Each of the task.config arguments can be substituted by '0', which means, that this argument will be searched and configured automatically. For a full automatic configuration, omit all arguments: Format: TASK.CONFIG ucos Task names are automatically found, if the OS internal mechanisms are used (since version 2.60), or if the TCB Extension structure is named TASK_USER_DATA, and if it contains (not points to) the task name in a member variable called TaskName. If a system symbol is not available, or if another value should be used for a specific system variable, then the corresponding argument must be set manually with the appropriate value (see Manual Configuration). Quick Configuration Guide To access all features of the RTOS debugger you should follow the following roadmap: 1. Run the PRACTICE demo script (~~/demo/<processor>/kernel/ucos/ucos.cmm). Start the demo with do ucos and go. The result should be a list of tasks, which change continuously their state. 2. Make a copy of the PRACTICE script file ucos.cmm. Modify the file according to your application. 3. Run the modified version in your application. This should allow you to display the kernel resources and use the trace functions (if available). Hooks & Internals in µc/os-ii No hooks are used in the kernel. To retrieve information on kernel objects, the RTOS Debugger uses the global µc/os Variables and the structures defined in the ucos-ii.h file. Be sure, that your application is compiled and linked with debugging symbols switched on. Note for 68HC08 COSMIC compilers: RTOS Debugger for MicroC/OS-II 7

The compiler does not export symbol information on typedefs to unnamed structures. You have to change them (in the ucos-ii.h file) to become named structures: Original ucos-ii.h typedef struct { } OS_EVENT; Change to: typedef struct os_event { } OS_EVENT; RTOS Debugger for MicroC/OS-II 8

Features The RTOS debugger for µc/os-ii supports the following features. Display of Kernel Resources The extension defines new PRACTICE commands to display various kernel resources. Information on the following µc/os-ii components can be displayed: TASK.Task TASK.Event TASK.Flag TASK.TImer TASK.Memory TASK.PARtition TASK.PROCess Tasks Intertask Communication Event Flags Timers Memory Partitions Space Partitions MPU Processes For a detailed description of each command refer to the chapter µc/os-ii Commands. If your hardware allows accessing the memory, while the target is running, these resources can be displayed On The Fly, i.e. while the application is running, without any intrusion to the application. Without this capability, the information will only be displayed, if the target application is stopped. Task Stack Coverage For stack usage coverage of the tasks, you can use the TASK.STacK command. Without any parameter, this command will set up a window with all active tasks. If you specify only a magic number as parameter, the stack area of this task will be automatically calculated. To use the calculation of the maximum stack usage, flag memory must be mapped to the task stack areas, when working with the emulation memory. When working with the target memory, a stack pattern must be defined with the command TASK.STacK.PATtern (default value is zero). To add/remove one task to/from the task stack coverage, you can either call the TASK.STacK.ADD rsp. TASK.STacK.ReMove commands with the task magic number as parameter, or omit the parameter and select from the task list window. It is recommended, to display only the tasks, that you are interested in, because the evaluation of the used stack space is very time consuming and slows down the debugger display. RTOS Debugger for MicroC/OS-II 9

Task Stack Coverage is only available, if you enabled OS_TASK_CREATE_EXT_EN, and if you created your tasks with OSTaskCreateExt(). To ensure proper stack calculation, specify OS_TASK_OPT_STK_CLR as an create option. Note for C166 using Tasking Compiler: The version 1.0 of the Tasking C166 port (author: K. Wannenmacher) lacks the updating of the OSTCBStkPtr variable. This causes, that the current stack pointer is displayed wrong. Task Related Breakpoints Any breakpoint set in the debugger can be restricted to fire only, if a specific task hits that breakpoint. This is especially useful, when debugging code which is shared between several tasks. To set a task related breakpoint, use the command: Break.Set <address> <range> [/<option>] /TASK <task> Set task related breakpoint. Use a magic number, task ID, or task name for <task>. For information about the parameters, see What to know about Magic Numbers, Task IDs and Task Names (general_ref_t.pdf). By default, the task related breakpoint will be implemented by a conditional breakpoint inside the debugger. I.e., the target will always halt at that breakpoint, but the debugger immediately resumes execution, if the current running task is not equal to the specified task. NOTE: Task related breakpoints impact the real-time behavior of the application On some architectures it is possible to set a task related breakpoint with on-chip debug logic that is less intrusive. Specify additionally the option /Onchip to use this. The debugger then uses the on-chip resources to reduce the number of breaks to the minimum, by pre-filtering the tasks. E.g. on ARM architectures, if the RTOS serves the ContextID register at task switches, and if the debug logic provides the ContextID comparison, you may use this register for less intrusive task related breakpoints: TrOnchip.ContextID ON will enable the comparison to the whole ContextID register. TrOnchip.ASID ON will enable the comparison to the ASID part only. If TASK.List.tasks provides a trace ID (traceid column), the debugger will use this ID for comparison. Without the trace ID, it uses the magic number (magic column) for comparison. For a general description of the Break.Set command, please see its documentation. When single stepping, the debugger halts on the next instruction, regardless which task hits this breakpoint. When debugging shared code, stepping over an OS function may lead to a task switch and coming back to the same place - but with a different task. If you want to stick the debugging within the current task you can set up the debugger with SETUP.StepWithinTask ON to use task related breakpoints for single stepping. In this case, single stepping will always stay within the current task. Other tasks using the same code will not be halted on these events. RTOS Debugger for MicroC/OS-II 10

If you want to halt program execution as soon as a specific task is scheduled to run by the OS, you can use the Break.SetTask command. Task Context Display You are able to switch the whole viewing context to a currently not executing task. This means, that all register and stack related information (such as Register, Data.List, Frame etc.) will be shown according to this task. Be aware that this is only for displaying information. When continuing debugging the application (Step or Go), the debugger will switch back to the current context. For displaying a specific task context, use the command: Frame.TASK [<task>] Display task context. Use a magic number, task ID, or task name for <task>. For information about the parameters, see What to know about Magic Numbers, Task IDs and Task Names (general_ref_t.pdf). To switch back to the current context, omit all parameters. For displaying the call stack of a specific task, you can use the following command: Frame /Task <task> Display call stack of a task. If you d like to see the application code, where the task was preempted, execute the command Frame /Caller /Task <task> to open a window of the same name. Double click on the line showing the OS service call. The TASK.TASK <task> window contains a button ( context ) to execute this command with the displayed task, and to switch back to the current context ( current ). Not available for C166! The version 1.0 of the Tasking C166 port (author: K. Wannenmacher) lacks the updating of the OSTCBStkPtr variable. This disables the usage of this feature, as we are not able to find the context of the task. Dynamic Task Performance Measurement The debugger may execute a dynamic performance measurement by evaluating the current running task in changing time intervals. Start the measurement with the commands PERF.Mode TASK and PERF.Arm, and view the contents with PERF.ListTASK. The evaluation is done by reading the magic location (= current running task) in memory. This memory read may be non-intrusive or intrusive, depending on the PERF.METHOD used. RTOS Debugger for MicroC/OS-II 11

If PERF collects the PC for function profiling of processes in MMU based operating systems (SYStem.Option MMUSPACES ON), then you need to set PERF.MMUSPACES, too. For a general description of the PERF command, refer to General Commands Reference Guide P (general_ref_p.pdf). Task Runtime Statistics Out of the recordings done by the Trace (if available), the debugger is able to evaluate the time spent in a task and display it statistically and graphically. Using this feature requires that the on-chip trace generation logic can generated task information. For details refer to OS-aware Tracing (glossary.pdf). To evaluate the contents of the trace buffer, use these commands: Trace.List List.TASK DEFault Trace.STATistic.TASK Trace.Chart.TASK Trace.PROfileSTATistic.TASK Trace.PROfileChart.TASK Trace.FindAll Address task.config(magic) Trace.FindAll CYcle owner OR CYcle context Display trace buffer and task switches Display task runtime statistic evaluation Display task runtime timechart Display task runtime within fixed time intervals statistically Display task runtime within fixed time intervals as colored graph Display all data access records to the magic location Display all context ID records The start of the recording time, when the calculation doesn t know, which task is running, is calculated as (unknown). TRACE32-ICE and TRACE32-FIRE use a completely different mechanism to record task information. See the trigger program below: ; Mark the magic location with an Alpha breakpoint Break.Set TASK.CONFIG(magic)++(TASK.CONFIG(magicsize)-1) /Alpha ; Program the Analyzer to record only task switches Analyzer.ReProgram ( Sample.Enable if AlphaBreak&&Write ) RTOS Debugger for MicroC/OS-II 12

Task State Analysis NOTE: This feature is only available, if your debugger equipment is able to trace memory data accesses (program flow trace is not sufficient). The time different tasks are in a certain state (running, ready, suspended or waiting) can be evaluated statistically or displayed graphically. This feature needs recording of all accesses to the status words of all tasks. Additionally, the accesses to the current task pointer (=magic) are needed. Adjust your trace logic to record all data write accesses, or limit the recorded data to the area where all TCBs are located (plus the current task pointer). To do a selective recording on task states with state analyzers (ICE or FIRE), use TASK.TASKState, if available, to mark the status words with Alpha breakpoints. Run the following PRACTICE script: ; Mark the magic location with an Alpha breakpoint Break.Set task.config(magic)++(task.config(magicsize)-1) /Alpha ; Mark all task state words with Alpha breakpoints TASK.TASKState ; Program the Analyzer to record task state transitions Analyzer.ReProgram ( Sample.Enable if AlphaBreak&&Write ) To do a selective recording on task states with flow traces (ICD, e.g. ETM and NEXUS trace), just enable the recording of all data write cycles. To evaluate the contents of the trace buffer, use these commands: Trace.STATistic.TASKState Trace.Chart.TASKState Display task state statistic Display task state timechart The start of the recording time, when the calculation doesn t know, which task is running, is calculated as (unknown). All kernel activities added to the calling task. RTOS Debugger for MicroC/OS-II 13

Function Runtime Statistics NOTE: This feature is only available, if your debugger equipment is able to trace memory data accesses (program flow trace is not sufficient). All function related statistic and timechart evaluations can be used with task specific information. The function timings will be calculated dependent on the task, that called this function. To do this, additionally to the function entries and exits, the task switches must be recorded. To do a selective recording on task related function runtimes with state analyzers (ICE and FIRE), use the following PRACTICE commands: ; Mark the magic location with an Alpha breakpoint Break.Set TASK.CONFIG(magic)++(TASK.CONFIG(magicsize)-1) /Alpha ; Mark the function entries/exits with Alpha/Beta breakpoints Break.SetFunc ; Program the Analyzer to record function entries/exits and task switches Analyzer.ReProgram ( Sample.Enable if AlphaBreak BetaBreak Mark.A if AlphaBreak Mark.B if BetaBreak ) To do a selective recording on task related function runtimes with flow traces (ICD, e.g. ETM and NEXUS trace), based on the data accesses, use the following PRACTICE command: ; Enable flow trace an accesses to the magic location Break.Set TASK.CONFIG(magic) /TraceData To do a selective recording on task related function runtimes with flow traces, based on the context ID, user the following PRACTICE command: ; Enable flow trace with context ID (e.g. 32bit) ETM.ContextID 32 To evaluate the contents of the trace buffer, use these commands: Trace.ListNesting Trace.STATistic.Func Trace.STATistic.TREE Display function nesting Display function runtime statistic Display functions as call tree RTOS Debugger for MicroC/OS-II 14

Trace.STATistic.sYmbol /SplitTASK Trace.Chart.Func Trace.Chart.sYmbol /SplitTASK Display flat runtime analysis Display function timechart Display flat runtime timechart The start of the recording time, when the calculation doesn t know, which task is running, is calculated as (unknown). µc/os-ii specific Menu The file ucos.men contains an alternate menu with µc/os-ii specific topics. Load this menu with the MENU.ReProgram command. NOTE: Load first the application symbols, then the µc/os-ii specific menu. The loading of the menu evaluates the existence of some µc/os-ii objects and creates the menu accordingly. You will find a new pull down menu called µc/os. The Display topics launch the appropriate kernel resource display windows. The Stack Coverage submenu starts and resets the µc/os specific stack coverage, and provides an easy way to add or remove tasks from the stack coverage window. The Trace pull-down menu is extended. In the List submenu, you can choose for an trace list window showing only task switches (if any) or task switches together with default display. The 'Perf' menu contains additional submenus for task runtime statistics and statistics on task states. RTOS Debugger for MicroC/OS-II 15

µc/os-ii Commands TASK.Event Display events Format: TASK.Event <event> Displays the event table of µc/os-ii or detailed information about one specific event. The event table holds all intertask communication mechanisms. Without any arguments, a table with all created events will be shown. Specify a event magic number to display detailed information on that event. magic is a unique ID, used by the RTOS Debugger to identify a specific event (address of the OS_EVENT structure). The fields magic, ptr and several fields in the detailed window are mouse sensitive, double clicking on them opens appropriate windows. TASK.Flag Display flags Format: TASK.Flag <flag> Displays the flag table of µc/os-ii or detailed information about one specific flag. Without any arguments, a table with all created flags will be shown. Specify a flag magic number to display detailed information on that flag. magic is a unique ID, used by the RTOS Debugger to identify a specific flag (address of the OS_FLAG_GRP structure). The field magic, and the task fields in the detailed window are mouse sensitive, double clicking on them opens appropriate windows. RTOS Debugger for MicroC/OS-II 16

TASK.Memory Display memory partitions Format: TASK.Memory Displays the table of all created memory partitions of µc/os-ii. magic is a unique ID, used by the RTOS Debugger to identify a specific memory partition (address of the OS_MEM). The field address is mouse sensitive, double clicking on it opens the appropriate window. TASK.PARtition Display space partitions Format: TASK.PARtition Displays the table of all created space partitions of µc/os-ii. magic is a unique ID, used by the RTOS Debugger to identify a specific space partition. RTOS Debugger for MicroC/OS-II 17

TASK.PROCess Display MPU processes Format: TASK.PROCess Displays the table of all created MPU processes of µc/os-ii. magic is a unique ID, used by the RTOS Debugger to identify a specific process. TASK.Task Display tasks Format: TASK.Task <task> Displays the task table of µc/os-ii or detailed information about one specific task. Without any arguments, a table with all created tasks will be shown. Specify a task magic number to display detailed information on that task. magic is a unique ID, used by the RTOS Debugger to identify a specific task (address of the TCB). The fields magic, event, msg and stack ptr are mouse sensitive, double clicking on them opens appropriate windows. magic has a context sensitive menu, too. Pressing the context button changes the register context to this task. current resets it to the current context. See Task Context Display. RTOS Debugger for MicroC/OS-II 18

TASK.TASKState Mark task state words Format: TASK.TASKState This command sets Alpha breakpoints on all task state words. The statistic evaluation of task states (see Task State Analysis) requires recording of the accesses to the task state words. By setting Alpha breakpoints to this words, and selectively recording Alphas, you can do a selective recording of task state transitions. Because setting the Alpha breakpoints by hand is very hard to do, this utility command sets automatically the Alphas to the state words of all tasks currently created. It does NOT set breakpoints to processes, that terminated or have not yet been created. TASK.TImer Display timers Format: TASK.TImer <timer> Displays the timer table of µc/os (since 2.80) or detailed information about one specific timer. Without any arguments, a table with all created timers will be shown. Specify a timer magic number to display detailed information on that timer. magic is a unique ID, used by the RTOS Debugger to identify a specific timer (address of the OS_TMR structure). The fields magic, and callback are mouse sensitive, double clicking on them opens appropriate windows. RTOS Debugger for MicroC/OS-II 19

µc/os-ii PRACTICE Functions There are special definitions for µc/os specific PRACTICE functions. TASK.CONFIG(magic) Returns the address for the magic number TASK.CONFIG(magicsize) Returns the size of the magic number (1,2 or 4) TASK.PAR.AVAIL() TASK.PROC.AVAIL() Returns 1 if space partitions are configured Returns 1 if MPU processes are configured TASK.STRUCT(tcb) Returns the symbol type name of the TCB structure TASK.TASKSTATE(min max) Returns the minimum or maximum address needed for data trace to do a Task State Analysis Frequently-Asked Questions No information available RTOS Debugger for MicroC/OS-II 20