diff options
author | robert-hh <robert@hammelrath.com> | 2023-03-18 08:06:43 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-03-20 22:33:45 +1100 |
commit | 711bac511e547096fe1e58af3ba70d31b244731f (patch) | |
tree | 0e0e8ed962f5f207cc0b35c82e9a20c69ff7c505 | |
parent | be686e634eede19f33612122d7254007a3d72bd0 (diff) | |
download | micropython-711bac511e547096fe1e58af3ba70d31b244731f.tar.gz micropython-711bac511e547096fe1e58af3ba70d31b244731f.zip |
rp2/main: Keep UART REPL with DEBUG=1 and MICROPY_HW_ENABLE_UART_REPL=1.
For builds with DEBUG=1 and MICROPY_HW_ENABLE_UART_REPL=1, calling
stdio_init_all() in main() detaches the UART input from REPL. This change
suppresses calling stdio_init_all() then.
-rw-r--r-- | ports/rp2/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/rp2/main.c b/ports/rp2/main.c index afc22aee72..9e69d159e1 100644 --- a/ports/rp2/main.c +++ b/ports/rp2/main.c @@ -76,6 +76,10 @@ int main(int argc, char **argv) { bi_decl(bi_program_feature("UART REPL")) setup_default_uart(); mp_uart_init(); + #else + #ifndef NDEBUG + stdio_init_all(); + #endif #endif #if MICROPY_HW_ENABLE_USBDEV @@ -90,10 +94,6 @@ int main(int argc, char **argv) { mp_thread_init(); #endif - #ifndef NDEBUG - stdio_init_all(); - #endif - // Start and initialise the RTC datetime_t t = { .year = 2021, |