Part Number: MSP430FR2433
Other Parts Discussed in Thread: ENERGYTRACE
Tool/software: TI C/C++ Compiler
Some questions and comments related to the linked post.
When assert() is called and you ARE debugging (say a Launchpad, and using the debugger, even when no breakpoints set), I find that assert() ends up pausing the target, and shows a stack trace of:
__TI_writemsg(), HOSTWrite(). fputs(), _abort_msg(), assert()
and the program counter is at this line of __TI_writemsg():
for (i = 0; i < 8; i++) PACKCHAR(*parm++, p, i);
I don't understand how that invokes the debugger, but I don't really care, as long as it breaks into the debugger as if BKPT was invoked.
What I do care about is that these functions don't have any useful effect, but they seem to drag in a lot of code such as write() and _stream from the runtime library. And they drag in many variables in the .data segment which seem to get initialized at C startup. Which very slightly skews memory sizes and power use while using EnergyTrace.
Question: if I don't care to have an abort message, is overriding the definition of _abort_msg() the conventional way? And how would I then invoke the debugger?
For a production build, I substitute an implementation of assert() that typically does a software reset.
I am testing LPM4.5, use C++, and use many assertions. Maybe that case is unusual.