Task Debugging Panel

Overview

The Task Debugging panel is used for low-level debugging of single iterations of the Initialization Code , Execution Code , Event Handler Code and Termination Code task code blocks. A debug session is started from a task testing session in the Task Testing Panel :

  • Manually by triggering the Task Testing menu, tool-bar or shortcut key commands
  • Automatically when an iteration takes more than 1 second to complete, in which case the debug session begins where the task code is stuck. If too short, the timeout setting can be modified in the Preferences Panel .

The debug session only lasts through one iteration of the task code block:

  • The session starts either at the first instruction of the task code block or at the first instruction after wake-up, depending on the “Debugging entry point” preference setting.
  • The session ends either at the last instruction of the task code block or after executing the sleep instruction, depending on the “Debugging exit point” preference setting.

When debugging a task iteration, the task code blocks are debugged one after another. The panel title bar indicates which task code block is currently being debugged.

Views

The Task Debugging panel is divided into multiple views that display the following information:

  • Code view:
    • Displays the contents of the Sensor Controller firmware assembly listing file, which is output together with the generated driver. The view is divided into four columns:
      • Address, relative to the start of the AUX RAM, in 16-bit increments
      • Prefix instruction machine code, if any. Prefix instructions are used to extend 8- and 10-bit immediate fields of certain instructions to 16-bit.
      • Instruction machine code or data word.
      • Assembly instruction, assembly code comments or task code. The task code is displayed in a different color.
    • The left margin indicates:
      • The current instruction with a yellow arrow.
      • Enabled breakpoints with a red square.
      • Search matches (see below) with a thin vertical yellow line to the left.
  • Data structure view
    • Values can be edited while the target is idle. Changes are reflected in the memory view.
  • Memory view
    • Data words can be edited while the target is idle. Changes are reflected in the data structure view.
    • Instructions can not be edited.
  • CPU register view
    • Values can not be edited.
  • CPU status flag view
    • Values can not be edited.
  • CPU control and status view
    • Values can not be edited.

The code view contents are static, and will not necessarily match the current contents of the AUX RAM.

The other views are updated each time execution is halted, and any value changes are high-lighted.

Use the Scroll To The Current Instruction command to scroll the code view to the next instruction to be executed.

Target Interaction Commands

The Task Debugging panel can be in one of the states listed below, each allowing for different subsets of the task debugging commands, which can be triggered from the Task Debugging menu, the panel tool bar or keyboard shortcuts:

  • Idle
    • Run - F5 : Run continuously until breakpoint hit, target is sleeping or stop command
    • Run To Selected Line - Ctrl+F5 : Run continuously until reaching the selected line, breakpoint hit, target is sleeping or stop command
    • Single-Step - F11 : Single-step one instruction
    • Toggle Breakpoint - F9 : Toggle breakpoint at (or below) the currently selected line (instructions only)
    • Remove All Breakpoints - Ctrl+F9 : Remove all breakpoints
    • Disconnect - F12 : Disconnect from the target
  • Running continuously
    • Stop - F6 : Stop continuous running
    • Disconnect - F12 : Disconnect from the target
  • Idle, potentially stuck at a wait-for-event (WEV) instruction
    • Single-Step From Blocking WEV - Ctrl+F11 : Single-step from blocking WEV instruction
    • Enables also all commands listed above for the idle state
    • The condition occurs when single-stepping and/or halting on breakpoints delays the execution of a WEV instruction. If the WEV instruction, when finally executed, starts waiting for a pulse-type event signal that has already been triggered and will not be triggered again (periodically), the debug session is deadlocked.
  • Idle, at the debugging exit point
    • End Debugging Current Task Code Block - F8 : End debugging of the current task code block, and continue with the next or return to the test session
    • End Debugging Session - F8 : End debugging session, and return to the test session
    • Disconnect - F12 : Disconnect from the target

Breakpoint related commands are also available through a pop-up menu by right-clicking on lines in the code view.