Prepare for debug
Prior to start debugging, one must start the msp430 jtag proxy
program. This utility can be found in windows' start menu, under
msp430gcc. But it is more convenient to create a capability to start
this from eclipse. How to arrange this?
From the run menu select "External Tools" and here enter
the new button below:

Enter or browse to the location of the proxy program, under windows
normally as given in the screenshot above, but without path
specification is allowable when the environment variable is set correspondingly.
Further set Arguments as shown in the screenshot: --port=3333 msp430.
Give this tool entry a name (e.g. MSP430 proxy) and close this window
(or run the tool immediately). The console window of eclipse informs
about the status of GDBproxy.

Repeat this procedure for the GIVEIO utility. Here the Working
Directory MUST be specified. Giveio is required with Windows 2000 or
XP in order to ensure that the parallel port is reserved for this
application. This little convenience is related to the platform
independent nature of mspgcc. You may have noted that the mspgcc
installation was finished with this install_giveio utility.
Both tools can be invoked by means of a single click from the eclipse
menu. One must activate these utilities only each first time a debug
session is started. To be honest it must be noted here that the
gdb-debug interface with MSP430 is prone to spurious hang-ups. The
pod interface is not really more reliable than CCE's interface.
Now start the proxy! From this dialog you can click the return
button. The console window in the bottom part of the eclipse
environment should show the following message:

When the message "msp430: Could not initialize device interface
(1)" appears, then giveio is not installed. Activate
this, and then start the proxy again. It is important to memorize how
to close the proxy: click the red square right. It will be
necessary to restart the proxy when the debugger hangs (lin the next
section, an alternative terminate method will be shown).
Setting up for starting a Debug Session
Prior to starting a debug session, the debug environment must be set
up. In the run menu, enter "Debug...". The following dialog
in a simpler makup as shown here appears: Click "embedded debug
launch" and then the new button below. Now an extended
version of this dialog box appears, just as shown here.

Choose the project (via the Browse... button) this debug set is to be
associated with, and also enter the name of the build output file, at
least with path relative to the sources of the project.
Further manual entries:

Specify the GDB debugger executable (with or without path). As a
personal preference you should decide if the target execution shall
halt at main(). Such is implied with double start action. I
personally uncheck this feature.
In the tab next, enter following command lines:

Here these lines are repeated to serve pasting in your eclipse environment: set remoteaddresssize 64 set remotetimeout 999999 target remote localhost:3333 set download-write-size 2000 set remote memory-write-packet-size 2000 set remote memory-write-packet-size fixed set remote memory-read-packet-size 2000 set remote memory-read-packet-size fixed monitor erase all load debug/msp430demo.elf
Remote localhost is the proxy's ID, which defaults to 3333. Not
necessary, but interesting are 5 lines with size specifications for
download and remote - which may be omitted. I don't know their exact
effect, but specifying the given sizes as high as possible (max.: RAM
limit of the derivative used) may considerably speed up download and
flash timing when a debug iteration step is entered. Feel free to
experiment it. The idea of size specification comes from homepage.hispeed.ch/py430/mspgcc/index.html.
For situations where information memory must be retained, specify monitor
erase main.
Finally take care of the proper name of the build output file.
Now, all necessary preparations are done, and a debug session can be started. |