diff options
-rw-r--r-- | common/panic_output.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/panic_output.c b/common/panic_output.c index 4c70b06679..1e8a602bd3 100644 --- a/common/panic_output.c +++ b/common/panic_output.c @@ -15,6 +15,7 @@ #include "task.h" #include "timer.h" #include "uart.h" +#include "usb_console.h" #include "util.h" /* Panic data goes at the end of RAM. */ @@ -89,7 +90,13 @@ void panic_printf(const char *format, ...) uart_flush_output(); va_start(args, format); + /* Send the message to the UART console */ vfnprintf(panic_txchar, NULL, format, args); +#if defined(CONFIG_USB_CONSOLE) || defined(CONFIG_USB_CONSOLE_STREAM) + /* Send the message to the USB console on platforms which support it. */ + usb_vprintf(format, args); +#endif + va_end(args); /* Flush the transmit FIFO */ |