Hi,
Since I started programming for MSP430 I've been looking for the MSP equivalent of "__asm int 3" (aka DebugBreak). I've come up with this fragment, tested on CCS 5.3.0:
#ifndef NDEBUG
// If debugger is attached and software breakpoints are enabled, DEBUG_BREAK will pause execution
#define DEBUG_BREAK _op_code(0x4343)
#else
// Strip out DEBUG_BREAKs in final/release builds
#define DEBUG_BREAK
#endif
Put this in a header file and you can then embed breakpoints in your code with a DEBUG_BREAK; statement. To reiterate what it says in the comment above: DEBUG_BREAK onl