From a0d4bdf731c3d77ab6235cfecf07b268569505ce Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Tue, 12 Oct 2021 09:08:15 -0500 Subject: [PATCH] fix pico_set_printf_implementation(TARGET compiler) (#593) --- src/rp2_common/pico_runtime/runtime.c | 6 ++++++ src/rp2_common/pico_stdio/stdio.c | 2 ++ 2 files changed, 8 insertions(+) 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"