Skip to content

Commit

Permalink
minimal-printf: Disable floating point support by default
Browse files Browse the repository at this point in the history
Mbed OS should not require floating point in its base configuration.
This provides further code size savings out of the box.
  • Loading branch information
hugueskamba committed Sep 10, 2019
1 parent 8f1bf43 commit 3177671
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions TESTS/mbed_platform/minimal-printf/compliance/test_app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"target_overrides": {
"*": {
"platform.minimal-printf-enable-floating-point": true
}
}
}
2 changes: 1 addition & 1 deletion platform/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions platform/source/minimal-printf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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).

Expand Down

0 comments on commit 3177671

Please sign in to comment.