102 Board Manual
Intel® IQ80321 I/O Processor Evaluation Platform
Getting Started and Debugg er
B.9 Debugging Basics

B.9.1 Overview

Debuggers allo w developers to interrogate application code by allowing program flow control, da ta
observation, and data manipulation. The f low control functions include the abilit y to single-step
through the code, step into functions, step over functions, and run to b reakpoint (hardware or
software). The data observation and manipulation functions include acces s to memory, registers, and
variables. The combination of th e flow control and data funct ions allows the developer to d ebug
problems as they occur or to validate the application code. As the size of an ap plication grows, the
need to be able to narrow down the cause of a problem to a few lines of code is imperative.
Debuggers have a finite set of capabilities and limitations. Debuggers can give insight that is difficult
to obtain without them, but they can fail when they are not used within the limits of their
functionality. They are intrusive by definition. They are software prog rams that interact with software
monitors or hardware (JTAG) to control a target program. Ultimatel y, the debugger works best when
the developer understands wha t it can and can not do and use s it within those constraints.

B.9.2 Hardware and Software Breakpoints

The following section provides a brief overview of breakpoints. See the Int el® 80321 I/O Processor
Developer’s Manual, for more detailed informati on.

B.9.2.1 Software Breakpoints

Software breakpoints are setup and ut ilized via debugger utilities (such as Code|Lab). The abilities of
software breakpoints were see n in Section B.7 of this Guide. Program execution can be halte d at a
particular line of code, stepped thr ough, and executed again to the next breakpoint via debug gers.
During this process, register values, memory address contents, variable contents, and many other
useful pieces of informati on can be monitored.

B.9.2.2 Hardware Breakpoints

Hardware breakpoints step and breakpoint in code in either ROM or RAM without altering the code,
stacks, or other target information. Hardware br eakpoints handle difficult issues, by providing the
ability to set the processor conditions that cause the program to halt. Use hardware breakpoints to
locate problems such as reentrance, obscure timing, etc.
The 80321 contains two instruction breakpoint address registers (IBCR0 an d IBCR1), one data
breakpoint address registe r (DBR0), one configurable d ata mask/address register (D BR1), and one
data breakpoint control register (DBCON). The 80321 also supports a 2 56 entry, trace buffer, that
records program execution information. The registers to control the trace buffer are located in CP14.