fix pico_set_printf_implementation(TARGET compiler) (#593)
diff --git a/src/rp2_common/pico_runtime/runtime.c b/src/rp2_common/pico_runtime/runtime.c
index 6628934..06526b7 100644
--- a/src/rp2_common/pico_runtime/runtime.c
+++ b/src/rp2_common/pico_runtime/runtime.c
@@ -20,7 +20,13 @@
#include "pico/mutex.h"
#include "pico/time.h"
+
+#if LIB_PICO_PRINTF_PICO
#include "pico/printf.h"
+#else
+#define weak_raw_printf printf
+#define weak_raw_vprintf vprintf
+#endif
#if PICO_ENTER_USB_BOOT_ON_EXIT
#include "pico/bootrom.h"
diff --git a/src/rp2_common/pico_stdio/stdio.c b/src/rp2_common/pico_stdio/stdio.c
index 8dd7257..b457b8a 100644
--- a/src/rp2_common/pico_stdio/stdio.c
+++ b/src/rp2_common/pico_stdio/stdio.c
@@ -10,7 +10,9 @@
#include "pico.h"
#include "pico/mutex.h"
+#if LIB_PICO_PRINTF_PICO
#include "pico/printf.h"
+#endif
#include "pico/stdio.h"
#include "pico/stdio/driver.h"
#include "pico/time.h"