From 8a030ba212e311cb09b59f81af608272aafed317 Mon Sep 17 00:00:00 2001 From: Maksim Lin Date: Thu, 5 Dec 2024 13:45:14 +1100 Subject: [PATCH] use putchar instead of raw uart access this prevents crash as we dont check otherwise if stdio uart is enabled --- sources/System/Console/Trace.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sources/System/Console/Trace.cpp b/sources/System/Console/Trace.cpp index 03ec4060..5483e399 100644 --- a/sources/System/Console/Trace.cpp +++ b/sources/System/Console/Trace.cpp @@ -13,12 +13,7 @@ #define NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS 1 #include "nanoprintf.h" -void pt_uart_putc(int c, void *context) { - uint8_t byte = (uint8_t)c; - // write directly to the UART instead of put_char() to save on extra function - // calls - uart_putc(DEBUG_UART, byte); -} +void pt_uart_putc(int c, void *context) { putchar(c); } Trace::Trace() {}