From cd5796eb52e97bf5591abef3012efe6d511d952e Mon Sep 17 00:00:00 2001 From: Greg Chadwick Date: Thu, 17 Oct 2024 15:33:37 +0100 Subject: [PATCH 1/2] Add option to force stderr to same UART as stdout This is useful for boards that may have a uart1 but don't want it being used for stderr. --- sdk/include/stdio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/include/stdio.h b/sdk/include/stdio.h index 9448b5c3..94a3af39 100644 --- a/sdk/include/stdio.h +++ b/sdk/include/stdio.h @@ -30,7 +30,7 @@ typedef volatile void FILE; # define stdin MMIO_CAPABILITY(void uart) #endif -#if DEVICE_EXISTS(uart1) +#if DEVICE_EXISTS(uart1) && !defined(STDIO_STDERR_IS_STDOUT) # define stderr MMIO_CAPABILITY(void, uart1) #elif defined(stdout) # define stderr stdout From aa7ded2a2ccbbbaf2ae59817fe2b47ed54f21d96 Mon Sep 17 00:00:00 2001 From: Greg Chadwick Date: Thu, 17 Oct 2024 15:34:13 +0100 Subject: [PATCH 2/2] Use single UART for stdout and stderr in Sonata --- sdk/boards/sonata-prerelease.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/boards/sonata-prerelease.json b/sdk/boards/sonata-prerelease.json index 35ad2d07..8eeef745 100644 --- a/sdk/boards/sonata-prerelease.json +++ b/sdk/boards/sonata-prerelease.json @@ -88,7 +88,8 @@ "SUNBURST_SHADOW_BASE=0x30000000", "SUNBURST_SHADOW_SIZE=0x800", "ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM=1", - "ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM=1" + "ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM=1", + "STDIO_STDERR_IS_STDOUT" ], "driver_includes" : [ "../include/platform/sunburst",