Univers A2P

Introduction to the Univers Debugger for THREADX

The THREADX RTOS can be simulated and debugged in Adveda’s united software and hardware environment, Univers. All the information needed for studying a full THREADX RTOS application is made available and easily accessible. Different breakpoint types can be set on all registers, every memory location and each variable in a thread and/or function. From the whole application, the cycle-accurate code flow is registered, and the numbers of executions of each code memory location and/or subroutine are shown (Code-coverage feature). THREADX applications of different processor types like A2P, Cortex (ARM7, 9, 11) and others are available. Each THREADX RTOS application can be connected to peripherals and/or other processor simulators which all are running simultaneously. Even multiple THREADX RTOS applications with different speeds can be simulated simultaneously in one single environment. Applications using FILEX, NETX and USBX can also be simulated.​

The THREADX RTOS application can be started easily by opening Adveda’s Univers, selecting “File\Load project” and then double-clicking “ExpressLogic\A2P_THREADX.hsim” or one of the other “.hsim” files.

The Thread List Tab

This is arguably the single most important window of the RTOS plugin.

This window shows a list of all threads created by the current application (by calls to tx_thread_create) and some items pertaining to their current state. The currently active thread is indicated by an arrow in the first column (and typically by a state of RUNNING in the State column). The order of the threads is that of the _tx_thread_created_ptr.

You can examine a particular thread by double-clicking on the corresponding row in the window. All debugger windows (Watch, Locals, Register, Call Stack, Source, Disassembly, etc.) will then show the state of the program from the point of view of the thread in question. A thread selected in this way is indicated in the Thread window by a different color (for the moment, a subdued blue color).

The last row of the Thread window is always NO TASK. Double-clicking on this row makes the debugger show the state of the program as it currently is (that is, as it would be shown without an RTOS plugin), in effect always following the active task.

Note that if a task has been selected by double-clicking, the debugger will show the state of that particular task until another task (or NO TASK) is selected, even if execution is performed by or in another task. For example, if task A is currently active (RUNNING) and you double-click on task (B), which is READY, you will see information about the suspended task B. If you now perform a single-step by pressing F10, the active task (A) will perform a single-step, but since you are focused on task (B), not much will visibly change.

The disassembly window presents a detailed view of the various jumps in the code.

The profile view window shows a graphical representation of the accesses to various memory locations (address on the horizontal axis, number of cycles on the vertical axis). It allows for quick identification of code that is not used, or areas in memory where high speed memory will improve overall performance of the application.

The profile tabs window shows information per function, the function’s location in memory, function size, how many times the function has been called and how many CPU cycles have been spent in a particular function, with an overall overview in percentages.

Inspector Windows

The seven other windows display RTOS status information of various types. These windows are formatted but passive displays of various internal RTOS data structures.





Event Flag Groups

Byte Pools

Block Pools

Subscribe to our news