Hi Alice
You never came back and answered Mark on his question.
I have a similar problem, and would like to get printfs working for debugging.
I'm using the following tools and SDK for development.
KDS V3.2
KSDK 1.3
MQX 5.0
In the fsl_platform_common.h there is the following definition of a debug printf
#define debug_printf(x, ...) do {} while (false)
Obviously this does nothing as it simply loops forever. The only call to this method is from main, which has after bootloader_run();
debug_printf("Warning: reached end of main()\r\n");
There is also this definition...
#if (defined(DEBUG) || defined(_DEBUG)) && !defined(DEBUG_PRINT_DISABLE)
static inline void debug_printf(const char * format, ...);
//! @brief Debug print utility.
//!
//! This print function will only output text when the @a DEBUG macro is defined.
static inline void debug_printf(const char * format, ...)
{
va_list args;
va_start(args, format);
vprintf(format, args);
// Temporarily disable MISRA rule 14.2
#if defined(__ICCARM__)
#pragma diag_suppress=Pm049
#endif
va_end(args);
#if defined(__ICCARM__)
#pragma diag_default=Pm049
#endif
}
#else // (DEBUG || _DEBUG) && !DEBUG_PRINT_DISABLE
What is the @a DEBUG? and if I define my own DEBUG will debug_printf become operational?
How is the UART setup for printfs?
Regards
Jerome