I have a short function which calls debug_vprintf. This has worked in debug and release configurations for years, but now it no longer works in release mode.
Until yesterday, the result that I was getting was that when debug_vprintf was called, I'd get a message "Unrecoverable Failure. CrossStudio must close." Today, I get different results: debug_vprintf prints garbage text the first time, and the second time, I get DEV_TARGET_CMD_ERR.
I don't know when the problem started. When I rebuild old versions that I believe previously worked, I get the problems now. That suggests that I changed a (tools, options) default setting that isn't overridden by any solution or project configuration settings.
When I stripped the program down, I was able to eliminate the problem by setting the project's GCC target to elf, but that's not a solution because the full program needs -std=c++11, which seems to not work with elf targets. When the GCC target is set to EABI, I get incorrect text output, then DEV_TARGET_CMD_ERR.
It appears that debug_vprintf is getting a bad parameter that causes it to print bad text, or crash the debugger, but when I print the actual parameters with debug_printf (not debug_*v*printf), they print correctly, so I know the parameters to my function are still correct.
If I create a new nearly-empty project, debug_vprintf works in release mode, so the underlying mechanism is still intact.
Does anybody have any idea what I could have changed that is retained outside of normal *.hzp and source files, that could cause debug_vprintf to kill the entire IDE?
I'm using CrossWorks for ARM release 2.3.5 for Windows x86.
Here's my function:
void debugout(const char *msg, ...)
uint32_t _saved_primask = __get_PRIMASK();
va_start (vl, msg);
Please sign in to leave a comment.