Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal-printf: Set default configurations to false #11450

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
43 changes: 20 additions & 23 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 support is 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 Expand Up @@ -87,33 +87,30 @@ https://github.com/ARMmbed/mbed-os-example-blinky application compiled with the

Blinky application size on K64F/GCC_ARM

| | File stream | Floating point | 64 bit integers | Flash | RAM |
| - | - | - | - | - | - |
| mbed-printf | | | | 30,944 | 12,096 |
| mbed-printf | | | X | 31,084 | 12,096 |
| mbed-printf | | X | X | 33,824 | 12,096 |
| mbed-printf | X | X | X | 34,304 | 12,096 |
| std printf | X | X | X | 54,158 | 12,112 |
| | Floating point | 64 bit integers | Flash | RAM |
| - | - | - | - | - |
| mbed-printf | | | 32,972 | 11,608 |
| mbed-printf | | X | 33,116 | 11,608 |
| mbed-printf | X | X | 35,856 | 11,608 |
| std printf | X | X | 55,766 | 12,104 |

Blinky application size on K64F/ARMC6

| | File stream | Floating point | 64 bit integers | Flash | RAM |
| - | - | - | - | - | - |
| mbed-printf | | | | 31,543 | xxxxx |
| mbed-printf | | | X | 31,691 | xxxxx |
| mbed-printf | | X | X | 34,515 | xxxxx |
| mbed-printf | X | X | X | 34,647 | xxxxx |
| std printf | X | X | X | 37,458 | xxxxx |
| | Floating point | 64 bit integers | Flash | RAM |
| - | - | - | - | - |
| mbed-printf | | | 33,585 | xxxxx |
| mbed-printf | | X | 33,679 | xxxxx |
| mbed-printf | X | X | 36,525 | xxxxx |
| std printf | X | X | 39,128 | xxxxx |

Blinky application size on K64F/IAR

| | File stream | Floating point | 64 bit integers | Flash | RAM |
| - | - | - | - | - | - |
| mbed-printf | | | | 28,713 | 8,546 |
| mbed-printf | | | X | 28,853 | 8,546 |
| mbed-printf | | X | X | 30,661 | 8,546 |
| mbed-printf | X | X | X | 32,047 | 8,594 |
| std printf | X | X | X | 35,055 | 8,462 |
| | Floating point | 64 bit integers | Flash | RAM |
| - | - | - | - | - |
| mbed-printf | | | 31,439 | 8,493 |
| mbed-printf | | X | 31,579 | 8,493 |
| mbed-printf | X | X | 33,387 | 8,493 |
| std printf | X | X | 36,643 | 8,553 |

### Blinky bare metal application

Expand Down