+// SPDX-License-Identifier: eCos-2.0
/*
*==========================================================================
*
* RedBoot stream handler for xyzModem protocol
*
*==========================================================================
- * SPDX-License-Identifier: eCos-2.0
- *==========================================================================
*#####DESCRIPTIONBEGIN####
*
* Author(s): gthomas
}
-#ifdef DEBUG
+#if defined(DEBUG) && !defined(CONFIG_USE_TINY_PRINTF)
/*
* Note: this debug setup works by storing the strings in a fixed buffer
*/
-#define FINAL
-#ifdef FINAL
-static char *zm_out = (char *) 0x00380000;
-static char *zm_out_start = (char *) 0x00380000;
-#else
-static char zm_buf[8192];
-static char *zm_out = zm_buf;
-static char *zm_out_start = zm_buf;
+static char zm_debug_buf[8192];
+static char *zm_out = zm_debug_buf;
+static char *zm_out_start = zm_debug_buf;
-#endif
static int
-zm_dprintf (char *fmt, ...)
+zm_dprintf(char *fmt, ...)
{
- int len;
- va_list args;
-
- va_start (args, fmt);
- len = diag_vsprintf (zm_out, fmt, args);
- zm_out += len;
- return len;
+ int len;
+ va_list args;
+
+ va_start(args, fmt);
+ len = diag_vsprintf(zm_out, fmt, args);
+ va_end(args);
+ zm_out += len;
+ return len;
}
static void