Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: XRangePingPong XRange-LoRaWAN-lmic-app lora-transceiver
Diff: common/exit.c
- Revision:
- 158:3121b9889f7b
- Parent:
- 9:0ce32e54c9a7
--- a/common/exit.c Fri Apr 11 17:15:06 2014 +0100 +++ b/common/exit.c Fri Apr 11 17:30:07 2014 +0100 @@ -15,6 +15,9 @@ */ #include "semihost_api.h" #include "mbed_interface.h" +#if DEVICE_STDIO_MESSAGES +#include <stdio.h> +#endif #ifdef TOOLCHAIN_GCC_CW // TODO: Ideally, we would like to define directly "_ExitProcess" @@ -23,6 +26,11 @@ void exit(int return_code) { #endif +#if DEVICE_STDIO_MESSAGES + fflush(stdout); + fflush(stderr); +#endif + #if DEVICE_SEMIHOST if (mbed_interface_connected()) { semihost_exit();