The debug capabilities that CrossWorks for MSP430 provides are implemented using the MSP430 Enhanced Emulation Module (EEM). At the time of writing slaa393 is the only publically available document that details the capabilities of the EEM. You should refer to this document if you want to know about the debug capabilities of a particular device.

Software Breakpoints

The Connection section of the target properties window has the Implement Software Breakpoints property. If this property is set to Yes 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 you want execution to break at. 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 using EEM triggers. Breakpoint expressions provide a simple interface for setting complex breakpoints. Additionally using the breakpoint dialog(s) 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 or stored into the storage block by setting their breakpoint property Action to be 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 in the window and selecting Refresh.

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 the 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 then you need to assign the approprate 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 then you should disable software breakpoints.

EEM Trigger Sequencer

The EEM trigger seqeuencer enables EEM combination triggers 4-7 to be used as inputs to the trigger seqeuencer 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 seqeuencer 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 seqeuencer 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 Clock Control dialog from the Debug | Control | Clock Control menu to specify the clock behaviour when the CPU stops on a breakpoint. The desired clock control settings are programmed when you start debugging they cannot be changed when you are debugging. The settings that are reported by the Clock Control dialog are specific to a particular device.

slaa393 examples.
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 stackpointer is written with a value less that 0x09A0.

Break on Write to Flash

Using the New Data Breakpoint dialog the breakpoint expression (char[0xF000])0x1000 and set 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 the breakpoint expression (char[0x400])0x0C00 and set 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 the breakpoint expression !(char[0xF000])0x1000 and set the "Breakpoint Trigger Type" to "IFetch" will break when a fetch is made from outside of flash memory.