| ||||||||
Technical Support Support Resources Product Information | µVISION DEBUGGER: ARGUMENT INVALID WHEN USING DEBUGGER FUNCTInformation in this article applies to:
QUESTIONI'm having trouble using debugger functions with printf. In my C program, I create a global string:
char tststring[25] ={"Test string\0"};
In the debugger, I create a debug function to print this string:
FUNC void string(void)
{
printf (" %s\n",tststring);
}
The debugger gives me the following error message: printf: argument 2 invalid What's wrong with my debug function? ANSWERYou cannot use variables from your C program in debug functions that way. Additionally, debug functions do not support structures, arrays, or pointers. A C string is an array of characters, so it isn't supported. MORE INFORMATION
Last Reviewed: Tuesday, June 29, 2004 | |||||||
| ||||||||