From f6c410c3ed539d4a9326e0626201b043c511f801 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Tue, 10 Sep 2019 14:36:27 +0100 Subject: [PATCH] minimal-printf: Disable floating point support by default Mbed OS should not require floating point in its base configuration. This provides further code size savings out of the box. --- .../mbed_platform/minimal-printf/compliance/test_app.json | 7 +++++++ platform/mbed_lib.json | 2 +- platform/source/minimal-printf/README.md | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 TESTS/mbed_platform/minimal-printf/compliance/test_app.json diff --git a/TESTS/mbed_platform/minimal-printf/compliance/test_app.json b/TESTS/mbed_platform/minimal-printf/compliance/test_app.json new file mode 100644 index 000000000000..084d441e0d0a --- /dev/null +++ b/TESTS/mbed_platform/minimal-printf/compliance/test_app.json @@ -0,0 +1,7 @@ +{ + "target_overrides": { + "*": { + "platform.minimal-printf-enable-floating-point": true + } + } +} diff --git a/platform/mbed_lib.json b/platform/mbed_lib.json index 316324fa3564..b571f3781ba2 100644 --- a/platform/mbed_lib.json +++ b/platform/mbed_lib.json @@ -140,7 +140,7 @@ }, "minimal-printf-enable-floating-point": { "help": "Enable floating point printing when using mprintf profile", - "value": true + "value": false }, "minimal-printf-set-floating-point-max-decimals": { "help": "Maximum number of decimals to be printed", diff --git a/platform/source/minimal-printf/README.md b/platform/source/minimal-printf/README.md index 6e8cd07c934c..f43a37f45731 100644 --- a/platform/source/minimal-printf/README.md +++ b/platform/source/minimal-printf/README.md @@ -41,7 +41,7 @@ Minimal printf is configured by the following parameters defined in `platform/mb }, "minimal-printf-enable-floating-point": { "help": "Enable floating point printing when using minimal-printf profile", - "value": true + "value": false }, "minimal-printf-set-floating-point-max-decimals": { "help": "Maximum number of decimals to be printed", @@ -51,7 +51,7 @@ Minimal printf is configured by the following parameters defined in `platform/mb } ``` -By default, 64 bit integers, floating point and FILE stream printing are enabled. +By default, 64 bit integers and FILE stream printing are enabled. If your target does not require some options then you can override the default configuration in your application `mbed_app.json` and achieve further memory optimisation (see next section for size comparison numbers).