You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* %x: unsigned integer [h, hh, (none), l, ll, z, j, t], printed as hexadecimal number (e.g., ff).
14
14
* %X: unsigned integer [h, hh, (none), l, ll, z, j, t], printed as hexadecimal number (e.g., FF).
15
-
* %f: floating point (enabled by default).
16
-
* %F: floating point (enabled by default, treated as %f).
17
-
* %g: floating point (enabled by default, treated as %f).
18
-
* %G: floating point (enabled by default, treated as %f).
15
+
* %f: floating point (disabled by default).
16
+
* %F: floating point (disabled by default, treated as %f).
17
+
* %g: floating point (disabled by default, treated as %f).
18
+
* %G: floating point (disabled by default, treated as %f).
19
19
* %c: character.
20
20
* %s: string.
21
21
* %p: pointer (e.g. 0x00123456).
22
22
23
23
Note that support for:
24
24
* 64b modifiers is only present when `minimal-printf-enable-64-bit` config is set to `true` (default).
25
-
* Floating point parameters is only present when `minimal-printf-enable-floating-point` config is set to `true` (default).
25
+
* Floating point parameters is only present when `minimal-printf-enable-floating-point` config is set to `true` (disabled by default).
26
26
27
27
Unrecognized format specifiers are treated as ordinary characters.
28
28
@@ -34,8 +34,6 @@ Floating point limitations:
34
34
35
35
As of Mbed OS 6.0 this is enabled by default. To replace the standard implementation of the printf functions with the ones in this library for older versions of Mbed:
36
36
37
-
To replace the standard implementation of the printf functions with the ones in this library:
38
-
39
37
Modify your application configuration file to override the parameter `target.printf_lib` with the value `minimal-printf` as shown below:
40
38
41
39
```json
@@ -70,27 +68,24 @@ Minimal printf is configured by the following parameters defined in `platform/mb
70
68
"name": "platform",
71
69
"config": {
72
70
"minimal-printf-enable-64-bit": {
73
-
"help": "Enable printing 64 bit integers when using minimal-printf profile",
71
+
"help": "Enable printing 64 bit integers when using minimalprintf library",
74
72
"value": true
75
73
},
76
74
"minimal-printf-enable-floating-point": {
77
-
"help": "Enable floating point printing when using minimal-printf profile",
78
-
"value": true
75
+
"help": "Enable floating point printing when using minimalprintf library",
"help": "Maximum number of decimals to be printed",
79
+
"help": "Maximum number of decimals to be printed when using minimal printf library",
82
80
"value": 6
83
81
}
84
-
}
82
+
}
85
83
}
86
84
```
87
85
88
-
By default, 64 bit integers and floating point support is enabled.
89
-
90
-
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).
91
-
92
-
In mbed_app.json:
86
+
By default, 64 bit integers support is enabled, but floating point support is disabled to increase memory savings.
93
87
88
+
If your application needs to override the default configuration add following section to your `mbed_app.json`:
0 commit comments