A target interface is a mechanism for communicating with, and controlling, a target. A target can be either a physical hardware device or a software simulation of a device. CrossStudio has a Targets window for viewing and manipulating target interfaces. For more information, see Targets window.

Before you can use a target interface, you must connect to it. You can only connect to one target interface at a time. For more information, see Connecting to a target.

All target interfaces have a set of properties. The properties provide information on the connected target and allow the target interface to be configured. For more information, see Viewing and editing target properties.

MSP430 Debug Capabilities

The debug capabilities provided by CrossWorks for MSP430 are implemented using the MSP430 Enhanced Emulation Module (EEM). At the time of this writing, SLAA393 is the only publicly available document that details the capabilities of the EEM. Refer to this document to learn about the debug capabilities of a particular device.

Software breakpoints

If the project property Implement Software Breakpoints is set to Yes when the target is connected then the opcode 0x4343 (mov.b r3, r3) is treated as a software-breakpoint instruction and, as such, when you set a code breakpoint, this opcode is written to the address at which you want execution to break. Using this feature provides an unlimited number of code breakpoints but will use one hardware breakpoint (EEM combination trigger) to implement the software breakpoint.

EEM triggers

CrossWorks for MSP430 implements breakpoint expressions (see Breakpoint expressions) using EEM triggers. Breakpoint expressions provide a simple interface for setting complex breakpoints. Additionally, using the breakpoint dialogs and breakpoint property window with CrossWorks for MSP430, you can specify…

EEM state storage

The Debug > Control > State Storage Control dialog allows you to configure the state-storage block of the EEM, and the Debug > Debug Windows > EEM State Storage window allows you to see the contents of the EEM-state-storage block. You can specify that breakpoints are to be used for state-storage control and are stored into the storage block by setting their breakpoint property Action to Trace. To implement a real-time trace on a variable, you can set a data breakpoint on a variable with the breakpoint property Action set to Trace, and set the state storage control to Store Mode: Triggers. You can refresh the EEM State Storage window without stopping the processor by right-clicking the window and choosing Refresh from the shortcut menu.

Variable watch (MSP430F5xx only)

On MSP430F5xx devices, you can configure the state-storage block to store variable values to fixed EEM storage locations and do instruction tracing with the remaining storage locations. For example, you can set state-storage locations 0 and 1 to contain the data-watch values corresponding to the EEM combination triggers 0 and 1. If you want to do this, you need to assign the appropriate EEM trigger combination number to the data breakpoint. Note that the EEM combination trigger number 0 is used to implement software breakpoints so, if you want to use this feature, you should disable software breakpoints.

EEM trigger sequencer

The EEM trigger sequencer enables EEM combination triggers 4–7 to be used as inputs to the trigger sequencer and, optionally, the EEM combination trigger 3 to be used to reset the trigger sequencer. The breakpoints you want as inputs to the sequencer should have the EEM combination trigger numbers 4–7 assigned to them and should have the breakpoint property Action set to Sequencer. You can set up the trigger sequencer using the Debug > Control > Sequencer Control dialog, and you can use the Debug > Debug Windows > EEM Trigger Sequencer window to see the current state of the trigger sequencer. The trigger sequencer starts in State0 and executes the specified action when it enters State3. On each state, there can be two transitions (A and B) to any of the other states.

Clock control

When you are connected to a target, you can use the ClockControl} dialog—from the Debug > Control > Clock Control menu—to specify the clock behavior when the CPU stops on a breakpoint. The desired clock-control settings are programmed when you start debugging, they cannot be changed while you are debugging. The settings reported by the Clock Control dialog are specific to a particular device.

Examples from SLAA393

See SLAA393 on the TI website.

Break on write to address

Using the New Data Breakpoint dialog, the breakpoint expression wLoopCounter==50 will break when wLoopCounter is written with the value 50.

Break on Write to Register

Using the New Data Breakpoint dialog, the breakpoint expression @sp\<=0x09A0 will break when the stack pointer is written with a value less than 0x09A0.

Break on Write to Flash

Using the New Data Breakpoint dialog, entering the breakpoint expression (char[0xF000])0x1000 and setting the "Breakpoint Trigger Type" to "Write" will break when a write is made to flash memory.

Break on Access of Invalid Memory

Using the New Data Breakpoint dialog, entering the breakpoint expression (char[0x400])0x0C00 and setting the "Breakpoint Trigger Type" to "No IFetch" will break when an access is made to BSL memory.

Break if Fetch is Out of Allowed Area

Using the New Data Breakpoint dialog, entering the breakpoint expression !(char[0xF000])0x1000 and setting the "Breakpoint Trigger Type" to "IFetch" will break when a fetch is made from outside flash memory.

CrossConnect for MSP430
Describes the Rowley CrossConnect for MSP430 target interface. This target interface is applicable to CrossConnect for ARM when used with a suitable ARM 20-pin to MSP430 14-pin JTAG converter. The converter should map the ARM nTRST signal to the MSP430 TEST signal, and the ARM nSRST, TDI, TMS, TCK, TDO, VCC, and GND signals map to the equivalent MSP430 signals.
TI MSP430 DLL Interface
Describes the MSP430 DLL interface, which is used to connect to a variety of devices, including the TI MSP-FET430UIF and Olimex MSP430-JTAG-TINY.
MSP430 core simulator
Describes the core simulator provided by CrossStudio, which you can use to develop software without access to hardware.