From 16060d6cf5fb14e54c72ee3732827e3a079813f6 Mon Sep 17 00:00:00 2001 From: Indan Zupancic Date: Tue, 19 Nov 2024 11:51:20 +0000 Subject: [PATCH] Avoid garbage on stdout for first print Caused by recursive stdio function calling. Just use seL4_DebugPutString() directly to avoid any problems. Signed-off-by: Indan Zupancic --- libsel4platsupport/src/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsel4platsupport/src/common.c b/libsel4platsupport/src/common.c index a1f130e55..a8fa0238d 100644 --- a/libsel4platsupport/src/common.c +++ b/libsel4platsupport/src/common.c @@ -268,8 +268,8 @@ static void __serial_setup() case NOT_INITIALIZED: #ifdef CONFIG_LIB_SEL4_PLAT_SUPPORT_USE_SEL4_DEBUG_PUTCHAR setup_status = SETUP_COMPLETE; - printf("\nWarning: using printf before serial is set up. This only works as your\n"); - printf("printf is backed by seL4_Debug_PutChar()\n"); + seL4_DebugPutString("\nWarning: using printf before serial is set up. This only works as your\n" + "printf is backed by seL4_Debug_PutChar()\n"); started_regular = 1; #else /* attempt failsafe initialization and print something out */