diff options
-rw-r--r-- | firmware/debug.c | 6 | ||||
-rw-r--r-- | firmware/debug.h | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/firmware/debug.c b/firmware/debug.c index 21583cd4be..00c37cc84c 100644 --- a/firmware/debug.c +++ b/firmware/debug.c | |||
@@ -215,13 +215,9 @@ void debug_init(void) | |||
215 | 215 | ||
216 | void debugf(char *fmt, ...) | 216 | void debugf(char *fmt, ...) |
217 | { | 217 | { |
218 | #ifdef DEBUG | ||
219 | va_list ap; | 218 | va_list ap; |
220 | |||
221 | va_start( ap, fmt ); | 219 | va_start( ap, fmt ); |
222 | vsnprintf( debugmembuf, sizeof(debugmembuf), fmt, ap ); | 220 | vfprintf( stderr, fmt, ap ); |
223 | va_end( ap ); | 221 | va_end( ap ); |
224 | printf( "%s", debugmembuf ); | ||
225 | #endif | ||
226 | } | 222 | } |
227 | #endif | 223 | #endif |
diff --git a/firmware/debug.h b/firmware/debug.h index 6825566951..876b8511a6 100644 --- a/firmware/debug.h +++ b/firmware/debug.h | |||
@@ -25,7 +25,7 @@ extern void debugf(char* fmt,...); | |||
25 | #ifdef __GNUC__ | 25 | #ifdef __GNUC__ |
26 | 26 | ||
27 | /* */ | 27 | /* */ |
28 | #ifdef DEBUG | 28 | #if defined(DEBUG) || defined(SIMULATOR) |
29 | #define DEBUGF(...) debugf(__VA_ARGS__) | 29 | #define DEBUGF(...) debugf(__VA_ARGS__) |
30 | #else | 30 | #else |
31 | #define DEBUGF(...) | 31 | #define DEBUGF(...) |