From 1f06aa069e5fad0667d8ae5c2e22c4a4262af010 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 20 Oct 2019 07:04:40 +1100 Subject: [PATCH] HAL_ChibiOS: fixed uprintf() in bootloader --- libraries/AP_HAL_ChibiOS/stdio.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/stdio.cpp b/libraries/AP_HAL_ChibiOS/stdio.cpp index 991cd3f126..959004a77d 100644 --- a/libraries/AP_HAL_ChibiOS/stdio.cpp +++ b/libraries/AP_HAL_ChibiOS/stdio.cpp @@ -46,7 +46,11 @@ int __wrap_snprintf(char *str, size_t size, const char *fmt, ...) int __wrap_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) { - return hal.util->vsnprintf(str, size, fmt, ap); +#ifdef HAL_BOOTLOADER_BUILD + return chvsnprintf(str, size, fmt, ap); +#else + return hal.util->vsnprintf(str, size, fmt, ap); +#endif } int __wrap_vasprintf(char **strp, const char *fmt, va_list ap)