From 8d9e0a86a6ddaa7bd238710eb4356c5896d6e949 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Tue, 22 Oct 2019 14:07:38 +0100 Subject: [PATCH] minimal_printf: Fix high level C functions that print to the console Ensure the file descriptor stdout is passed to `fputc` when the high level C functions to print to the console are referenced. This issue fixed only affected binaries built with the ARM toolchain. --- .../source/minimal-printf/mbed_printf_armlink_overrides.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/source/minimal-printf/mbed_printf_armlink_overrides.c b/platform/source/minimal-printf/mbed_printf_armlink_overrides.c index 230279a624..5d4f2bc78c 100644 --- a/platform/source/minimal-printf/mbed_printf_armlink_overrides.c +++ b/platform/source/minimal-printf/mbed_printf_armlink_overrides.c @@ -40,7 +40,7 @@ int $Sub$$__2printf(const char *format, ...) { va_list arguments; va_start(arguments, format); - int result = mbed_minimal_formatted_string(NULL, LONG_MAX, format, arguments, NULL); + int result = mbed_minimal_formatted_string(NULL, LONG_MAX, format, arguments, stdout); va_end(arguments); return result; @@ -70,7 +70,7 @@ int $Sub$$__2vprintf(char *buffer, const char *format, ...) { va_list arguments; va_start(arguments, format); - int result = mbed_minimal_formatted_string(buffer, LONG_MAX, format, arguments, NULL); + int result = mbed_minimal_formatted_string(buffer, LONG_MAX, format, arguments, stdout); va_end(arguments); return result;