We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96f5eec commit 91468edCopy full SHA for 91468ed
1 file changed
supervisor/shared/serial.c
@@ -73,6 +73,11 @@ const mp_print_t debug_uart_print = {NULL, debug_uart_print_strn};
73
74
int debug_uart_printf(const char *fmt, ...) {
75
#if defined(CIRCUITPY_DEBUG_UART_TX)
76
+ // Skip prints that occur before debug serial is started. It's better than
77
+ // crashing.
78
+ if (common_hal_busio_uart_deinited(&debug_uart)) {
79
+ return 0;
80
+ }
81
va_list ap;
82
va_start(ap, fmt);
83
int ret = mp_vprintf(&debug_uart_print, fmt, ap);
0 commit comments