2016-05-13 23:50:59 +00:00
|
|
|
.TH mspdebug 1 "14 May 2016" "Version 0.24"
|
2010-03-18 01:02:05 +00:00
|
|
|
.SH NAME
|
|
|
|
MSPDebug - debugging tool for MSP430 MCUs
|
|
|
|
.SH SYNOPSIS
|
2010-06-28 02:36:05 +00:00
|
|
|
\fBmspdebug\fR [options] \fIdriver\fR [\fIcommand\fR ...]
|
2010-03-18 01:02:05 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
MSPDebug is a command-line tool designed for debugging and programming
|
2010-06-28 02:36:05 +00:00
|
|
|
the MSP430 family of MCUs. It supports the eZ430-F2013, eZ430-RF2500,
|
2012-08-14 05:24:17 +00:00
|
|
|
Launchpad, Chronos, FET430UIF, GoodFET, Olimex MSP430-JTAG-TINY and
|
2012-03-02 22:56:26 +00:00
|
|
|
MSP430-JTAG-ISO programming tools, as well as a simulation mode.
|
2010-03-18 01:02:05 +00:00
|
|
|
|
|
|
|
When started with appropriate options, MSPDebug will attempt to
|
|
|
|
connect to the debugging tool specified and identify the device under
|
|
|
|
test. Once connected, the user is presented with a command prompt
|
|
|
|
which can be used to reflash the device memory, inspect memory and
|
|
|
|
registers, set registers, and control the CPU (single step, run and
|
|
|
|
run to breakpoint).
|
|
|
|
|
2011-04-04 05:34:06 +00:00
|
|
|
It supports a variety of file formats, described in the section
|
|
|
|
\fBBINARY FORMATS\fR below. It can also be used as a remote stub
|
2010-03-22 06:12:51 +00:00
|
|
|
for \fBgdb\fR(1).
|
2010-04-08 02:43:19 +00:00
|
|
|
|
2013-04-04 02:53:38 +00:00
|
|
|
On startup, MSPDebug will look for a file called .mspdebug first in the
|
|
|
|
current directory, and then in the user's home directory. If either file
|
|
|
|
exists, commands will be read and executed from this file before
|
|
|
|
executing any other commands or starting the interactive reader.
|
|
|
|
|
|
|
|
Alternatively, a configuration file can be explicitly specified with the
|
|
|
|
\fB-C\fR option.
|
2010-08-31 03:50:00 +00:00
|
|
|
.SH COMMAND-LINE OPTIONS
|
2010-03-18 01:02:05 +00:00
|
|
|
Command-line options accepted by MSPDebug are described below. If
|
|
|
|
commands are specified on the end of the command-line, then they are
|
|
|
|
executed after connecting to the device, and the interactive prompt is
|
2011-09-30 20:59:54 +00:00
|
|
|
not started. Please be aware that commands consisting of multiple
|
|
|
|
words need to be enclosed in quotation marks, otherwise they are
|
|
|
|
treated as single commands. Thus the common prog command would be
|
|
|
|
used as "prog main.elf".
|
|
|
|
See the section labelled \fBCOMMANDS\fR for more information.
|
2010-08-31 03:50:00 +00:00
|
|
|
.IP "\-q"
|
|
|
|
Start in quiet mode. See the "quiet" option described below.
|
2010-03-18 01:02:05 +00:00
|
|
|
.IP "\-v \fIvoltage\fR"
|
|
|
|
Set the programming voltage. The voltage should be specified as an integer
|
|
|
|
in millivolts. It defaults to 3000 (3.0 V).
|
|
|
|
.IP "\-j"
|
|
|
|
Use JTAG instead of Spy-Bi-Wire to communicate with the MSP430. This
|
2011-06-13 01:02:49 +00:00
|
|
|
option doesn't work with eZ430 or eZ430-RF2500 devices, which support
|
|
|
|
Spy-Bi-Wire only.
|
2010-06-28 02:36:05 +00:00
|
|
|
.IP "\-d \fIdevice\fR"
|
|
|
|
Specify that the driver should connect via a tty device rather than USB.
|
|
|
|
The supported connection methods vary depending on the driver. See the
|
|
|
|
section \fBDRIVERS\fR below for details.
|
2010-06-28 03:13:51 +00:00
|
|
|
.IP "\-U \fIbus\fR:\fIdevice\fR"
|
|
|
|
Specify a particular USB device to connect to. Without this option,
|
|
|
|
the first device of the appropriate type is opened.
|
2011-07-18 02:56:29 +00:00
|
|
|
.IP "\-s \fIserial\fR"
|
|
|
|
Specify a particular USB device serial number to connect to. Use this
|
|
|
|
option to distinguish between multiple devices of the same type.
|
2010-06-28 02:36:05 +00:00
|
|
|
.IP "\-n"
|
|
|
|
Do not process the startup file (~/.mspdebug).
|
2013-03-25 21:07:32 +00:00
|
|
|
.IP "\-C \fIfile\fR"
|
|
|
|
Specify an alternative configuration file (default is ~/.mspdebug). If -n
|
|
|
|
is specified as well, no file will be read.
|
2010-09-17 14:36:16 +00:00
|
|
|
.IP "\--long-password"
|
|
|
|
When using the flash-bsl driver, send a 32-byte BSL password instead
|
|
|
|
of the standard 16-byte password.
|
2010-06-28 02:36:05 +00:00
|
|
|
.IP "\-\-help"
|
|
|
|
Display a brief help message and exit.
|
|
|
|
.IP "\-\-fet\-list"
|
2011-02-20 22:13:43 +00:00
|
|
|
Display a list of chips supported by the FET driver (the driver used
|
2013-07-18 00:23:02 +00:00
|
|
|
for UIF, RF2500 and Olimex devices).
|
2010-06-28 02:36:05 +00:00
|
|
|
.IP "\-\-fet\-force\-id \fIstring\fR"
|
|
|
|
When using a FET device, force the connected chip to be recognised by
|
|
|
|
MSPDebug as one of the given type during initialization. This overrides
|
2011-06-13 01:02:49 +00:00
|
|
|
the device ID returned by the FET. The given string should be a chip
|
|
|
|
name in long form, for example "MSP430F2274".
|
2013-05-21 03:59:17 +00:00
|
|
|
.IP "\-\-fet\-skip\-close"
|
|
|
|
When using a FET device, skip the JTAG close procedure when disconnecting.
|
|
|
|
With some boards, this removes the need to replug the debugger after use.
|
2010-06-28 03:13:51 +00:00
|
|
|
.IP "\-\-usb\-list"
|
|
|
|
List available USB devices and exit.
|
2011-03-27 00:02:31 +00:00
|
|
|
.IP "\-\-force-reset"
|
|
|
|
When using a FET device, always send a reset during initialization. By
|
|
|
|
default, an initialization without reset will be tried first.
|
2011-12-14 00:11:29 +00:00
|
|
|
.IP "\-\-allow-fw-update"
|
|
|
|
When using a V3 FET device via the TI library, allow the library to
|
|
|
|
perform a firmware update if the FET firmware is incompatible with the
|
|
|
|
library.
|
|
|
|
.IP "\-\-require-fw-update \fIimage.txt\fR"
|
2012-09-11 02:35:31 +00:00
|
|
|
When using a V3 FET device, or certain Olimex devices, force a firmware
|
|
|
|
update using the given firmware image. The firmware format depends on
|
|
|
|
the driver.
|
2010-08-31 03:50:00 +00:00
|
|
|
.IP "\-\-version"
|
|
|
|
Show program version and copyright information.
|
2012-10-09 03:05:54 +00:00
|
|
|
.IP "\-\-embedded"
|
|
|
|
Start mspdebug as an embedded subprocess. See the documentation
|
|
|
|
accompanying the source release for more information on embedded mode.
|
2014-04-01 23:37:43 +00:00
|
|
|
.IP "\-\-bsl\-entry\-sequence \fIseq\fR"
|
|
|
|
Specify a BSL entry sequence. Each character specifies a modem control
|
|
|
|
line transition (R: RTS on, r: RTS off, D: DTR on, d: DTR off). A comma
|
|
|
|
indicates a delay. The entry and exit sequences are separated by a
|
2014-04-17 03:58:16 +00:00
|
|
|
colon. The default value is \fBdR,r,R,r,R,D:dR,DR\fR, for the
|
|
|
|
\fBflash-bsl\fR driver.
|
2010-06-28 02:36:05 +00:00
|
|
|
.SH DRIVERS
|
2013-10-09 22:45:48 +00:00
|
|
|
For drivers supporting both USB and tty access, USB is the default,
|
2013-09-29 13:37:01 +00:00
|
|
|
unless specified otherwise (see \fB-d\fR above).
|
|
|
|
|
|
|
|
On Linux, if USB access is used, the kernel driver (if any) is
|
2013-10-09 22:45:48 +00:00
|
|
|
detached from the tty device. If further access to the tty device is
|
2013-09-29 13:37:01 +00:00
|
|
|
needed, unloading and re-loading of the driver (e.g. cdc-acm.ko) is required.
|
|
|
|
|
2010-06-28 02:36:05 +00:00
|
|
|
A driver name must be specified on the command line for MSPDebug to
|
|
|
|
connect to. Valid driver names are listed here.
|
|
|
|
.IP "\fBrf2500\fR"
|
2011-09-14 04:25:33 +00:00
|
|
|
Connect to an eZ430-RF2500, Launchpad or Chronos device. Only USB
|
|
|
|
connection is supported.
|
2010-06-28 02:36:05 +00:00
|
|
|
.IP "\fBolimex\fR"
|
2012-09-17 23:25:45 +00:00
|
|
|
Connect to an Olimex MSP430-JTAG-TINY device. Both USB and tty access are
|
2010-06-28 02:36:05 +00:00
|
|
|
supported.
|
2011-12-25 22:22:04 +00:00
|
|
|
.IP "\fBolimex-v1\fR"
|
2012-09-17 23:25:45 +00:00
|
|
|
Connect to an Olimex MSP430-JTAG-TINY (V1) device. Both USB and tty access are
|
2011-12-25 22:22:04 +00:00
|
|
|
supported. This driver must be used instead of \fBolimex\fR if connecting
|
|
|
|
to a V1 device via a tty interface.
|
2010-11-08 20:16:31 +00:00
|
|
|
.IP "\fBolimex-iso\fR"
|
2012-09-17 23:25:45 +00:00
|
|
|
Connect to an Olimex MSP430-JTAG-ISO device. Both USB and tty access are
|
2012-03-01 23:13:11 +00:00
|
|
|
supported.
|
2012-09-13 01:55:14 +00:00
|
|
|
.IP "\fBolimex-iso-mk2\fR"
|
|
|
|
Connect to an Olimex MSP430-JTAG-ISO-MK2 device. Both USB and tty
|
|
|
|
access are supported.
|
2010-06-28 02:36:05 +00:00
|
|
|
.IP "\fBsim\fR"
|
2010-03-18 01:02:05 +00:00
|
|
|
Do not connect to any hardware device, but instead start in simulation
|
2011-04-04 05:34:06 +00:00
|
|
|
mode. A 64k buffer is allocated to simulate the device memory.
|
2010-03-18 01:02:05 +00:00
|
|
|
|
2010-03-20 03:04:21 +00:00
|
|
|
During simulation, addresses below 0x0200 are assumed to be IO memory.
|
2011-03-10 22:38:23 +00:00
|
|
|
Programmed IO writes to and from IO memory are handled by the IO
|
|
|
|
simulator, which can be configured and controlled with the \fBsimio\fR
|
|
|
|
command, described below.
|
2010-03-20 03:04:21 +00:00
|
|
|
|
2010-03-18 01:02:05 +00:00
|
|
|
This mode is intended for testing of changes to MSPDebug, and for
|
|
|
|
aiding the disassembly of MSP430 binaries (as all binary and symbol
|
|
|
|
table formats are still usable in this mode).
|
2010-06-28 02:36:05 +00:00
|
|
|
.IP "\fBuif\fR"
|
|
|
|
Connect to an eZ430-F2013 or a FET430UIF device. The device argument
|
|
|
|
should be the filename of the appropriate tty device. The TI serial
|
|
|
|
converter chips on these devices are supported by newer versions of the
|
|
|
|
Linux kernel, and should appear as /dev/tty\fIXX\fR when attached.
|
|
|
|
|
2011-09-16 04:09:03 +00:00
|
|
|
USB connection is supported for this driver. The USB interface chip in
|
|
|
|
these devices is a TI3410, which requires a firmware download on
|
|
|
|
startup. MSPDebug will search for a file called ti_3410.fw.ihex in
|
|
|
|
the configured library directory and the current directory. You can
|
|
|
|
specify an alternate location for the file via the
|
|
|
|
\fBMSPDEBUG_TI3410_FW\fR environment variable.
|
2010-06-28 02:36:05 +00:00
|
|
|
.IP "\fBuif-bsl\fR"
|
|
|
|
Connect to the bootloader on a FET430UIF device. These devices contain
|
2011-06-06 04:05:52 +00:00
|
|
|
MSP430F1612 chips. By sending a special command sequence, you can obtain
|
|
|
|
access to the bootloader and inspect memory on the MSP430F1612 in the
|
2010-06-28 02:36:05 +00:00
|
|
|
programming device itself.
|
|
|
|
|
2011-04-04 05:34:06 +00:00
|
|
|
Currently, only memory read/write and erase are supported. CPU control
|
|
|
|
via the bootloader is not possible.
|
2010-09-17 14:36:16 +00:00
|
|
|
.IP "\fBflash-bsl\fR"
|
|
|
|
Connect to the built-in bootloader in MSP430 devices with flash bootloader
|
2010-09-23 01:40:53 +00:00
|
|
|
memory. Devices with ROM bootloaders require another driver. Currently,
|
2010-09-17 14:36:16 +00:00
|
|
|
this driver must mass-erase the device in order to gain access. Read,
|
|
|
|
write, and erase operations are supported.
|
|
|
|
|
|
|
|
USB connection is not supported for this driver. Connection is via serial
|
|
|
|
port, and bootloader entry is accomplished via the RTS and DTR lines.
|
|
|
|
Connect RTS to the device's TEST pin and DTR to the device's RST pin.
|
|
|
|
Use an appropriate serial level-shifter to make the connection, if necessary.
|
|
|
|
If connecting to a device with non-multiplexed JTAG pins, connect RTS to
|
|
|
|
the device's TCK pin via an inverter.
|
2011-06-06 03:47:52 +00:00
|
|
|
.IP "\fBgdbc\fR"
|
|
|
|
GDB client mode. Connect to a server which implements the GDB remote
|
|
|
|
protocol and provide an interface to it. To use this driver, specify
|
|
|
|
the remote address in \fIhostname:port\fR format using the \fB-d\fR
|
|
|
|
option.
|
2011-10-17 23:28:09 +00:00
|
|
|
.IP "\fBtilib\fR"
|
|
|
|
Use the Texas Instruments MSP430.DLL to access the device. The library
|
|
|
|
file (MSP430.DLL for Windows, libmsp430.so for Unix-like systems) must
|
|
|
|
be present in the dynamic loader search path.
|
|
|
|
|
2012-04-25 00:43:14 +00:00
|
|
|
USB connection is not supported for this driver. This driver supports
|
2012-09-17 23:25:45 +00:00
|
|
|
watchpoints. Note that the \fB-d\fR option for this driver passes its
|
|
|
|
argument straight through to the library's \fBMSP430_Initialize\fR
|
|
|
|
function. Any special argument supported by that function is therefore
|
|
|
|
accessible via the \fB-d\fR option.
|
2013-11-20 16:36:09 +00:00
|
|
|
|
|
|
|
Automatic device discovery works only on Linux and Windows. On other
|
|
|
|
systems, the appropriate ACM serial node must be explicitly specified.
|
2012-07-18 00:26:55 +00:00
|
|
|
.IP "\fBgoodfet\fR"
|
2013-10-09 22:45:48 +00:00
|
|
|
Connect to a GoodFET device. JTAG mode must be used, and only tty access
|
2012-07-18 00:26:55 +00:00
|
|
|
is supported. This device can be used for memory access (read, erase and
|
|
|
|
program), but CPU control is limited. The CPU may be halted, run and
|
|
|
|
reset, but register access and breakpoints aren't supported.
|
2012-10-11 22:33:20 +00:00
|
|
|
.IP "\fBpif\fR"
|
2013-12-11 01:57:54 +00:00
|
|
|
Connect to a parallel-port JTAG controller. JTAG mode must be used, and
|
|
|
|
only tty access is supported. Currently, this driver is only supported
|
2013-12-11 10:17:07 +00:00
|
|
|
on Linux, FreeBSD and DragonFly BSD. A parallel port device (ppdev on
|
|
|
|
Linux, ppi on FreeBSD and DragonFly BSD) must be specified via the
|
|
|
|
\fB-d\fR option.
|
2015-02-03 21:22:39 +00:00
|
|
|
.IP "\fBgpio\fR"
|
|
|
|
Connect to system gpios. JTAG mode must be used, and
|
|
|
|
only tty access is supported. Currently, this driver is only supported
|
|
|
|
on Linux, FreeBSD and DragonFly BSD. The gpios to used must defined using
|
2016-11-19 19:48:32 +00:00
|
|
|
a string like "tdi=7 tdo=8 tms=9 tck=4 rst=10 tst=11" via the
|
2015-02-03 21:22:39 +00:00
|
|
|
\fB-d\fR option. (dont forget the quotes)
|
|
|
|
|
2013-07-18 02:22:56 +00:00
|
|
|
.IP "\fBload-bsl\fR"
|
|
|
|
Connect to a USB bootloader. The stub bootloader will be used to load a
|
|
|
|
fuller-featured bootloader into RAM for execution.
|
2013-09-08 01:41:55 +00:00
|
|
|
.IP "\fBezfet\fR"
|
|
|
|
This driver is for Texas Instruments' eZ-FET devices. It supports USB
|
2013-10-09 22:45:48 +00:00
|
|
|
and tty access. It does not support breakpoint control.
|
2014-04-17 03:58:16 +00:00
|
|
|
.IP "\fBrom-bsl\fR"
|
|
|
|
This driver is for the old-style (ROM) bootstrap loader. It supports tty
|
|
|
|
access only. Entry is attempted via the RTS/DTR signals. The default
|
|
|
|
sequence is \fBDR,r,R,r,d,R:DR,r\fR, but you can override this with the
|
|
|
|
\fB\-\-bsl\-entry\-sequence\fR option.
|
|
|
|
|
|
|
|
\fBWARNING:\fR this driver unlocks the BSL by performing a mass erase.
|
|
|
|
There are reports of this operation causing an erase of info A in some
|
|
|
|
devices. Use at your own risk.
|
2010-03-18 01:02:05 +00:00
|
|
|
.SH COMMANDS
|
|
|
|
MSPDebug can accept commands either through an interactive prompt, or
|
|
|
|
non-interactively when specified on the command line. The supported
|
|
|
|
commands are listed below.
|
2010-04-10 04:33:21 +00:00
|
|
|
|
|
|
|
Commands take arguments separated by spaces. Any text string enclosed
|
|
|
|
in double-quotation marks is considered to be a single argument, even
|
|
|
|
if it contains space characters. Within a quoted string, the usual
|
|
|
|
C-style backslash substitutions can be used.
|
2010-10-11 23:48:25 +00:00
|
|
|
|
|
|
|
Commands can be specified by giving the first few characters of the
|
|
|
|
command name, provided that the prefix is unambiguous. Some commands
|
|
|
|
support automatic repeat. For these commands, pressing enter at the
|
|
|
|
reader prompt without typing anything will cause repeat execution.
|
2013-12-10 22:25:40 +00:00
|
|
|
.IP "\fB!\fR [\fIcommand\fR [\fIargs ...\fR]]"
|
|
|
|
Invoke an interactive operating system shell. If any arguments
|
|
|
|
are specified, the first one is taken as a command to execute, with the
|
|
|
|
rest of the arguments as the arguments to the command.
|
|
|
|
|
|
|
|
This command is not yet available on non-POSIX systems.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fB=\fR \fIexpression\fR"
|
2010-03-18 01:02:05 +00:00
|
|
|
Evaluate an address expression and show both its value, and the result
|
|
|
|
when the value is looked up in reverse in the current symbol
|
|
|
|
table. This result is of the form \fIsymbol\fR+\fIoffset\fR, where
|
|
|
|
\fIsymbol\fR is the name of the nearest symbol not past the address in
|
|
|
|
question.
|
|
|
|
|
|
|
|
See the section marked \fBADDRESS EXPRESSIONS\fR for more information on
|
|
|
|
the syntax of expressions.
|
2011-04-04 05:09:11 +00:00
|
|
|
.IP "\fBalias\fR"
|
|
|
|
Show a list of defined command aliases.
|
|
|
|
.IP "\fBalias\fR \fIname\fR"
|
|
|
|
Remove a previously defined command alias.
|
|
|
|
.IP "\fBalias\fR \fIname\fR \fIcommand\fR"
|
|
|
|
Define a command alias. The text \fIcommand\fR will be substituted for
|
|
|
|
\fIname\fR when looking up commands. The given command text may contain
|
|
|
|
a command plus arguments, if the entire text is wrapped in quotes when
|
|
|
|
defining the alias. To avoid alias substitution when interpreting
|
|
|
|
commands, prefix the command with \\ (a backslash character).
|
2013-12-02 18:27:13 +00:00
|
|
|
.IP "\fBblow_jtag_fuse\fR"
|
|
|
|
Blow the device's JTAG fuse.
|
|
|
|
|
|
|
|
.B WARNING: this is an irreversible operation!
|
2010-07-02 02:22:52 +00:00
|
|
|
.IP "\fBbreak\fR"
|
|
|
|
Show a list of active breakpoints. Breakpoints can be added and removed
|
|
|
|
with the \fBsetbreak\fR and \fBdelbreak\fR commands. Each breakpoint is
|
|
|
|
numbered with an integer index starting at 0.
|
2010-05-18 04:35:02 +00:00
|
|
|
.IP "\fBcgraph\fR \fIaddress\fR \fIlength\fR [\fIaddress\fR]"
|
|
|
|
Construct the call graph of all functions contained or referenced in
|
|
|
|
the given range of memory. If a particular function is specified, then
|
|
|
|
details for that node of the graph are displayed. Otherwise, a summary
|
|
|
|
of all nodes is displayed.
|
|
|
|
|
|
|
|
Information from the symbol table is used for hinting at the possible
|
|
|
|
locations of function starts. Any symbol which does not contain a "."
|
|
|
|
is considered a possible function start.
|
|
|
|
|
|
|
|
Callers and callee names are shown prefixed by a "*" where the
|
|
|
|
transition is a tail-call type transition.
|
2010-07-02 02:22:52 +00:00
|
|
|
.IP "\fBdelbreak\fR [\fIindex\fR]"
|
|
|
|
Delete one or all breakpoints. If an index is given, the selected breakpoint
|
|
|
|
is deleted. Otherwise, all breakpoints are cleared.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBdis\fR \fIaddress\fR [\fIlength\fR]"
|
2010-03-18 01:02:05 +00:00
|
|
|
Dissassemble a section of memory. Both arguments may be address
|
|
|
|
expressions. If no length is specified, a section of the default
|
|
|
|
length (64 bytes) is disassembled and shown.
|
|
|
|
|
|
|
|
If symbols are available, then all addresses used as operands are
|
|
|
|
translated into \fIsymbol\fR+\fIoffset\fR form.
|
2010-10-11 23:48:25 +00:00
|
|
|
|
|
|
|
This command supports repeat execution. If repeated, it continues to
|
|
|
|
disassemble another block of memory following that last printed.
|
2013-03-25 21:19:31 +00:00
|
|
|
.IP "\fBerase\fR [\fBall\fR|\fBsegment\fR|\fBsegrange\fR] [\fIaddress\fR] [\fIsize\fR] [\fIsegrange\fR]"
|
2010-09-23 04:08:45 +00:00
|
|
|
Erase the device under test. With no arguments, all code memory is erased
|
|
|
|
(but not information or boot memory). With the argument "all", a mass
|
|
|
|
erase is performed (the results may depend on the state of the LOCKA
|
|
|
|
bit in the flash memory controller).
|
|
|
|
|
|
|
|
Specify "segment" and a memory address to erase an individual flash
|
2013-03-25 21:19:31 +00:00
|
|
|
segment. Specify "segrange", an address, size and segment size to erase
|
|
|
|
an arbitrary set of contiguous segments.
|
2010-10-11 22:44:46 +00:00
|
|
|
.IP "\fBexit\fR"
|
|
|
|
Exit from MSPDebug.
|
2012-08-14 04:48:38 +00:00
|
|
|
.IP "\fBfill\fR \fIaddress\fR \fIlength\fR \fIb0\fR [\fIb1\fR \fIb2\fR ...]
|
|
|
|
Fill the memory region of size \fIlength\fR starting at \fIaddress\fR with
|
|
|
|
the pattern of bytes given (specified in hexadecimal). The pattern will be
|
|
|
|
repeated without padding as many times as necessary without exceeding the
|
|
|
|
bounds of the specified region.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBgdb\fR [\fIport\fR]"
|
2010-03-22 06:12:51 +00:00
|
|
|
Start a GDB remote stub, optionally specifying a TCP port to listen on.
|
2013-04-21 22:29:30 +00:00
|
|
|
If no port is given, the default port is controlled by the option
|
|
|
|
\fBgdb_default_port\fR.
|
2010-03-22 06:12:51 +00:00
|
|
|
|
|
|
|
MSPDebug will wait for a connection on this port, and then act as a
|
2010-08-17 01:05:22 +00:00
|
|
|
GDB remote stub until GDB disconnects.
|
|
|
|
|
|
|
|
GDB's "monitor" command can be used to issue MSPDebug commands via the
|
|
|
|
GDB interface. Supplied commands are executed non-interactively, and
|
|
|
|
the output is sent back to be displayed in GDB.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBhelp\fR [\fIcommand\fR]"
|
2010-03-18 01:02:05 +00:00
|
|
|
Show a brief listing of available commands. If an argument is
|
|
|
|
specified, show the syntax for the given command. The help text shown
|
|
|
|
when no argument is given is also shown when MSPDebug starts up.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBhexout\fR \fIaddress\fR \fIlength\fR \fIfilename\fR"
|
2010-03-18 01:02:05 +00:00
|
|
|
Read the specified section of the device memory and save it to an
|
|
|
|
Intel HEX file. The address and length arguments may both be address
|
|
|
|
expressions.
|
|
|
|
|
|
|
|
If the specified file already exists, then it will be overwritten. If
|
|
|
|
you need to dump memory from several disjoint memory regions, you can
|
|
|
|
do this by saving each section to a separate file. The resulting files
|
|
|
|
can then be concatenated together to form a single valid HEX file.
|
2010-04-08 01:15:30 +00:00
|
|
|
.IP "\fBisearch\fR \fIaddress\fR \fIlength\fR [\fIoptions\fR ...]"
|
|
|
|
Search over the given range for an instruction which matches the specified
|
|
|
|
search criteria. The search may be narrowed by specifying one or more of
|
|
|
|
the following terms:
|
|
|
|
.RS
|
|
|
|
.IP "\fBopcode\fR \fIopcode\fR"
|
|
|
|
Match the specified opcode. Byte/word specifiers are not recognised, as
|
|
|
|
they are specified with other options.
|
|
|
|
.IP "\fBbyte\fR"
|
|
|
|
Match only byte operations.
|
|
|
|
.IP "\fBword\fR"
|
|
|
|
Match only word operations.
|
2010-09-09 00:24:36 +00:00
|
|
|
.IP "\fBaword\fR"
|
|
|
|
Match only address-word (20-bit) operations.
|
2010-04-08 01:15:30 +00:00
|
|
|
.IP "\fBjump\fR"
|
|
|
|
Match only jump instructions (conditional and unconditional jumps, but
|
|
|
|
not instructions such as BR which load the program counter explicitly).
|
|
|
|
.IP "\fBsingle\fR"
|
|
|
|
Match only single-operand instructions.
|
|
|
|
.IP "\fBdouble\fR"
|
|
|
|
Match only double-operand instructions.
|
|
|
|
.IP "\fBnoarg\fR"
|
|
|
|
Match only instructions with no arguments.
|
|
|
|
.IP "\fBsrc\fR \fIaddress\fR"
|
|
|
|
Match instructions with the specified value in the source operand. The value
|
|
|
|
may be given as an address expression. Specifying this option implies matching
|
|
|
|
of only double-operand instructions.
|
|
|
|
.IP "\fBdst\fR \fIaddress\fR"
|
|
|
|
Match instructions with the specified value in the destination
|
|
|
|
operand. This option implies that no-argument instructions are not
|
|
|
|
matched.
|
|
|
|
.IP "\fBsrcreg\fR \fIregister\fR"
|
|
|
|
Match instructions using the specified register in the source operand. This
|
|
|
|
option implies matching of only double-operand instructions.
|
|
|
|
.IP "\fBdstreg\fR \fIregister\fR"
|
|
|
|
Match instructions using the specified register in the destination operand.
|
|
|
|
This option implies that no-argument instructions are not matched.
|
|
|
|
.IP "\fBsrcmode\fR \fImode\fR"
|
|
|
|
Match instructions using the specified mode in the source operand. See
|
|
|
|
below for a list of modes recognised. This option implies matching of
|
|
|
|
only double-operand instructions.
|
|
|
|
.IP "\fBdstmode\fR \fImode\fR"
|
|
|
|
Match instructions using the specified mode in the destination operand. See
|
|
|
|
below for a list of modes. This option implies that no-argument instructions
|
|
|
|
are not matched.
|
|
|
|
.RE
|
2011-03-10 22:38:23 +00:00
|
|
|
.IP
|
2010-04-08 01:15:30 +00:00
|
|
|
For single-operand instructions, the operand is considered to be the
|
|
|
|
destination operand.
|
|
|
|
|
|
|
|
The seven addressing modes used by the MSP430 are represented by single
|
|
|
|
characters, and are listed here:
|
|
|
|
.RS
|
|
|
|
.IP "\fBR\fR"
|
|
|
|
Register mode.
|
|
|
|
.IP "\fBI\fR"
|
|
|
|
Indexed mode.
|
|
|
|
.IP "\fBS\fR"
|
|
|
|
Symbolic mode.
|
|
|
|
.IP "\fB&\fR"
|
|
|
|
Absolute mode.
|
|
|
|
.IP "\fB@\fR"
|
|
|
|
Register-indirect mode.
|
|
|
|
.IP "\fB+\fR"
|
|
|
|
Register-indirect mode with auto-increment.
|
|
|
|
.IP "\fB#\fR"
|
|
|
|
Immediate mode.
|
|
|
|
.RE
|
2010-09-12 23:27:11 +00:00
|
|
|
.IP "\fBload\fR \fIfilename\fR"
|
|
|
|
Program the device under test using the binary file supplied. This
|
|
|
|
command is like \fBprog\fR, but it does not load symbols or erase
|
|
|
|
the device before programming.
|
|
|
|
|
2012-08-29 10:38:13 +00:00
|
|
|
The CPU is reset and halted before and after programming.
|
|
|
|
.IP "\fBload_raw\fR \fIfilename\fR \fIaddress\fR"
|
|
|
|
Write the data contained in a raw binary file to the given memory address.
|
|
|
|
|
2010-09-12 23:27:11 +00:00
|
|
|
The CPU is reset and halted before and after programming.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBmd\fR \fIaddress\fR [\fIlength\fR]"
|
2010-03-18 01:02:05 +00:00
|
|
|
Read the specified section of device memory and display it as a
|
|
|
|
canonical\-style hexdump. Both arguments may be address expressions. If
|
|
|
|
no length is specified, a section of the default length (64 bytes) is
|
|
|
|
shown.
|
|
|
|
|
|
|
|
The output is split into three columns. The first column shows the
|
|
|
|
starting address for the line. The second column lists the hexadecimal
|
|
|
|
values of the bytes. The final column shows the ASCII characters
|
|
|
|
corresponding to printable bytes, and . for non-printing characters.
|
2010-10-11 23:48:25 +00:00
|
|
|
|
|
|
|
This command supports repeat execution. If repeated, it continues to
|
|
|
|
print another block of memory following that last printed.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBmw\fR \fIaddress\fR \fIbytes\fR ..."
|
2010-03-23 02:05:37 +00:00
|
|
|
Write a sequence of bytes at the given memory address. The address given
|
|
|
|
may be an address expression. Bytes values are two-digit hexadecimal
|
|
|
|
numbers separated by spaces.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBopt\fR [\fIname\fR] [\fIvalue\fR]"
|
|
|
|
Query, set or list option variables. MSPDebug's behaviour can be configured
|
|
|
|
using option variables, described below in the section \fBOPTIONS\fR.
|
|
|
|
|
|
|
|
Option variables may be of three types: boolean, numeric or text. Numeric
|
|
|
|
values may be specified as address expressions.
|
|
|
|
|
|
|
|
With no arguments, this command displays all available option variables.
|
|
|
|
With just an option name as its argument, it displays the current value
|
|
|
|
of that option.
|
2012-10-03 23:59:52 +00:00
|
|
|
.IP "\fBpower info\fR"
|
|
|
|
Show basic power statistics gathered over the last few sessions. This
|
|
|
|
includes total charge consumption, run time and average current.
|
|
|
|
.IP "\fBpower clear\fR"
|
|
|
|
Clear all recorded power statistics.
|
|
|
|
.IP "\fBpower all\fR [\fIgranularity\fR]"
|
|
|
|
Show sample data gathered over all sessions. An optional granularity can
|
|
|
|
be specified, in microseconds. For each time slice, relative session time,
|
|
|
|
charge consumption, current consumption and approximate code location are
|
|
|
|
shown.
|
|
|
|
.IP "\fBpower session\fR \fIN\fR [\fIgranularity\fR]"
|
|
|
|
Same as \fBpower all\fR, except that data is shown only for the \fIN\fRth
|
|
|
|
session.
|
|
|
|
.IP "\fBpower export-csv\fR \fIN\fR \fIfilename\fR"
|
|
|
|
Export raw sample data for the \fIN\fRth session to the given file in CSV
|
|
|
|
format. For each line, the columns are, in order: relative time in
|
|
|
|
microseconds, current consumption in microamps, memory address.
|
|
|
|
.IP "\fBpower profile\fR"
|
|
|
|
If a symbol table is loaded, compile and correlate all gathered power data
|
|
|
|
against the symbol table. A single table is then shown listing, per function,
|
|
|
|
charge consumption, run time and average current. The functions are listed
|
|
|
|
in order of charge consumption (biggest consumers first).
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBprog\fR \fIfilename\fR"
|
2010-03-18 01:02:05 +00:00
|
|
|
Erase and reprogram the device under test using the binary file
|
2010-09-12 23:27:11 +00:00
|
|
|
supplied. The file format will be auto-detected and may be any of
|
|
|
|
the supported file formats.
|
2010-03-18 01:02:05 +00:00
|
|
|
|
2010-09-12 23:27:11 +00:00
|
|
|
In the case of a file containing symbols, symbols will be automatically
|
|
|
|
loaded from the file into the symbol table (discarding any existing
|
|
|
|
symbols), if they are present.
|
2010-03-18 01:02:05 +00:00
|
|
|
|
2010-03-23 01:53:42 +00:00
|
|
|
The CPU is reset and halted before and after programming.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBread\fR \fIfilename\fR"
|
2010-03-23 02:31:58 +00:00
|
|
|
Read commands from the given file, line by line and process each one.
|
|
|
|
Any lines whose first non-space character is \fB#\fR are ignored. If
|
|
|
|
an error occurs while processing a command, the rest of the file is not
|
|
|
|
processed.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBregs\fR"
|
2010-03-18 01:02:05 +00:00
|
|
|
Show the current value of all CPU registers in the device under test.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBreset\fR"
|
2010-03-18 01:02:05 +00:00
|
|
|
Reset (and halt) the CPU of the device under test.
|
2010-07-02 02:22:52 +00:00
|
|
|
.IP "\fBrun\fR"
|
|
|
|
Start running the CPU. The interactive command prompt is blocked when
|
|
|
|
the CPU is started and the prompt will not appear again until the CPU
|
|
|
|
halts. The CPU will halt if it encounters a breakpoint, or if Ctrl\-C
|
|
|
|
is pressed by the user.
|
2010-03-18 01:02:05 +00:00
|
|
|
|
|
|
|
After the CPU halts, the current register values are shown as well as
|
|
|
|
a disassembly of the first few instructions at the address selected
|
|
|
|
by the program counter.
|
2012-08-29 10:38:13 +00:00
|
|
|
.IP "\fBsave_raw\fR \fIaddress\fR \fIlength\fR \fIfilename\fR"
|
|
|
|
Save a region of memory to a raw binary file. The address and length
|
|
|
|
arguments may both be address expressions.
|
|
|
|
|
|
|
|
If the specified file already exists, then it will be overwritten.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBset\fR \fIregister\fR \fIvalue\fR"
|
2010-03-18 01:02:05 +00:00
|
|
|
Alter the value of a register. Registers are specified as numbers from
|
|
|
|
0 through 15. Any leading non-numeric characters are ignored (so a
|
|
|
|
register may be specified as, for example, "R12"). The value argument
|
|
|
|
is an address expression.
|
2010-07-02 02:22:52 +00:00
|
|
|
.IP "\fBsetbreak\fR \fIaddress\fR [\fIindex\fR]"
|
|
|
|
Add a new breakpoint. The breakpoint location is an address expression. An
|
|
|
|
optional index may be specified, indicating that this new breakpoint should
|
|
|
|
overwrite an existing slot. If no index is specified, then the breakpoint
|
|
|
|
will be stored in the next unused slot.
|
2012-04-25 00:43:14 +00:00
|
|
|
.IP "\fBsetwatch\fR \fIaddress\fR [\fIindex\fR]"
|
|
|
|
Add a new watchpoint. The watchpoint location is an address expression, and
|
|
|
|
an optional index may be specified. Watchpoints are considered to be a type
|
|
|
|
of breakpoint and can be inspected or removed using the \fBbreak\fR and
|
|
|
|
\fBdelbreak\fR commands. Note that not all drivers support watchpoints.
|
2012-04-25 02:10:26 +00:00
|
|
|
.IP "\fBsetwatch_r\fR \fIaddress\fR [\fIindex\fR]"
|
|
|
|
Add a watchpoint which is triggered only on read access.
|
|
|
|
.IP "\fBsetwatch_w\fR \fIaddress\fR [\fIindex\fR]"
|
|
|
|
Add a watchpoint which is triggered only on write access.
|
2011-03-10 22:38:23 +00:00
|
|
|
.IP "\fBsimio add\fR \fIclass\fR \fIname\fR [\fIargs ...\fR]"
|
|
|
|
Add a new peripheral to the IO simulator. The \fIclass\fR parameter may be
|
|
|
|
any of the peripheral types named in the output of the \fBsimio classes\fR
|
|
|
|
command. The \fIname\fR parameter is a unique name assigned by the user to
|
|
|
|
this peripheral instance, and is used with other commands to refer to this
|
|
|
|
instance of the peripheral.
|
|
|
|
|
|
|
|
Some peripheral classes take arguments upon creation. These are documented
|
|
|
|
in the output to the \fBsimio help\fR command.
|
|
|
|
.IP "\fBsimio classes\fR"
|
|
|
|
List the names of the different types of peripherals which may be added to
|
|
|
|
the simulator. You can use the \fBsimio help\fR command to obtain more
|
|
|
|
information about each peripheral type.
|
|
|
|
.IP "\fBsimio config\fR \fIname\fR \fIparam\fR [\fIargs ...\fR]"
|
|
|
|
Configure or perform some action on a peripheral instance. The \fIparam\fR
|
|
|
|
argument is specific to the peripheral type. A list of valid configuration
|
|
|
|
commands can be obtained by using the \fBsimio help\fR command.
|
|
|
|
.IP "\fBsimio del\fR \fIname\fR"
|
|
|
|
Remove a previously added peripheral instance. The \fIname\fR argument
|
|
|
|
should be the name of the peripheral that was assigned with the
|
|
|
|
\fBsimio add\fR command.
|
|
|
|
.IP "\fBsimio devices\fR"
|
|
|
|
List all peripheral instances currently attached to the simulator, along
|
|
|
|
with their types and interrupt status. You can obtain more detailed
|
|
|
|
information for each instance with the \fBsimio info\fR command.
|
|
|
|
.IP "\fBsimio help\fR \fIclass\fR"
|
|
|
|
Obtain more information about a peripheral class. The documentation
|
|
|
|
given will list constructor arguments and configuration parameters for
|
|
|
|
the device type.
|
|
|
|
.IP "\fBsimio info\fR \fIname\fR"
|
|
|
|
Display detailed status information for a particular peripheral. The type
|
|
|
|
of information displayed is specific to each type of peripheral.
|
2011-04-04 05:34:06 +00:00
|
|
|
.IP "\fBstep\fR [\fIcount\fR]"
|
|
|
|
Step the CPU through one or more instructions. After stepping, the new
|
|
|
|
register values are displayed, as well as a disassembly of the
|
|
|
|
instructions at the address selected by the program counter.
|
|
|
|
|
|
|
|
An optional count can be specified to step multiple times. If no
|
|
|
|
argument is given, the CPU steps once. This command supports repeat
|
|
|
|
execution.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBsym clear\fR"
|
2010-03-27 10:47:17 +00:00
|
|
|
Clear the symbol table, deleting all symbols.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBsym set\fR \fIname\fR \fIvalue\fR"
|
2010-03-27 10:47:17 +00:00
|
|
|
Set or alter the value of a symbol. The value given may be an address
|
|
|
|
expression.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBsym del\fR \fIname\fR"
|
2010-03-27 10:47:17 +00:00
|
|
|
Delete the given symbol from the symbol table.
|
2010-03-31 06:39:02 +00:00
|
|
|
.IP "\fBsym import\fR \fIfilename\fR"
|
2010-03-18 01:02:05 +00:00
|
|
|
Load symbols from the specified file and add them to the symbol table.
|
|
|
|
The file format will be auto-detected and may be either ELF32 or a
|
|
|
|
BSD-style symbol listing (like the output from \fBnm\fR(1)).
|
|
|
|
|
|
|
|
Symbols can be combined from many sources, as the syms command adds
|
|
|
|
to the existing symbol table without discarding existing symbols.
|
2010-03-31 06:39:02 +00:00
|
|
|
.IP "\fBsym import+\fR \fIfilename\fR"
|
|
|
|
This command is similar to \fBsym import\fR, except that the symbol table
|
2010-03-27 10:47:17 +00:00
|
|
|
is not cleared first. By using this command, symbols from multiple
|
|
|
|
sources can be combined.
|
2010-03-31 06:39:02 +00:00
|
|
|
.IP "\fBsym export\fR \fIfilename\fR"
|
2010-03-27 10:47:17 +00:00
|
|
|
Save all symbols currently defined to the given file. The symbols are
|
|
|
|
saved as a BSD-style symbol table. Note that symbol types are not stored
|
|
|
|
by MSPDebug, and all symbols are saved as type \fBt\fR.
|
2010-03-30 00:55:35 +00:00
|
|
|
.IP "\fBsym find\fR [\fIregex\fR]"
|
2010-03-27 10:47:17 +00:00
|
|
|
Search for symbols. If a regular expression is given, then all symbols
|
|
|
|
matching the expression are printed. If no expression is specified, then
|
|
|
|
the entire symbol table is listed.
|
2010-03-31 07:40:46 +00:00
|
|
|
.IP "\fBsym rename\fR \fIregex\fR \fIstring\fR"
|
|
|
|
Rename symbols by searching for those matching the given regular
|
|
|
|
expression and substituting the given string for the matched portion. The
|
|
|
|
symbols renamed are displayed, as well as a total count of all symbols
|
|
|
|
renamed.
|
2012-07-18 02:03:55 +00:00
|
|
|
.IP "\fBverify \fIfilename\fR"
|
|
|
|
Compare the contents of the given binary file to the chip memory. If any
|
|
|
|
differences are found, a message is printed for the first mismatched
|
|
|
|
byte.
|
2012-08-29 10:38:13 +00:00
|
|
|
.IP "\fBverify_raw \fIfilename\fR \fIaddress\fR"
|
|
|
|
Compare the contents of a raw binary file to the device memory at the given
|
|
|
|
address. If any differences are found, a message is printed for the first
|
|
|
|
mismatched byte.
|
2011-03-15 02:26:23 +00:00
|
|
|
.SH BINARY FORMATS
|
|
|
|
The following binary/symbol formats are supported by MSPDebug:
|
|
|
|
|
|
|
|
.RS
|
|
|
|
ELF32
|
|
|
|
.br
|
|
|
|
COFF
|
|
|
|
.br
|
|
|
|
Intel HEX (program only)
|
|
|
|
.br
|
|
|
|
BSD symbol table (symbols only)
|
|
|
|
.br
|
|
|
|
TI Text (program only)
|
|
|
|
.br
|
|
|
|
SREC (program only)
|
|
|
|
.RE
|
2011-03-10 22:38:23 +00:00
|
|
|
.SH IO SIMULATOR
|
|
|
|
The IO simulator subsystem consists of a database of device classes, and a
|
|
|
|
list of instances of those classes. Each device class has a different
|
|
|
|
set of constructor arguments, configuration parameters and information which
|
|
|
|
may be displayed. This section describes the operation of the available
|
|
|
|
device classes in detail.
|
|
|
|
|
|
|
|
In the list below, each device class is listed, followed by its constructor
|
|
|
|
arguments.
|
2011-03-11 01:51:39 +00:00
|
|
|
.IP "\fBgpio\fR"
|
|
|
|
Digital IO port simulator. This device simulates any of the digital ports
|
|
|
|
with or without interrupt capability. It has the following configuration
|
|
|
|
parameters:
|
|
|
|
.RS
|
|
|
|
.IP "\fBbase\fR \fIaddress\fR"
|
|
|
|
Set the base address for this port. Note that for ports without interrupt
|
|
|
|
capability, the resistor enable port has a special address which is
|
|
|
|
computable from the base address.
|
|
|
|
.IP "\fBirq\fR \fIvector\fR"
|
|
|
|
Enable interrupt functionality for this port by specifying an interrupt
|
|
|
|
vector number.
|
|
|
|
.IP "\fBnoirq\fR"
|
|
|
|
Disable interrupt functionality for this port.
|
|
|
|
.IP "\fBverbose\fR"
|
|
|
|
Print a state change message every time the port output changes.
|
|
|
|
.IP "\fBquiet\fR"
|
|
|
|
Don't print anything when the port state changes (the default).
|
|
|
|
.IP "\fBset\fR \fIpin\fR \fIvalue\fR"
|
|
|
|
Set the input pin state for the given pin on this port. The \fIpin\fR
|
|
|
|
parameter should be an index between 0 and 7. The \fIvalue\fR should be
|
|
|
|
either zero (for a low state) or non-zero (for a high state).
|
|
|
|
.RE
|
2011-03-11 00:49:07 +00:00
|
|
|
.IP "\fBhwmult\fR"
|
|
|
|
This peripheral simulates the hardware multiplier. It has no constructor or
|
|
|
|
configuration parameters, and does not provide any extended information.
|
2011-03-10 22:38:23 +00:00
|
|
|
.IP "\fBtimer\fR [\fIsize\fR]"
|
|
|
|
This peripheral simulators Timer_A modules, and can be used to simulate
|
|
|
|
Timer_B modules, provided that the extended features aren't required.
|
|
|
|
|
|
|
|
The constructor takes a size argument specifying the number of capture/compare
|
|
|
|
registers in this peripheral instance. The number of such registers may not
|
|
|
|
be less than 2, or greater than 7.
|
|
|
|
|
|
|
|
The IO addresses and IRQs used are configurable. The default IO addresses used
|
|
|
|
are those specified for Timer_A in the MSP430 hardware documentation.
|
|
|
|
.RS
|
|
|
|
.IP "\fBbase\fR \fIaddress\fR"
|
|
|
|
Alter the base IO address. By default, this is 0x0160. By setting this to 0x0180,
|
|
|
|
a Timer_B module may be simulated.
|
|
|
|
.IP "\fBirq0\fR \fInumber\fR"
|
|
|
|
Set the TACCR0 interrupt vector number. By default, this is interrupt vector 9.
|
|
|
|
This interrupt is self-clearing, and higher priority than the TACCR1/TAIFG
|
|
|
|
vector.
|
|
|
|
.IP "\fBirq1\fR \fInumber\fR"
|
|
|
|
Set the TACCR1/TAIFG interrupt vector. By default, this is interrupt vector 8.
|
|
|
|
.IP "\fBiv\fR \fIaddress\fR"
|
|
|
|
Alter the address of the interrupt vector register. By default, this is 0x012E.
|
|
|
|
By setting this to 0x011E, a Timer_B module may be simulated.
|
|
|
|
.IP "\fBset\fR \fIchannel\fR \fIvalue\fR"
|
|
|
|
When Timer_A is used in capture mode, the CCI bit in each capture register reflects
|
|
|
|
the state of the corresponding input pin, and can't be altered in software. This
|
|
|
|
configuration command can be used to simulate changes in input pin state, and will
|
|
|
|
trigger the corresponding interrupts if the peripheral is so configured.
|
|
|
|
.RE
|
|
|
|
.IP "\fBtracer\fR [\fIhistory-size\fR]"
|
|
|
|
The tracer peripheral is a debugging device. It can be used to investigate
|
|
|
|
and record the IO activity of a running program, to benchmark execution time,
|
|
|
|
and to simulate interrupts.
|
|
|
|
|
|
|
|
The information displayed by the tracer gives a running count of clock cycles
|
|
|
|
from each of the system clocks, and an instruction count. A list of the \fIN\fR
|
|
|
|
most recent IO events is also displayed (this is configurable via the \fIhistory-size\fR
|
|
|
|
argument of the constructor). Each IO event is timestamped by the number of
|
|
|
|
MCLK cycles that have elapsed since the last reset of the device's counter.
|
|
|
|
|
|
|
|
The IO events that it records consist of programmed IO reads and writes,
|
|
|
|
interrupt acceptance, and system resets. As well as keeping the IO events in a
|
|
|
|
rotating buffer, the tracer can be configured to display the events as they
|
|
|
|
occur.
|
|
|
|
|
|
|
|
Note that since clock cycles don't advance while the CPU isn't running, this
|
|
|
|
peripheral can be used to calculate execution times for blocks of code. This
|
|
|
|
can be achieved by setting a breakpoint at the end of the code block, setting the
|
|
|
|
program counter to the start of the code block, clearing the tracer and running
|
|
|
|
the code. After the breakpoint is reached, the information displayed by the
|
|
|
|
tracer will contain a count of MCLK cycles elapsed during the last run.
|
|
|
|
|
|
|
|
The configuration parameters for this device class are:
|
|
|
|
.RS
|
|
|
|
.IP "\fBverbose\fR"
|
|
|
|
Start displaying IO events as they occur, as well as recording them in the
|
|
|
|
rotating buffer.
|
|
|
|
.IP "\fBquiet\fR"
|
|
|
|
Stop displaying IO events as they occur, and just record them in the buffer.
|
|
|
|
.IP "\fBtrigger\fR \fIirq\fR"
|
|
|
|
Signal an interrupt request to the CPU. This request will remain raised until
|
|
|
|
accepted by the CPU or cleared by the user.
|
|
|
|
.IP "\fBuntrigger\fR"
|
|
|
|
Clear a signalled interrupt request.
|
|
|
|
.IP "\fBclear\fR"
|
|
|
|
Reset the clock cycle and instruction counts to 0, and clear the IO event
|
|
|
|
history.
|
|
|
|
.RE
|
2011-03-11 00:18:03 +00:00
|
|
|
.IP "\fBwdt\fR"
|
|
|
|
This peripheral simulates the Watchdog Timer+, which can be used in software
|
|
|
|
either as a watchdog or as an interval timer. It has no constructor arguments.
|
|
|
|
|
|
|
|
The simulated state of the NMI/RST# pin can be controlled through a configuration
|
|
|
|
parameter. Note that if this pin state is held low with the pin mode selected
|
|
|
|
as a reset (the default), the CPU will not run.
|
|
|
|
|
|
|
|
The extended information for this peripheral shows all register states, including
|
|
|
|
the hidden counter register. Configuration parameters are:
|
|
|
|
.RS
|
|
|
|
.IP "\fBnmi\fR \fIstate\fR"
|
|
|
|
Set the NMI/RST# pin state. The argument should be zero to indicate a low state
|
|
|
|
or non-zero for a high state.
|
|
|
|
.IP "\fBirq\fR \fIirq\fR"
|
|
|
|
Select the interrupt vector for interval timer mode. The default is to use
|
|
|
|
interrupt vector 10.
|
2010-03-18 01:02:05 +00:00
|
|
|
.SH ADDRESS EXPRESSIONS
|
|
|
|
Any command which accepts a memory address, length or register value
|
|
|
|
as an argument may be given an address expression. An address
|
2010-04-10 00:25:01 +00:00
|
|
|
expression consists of an algebraic combination of values.
|
2010-03-18 01:02:05 +00:00
|
|
|
|
2016-01-21 17:35:52 +00:00
|
|
|
An address value can be one of the following:
|
|
|
|
.RS
|
|
|
|
A symbol name
|
|
|
|
.br
|
|
|
|
A CPU register name preceded with "@"
|
|
|
|
.br
|
|
|
|
A hex value preceded with the specifier "0x"
|
|
|
|
.br
|
|
|
|
A decimal value preceded with the specifier "0d"
|
|
|
|
.br
|
|
|
|
A number in the default input radix (without a specifier). See the option
|
|
|
|
\fBiradix\fR for more information.
|
|
|
|
.RE
|
2010-03-18 01:02:05 +00:00
|
|
|
|
2010-04-10 00:25:01 +00:00
|
|
|
The operators recognised are the usual algebraic operators: \fB+\fR, \fB-\fR,
|
|
|
|
\fB*\fR, \fB/\fR, \fB%\fR, \fB(\fR and \fB)\fR. Operator precedence is the
|
|
|
|
same as in C-like languages, and the \fB-\fR operator may be used as a
|
|
|
|
unary negation operator.
|
|
|
|
|
2010-03-18 01:02:05 +00:00
|
|
|
The following are all valid examples of address expressions:
|
|
|
|
|
2010-04-10 00:25:01 +00:00
|
|
|
.B 2+2
|
2010-03-18 01:02:05 +00:00
|
|
|
.br
|
2010-04-10 00:25:01 +00:00
|
|
|
.B table_start + (elem_size + elem_pad)*4
|
2010-03-18 01:02:05 +00:00
|
|
|
.br
|
|
|
|
.B main+0x3f
|
|
|
|
.br
|
|
|
|
.B __bss_end-__bss_start
|
2016-01-21 17:35:52 +00:00
|
|
|
.br
|
|
|
|
.B @sp
|
2010-03-30 00:55:35 +00:00
|
|
|
.SH OPTIONS
|
|
|
|
MSPDebug's behaviour can be configured via the following variables:
|
|
|
|
.IP "\fBcolor\fR (boolean)"
|
2010-04-10 04:41:57 +00:00
|
|
|
If true, MSPDebug will colorize debugging output.
|
2011-02-20 22:30:32 +00:00
|
|
|
.IP "\fBfet_block_size\fR (numeric)"
|
|
|
|
Change the size of the buffer used to transfer memory to and from the
|
|
|
|
FET. Increasing the value from the default of 64 will improve transfer
|
|
|
|
speed, but may cause problems with some chips.
|
2013-01-31 00:54:19 +00:00
|
|
|
.IP "\fBenable_bsl_access\fR (boolean)"
|
|
|
|
If set, some drivers will allow erase/program access to flash
|
|
|
|
BSL memory. If in doubt, do not enable this.
|
|
|
|
.IP "\fBenable_locked_flash_access\fR (boolean)"
|
|
|
|
If set, some drivers will allow erase/program access to the info A
|
|
|
|
segment. If in doubt, do not enable this. Currently, the tilib and uif
|
|
|
|
drivers are affected by this option.
|
2013-12-02 18:27:13 +00:00
|
|
|
.IP "\fBenable_fuse_blow\fR"
|
|
|
|
If set, some drivers will allow the JTAG security fuse to be blown.
|
|
|
|
|
|
|
|
.B WARNING: this is an irreversible operation!
|
|
|
|
|
|
|
|
If in doubt, do not enable this option.
|
2013-04-21 22:29:30 +00:00
|
|
|
.IP "\fBgdb_default_port\fR (numeric)"
|
|
|
|
This option controls the default TCP port for the GDB server, if no
|
|
|
|
argument is given to the "\fBgdb\fR" command.
|
2010-06-15 02:51:12 +00:00
|
|
|
.IP "\fBgdb_loop\fR (boolean)"
|
|
|
|
Automatically restart the GDB server after disconnection. If this
|
|
|
|
option is set, then the GDB server keeps running until an error occurs,
|
|
|
|
or the user interrupts with Ctrl+C.
|
2011-06-06 03:47:52 +00:00
|
|
|
.IP "\fBgdbc_xfer_size\fR (numeric)"
|
|
|
|
Maximum size of memory transfers for the GDB client. Increasing this
|
|
|
|
value will result in faster transfers, but may cause problems with some
|
|
|
|
servers.
|
2010-10-11 22:26:36 +00:00
|
|
|
.IP "\fBiradix\fR (numeric)"
|
|
|
|
Default input radix for address expressions. For address values with
|
|
|
|
no radix specifier, this value gives the input radix, which is
|
|
|
|
10 (decimal) by default.
|
2010-08-31 03:50:00 +00:00
|
|
|
.IP "\fBquiet\fR (boolean)"
|
|
|
|
If set, MSPDebug will supress most of its debug-related output. This option
|
|
|
|
defaults to false, but can be set true on start-up using the \fB-q\fR
|
|
|
|
command-line option.
|
2011-09-16 04:09:03 +00:00
|
|
|
.SH ENVIRONMENT
|
|
|
|
.IP "\fBMSPDEBUG_TI3410_FW\fI"
|
|
|
|
Specifies the location of TI3410 firmware, for raw USB access to FET430UIF
|
|
|
|
or eZ430 devices. This variable should contain the path to an Intel HEX
|
|
|
|
file containing suitable firmware for the TI3410.
|
|
|
|
.SH FILES
|
|
|
|
.IP "~/.mspdebug"
|
|
|
|
File containing commands to be executed on startup.
|
|
|
|
.IP "ti_3410.fw.ihex"
|
|
|
|
Firmware image for the TI3410 USB interface chip. This file is only
|
|
|
|
required for raw USB access to FET430UIF or eZ430 devices.
|
2011-04-04 05:34:06 +00:00
|
|
|
.SH SEE ALSO
|
|
|
|
\fBnm\fR(1), \fBgdb\fR(1), \fBobjcopy\fR(1)
|
2010-03-18 01:02:05 +00:00
|
|
|
.SH BUGS
|
|
|
|
If you find any bugs, you should report them to the author at
|
2011-02-06 22:55:24 +00:00
|
|
|
dlbeer@gmail.com. It would help if you could include a transcript
|
2010-03-18 01:02:05 +00:00
|
|
|
of an MSPDebug session illustrating the program, as well as any
|
2011-04-04 05:34:06 +00:00
|
|
|
relevant binaries or other files.
|
2010-03-18 01:02:05 +00:00
|
|
|
.SH COPYRIGHT
|
2013-07-18 00:23:02 +00:00
|
|
|
Copyright (C) 2009-2013 Daniel Beer <dlbeer@gmail.com>
|
2010-03-18 01:02:05 +00:00
|
|
|
|
|
|
|
MSPDebug is free software, distributed under the terms of the GNU
|
|
|
|
General Public license (version 2 or later). See the file COPYING
|
|
|
|
included with the source code for more details.
|