Skip to content

Commit 8d9e0a8

Browse files
committed
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.
1 parent 5d330bf commit 8d9e0a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

platform/source/minimal-printf/mbed_printf_armlink_overrides.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int $Sub$$__2printf(const char *format, ...)
4040
{
4141
va_list arguments;
4242
va_start(arguments, format);
43-
int result = mbed_minimal_formatted_string(NULL, LONG_MAX, format, arguments, NULL);
43+
int result = mbed_minimal_formatted_string(NULL, LONG_MAX, format, arguments, stdout);
4444
va_end(arguments);
4545

4646
return result;
@@ -70,7 +70,7 @@ int $Sub$$__2vprintf(char *buffer, const char *format, ...)
7070
{
7171
va_list arguments;
7272
va_start(arguments, format);
73-
int result = mbed_minimal_formatted_string(buffer, LONG_MAX, format, arguments, NULL);
73+
int result = mbed_minimal_formatted_string(buffer, LONG_MAX, format, arguments, stdout);
7474
va_end(arguments);
7575

7676
return result;

0 commit comments

Comments
 (0)