mirror of https://github.com/ARMmbed/mbed-os.git
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.pull/2741/head
parent
7669d7f8f5
commit
9803b62b4d
|
@ -609,9 +609,11 @@ extern "C" void exit(int return_code) {
|
|||
#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()) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue