下载

© Semiconductor Components Industries, LLC, 2016
August, 2016 − Rev. 3
1 Publication Order Number:
AND9370/D
AND9370/D
AX8052 Debugger
Software Manual
Introduction:
The ON Semiconductor AX8052 line of fully integrated
embedded Microcontrollers feature advanced debug
features that significantly ease the task of writing firmware
compared to other 8052 compatible Microcontrollers. The
ON Semiconductor AX8052 Debug System consists of the
following components:
• The ON Semiconductor AX8052 Debug Interface. This
device connects the AX8052 Microcontroller Debug
Interface, consisting of the Signals RESET_N,
DBG_EN, PB6, PB7, GND, VCCIO to a standard PC
USB Interface.
• The AXSDB command line debugger processes
commands and executes them on the Microcontroller
using the Debug Interface. The AXSDB debugger can
be directly used, or through the AxCode::Blocks IDE. It
is fully scriptable thanks to its built-in Tool Control
Language (TCL) interpreter.
• The AxCode::Blocks IDE. AxCode::Blocks is a
customized version of the popular Code::Blocks IDE. It
is documented elsewhere, see AxCodeBlocks.pdf for an
introduction. Users wishing to develop with the
AxCode::Blocks IDE need not be familiar with axsdb
debugger commands, and can skip the remainder of this
document.
AXSDB
AXSDB is the ON Semiconductor AX8052 Symbolic
Command Line debugger. It is fully scriptable, thanks to its
built-in Tool Control Language (TCL) scripting engine. It is
suggested that the reader consults the Documentation
section on the TCL homepage, http://www.tcl.tk/
, for
information on the standard TCL commands. The remainder
of this document will describe the AX8052 specific
commands AXSDB adds to the standard TCL commands.
AX8052 specific Commands come in two flavors:
• Core commands implemented in the Debugger DLL,
libaxsdb−0.dll
• Convenience Commands implemented in TCL on top
of the core commands, contained in axsdb.tcl. These
commands can be changed by the user by changing
axsdb.tcl.
All commands, variables and channels are defined in the
namespace axsdb. axsdb.tcl imports them into the global
namespace.
State handling
When AXSDB is started, it responds with a prompt. The
debugger is then ready to accept user commands. It does
however not yet have access to any hardware.
First, AXSDB must be connected to any AX8052 Debug
Interface, connected to an USB port of the Computer
running AXSDB. The commands LIST_TARGETS,
CONNECT_TARGET, and DISCONNECT_TARGET
manage AXSDB’s connections to the active Debug
Interface. Note that the default axsdb.tcl automatically
connects to the Debug Interface if it finds exactly one
connected to the PC. Once AXSDB has connected to a
Debug Interface, it is configured to be inactive, i.e.
RESET_N is driven high, DBG_EN is driven low, and PB6
and PB7 are set to high-impedance. In this state a target
board may be connected to the debug interface without
disturbing the target microprocessor.
In order to actually start debugging, AXSDB needs to be
connected to the Microcontroller. The commands
CONNECT and DISCONNECT manage the connection to
the Microcontroller hardware debug interface.
Once connected to the Microcontroller, commands that
control the Microcontroller state can be used, such as RUN,
STEP, STOP, etc.
www.onsemi.com
APPLICATION NOTE