This is a fork of the `events` subdirectory of https://github.com/ARMmbed/mbed-os

Dependents:   HelloWorld_CCA01M1 HelloWorld_CCA02M1 CI-data-logger-server HelloWorld_CCA02M1 ... more

This is a fork of the events subdirectory of https://github.com/ARMmbed/mbed-os.

Note, you must import this library with import name: events!!!

Files at this revision

API Documentation at this revision

Comitter:
Vincent Coubard
Date:
Mon Sep 19 10:33:48 2016 +0100
Parent:
7840:f45430d4e42e
Child:
8147:c2e43990f039
Commit message:
Makes flush of IOs at exit configurable.

This change allows program which doesn't use the IO subsystem to
completelly get rid of it in the binary generated.

IO's are still flushed by default but it can be overriden in
configuration.

Changed in this revision

hal/common/retarget.cpp Show annotated file Show diff for this revision Revisions of this file
mbed_lib.json Show annotated file Show diff for this revision Revisions of this file
--- a/hal/common/retarget.cpp	Wed Sep 14 14:41:31 2016 +0300
+++ b/hal/common/retarget.cpp	Mon Sep 19 10:33:48 2016 +0100
@@ -609,9 +609,11 @@
 #endif
 
 #if DEVICE_STDIO_MESSAGES
+#if MBED_CONF_CORE_STDIO_FLUSH_AT_EXIT
     fflush(stdout);
     fflush(stderr);
 #endif
+#endif
 
 #if DEVICE_SEMIHOST
     if (mbed_interface_connected()) {
--- a/mbed_lib.json	Wed Sep 14 14:41:31 2016 +0300
+++ b/mbed_lib.json	Mon Sep 19 10:33:48 2016 +0100
@@ -9,6 +9,11 @@
         "stdio-baud-rate": {
             "help": "Baud rate for stdio",
             "value": 9600
+        },
+
+        "stdio-flush-at-exit": {
+            "help": "Enable or disable the flush of standard I/O's at exit.",
+            "value": true
         }
     }
 }