Board Manual 119
Intel® IQ80321 I/O Processor E valuation Platform
Getting Started and Debugger
C.9 Debugging Basics

C.9.1 Overview

Debuggers allow developer s to interrogate application co de by allowing program flow c ontrol, data
observation, and data manipulation. The flow control functions include the ability to sing le-step
through the code, step into fu nctions, step over functions , and run to breakpoint (ha rdware or
software). The data observation and manipulation functions include access to mem ory, registers, and
variables. The combination of the flow con trol and data functions allows the develop er to debug
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. Debu ggers can give insight that is difficult
to obtain without them, but they can fail wh en they are not used within the limits of their
functionality. They are intrusive by defi nition. They are software programs that interact with s oftware
monitors or hardware (JTAG) to control a target program. U ltimately, the debugger works best when
the developer understands wha t it can and can not do and uses it within those constraints.

C.9.2 Hardware and Software Breakpoints

The following section provide s a brief overview of breakp oints. See the Intel® 80321 I/O Processor
Developer’s Manual, for more detailed information.

C.9.2.1 Software Breakpoints

Software breakpoints are setup and utilized via debugger utilities ( such as Code|Lab). The abilities of
software breakpoints were seen in SectionC.7 of this Guide. Program execu tion can be halted at a
particular line of code, stepp ed through, and executed agai n to the next breakpoint via de buggers.
During this process, register values, memory address contents, variable contents, and man y other
useful pieces of information can be monitored.

C.9.2.2 Hardware Breakpoints

Hardware breakpoints step and breakpoint in code in either ROM or RA M without altering the code,
stacks, or other target informa tion. Hardware breakpoin ts handle difficult issues, by pr oviding the
ability to set the processor conditions tha t cause the program to halt. Use hardware break points to
locate problems such as reentrance, obscure timing, etc.
The 80321 contains two instru ction breakpoint address reg isters (IBCR0 and IBCR1), one data
breakpoint address register (DBR0), one configurable data mask/address register (DBR1), and one
data breakpoint control register (DBCON). The 80321 also supports a 256 entr y, trace buffer, that
records program execution information. The registers to control the trace bu ffer are located in CP14.