Skip to content

Commit f6c410c

Browse files
committed
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.
1 parent 5f8f5fd commit f6c410c

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"target_overrides": {
3+
"*": {
4+
"platform.minimal-printf-enable-floating-point": true
5+
}
6+
}
7+
}

platform/mbed_lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
},
141141
"minimal-printf-enable-floating-point": {
142142
"help": "Enable floating point printing when using mprintf profile",
143-
"value": true
143+
"value": false
144144
},
145145
"minimal-printf-set-floating-point-max-decimals": {
146146
"help": "Maximum number of decimals to be printed",

platform/source/minimal-printf/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Minimal printf is configured by the following parameters defined in `platform/mb
4141
},
4242
"minimal-printf-enable-floating-point": {
4343
"help": "Enable floating point printing when using minimal-printf profile",
44-
"value": true
44+
"value": false
4545
},
4646
"minimal-printf-set-floating-point-max-decimals": {
4747
"help": "Maximum number of decimals to be printed",
@@ -51,7 +51,7 @@ Minimal printf is configured by the following parameters defined in `platform/mb
5151
}
5252
```
5353

54-
By default, 64 bit integers, floating point and FILE stream printing are enabled.
54+
By default, 64 bit integers and FILE stream printing are enabled.
5555

5656
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).
5757

0 commit comments

Comments
 (0)