diff --git a/src/main/common/log.c b/src/main/common/log.c index 20faa4a53db..49eb5a8b985 100644 --- a/src/main/common/log.c +++ b/src/main/common/log.c @@ -20,11 +20,12 @@ #include #include -#if defined(SEMIHOSTING) +#if defined(SEMIHOSTING) || defined(SITL_BUILD) #include #endif #include "build/version.h" +#include "build/debug.h" #include "drivers/serial.h" #include "drivers/time.h" @@ -125,6 +126,7 @@ static void logPrint(const char *buf, size_t size) fputc(buf[ii], stdout); } #endif + SD(printf("%s\n", buf)); if (logPort) { // Send data via UART (if configured & connected - a safeguard against zombie VCP) if (serialIsConnected(logPort)) {