Lines Matching +full:- +full:- +full:set +full:- +full:config
5 needed by the application. The format-string based interface to
19 that to add --defsym options when linking. This means the preprocessor
20 definition must be set on the command line and not in a file.
25 * Printf uses within picolibc (which are all integer-only) now share
27 integer-only and float versions
30 work even when using integer-only or float printf functions.
32 Because the linker gets --defsym flags for both vfprintf and vfscanf,
35 picolibc.specs includes the --gc-sections linker flag. This causes
39 However, the defsym approach does not work with link-time
49 the picolibc built-time option, `-Dformat-default`, which defaults to
54 `-Dformat-default=double`). This offers full printf functionality,
57 support for the upcoming %b format specifier via the `io-percent-b`
59 `io-long-double` setting. The picolibc.specs stanza that matches
64 cc -Wl,--defsym=vfprintf=__d_vfprintf -Wl,--defsym=vfscanf=__d_vfscanf
66 If you're using a linker that supports -alias instead of --defsym,
69 cc -Wl,-alias,___d_vfprintf,_vfprintf -Wl,-alias,___d_vfscanf,_vfscanf
72 `-Dformat-default=float`). This provides support for float, but not
74 -DPICOLIBC_FLOAT_PRINTF_SCANF on the command line during linking,
78 cc -Wl,--defsym=vfprintf=__f_vfprintf -Wl,--defsym=vfscanf=__f_vfscanf
80 If you're using a linker that supports -alias instead of --defsym,
83 cc -Wl,-alias,___f_vfprintf,_vfprintf -Wl,-alias,___f_vfscanf,_vfscanf
86 `-Dformat-default=long-long`). This removes support for all float and
88 positional parameters optional via the `io-c99-formats` and
89 `io-pos-args` settings. The picolibc.specs stanza that matches this
94 cc -Wl,--defsym=vfprintf=__l_vfprintf -Wl,--defsym=vfscanf=__l_vfscanf
96 If you're using a linker that supports -alias instead of --defsym,
99 cc -Wl,-alias,___l_vfprintf,_vfprintf -Wl,-alias,___l_vfscanf,_vfscanf
102 `-Dformat-default=integer`). This removes support for long long
108 cc -Wl,--defsym=vfprintf=__i_vfprintf -Wl,--defsym=vfscanf=__i_vfscanf
110 If you're using a linker that supports -alias instead of --defsym,
113 cc -Wl,-alias,___i_vfprintf,_vfprintf -Wl,-alias,___i_vfscanf,_vfscanf
116 `-Dformat-default=minimal`). This removes support for width and
122 `io-pos-args` or `io-percent-b`. The picolibc.specs stanza that
127 cc -Wl,--defsym=vfprintf=__m_vfprintf -Wl,--defsym=vfscanf=__m_vfscanf
129 If you're using a linker that supports -alias instead of --defsym,
132 cc -Wl,-alias,___m_vfprintf,_vfprintf -Wl,-alias,___m_vfscanf,_vfscanf
148 …-none-eabi-gcc -Os -march=armv7-m --specs=picolibc.specs --oslib=semihost --crt0=hosted -Wl,--defs…
149 $ arm-none-eabi-size printf.elf
152 …-system-arm -chardev stdio,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -monitor none -s…
155 Switching to float-only reduces the size but lets this still work,
158 …-none-eabi-gcc -DPICOLIBC_FLOAT_PRINTF_SCANF -Os -march=armv7-m --specs=picolibc.specs --oslib=sem…
159 $ arm-none-eabi-size printf-float.elf
161 6792 80 4104 10976 2ae0 printf-float.elf
162 …-system-arm -chardev stdio,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -monitor none -s…
165 Selecting the long-long variant reduces the size further, but now the
168 …-none-eabi-gcc -DPICOLIBC_LONG_LONG_PRINTF_SCANF -Os -march=armv7-m --specs=picolibc.specs --oslib…
169 $ arm-none-eabi-size printf-long-long.elf
171 2216 80 4104 6400 1900 printf-long-long.elf
172 …-system-arm -chardev stdio,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -monitor none -s…
175 Going to integer-only reduces the size even further, but now it
178 …-none-eabi-gcc -DPICOLIBC_INTEGER_PRINTF_SCANF -Os -march=armv7-m --specs=picolibc.specs --oslib=s…
179 $ arm-none-eabi-size printf-int.elf
181 2056 80 4104 6240 1860 printf-int.elf
182 …-system-arm -chardev stdio,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -monitor none -s…
189 …-none-eabi-gcc -DPICOLIBC_MINIMAL_PRINTF_SCANF -Os -march=armv7-m --specs=picolibc.specs --oslib=s…
190 $ arm-none-eabi-size printf-min.elf
192 1520 80 4104 5704 1648 printf-min.elf
193 …-system-arm -chardev stdio,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -monitor none -s…
196 There's a build-time option available that enables long-long support
197 in the minimal printf variant, `-Dminimal-io-long-long=true`. Building with
200 $ arm-none-eabi-size printf-min.elf
202 1632 80 4104 5816 16b8 printf-min.elf
203 …-system-arm -chardev stdio,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -monitor none -s…
208 In addition to the application build-time options, picolibc includes a
209 number of picolibc build-time options to control the feature set (and
212 * `-Dio-c99-formats=true` This option controls whether support for
213 the C99 type-specific format modifiers 'j', 'z' and 't' and the hex
214 float format 'a' are included in the long-long, integer and minimal
218 * `-Dio-pos-args=true` This option add support for C99 positional
224 * `-Dio-long-long=true` This deprecated option controls whether
230 * `-Dminimal-io-long-long=true` This option controls whether support
234 * `-Dio-float-exact=true` This option, which is enabled by default,
237 (e.g. "%.9g") for 32-bit floats and 17 digits (e.g. "%.17g") for
238 64-bit floats ensures that passing the output back to scanf will
239 exactly re-create the original value.
241 * `-Dio-long-double=true` This option add support for long double
242 parameters. That is limited to systems using 80- and 128- bit long
246 * `-Datomic-ungetc=true` This option, which is enabled by default,
248 make them re-entrant. Without this option, multiple threads using
251 * `-Dprintf-small-ultoa=true` This option, which is enabled by
252 default, switches printf's binary-to-decimal conversion code to a
257 custom divide-and-modulus-by-ten implementations.
265 * `-Dtinystdio=false` This disables the tinystdio code and uses
268 * `-Dnewlib-stdio64=true` This option changes the newlib stdio code
270 64-bit versions of stdio interfaces which are defined with types
271 which may be 32-bits (like 'long'). This option is enabled by default.
277 'nano' printf code doesn't support long-long integer output, so we
278 can't use that, and we need to enable long-long and floating point
281 $ mkdir build-arm; cd build-arm
282 $ ../scripts/do-arm-configure -Dtinystdio=false -Dio-long-long=true -Dnewlib-io-float=true
287 …-none-eabi-gcc -Os -march=armv7-m --specs=picolibc.specs --oslib=semihost --crt0=hosted -Wl,--defs…
288 $ arm-none-eabi-size printf.elf
291 …-system-arm -chardev stdio,id=stdio0 -semihosting-config enable=on,chardev=stdio0 -monitor none -s…