This is an automated email from the ASF dual-hosted git repository.
github-actions[bot] pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/nuttx-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 4f14235268 Publishing docs: c8c0661c997e31df18fcdd5f6775d07bfae6eac3
(web: 6142dd741c70ff558eccd0bc89fdb3cc7be31ca9)
4f14235268 is described below
commit 4f142352687e3bb806c8d9887c5cede0efadf028
Author: Mohd Irshad <[email protected]>
AuthorDate: Tue Nov 10 00:08:57 2026 +0000
Publishing docs: c8c0661c997e31df18fcdd5f6775d07bfae6eac3 (web:
6142dd741c70ff558eccd0bc89fdb3cc7be31ca9)
---
.../guides/chip-specific/stm32_ports.rst.txt | 11 +-
.../latest/_sources/os/libs/libc/index.rst.txt | 1 +
.../latest/_sources/os/libs/libc/printf.rst.txt | 623 ++++++++++++
.../_sources/os/networking/socketcan.rst.txt | 12 +-
.../arm/stm32n6/boards/stm32n6570-dk/index.rst.txt | 6 +-
.../_sources/platforms/arm/stm32n6/index.rst.txt | 2 +-
.../docs/latest/components/libs/libc/printf.html | 5 +
.../latest/guides/chip-specific/stm32_ports.html | 30 +-
.../latest/guides/porting/port_bootsequence.html | 8 +-
.../porting/port_relatedkernelconfigrations.html | 8 +-
.../latest/guides/programs/fully_linked_elf.html | 2 +-
.../guides/programs/partially_linked_elf.html | 2 +-
content/docs/latest/objects.inv | Bin 262285 -> 262648
bytes
content/docs/latest/os/libs/libc/index.html | 1 +
content/docs/latest/os/libs/libc/popen.html | 4 +-
content/docs/latest/os/libs/libc/printf.html | 1000 ++++++++++++++++++++
content/docs/latest/os/libs/libc/search.html | 4 +-
content/docs/latest/os/networking/socketcan.html | 12 +-
.../stm32f0/boards/stm32f051-discovery/index.html | 60 +-
.../arm/stm32n6/boards/stm32n6570-dk/index.html | 6 +-
.../docs/latest/platforms/arm/stm32n6/index.html | 32 +-
content/docs/latest/reference/user/07_signals.html | 4 +-
content/docs/latest/reference/user/structures.html | 2 +-
content/docs/latest/searchindex.js | 2 +-
24 files changed, 1730 insertions(+), 107 deletions(-)
diff --git
a/content/docs/latest/_sources/guides/chip-specific/stm32_ports.rst.txt
b/content/docs/latest/_sources/guides/chip-specific/stm32_ports.rst.txt
index 22e54a2d4f..3454411271 100644
--- a/content/docs/latest/_sources/guides/chip-specific/stm32_ports.rst.txt
+++ b/content/docs/latest/_sources/guides/chip-specific/stm32_ports.rst.txt
@@ -387,7 +387,7 @@ HASH to be done not supported
I2C v1 arch/arm/src/common/stm32/stm32_i2c_m3m4_v1.c
IWDG v1 arch/arm/src/common/stm32/stm32_iwdg.c
RCC to be done arch/arm/src/stm32f2/stm32_rcc.c
-RNG v1 arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c
+RNG v1 arch/arm/src/common/stm32/stm32_rng_v1.c
RTC RTCC v1
arch/arm/src/common/stm32/stm32_rtc_m3m4_v1_lowerhalf.c
SDIO v1 arch/arm/src/common/stm32/stm32_sdio_m3m4_v1.c
SPI/I2S v2 arch/arm/src/common/stm32/stm32_spi_m3m4_v2v3v4.c
@@ -451,7 +451,7 @@ LPTIM v1
arch/arm/src/common/stm32/stm32_lptim.c
LTDC v1 arch/arm/src/common/stm32/stm32_ltdc_m3m4_v1.c
QUADSPI to be done not supported
RCC to be done arch/arm/src/stm32f4/stm32_rcc.c
-RNG v1 arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c
+RNG v1 arch/arm/src/common/stm32/stm32_rng_v1.c
RTC RTCC F4 arch/arm/src/common/stm32/stm32_rtcc_m3m4_f4.c
SDIO v1 arch/arm/src/common/stm32/stm32_sdio_m3m4_v1.c
SPI/I2S v2 arch/arm/src/common/stm32/stm32_spi_m3m4_v2v3v4.c
@@ -484,7 +484,7 @@ IWDG v2
arch/arm/src/common/stm32/stm32_iwdg.c
LPTIM v1 arch/arm/src/common/stm32/stm32_lptim.c
OPAMP v1 arch/arm/src/common/stm32/stm32_opamp_m3m4_v1.c
RCC to be done arch/arm/src/stm32g4/stm32_rcc.c
-RNG v1 arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c
+RNG v1 arch/arm/src/common/stm32/stm32_rng_v1.c
RTC RTCC v1
arch/arm/src/common/stm32/stm32_rtc_m3m4_v1_lowerhalf.c
SPI/I2S v3 arch/arm/src/common/stm32/stm32_spi_m3m4_v2v3v4.c
TIM v3 arch/arm/src/common/stm32/stm32_tim.c
@@ -630,7 +630,7 @@ WWDG v3
arch/arm/src/common/stm32/stm32_wwdg.c
LPTIM v2 arch/arm/src/common/stm32/stm32_lptim.c
PULSECOUNT n/a arch/arm/src/common/stm32/stm32_pulsecount.c
PWM n/a arch/arm/src/stm32h5/stm32_pwm.c
-RNG n/a arch/arm/src/stm32h5/stm32_rng.c
+RNG v1 arch/arm/src/common/stm32/stm32_rng_v1.c
USB host n/a arch/arm/src/stm32h5/stm32_usbdrdhost.c
============ ============ ============================================
@@ -659,7 +659,7 @@ MDMA to be done arch/arm/src/stm32h7/stm32_dma.c
PWR to be done arch/arm/src/stm32h7/stm32_pwr.c
QUADSPI to be done arch/arm/src/stm32h7/stm32_qspi.c
RCC to be done arch/arm/src/stm32h7/stm32_rcc.c
-RNG to be done arch/arm/src/stm32h7/stm32_rng.c
+RNG v1 arch/arm/src/common/stm32/stm32_rng_v1.c
RTC to be done arch/arm/src/stm32h7/stm32_rtc.c
SDMMC to be done arch/arm/src/stm32h7/stm32_sdmmc.c
SPI/I2S to be done arch/arm/src/stm32h7/stm32_spi.c
@@ -781,6 +781,7 @@ IWDG v3
arch/arm/src/common/stm32/stm32_iwdg.c
LPTIM v2 arch/arm/src/common/stm32/stm32_lptim.c
PWR n6 arch/arm/src/stm32n6/stm32_pwr.c
RCC n6 arch/arm/src/stm32n6/stm32n6xx_rcc.c
+RNG v1 arch/arm/src/common/stm32/stm32_rng_v1.c
SPI/I2S to be done not supported
TIM v3 arch/arm/src/common/stm32/stm32_tim.c
USART/LPUART v4 arch/arm/src/stm32n6/stm32_serial.c
diff --git a/content/docs/latest/_sources/os/libs/libc/index.rst.txt
b/content/docs/latest/_sources/os/libs/libc/index.rst.txt
index a8ce70b999..6b682682e2 100644
--- a/content/docs/latest/_sources/os/libs/libc/index.rst.txt
+++ b/content/docs/latest/_sources/os/libs/libc/index.rst.txt
@@ -196,6 +196,7 @@ Implementation Details
fnmatch.rst
popen.rst
+ printf.rst
search.rst
stdbit.rst
stream.rst
diff --git a/content/docs/latest/_sources/os/libs/libc/printf.rst.txt
b/content/docs/latest/_sources/os/libs/libc/printf.rst.txt
new file mode 100644
index 0000000000..5b4f9e2b5e
--- /dev/null
+++ b/content/docs/latest/_sources/os/libs/libc/printf.rst.txt
@@ -0,0 +1,623 @@
+======
+printf
+======
+
+This page explains what ``printf()`` does in NuttX: each conversion, flag,
+length, width and precision, each option and profile, and the flash and stack
+that each one costs.
+
+``printf()``, ``fprintf()``, ``dprintf()``, ``sprintf()``, ``snprintf()``,
+``asprintf()``, ``syslog()`` and their ``v`` forms all use one function:
+``lib_vsprintf()`` in ``libs/libc/stream/lib_libvsprintf.c``. So this page
+applies to all of them.
+
+On an output error, ``printf()``, ``fprintf()`` and their ``v`` forms return a
+negative value. A buffered stream reports a write error when it flushes.
+
+All outputs on this page come from a run of the examples on NuttX
+(``rv-virt:nsh``, 32-bit RISC-V, under QEMU). The first sections show the
+Full profile. Each example shows the output between quotes.
+
+The rule
+========
+
+A correct call of ``printf()`` never crashes or hangs, in any configuration.
+A *correct call* is a call that GCC and Clang accept with
+``-Wall -Wextra -Wformat=2``.
+
+- The grammar of the format is always on. An option removes an output, and
+ never the parser.
+- Each argument is read at its right size, also when its conversion is off.
+- A conversion that is off prints one ``?``, padded to the width, so the rest
+ of the line stays correct. ``%n`` always prints nothing.
+- Width and precision counters cannot wrap. No read or write goes outside a
+ buffer. ``NULL`` for ``%s`` prints ``(null)``. The stack use is bounded.
+
+Conversions
+===========
+
+================ =========================================================
+Conversion Output
+================ =========================================================
+``%d``, ``%i`` A signed decimal integer.
+``%u`` An unsigned decimal integer.
+``%o`` An unsigned octal integer.
+``%x``, ``%X`` An unsigned hexadecimal integer.
+``%b``, ``%B`` An unsigned binary integer (C23, ``LIBC_PRINTF_C23``).
+``%c`` One character.
+``%s`` A string.
+``%p`` A pointer, in hexadecimal, with ``0x``.
+``%%`` One ``%``.
+``%e``, ``%E`` A float, in the form ``d.ddde+dd``.
+``%f``, ``%F`` A float, in the form ``ddd.ddd``.
+``%g``, ``%G`` A float, in the form of ``%e`` or ``%f``, whichever is
+ shorter, without trailing zeros. With ``#`` the zeros
+ stay.
+``%a``, ``%A`` A float, exactly, in hexadecimal
+ (``LIBC_PRINTF_HEXFLOAT``).
+``%n`` Reads its pointer and prints nothing. It stores nothing,
+ so a format never writes to memory.
+ ``LIBC_PRINTF_PERCENT_N`` stores the count: it is
+ dangerous, and no profile has it.
+================ =========================================================
+
+.. code-block:: text
+
+ printf("%d", 42) "42"
+ printf("%i", -42) "-42"
+ printf("%u", 42) "42"
+ printf("%o", 8) "10"
+ printf("%x", 255) "ff"
+ printf("%X", 255) "FF"
+ printf("%c", 'A') "A"
+ printf("%s", "text") "text"
+ printf("%p", (void *)0x1000) "0x1000"
+ printf("100%%") "100%"
+ printf("%e", 3.14159) "3.141590e+00"
+ printf("%E", 3.14159) "3.141590E+00"
+ printf("%f", 3.14159) "3.141590"
+ printf("%F", 3.14159) "3.141590"
+ printf("%g", 3.14159) "3.14159"
+ printf("%G", 0.000001) "1E-06"
+ printf("%a", 1.5) "0x1.8p+0"
+ printf("%A", 1.5) "0X1.8P+0"
+ printf("%b", 5) "101"
+ printf("%B", 5) "101"
+ printf("ab%n|", &n) "ab|"
+
+Flags
+=====
+
+========= ==============================================================
+Flag Effect
+========= ==============================================================
+``-`` Pads on the right (``LIBC_PRINTF_LEFT_JUSTIFY``).
+``+`` Prints the sign of a positive number.
+space Prints a space in place of the sign of a positive number.
+``#`` The alternative form (``LIBC_PRINTF_ALT_FORM``): ``0x``, ``0X``,
+ ``0b``, ``0B``, a first ``0`` for ``%o``, the point of a float
+ that has no digits after it, and the trailing zeros of ``%g``.
+``0`` Pads with zeros after the sign and the prefix.
+``'`` Accepted and ignored: the C locale has no separator.
+========= ==============================================================
+
+.. code-block:: text
+
+ printf("%-5d|", 42) "42 |"
+ printf("%+d", 42) "+42"
+ printf("% d", 42) " 42"
+ printf("%#x", 255) "0xff"
+ printf("%#X", 255) "0XFF"
+ printf("%#o", 8) "010"
+ printf("%#b", 5) "0b101"
+ printf("%#.0f", 3.0) "3."
+ printf("%#g", 1.0) "1.00000"
+ printf("%05d", 42) "00042"
+ printf("%'d", 1234567) "1234567"
+
+Width
+=====
+
+The width is the smallest number of bytes. A longer output is not cut. ``*``
+takes the width from an ``int`` argument, and a negative value means the ``-``
+flag and a positive width.
+
+.. code-block:: text
+
+ printf("%5d", 42) " 42"
+ printf("%*d", 5, 42) " 42"
+ printf("%*d|", -5, 42) "42 |"
+ printf("%5s", "ab") " ab"
+ printf("%-5s|", "ab") "ab |"
+ printf("%3d", 12345) "12345"
+
+Precision
+=========
+
+For an integer, the precision is the smallest number of digits
+(``LIBC_PRINTF_INT_PRECISION``). An integer with the value 0 and a precision
+of 0 prints no digits. For ``%e``, ``%f`` and ``%a`` it is the number of
digits
+after the point. For ``%g`` it is the number of significant digits. For
+``%s`` it is the largest number of bytes. ``*`` takes it from an ``int``
+argument, and a negative value means no precision.
+
+.. code-block:: text
+
+ printf("%.3d", 5) "005"
+ printf("%.0d|", 0) "|"
+ printf("%8.3d", 5) " 005"
+ printf("%.2f", 3.14159) "3.14"
+ printf("%.3e", 3.14159) "3.142e+00"
+ printf("%.3g", 3.14159) "3.14"
+ printf("%.3s", "abcde") "abc"
+ printf("%.*f", 1, 2.25) "2.2"
+ printf("%.*d|", -1, 0) "0|"
+ printf("%8.2f", 3.14159) " 3.14"
+ printf("%.0f", 2.5) "2"
+
+Length modifiers
+================
+
+============================= ==============================================
+Length Argument of an integer conversion
+============================= ==============================================
+``hh`` ``char`` (``LIBC_PRINTF_SHORT``)
+``h`` ``short`` (``LIBC_PRINTF_SHORT``)
+``l`` ``long``
+``ll`` ``long long`` (``LIBC_PRINTF_LONG_LONG``)
+``j`` ``intmax_t`` (``LIBC_PRINTF_LONG_LONG``)
+``z``, ``t`` ``size_t``, ``ptrdiff_t``
+``L`` ``long double`` for a float, and ``long long``
+ for an integer, as in GNU libc
+``w8``, ``w16``, ``w32``, The exact-width types (C23,
+``w64`` ``LIBC_PRINTF_C23``)
+``wf8``, ``wf16``, ``wf32``, The fastest types of that width (C23,
+``wf64`` ``LIBC_PRINTF_C23``)
+============================= ==============================================
+
+``LIBC_PRINTF_LONG_LONG`` applies where ``long long`` is longer than ``long``.
+A ``long double`` prints with the precision and range of a ``double``, but
+``%La`` prints all its bits where it has more than a ``double``.
+
+.. code-block:: text
+
+ printf("%hhd", 300) "44"
+ printf("%hd", 70000) "4464"
+ printf("%ld", 1234567L) "1234567"
+ printf("%lld", 123456789012LL) "123456789012"
+ printf("%llx", 0x123456789abULL) "123456789ab"
+ printf("%jd", (intmax_t)-1) "-1"
+ printf("%zu", (size_t)42) "42"
+ printf("%td", (ptrdiff_t)-42) "-42"
+ printf("%Lf", (long double)1.5) "1.500000"
+ printf("%La", (long double)1.5) "0x1.8p+0"
+ printf("%w8d", 300) "44"
+ printf("%w16x", 0x12345) "2345"
+ printf("%w32u", 42) "42"
+ printf("%w64d", (int64_t)123456789012LL) "123456789012"
+ printf("%wf16d", 42) "42"
+
+Numbered arguments
+==================
+
+``%n$`` takes argument number *n* (``LIBC_NUMBERED_ARGS``), up to
+``LIBC_NL_ARGMAX``. ``*m$`` takes a width or precision from argument *m*.
+POSIX does not allow a mix of numbered and sequential conversions in one
format.
+
+.. code-block:: text
+
+ printf("%2$s %1$s", "world", "hello") "hello world"
+ printf("%1$*2$d|", 42, 5) " 42|"
+ printf("%2$.*1$f", 2, 3.14159) "3.14"
+
+Each argument before the highest number that the format uses must have a
+number in the format: otherwise its size is not known, so ``printf()`` cannot
+find the arguments after it. Then it reads only the arguments before the gap,
+and a conversion with a later number ends the output.
+
+Floating point values
+=====================
+
+.. code-block:: text
+
+ printf("%f", 1.0 / 0.0) "inf"
+ printf("%F", -1.0 / 0.0) "-INF"
+ printf("%e", 0.0 / 0.0 * 0.0) "nan"
+ printf("%f", -0.0) "-0.000000"
+ printf("%g", -0.0) "-0"
+ printf("%a", -0.0) "-0x0p+0"
+ printf("%s", (char *)NULL) "(null)"
+ printf("%a", 0.1) "0x1.999999999999ap-4"
+ printf("%.0a", 1.5) "0x2p+0"
+ printf("%.1a", 1.09375) "0x1.2p+0"
+ printf("%a", 5e-324) "0x0.0000000000001p-1022"
+ printf("%a", 1.0 / 0.0) "inf"
+ printf("%10.3a|", 1.5) "0x1.800p+0|"
+ printf("%#.0a", 1.0) "0x1.p+0"
+ printf("%010a", 1.5) "0x001.8p+0"
+
+``%a`` has no limit on precision and takes all digits from the bits of the
+value. With a precision it rounds to nearest, ties to even. A subnormal value
+has a first digit of 0 and the exponent of the smallest normal value, as in GNU
+libc.
+
+Unknown conversions and truncated formats
+=========================================
+
+An unknown conversion has no known argument size. So ``printf()`` prints ``%``
+and the letter, then the rest of the format as text, reads no more arguments,
+and ends. A format that ends in the middle of a conversion prints ``%`` and
+ends, and no read goes past the terminator. This is always on. A valid C23
+format that this configuration does not know takes the same path, so it cannot
+misread a later ``%s``.
+
+.. code-block:: text
+
+ printf("%d %y %d", 1, 2) "1 %y %d"
+ printf("a%-5.3kb%d", 1) "a%kb%d"
+ printf("abc%") "abc%"
+ printf("abc%5") "abc%"
+ printf("abc%l") "abc%"
+ printf("%Hf|%s", 1.5, "x") "%Hf|%s"
+ printf("%w7d|%d", 1, 2) "%w7d|%d"
+
+Large output
+============
+
+There is no cap on width or precision. ``%2147483647d`` is legal and prints
all
+of it, which takes about 2 days on a 115200 baud console. A caller with a
small
+buffer must use ``snprintf()``. If the total passes ``INT_MAX``, the result
+is -1 with ``errno`` set to ``EOVERFLOW``. The output written before that
stays.
+A conversion that is longer than ``INT_MAX`` fails before its output. A width
+or precision with too many digits stops at ``INT_MAX``.
+
+The next examples use ``snprintf()`` with a small buffer, and show the return
+value.
+
+.. code-block:: text
+
+ snprintf(buf, sizeof(buf), "x%2147483647d", 1) returns -1,
errno 75 (EOVERFLOW)
+ snprintf(buf, sizeof(buf), "%.2147483647f", 1.5) returns -1,
errno 75 (EOVERFLOW)
+ snprintf(buf, sizeof(buf), "%.99999999999s|", "abc") returns 4
+ snprintf(buf, sizeof(buf), "%300d", 1) returns 300
+
+Options and profiles
+====================
+
+Each feature is an option with its own prompt. A profile only sets the default
+of each option: select one in *Library Routines*, *printf profile*. You can
add
+or remove any feature in any profile.
+
+============================= ========== =========== ======
+Option Minimal Default Full
+============================= ========== =========== ======
+``LIBC_FLOATINGPOINT`` off see below on
+``LIBC_PRINTF_HEXFLOAT`` off off on
+``LIBC_PRINTF_C23`` off off on
+``LIBC_PRINTF_EXACT`` off off on
+``LIBC_PRINTF_EXACT_LDOUBLE`` off off on
+``LIBC_PRINTF_PERCENT_N`` off off off
+``LIBC_NUMBERED_ARGS`` off off on
+``LIBC_LOCALE`` off off on
+``LIBC_PRINTF_LONG_LONG`` see below on on
+``LIBC_PRINTF_ALT_FORM`` off on on
+``LIBC_PRINTF_INT_PRECISION`` off on on
+``LIBC_PRINTF_OCTAL`` on on on
+``LIBC_PRINTF_LEFT_JUSTIFY`` on on on
+``LIBC_PRINTF_SHORT`` on on on
+``STREAM_OUT_BUFFER_SIZE`` 0 64 64
+============================= ========== =========== ======
+
+In Default, ``LIBC_FLOATINGPOINT`` is on when ``DEFAULT_SMALL`` is off and the
+CPU has an FPU, as before the profiles existed. In Minimal,
+``LIBC_PRINTF_LONG_LONG`` stays on with ``SYSLOG_TIMESTAMP`` or ``FS_PROCFS``,
+because the log time stamps and ``/proc`` print ``time_t`` and ``uint64_t``.
+
+``LIBC_PRINTF_HEXFLOAT`` does not need ``LIBC_FLOATINGPOINT``. It uses no
+floating point operation and pulls in no soft-float code, so a small board with
+floating point off can still print the exact value of a ``double``.
+
+``LIBC_PRINTF_EXACT`` prints the correctly rounded digits of each ``double``,
+ties to even, with no limit on the number of digits. Most values take the same
+short path as without the option. A value that the short path cannot prove
+correct takes ``vsprintf_float_big()``, with a larger stack frame.
+``LIBC_PRINTF_EXACT_LDOUBLE`` does the same for ``long double``, and needs
+``LIBC_PRINTF_EXACT``. Its buffer is on the stack of ``vsprintf_ldouble()``,
which
+only ``%Le``, ``%Lf`` and ``%Lg`` call.
+
+``LIBC_PRINTF_PERCENT_N`` is dangerous. With it, ``%n`` stores the count of
the
+bytes so far through its pointer, at the size of its length modifier, and
prints
+nothing. A format that an attacker can change then gives a write to any
address.
+A ``NULL`` pointer stores nothing. With it on, the call below stores 2 in
``n``:
+
+.. code-block:: text
+
+ printf("ab%n|", &n) "ab|"
+
+What a feature prints when it is off
+------------------------------------
+
+Each line shows the same call with the feature on, then with it off. The ``?``
+comes from a conversion that is off: the argument is read at its right size, so
+the next conversion is correct. With ``LIBC_PRINTF_ALT_FORM`` off the flag has
+no effect, but ``%p`` keeps ``0x``. With ``LIBC_PRINTF_LEFT_JUSTIFY`` off the
+output pads on the left. With ``LIBC_PRINTF_C23`` off ``%b`` and ``wN`` are
+unknown conversions, so they print as text and end the conversions. Numbered
+arguments off have the same result.
+
+.. code-block:: text
+
+ Call Full All off
+ printf("ab%n|", &n) "ab|" "ab|"
+ printf("%f", 3.14159) "3.141590" "?"
+ printf("%e", 3.14159) "3.141590e+00" "?"
+ printf("%g", 3.14159) "3.14159" "?"
+ printf("%a", 1.5) "0x1.8p+0" "?"
+ printf("%b", 5) "101" "%b"
+ printf("%#x", 255) "0xff" "ff"
+ printf("%#o", 8) "010" "?"
+ printf("%p", (void *)0x1000) "0x1000" "0x1000"
+ printf("%.3d", 5) "005" "?"
+ printf("%8.3d", 5) " 005" " ?"
+ printf("%.3s", "abcde") "abc" "abc"
+ printf("%o", 8) "10" "?"
+ printf("%-5d|", 42) "42 |" " 42|"
+ printf("%-5s|", "ab") "ab |" " ab|"
+ printf("%hhd", 300) "44" "?"
+ printf("%hd", 70000) "4464" "?"
+ printf("%lld", 123456789012LL) "123456789012" "?"
+ printf("%llx", 0x123456789abULL) "123456789ab" "?"
+ printf("%jd", (intmax_t)-1) "-1" "?"
+ printf("%ld", 1234567L) "1234567" "1234567"
+ printf("%Lf", (long double)1.5) "1.500000" "?"
+ printf("%La", (long double)1.5) "0x1.8p+0" "?"
+ printf("%w64d", (int64_t)123456789012LL) "123456789012" "%w64d"
+ printf("%2$s %1$s", "world", "hello") "hello world" "%$s %1$s"
+ printf("%05d", 42) "00042" "00042"
+
+Correct and wrong usage
+=======================
+
+If the compiler accepts the call with ``-Wall -Wextra -Wformat=2``, it is
correct
+usage and ``printf()`` must handle it. If the compiler warns, it is wrong
usage.
+
+These are outside the guarantee, because ``printf()`` cannot detect them:
+
+- A wild pointer for ``%s``.
+- An argument of the wrong type, such as a ``double`` for ``%d`` or an ``int``
+ for ``%s``.
+- ``printf(NULL)``: ``NULL`` is not a format string.
+- A mix of numbered and sequential conversions.
+- A wild pointer for ``%n`` with ``LIBC_PRINTF_PERCENT_N`` on.
+
+What is outside the guarantee
+=============================
+
+The guarantee is about safety. Without ``LIBC_PRINTF_EXACT`` the output of
+``%e``, ``%f`` and ``%g`` is not exact, and some forms do not match the
standard
+yet. Each call below shows the output of Default, and of Full with the exact
+options on:
+
+.. code-block:: text
+
+ printf("%.0f", 0.5)
+ Default: "0"
+ Exact: "0"
+ printf("%.0f", 2.5)
+ Default: "2"
+ Exact: "2"
+ printf("%.2f", 1.005)
+ Default: "1.00"
+ Exact: "1.00"
+ printf("%.0f", 1e22)
+ Default: "10000000000000000000000"
+ Exact: "10000000000000000000000"
+ printf("%.20f", 0.1)
+ Default: "0.10000000000000001000"
+ Exact: "0.10000000000000000555"
+ printf("%.17e", 0.1)
+ Default: "1.00000000000000010e-01"
+ Exact: "1.00000000000000006e-01"
+ printf("%.25e", 1e23)
+ Default: "9.9999999999999992000000000e+22"
+ Exact: "9.9999999999999991611392000e+22"
+ printf("%g", 1234567.0)
+ Default: "1.23457e+06"
+ Exact: "1.23457e+06"
+ printf("%#g", 1.0)
+ Default: "1.00000"
+ Exact: "1.00000"
+ printf("%.30Le", 0.1L)
+ Default: "1.000000000000000100000000000000e-01"
+ Exact: "1.000000000000000000000000000000e-01"
+
+- Without ``LIBC_PRINTF_EXACT``, ``%e``, ``%f`` and ``%g`` have at most 17
+ significant digits. The digits after them print as 0. The last digits can
+ differ from a correctly rounded result.
+- Without ``LIBC_PRINTF_EXACT_LDOUBLE``, ``%Le``, ``%Lf`` and ``%Lg`` have the
+ precision and the range of a ``double``.
+- ``%lc`` and ``%ls`` without ``LIBC_LOCALE`` print narrow characters.
+- ``dprintf()`` returns the length of the output also when the write fails.
+- ``lib_bsprintf()`` has its own smaller format: see :doc:`stream`.
+
+Flash and stack
+===============
+
+Each number comes from a build of the board's configuration with ``-Os``, the
+``size`` tool, the linker map and ``-fstack-usage``. The boards are
+``nucleo-f072rb:nsh`` (Cortex-M0), ``nucleo-f103rb:nsh`` (Cortex-M3),
+``rv-virt:nsh`` (32-bit RISC-V, with an FPU) and ``qemu-armv8a:nsh`` (arm64).
+Other boards and compilers give other numbers, so use them to compare.
+
+
+Image text, in bytes:
+
+.. list-table::
+ :header-rows: 1
+
+ * -
+ - Cortex-M0
+ - Cortex-M3
+ - rv32
+ - arm64
+ * - Minimal
+ - 46,460
+ - 33,964
+ - 228,166
+ - 325,844
+ * - Default
+ - 46,792
+ - 34,512
+ - 231,490
+ - 329,564
+ * - Full
+ - 58,072
+ - 40,156
+ - 235,900
+ - 335,360
+ * - ``LIBC_PRINTF_EXACT`` added, floating point on
+ - +1544
+ - +1352
+ - +1628
+ - +1912
+ * - ``LIBC_PRINTF_EXACT_LDOUBLE`` added to that
+ - +0
+ - +0
+ - +176
+ - +320
+ * - ``LIBC_PRINTF_HEXFLOAT`` added to Minimal
+ - +840
+ - +820
+ - +1048
+ - +1472
+ * - ``LIBC_PRINTF_C23`` added to Minimal
+ - +160
+ - +228
+ - +166
+ - +192
+
+The objects of printf (text and data), in bytes:
+
+.. list-table::
+ :header-rows: 1
+
+ * -
+ - Cortex-M0
+ - Cortex-M3
+ - rv32
+ - arm64
+ * - Minimal
+ - 1,519
+ - 1,307
+ - 1,937
+ - 2,801
+ * - Default
+ - 1,835
+ - 1,785
+ - 5,373
+ - 6,525
+ * - Full
+ - 7,635
+ - 7,269
+ - 9,743
+ - 12,077
+
+``libgcc`` in the image, in bytes:
+
+.. list-table::
+ :header-rows: 1
+
+ * -
+ - Cortex-M0
+ - Cortex-M3
+ - rv32
+ - arm64
+ * - Minimal
+ - 2,028
+ - 964
+ - 4,470
+ - 361
+ * - Default
+ - 2,028
+ - 1,012
+ - 4,492
+ - 361
+ * - Full
+ - 7,376
+ - 1,012
+ - 4,492
+ - 361
+
+Stack frame of ``vsprintf_internal()``, in bytes:
+
+.. list-table::
+ :header-rows: 1
+
+ * -
+ - Cortex-M0
+ - Cortex-M3
+ - rv32
+ - arm64
+ * - Minimal
+ - 80
+ - 72
+ - 96
+ - 160
+ * - Default
+ - 88
+ - 72
+ - 128
+ - 160
+ * - Full
+ - 192
+ - 184
+ - 192
+ - 256
+
+
+Stack frames of the floating point functions, with both exact options on, in
bytes:
+
+.. list-table::
+ :header-rows: 1
+
+ * -
+ - Cortex-M0
+ - Cortex-M3
+ - rv32
+ - arm64
+ * - ``vsprintf_float()``
+ - 96
+ - 96
+ - 96
+ - 112
+ * - ``__dtoa_engine()``
+ - 104
+ - 88
+ - 112
+ - 64
+ * - ``vsprintf_putfloat()``
+ - 72
+ - 80
+ - 96
+ - 128
+ * - ``vsprintf_float_big()``
+ - 256
+ - 256
+ - 256
+ - 288
+ * - ``vsprintf_ldouble()``
+ - -
+ - -
+ - 2624
+ - 2624
+
+Floating point is off by default on the two Cortex boards, and on by default
on the other two. Full has it on everywhere.
+
+``%e``, ``%f`` and ``%g`` use integer operations only, and pull in no
soft-float
+code. Other code in the image can: see the row of ``libgcc``. ``%lld`` needs
a 64-bit division on a
+32-bit CPU, and the kernel clock code often needs it too.
+
+``LIBC_NUMBERED_ARGS`` also adds a variable length array to the stack of
+``lib_vsprintf()``: one union for each argument that the format uses. The size
+of the union is 8 bytes, or the size of ``long double`` with
+``LIBC_PRINTF_HEXFLOAT`` on a CPU where that is larger.
diff --git a/content/docs/latest/_sources/os/networking/socketcan.rst.txt
b/content/docs/latest/_sources/os/networking/socketcan.rst.txt
index 8e4136ad26..2e9c03d056 100644
--- a/content/docs/latest/_sources/os/networking/socketcan.rst.txt
+++ b/content/docs/latest/_sources/os/networking/socketcan.rst.txt
@@ -92,13 +92,11 @@ Files supporting SocketCAN can be found in the following
locations:
- **Header File**: ``include/nuttx/net/can.h``
- **Main Modules**:
- - ``can_conn.c`` - Connection management
- - ``can_sockif.c`` - Socket interface implementation
- - ``can_sendmsg.c`` - Message transmission
- - ``can_sendmsg_buffered.c`` - Message transmission with buffering
- - ``can_recvmsg.c`` - Message reception
- - ``can_poll.c`` - Polling support
- - ``can_callback.c`` - Callback handling
+ - ``can.c`` - Protocol-independent core: connection management, input,
+ callbacks and polling
+ - ``can_raw.c`` - CAN_RAW protocol: socket interface, transmission (with
+ and without buffering), reception, filters and socket options
+ - ``can_sockif.c`` - Selection of the socket interface of a CAN protocol
Configuration Options
---------------------
diff --git
a/content/docs/latest/_sources/platforms/arm/stm32n6/boards/stm32n6570-dk/index.rst.txt
b/content/docs/latest/_sources/platforms/arm/stm32n6/boards/stm32n6570-dk/index.rst.txt
index 67a06eea42..1bd8065e63 100644
---
a/content/docs/latest/_sources/platforms/arm/stm32n6/boards/stm32n6570-dk/index.rst.txt
+++
b/content/docs/latest/_sources/platforms/arm/stm32n6/boards/stm32n6570-dk/index.rst.txt
@@ -111,7 +111,7 @@ USER1 PC13 Button B2, EXTI13, high when pressed
TAMP PE0 Button B4, EXTI0, high when pressed
===== ===== ======================================
-The LEDs are available through ``/dev/userleds`` and the button through
+The LEDs are available through ``/dev/userleds`` and the buttons through
``/dev/buttons`` in the nsh configuration.
Clocking
@@ -121,8 +121,8 @@ By default the CPU runs at 800 MHz and the system buses at
400 MHz. PLL1 is
fed from the 48 MHz HSE crystal, HCLK and the APB clocks run at 200 MHz and
the timer kernel clock is 200 MHz. 800 MHz requires the VOS high voltage
range, so the board SMPS is switched to its overdrive output through PF4
-before the PLL is started. PLL2, PLL3 and PLL4 are started with the ST
-reference settings for the peripheral kernel clocks.
+before the PLL is started. PLL2, PLL3 and PLL4 are started for the
+peripheral kernel clocks.
``CONFIG_STM32N6570_DK_CLOCK_HSI`` selects a conservative tree instead: PLL1
from the internal 64 MHz HSI, CPU 200 MHz, SYSCLK 100 MHz and VOS low. The
diff --git a/content/docs/latest/_sources/platforms/arm/stm32n6/index.rst.txt
b/content/docs/latest/_sources/platforms/arm/stm32n6/index.rst.txt
index b6cf5807fb..f73864cc2d 100644
--- a/content/docs/latest/_sources/platforms/arm/stm32n6/index.rst.txt
+++ b/content/docs/latest/_sources/platforms/arm/stm32n6/index.rst.txt
@@ -31,6 +31,7 @@ DMA Yes GPDMA1 and HPDMA1 through the common
GPDMA driver.
PWR Yes Supply configuration, VOS, I/O supply validity.
RCC Yes HSI/HSE, PLL1-4, IC1-20, bus prescalers and kernel
clock selection from board.h.
+RNG Yes Through the common driver.
USART Yes USART1 only.
ADC No
@@ -44,7 +45,6 @@ LPTIM No
LTDC No
MPU No
NPU No
-RNG No
RTC No
SAI No
SDMMC No
diff --git a/content/docs/latest/components/libs/libc/printf.html
b/content/docs/latest/components/libs/libc/printf.html
new file mode 100644
index 0000000000..f3ba9c2bf0
--- /dev/null
+++ b/content/docs/latest/components/libs/libc/printf.html
@@ -0,0 +1,5 @@
+<!-- SPDX-License-Identifier: Apache-2.0 -->
+<html><head>
+<script>location.replace("../../../os/libs/libc/printf.html" +
location.hash);</script>
+<meta http-equiv="refresh" content="0; url=../../../os/libs/libc/printf.html">
+</head></html>
diff --git a/content/docs/latest/guides/chip-specific/stm32_ports.html
b/content/docs/latest/guides/chip-specific/stm32_ports.html
index b2d888630c..ea91e884a6 100644
--- a/content/docs/latest/guides/chip-specific/stm32_ports.html
+++ b/content/docs/latest/guides/chip-specific/stm32_ports.html
@@ -1177,7 +1177,7 @@ exact IP core version has not been documented yet.</p>
</tr>
<tr class="row-even"><td><p>RNG</p></td>
<td><p>v1</p></td>
-<td><p>arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c</p></td>
+<td><p>arch/arm/src/common/stm32/stm32_rng_v1.c</p></td>
</tr>
<tr class="row-odd"><td><p>RTC</p></td>
<td><p>RTCC v1</p></td>
@@ -1395,7 +1395,7 @@ exact IP core version has not been documented yet.</p>
</tr>
<tr class="row-even"><td><p>RNG</p></td>
<td><p>v1</p></td>
-<td><p>arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c</p></td>
+<td><p>arch/arm/src/common/stm32/stm32_rng_v1.c</p></td>
</tr>
<tr class="row-odd"><td><p>RTC</p></td>
<td><p>RTCC F4</p></td>
@@ -1508,7 +1508,7 @@ exact IP core version has not been documented yet.</p>
</tr>
<tr class="row-odd"><td><p>RNG</p></td>
<td><p>v1</p></td>
-<td><p>arch/arm/src/common/stm32/stm32_rng_m3m4_v1.c</p></td>
+<td><p>arch/arm/src/common/stm32/stm32_rng_v1.c</p></td>
</tr>
<tr class="row-even"><td><p>RTC</p></td>
<td><p>RTCC v1</p></td>
@@ -2015,8 +2015,8 @@ exact IP core version has not been documented yet.</p>
<td><p>arch/arm/src/stm32h5/stm32_pwm.c</p></td>
</tr>
<tr class="row-even"><td><p>RNG</p></td>
-<td><p>n/a</p></td>
-<td><p>arch/arm/src/stm32h5/stm32_rng.c</p></td>
+<td><p>v1</p></td>
+<td><p>arch/arm/src/common/stm32/stm32_rng_v1.c</p></td>
</tr>
<tr class="row-odd"><td><p>USB host</p></td>
<td><p>n/a</p></td>
@@ -2112,8 +2112,8 @@ exact IP core version has not been documented yet.</p>
<td><p>arch/arm/src/stm32h7/stm32_rcc.c</p></td>
</tr>
<tr class="row-odd"><td><p>RNG</p></td>
-<td><p>to be done</p></td>
-<td><p>arch/arm/src/stm32h7/stm32_rng.c</p></td>
+<td><p>v1</p></td>
+<td><p>arch/arm/src/common/stm32/stm32_rng_v1.c</p></td>
</tr>
<tr class="row-even"><td><p>RTC</p></td>
<td><p>to be done</p></td>
@@ -2523,27 +2523,31 @@ exact IP core version has not been documented yet.</p>
<td><p>n6</p></td>
<td><p>arch/arm/src/stm32n6/stm32n6xx_rcc.c</p></td>
</tr>
-<tr class="row-even"><td><p>SPI/I2S</p></td>
+<tr class="row-even"><td><p>RNG</p></td>
+<td><p>v1</p></td>
+<td><p>arch/arm/src/common/stm32/stm32_rng_v1.c</p></td>
+</tr>
+<tr class="row-odd"><td><p>SPI/I2S</p></td>
<td><p>to be done</p></td>
<td><p>not supported</p></td>
</tr>
-<tr class="row-odd"><td><p>TIM</p></td>
+<tr class="row-even"><td><p>TIM</p></td>
<td><p>v3</p></td>
<td><p>arch/arm/src/common/stm32/stm32_tim.c</p></td>
</tr>
-<tr class="row-even"><td><p>USART/LPUART</p></td>
+<tr class="row-odd"><td><p>USART/LPUART</p></td>
<td><p>v4</p></td>
<td><p>arch/arm/src/stm32n6/stm32_serial.c</p></td>
</tr>
-<tr class="row-odd"><td><p>USB</p></td>
+<tr class="row-even"><td><p>USB</p></td>
<td><p>device</p></td>
<td><p>not supported</p></td>
</tr>
-<tr class="row-even"><td><p>WWDG</p></td>
+<tr class="row-odd"><td><p>WWDG</p></td>
<td><p>v3</p></td>
<td><p>arch/arm/src/common/stm32/stm32_wwdg.c</p></td>
</tr>
-<tr class="row-odd"><td><p>XSPI</p></td>
+<tr class="row-even"><td><p>XSPI</p></td>
<td><p>to be done</p></td>
<td><p>not supported</p></td>
</tr>
diff --git a/content/docs/latest/guides/porting/port_bootsequence.html
b/content/docs/latest/guides/porting/port_bootsequence.html
index e64a702065..543c1e7c12 100644
--- a/content/docs/latest/guides/porting/port_bootsequence.html
+++ b/content/docs/latest/guides/porting/port_bootsequence.html
@@ -151,7 +151,13 @@
<li class="toctree-l2"><a class="reference internal"
href="../build/platform_directories.html">Platform Directories</a></li>
<li class="toctree-l2"><a class="reference internal"
href="customboards.html">Custom Boards How-To</a></li>
<li class="toctree-l2"><a class="reference internal"
href="include_files_board_h.html">Including Files in board.h</a></li>
-<li class="toctree-l2"><a class="reference internal" href="port.html">How to
port</a></li>
+<li class="toctree-l2 current"><a class="reference internal"
href="port.html">How to port</a><ul class="current">
+<li class="toctree-l3 current"><a class="current reference internal"
href="#">The diagram of boot sequence</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="port_relatedkernelconfigrations.html">The list of related kernel
configurations</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="port.html#porting-procedure">Porting procedure</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="port.html#porting-case-studies">Porting Case Studies</a></li>
+</ul>
+</li>
<li class="toctree-l2 current"><a class="current reference internal"
href="#">The diagram of boot sequence</a></li>
<li class="toctree-l2"><a class="reference internal"
href="port_relatedkernelconfigrations.html">The list of related kernel
configurations</a></li>
<li class="toctree-l2"><a class="reference internal"
href="specialstuff_in_nuttxheaderfiles.html">Why can’t I put my special stuff
in NuttX header files?</a></li>
diff --git
a/content/docs/latest/guides/porting/port_relatedkernelconfigrations.html
b/content/docs/latest/guides/porting/port_relatedkernelconfigrations.html
index 107389719a..d718a3e872 100644
--- a/content/docs/latest/guides/porting/port_relatedkernelconfigrations.html
+++ b/content/docs/latest/guides/porting/port_relatedkernelconfigrations.html
@@ -151,7 +151,13 @@
<li class="toctree-l2"><a class="reference internal"
href="../build/platform_directories.html">Platform Directories</a></li>
<li class="toctree-l2"><a class="reference internal"
href="customboards.html">Custom Boards How-To</a></li>
<li class="toctree-l2"><a class="reference internal"
href="include_files_board_h.html">Including Files in board.h</a></li>
-<li class="toctree-l2"><a class="reference internal" href="port.html">How to
port</a></li>
+<li class="toctree-l2 current"><a class="reference internal"
href="port.html">How to port</a><ul class="current">
+<li class="toctree-l3"><a class="reference internal"
href="port_bootsequence.html">The diagram of boot sequence</a></li>
+<li class="toctree-l3 current"><a class="current reference internal"
href="#">The list of related kernel configurations</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="port.html#porting-procedure">Porting procedure</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="port.html#porting-case-studies">Porting Case Studies</a></li>
+</ul>
+</li>
<li class="toctree-l2"><a class="reference internal"
href="port_bootsequence.html">The diagram of boot sequence</a></li>
<li class="toctree-l2 current"><a class="current reference internal"
href="#">The list of related kernel configurations</a></li>
<li class="toctree-l2"><a class="reference internal"
href="specialstuff_in_nuttxheaderfiles.html">Why can’t I put my special stuff
in NuttX header files?</a></li>
diff --git a/content/docs/latest/guides/programs/fully_linked_elf.html
b/content/docs/latest/guides/programs/fully_linked_elf.html
index 41dc047b39..ef8dbcf411 100644
--- a/content/docs/latest/guides/programs/fully_linked_elf.html
+++ b/content/docs/latest/guides/programs/fully_linked_elf.html
@@ -488,7 +488,7 @@ NuttX package: <code class="docutils literal
notranslate"><span class="pre">nutt
<div
class="admonition-here-is-an-alternative-minimal-and-possibly-outdated-version
admonition">
<p class="admonition-title">Here is an alternative minimal (and possibly
outdated) version</p>
<div class="sphinx_collapse docutils">
-<input class="sphinx_collapse__input"
id="ddadf42e-b150-4fcb-bd84-9857a6e2ec8e"
name="ddadf42e-b150-4fcb-bd84-9857a6e2ec8e" type="checkbox"><label
class="sphinx_collapse__label" for="ddadf42e-b150-4fcb-bd84-9857a6e2ec8e"><i
class="sphinx_collapse__icon"></i>Show content:</label><div
class="sphinx_collapse__content docutils">
+<input class="sphinx_collapse__input"
id="26902d5b-7d6a-42d9-bb88-2de41582c93f"
name="26902d5b-7d6a-42d9-bb88-2de41582c93f" type="checkbox"><label
class="sphinx_collapse__label" for="26902d5b-7d6a-42d9-bb88-2de41582c93f"><i
class="sphinx_collapse__icon"></i>Show content:</label><div
class="sphinx_collapse__content docutils">
<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>SECTIONS
{
.text 0x00000000 :
diff --git a/content/docs/latest/guides/programs/partially_linked_elf.html
b/content/docs/latest/guides/programs/partially_linked_elf.html
index 66088869f6..d9e09988e1 100644
--- a/content/docs/latest/guides/programs/partially_linked_elf.html
+++ b/content/docs/latest/guides/programs/partially_linked_elf.html
@@ -514,7 +514,7 @@ NuttX package: <code class="docutils literal
notranslate"><span class="pre">nutt
<div
class="admonition-here-is-an-alternative-minimal-and-possibly-outdated-version
admonition">
<p class="admonition-title">Here is an alternative minimal (and possibly
outdated) version</p>
<div class="sphinx_collapse docutils">
-<input class="sphinx_collapse__input"
id="8fd33900-e1ec-47d1-836a-0bbe0a01c66d"
name="8fd33900-e1ec-47d1-836a-0bbe0a01c66d" type="checkbox"><label
class="sphinx_collapse__label" for="8fd33900-e1ec-47d1-836a-0bbe0a01c66d"><i
class="sphinx_collapse__icon"></i>Show content:</label><div
class="sphinx_collapse__content docutils">
+<input class="sphinx_collapse__input"
id="c8137a1c-a87a-43c6-8e41-c3d3d3750da0"
name="c8137a1c-a87a-43c6-8e41-c3d3d3750da0" type="checkbox"><label
class="sphinx_collapse__label" for="c8137a1c-a87a-43c6-8e41-c3d3d3750da0"><i
class="sphinx_collapse__icon"></i>Show content:</label><div
class="sphinx_collapse__content docutils">
<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>SECTIONS
{
.text 0x00000000 :
diff --git a/content/docs/latest/objects.inv b/content/docs/latest/objects.inv
index 45fe5545a7..b8faab560c 100644
Binary files a/content/docs/latest/objects.inv and
b/content/docs/latest/objects.inv differ
diff --git a/content/docs/latest/os/libs/libc/index.html
b/content/docs/latest/os/libs/libc/index.html
index 7562a51784..ab8457720f 100644
--- a/content/docs/latest/os/libs/libc/index.html
+++ b/content/docs/latest/os/libs/libc/index.html
@@ -385,6 +385,7 @@ not wish to include into the base FLASH image.</p>
<ul>
<li class="toctree-l1"><a class="reference internal"
href="fnmatch.html">fnmatch</a></li>
<li class="toctree-l1"><a class="reference internal" href="popen.html">popen()
and dpopen()</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="printf.html">printf</a></li>
<li class="toctree-l1"><a class="reference internal"
href="search.html">search</a></li>
<li class="toctree-l1"><a class="reference internal"
href="stdbit.html">stdbit.h</a></li>
<li class="toctree-l1"><a class="reference internal"
href="stream.html">lib_bsprintf</a></li>
diff --git a/content/docs/latest/os/libs/libc/popen.html
b/content/docs/latest/os/libs/libc/popen.html
index e60af6d38d..046804f863 100644
--- a/content/docs/latest/os/libs/libc/popen.html
+++ b/content/docs/latest/os/libs/libc/popen.html
@@ -46,7 +46,7 @@
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
- <link rel="next" title="search" href="search.html" />
+ <link rel="next" title="printf" href="printf.html" />
<link rel="prev" title="fnmatch" href="fnmatch.html" />
</head>
@@ -228,7 +228,7 @@ pair (needs <code class="docutils literal
notranslate"><span class="pre">CONFIG_
</div>
<footer><div class="rst-footer-buttons" role="navigation"
aria-label="Footer">
<a href="fnmatch.html" class="btn btn-neutral float-left"
title="fnmatch" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"
aria-hidden="true"></span> Previous</a>
- <a href="search.html" class="btn btn-neutral float-right"
title="search" accesskey="n" rel="next">Next <span class="fa
fa-arrow-circle-right" aria-hidden="true"></span></a>
+ <a href="printf.html" class="btn btn-neutral float-right"
title="printf" accesskey="n" rel="next">Next <span class="fa
fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
diff --git a/content/docs/latest/os/libs/libc/printf.html
b/content/docs/latest/os/libs/libc/printf.html
new file mode 100644
index 0000000000..472fa35b32
--- /dev/null
+++ b/content/docs/latest/os/libs/libc/printf.html
@@ -0,0 +1,1000 @@
+<!--
+ Documentation/_templates/layout.html
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership. The
+ ASF licenses this file to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ License for the specific language governing permissions and limitations
+ under the License.
+-->
+
+
+
+<!DOCTYPE html>
+<html class="writer-html5" lang="en">
+<head>
+ <meta charset="utf-8" /><meta name="generator" content="Docutils 0.19:
https://docutils.sourceforge.io/" />
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>printf — NuttX latest documentation</title>
+ <link rel="stylesheet" type="text/css"
href="../../../_static/pygments.css" />
+ <link rel="stylesheet" type="text/css"
href="../../../_static/css/theme.css" />
+ <link rel="stylesheet" type="text/css"
href="../../../_static/copybutton.css" />
+ <link rel="stylesheet" type="text/css"
href="../../../_static/sphinx_collapse.css" />
+ <link rel="stylesheet" type="text/css"
href="../../../_static/sphinx-design.4cbf315f70debaebd550c87a6162cf0f.min.css"
/>
+ <link rel="stylesheet" type="text/css"
href="../../../_static/custom.css" />
+
+
+ <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
+ <script src="../../../_static/jquery.js"></script>
+ <script
src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
+ <script data-url_root="../../../" id="documentation_options"
src="../../../_static/documentation_options.js"></script>
+ <script src="../../../_static/doctools.js"></script>
+ <script src="../../../_static/sphinx_highlight.js"></script>
+ <script src="../../../_static/clipboard.min.js"></script>
+ <script src="../../../_static/copybutton.js"></script>
+ <script src="../../../_static/design-tabs.js"></script>
+ <script src="../../../_static/js/theme.js"></script>
+ <link rel="index" title="Index" href="../../../genindex.html" />
+ <link rel="search" title="Search" href="../../../search.html" />
+ <link rel="next" title="search" href="search.html" />
+ <link rel="prev" title="popen() and dpopen()" href="popen.html" />
+</head>
+
+<body class="wy-body-for-nav">
+ <div class="wy-grid-for-nav">
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+ <div class="wy-side-scroll">
+ <div class="wy-side-nav-search" >
+
+ <a href="../../../index.html" class="nuttx-brand">
+
+ <img src="../../../_static/NuttX.png" class="logo" alt="NuttX logo"/>
+
+
+ <span class="nuttx-brand-name">NuttX</span>
+
+ </a>
+
+ <div class="version-selector">
+ <label class="nuttx-version-label" for="nuttx-version">Version</label>
+ <select id="nuttx-version"
+ onchange="javascript:location.href = this.value;">
+ <option value="../../../../latest" selected="selected">latest</option>
+
+ <option value="../../../../10.0.0" >10.0.0</option>
+
+ <option value="../../../../10.0.1" >10.0.1</option>
+
+ <option value="../../../../10.1.0" >10.1.0</option>
+
+ <option value="../../../../10.2.0" >10.2.0</option>
+
+ <option value="../../../../10.3.0" >10.3.0</option>
+
+ <option value="../../../../11.0.0" >11.0.0</option>
+
+ <option value="../../../../12.0.0" >12.0.0</option>
+
+ <option value="../../../../12.1.0" >12.1.0</option>
+
+ <option value="../../../../12.2.0" >12.2.0</option>
+
+ <option value="../../../../12.2.1" >12.2.1</option>
+
+ <option value="../../../../12.3.0" >12.3.0</option>
+
+ <option value="../../../../12.4.0" >12.4.0</option>
+
+ <option value="../../../../12.5.0" >12.5.0</option>
+
+ <option value="../../../../12.5.1" >12.5.1</option>
+
+ <option value="../../../../12.6.0" >12.6.0</option>
+
+ <option value="../../../../12.7.0" >12.7.0</option>
+
+ <option value="../../../../12.8.0" >12.8.0</option>
+
+ <option value="../../../../12.9.0" >12.9.0</option>
+
+ <option value="../../../../12.10.0" >12.10.0</option>
+
+ <option value="../../../../12.11.0" >12.11.0</option>
+
+ <option value="../../../../12.12.0" >12.12.0</option>
+
+ <option value="../../../../12.13.0" >12.13.0</option>
+
+ <option value="../../../../13.0.0" >13.0.0</option>
+
+ <option value="../../../../13.0.1" >13.0.1</option>
+
+ <option value="../../../../13.1.0" >13.1.0</option>
+
+ </select>
+ </div>
+
+
+<div role="search">
+ <form id="rtd-search-form" class="wy-form" action="../../../search.html"
method="get">
+ <input type="text" name="q" placeholder="Search docs" aria-label="Search
docs" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+
+ </div><div class="wy-menu wy-menu-vertical" data-spy="affix"
role="navigation" aria-label="Navigation menu">
+ <p class="caption" role="heading"><span
class="caption-text">Table of Contents</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal"
href="../../../index.html">Home</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="../../../introduction/index.html">Introduction</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="../../../quickstart/index.html">Getting Started</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="../../../platforms/index.html">Supported Platforms</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="../../../guides/index.html">Guides</a></li>
+<li class="toctree-l1 current"><a class="reference internal"
href="../../index.html">OS Design</a><ul class="current">
+<li class="toctree-l2"><a class="reference internal"
href="../../index.html#build-modes">Build modes</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="../../index.html#the-kernel">The kernel</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="../../index.html#device-drivers">Device drivers</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="../../index.html#file-systems-and-networking">File systems and
networking</a></li>
+<li class="toctree-l2 current"><a class="reference internal"
href="../../index.html#running-programs">Running programs</a><ul
class="current">
+<li class="toctree-l3"><a class="reference internal"
href="../../binfmt/index.html">Binary Loader</a></li>
+<li class="toctree-l3"><a class="reference internal"
href="../../syscall.html">Syscall Layer</a></li>
+<li class="toctree-l3 current"><a class="reference internal"
href="../index.html">NuttX libraries</a><ul class="current">
+<li class="toctree-l4 current"><a class="reference internal"
href="index.html">libc</a><ul class="current">
+<li class="toctree-l5"><a class="reference internal"
href="index.html#sub-directories">Sub-Directories</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="index.html#non-standard-names-in-the-headers">Non-standard Names in the
Headers</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="index.html#library-database">Library Database</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="index.html#symtab">symtab</a></li>
+<li class="toctree-l5 current"><a class="reference internal"
href="index.html#implementation-details">Implementation Details</a></li>
+</ul>
+</li>
+<li class="toctree-l4"><a class="reference internal"
href="../libbuiltin.html">Toolchain support library</a></li>
+<li class="toctree-l4"><a class="reference internal"
href="../libdsp.html">libdsp</a></li>
+<li class="toctree-l4"><a class="reference internal"
href="../libm.html">libm</a></li>
+<li class="toctree-l4"><a class="reference internal"
href="../libxx.html">libxx</a></li>
+<li class="toctree-l4"><a class="reference internal"
href="../libnx/index.html">libnx</a></li>
+<li class="toctree-l4"><a class="reference internal"
href="../crc.html">CRC</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="toctree-l2"><a class="reference internal"
href="../../index.html#media-and-security">Media and security</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="../../index.html#portability">Portability</a></li>
+<li class="toctree-l2"><a class="reference internal"
href="../../index.html#reference">Reference</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal"
href="../../../reference/index.html">API Reference</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="../../../applications/index.html">Applications</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="../../../developing/index.html">Developing NuttX</a></li>
+<li class="toctree-l1"><a class="reference internal"
href="../../../about/index.html">About</a></li>
+</ul>
+
+ </div>
+ </div>
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav
class="wy-nav-top" aria-label="Mobile navigation menu" >
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="../../../index.html">NuttX</a>
+ </nav>
+
+ <div class="wy-nav-content">
+ <div class="rst-content">
+ <div role="navigation" aria-label="Page navigation">
+ <ul class="wy-breadcrumbs">
+ <li><a href="../../../index.html" class="icon icon-home"
aria-label="Home"></a></li>
+ <li class="breadcrumb-item"><a href="../../index.html">OS
Design</a></li>
+ <li class="breadcrumb-item"><a href="../index.html">NuttX
libraries</a></li>
+ <li class="breadcrumb-item"><a href="index.html">libc</a></li>
+ <li class="breadcrumb-item active">printf</li>
+ <li class="wy-breadcrumbs-aside">
+ <a
href="https://github.com/apache/nuttx/blob/master/Documentation/os/libs/libc/printf.rst"
class="fa fa-github"> Edit on GitHub</a>
+ </li>
+ </ul>
+ <hr/>
+</div>
+ <div role="main" class="document" itemscope="itemscope"
itemtype="http://schema.org/Article">
+ <div itemprop="articleBody">
+
+ <section id="printf">
+<h1>printf<a class="headerlink" href="#printf" title="Permalink to this
heading"></a></h1>
+<p>This page explains what <code class="docutils literal notranslate"><span
class="pre">printf()</span></code> does in NuttX: each conversion, flag,
+length, width and precision, each option and profile, and the flash and stack
+that each one costs.</p>
+<p><code class="docutils literal notranslate"><span
class="pre">printf()</span></code>, <code class="docutils literal
notranslate"><span class="pre">fprintf()</span></code>, <code class="docutils
literal notranslate"><span class="pre">dprintf()</span></code>, <code
class="docutils literal notranslate"><span class="pre">sprintf()</span></code>,
<code class="docutils literal notranslate"><span
class="pre">snprintf()</span></code>,
+<code class="docutils literal notranslate"><span
class="pre">asprintf()</span></code>, <code class="docutils literal
notranslate"><span class="pre">syslog()</span></code> and their <code
class="docutils literal notranslate"><span class="pre">v</span></code> forms
all use one function:
+<code class="docutils literal notranslate"><span
class="pre">lib_vsprintf()</span></code> in <code class="docutils literal
notranslate"><span
class="pre">libs/libc/stream/lib_libvsprintf.c</span></code>. So this page
+applies to all of them.</p>
+<p>On an output error, <code class="docutils literal notranslate"><span
class="pre">printf()</span></code>, <code class="docutils literal
notranslate"><span class="pre">fprintf()</span></code> and their <code
class="docutils literal notranslate"><span class="pre">v</span></code> forms
return a
+negative value. A buffered stream reports a write error when it flushes.</p>
+<p>All outputs on this page come from a run of the examples on NuttX
+(<code class="docutils literal notranslate"><span
class="pre">rv-virt:nsh</span></code>, 32-bit RISC-V, under QEMU). The first
sections show the
+Full profile. Each example shows the output between quotes.</p>
+<section id="the-rule">
+<h2>The rule<a class="headerlink" href="#the-rule" title="Permalink to this
heading"></a></h2>
+<p>A correct call of <code class="docutils literal notranslate"><span
class="pre">printf()</span></code> never crashes or hangs, in any configuration.
+A <em>correct call</em> is a call that GCC and Clang accept with
+<code class="docutils literal notranslate"><span class="pre">-Wall</span>
<span class="pre">-Wextra</span> <span class="pre">-Wformat=2</span></code>.</p>
+<ul class="simple">
+<li><p>The grammar of the format is always on. An option removes an output,
and
+never the parser.</p></li>
+<li><p>Each argument is read at its right size, also when its conversion is
off.</p></li>
+<li><p>A conversion that is off prints one <code class="docutils literal
notranslate"><span class="pre">?</span></code>, padded to the width, so the rest
+of the line stays correct. <code class="docutils literal notranslate"><span
class="pre">%n</span></code> always prints nothing.</p></li>
+<li><p>Width and precision counters cannot wrap. No read or write goes
outside a
+buffer. <code class="docutils literal notranslate"><span
class="pre">NULL</span></code> for <code class="docutils literal
notranslate"><span class="pre">%s</span></code> prints <code class="docutils
literal notranslate"><span class="pre">(null)</span></code>. The stack use is
bounded.</p></li>
+</ul>
+</section>
+<section id="conversions">
+<h2>Conversions<a class="headerlink" href="#conversions" title="Permalink to
this heading"></a></h2>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"><p>Conversion</p></th>
+<th class="head"><p>Output</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">%d</span></code>, <code class="docutils literal notranslate"><span
class="pre">%i</span></code></p></td>
+<td><p>A signed decimal integer.</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">%u</span></code></p></td>
+<td><p>An unsigned decimal integer.</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">%o</span></code></p></td>
+<td><p>An unsigned octal integer.</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">%x</span></code>, <code class="docutils literal notranslate"><span
class="pre">%X</span></code></p></td>
+<td><p>An unsigned hexadecimal integer.</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">%b</span></code>, <code class="docutils literal notranslate"><span
class="pre">%B</span></code></p></td>
+<td><p>An unsigned binary integer (C23, <code class="docutils literal
notranslate"><span class="pre">LIBC_PRINTF_C23</span></code>).</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">%c</span></code></p></td>
+<td><p>One character.</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">%s</span></code></p></td>
+<td><p>A string.</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">%p</span></code></p></td>
+<td><p>A pointer, in hexadecimal, with <code class="docutils literal
notranslate"><span class="pre">0x</span></code>.</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">%%</span></code></p></td>
+<td><p>One <code class="docutils literal notranslate"><span
class="pre">%</span></code>.</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">%e</span></code>, <code class="docutils literal notranslate"><span
class="pre">%E</span></code></p></td>
+<td><p>A float, in the form <code class="docutils literal notranslate"><span
class="pre">d.ddde+dd</span></code>.</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">%f</span></code>, <code class="docutils literal notranslate"><span
class="pre">%F</span></code></p></td>
+<td><p>A float, in the form <code class="docutils literal notranslate"><span
class="pre">ddd.ddd</span></code>.</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">%g</span></code>, <code class="docutils literal notranslate"><span
class="pre">%G</span></code></p></td>
+<td><p>A float, in the form of <code class="docutils literal
notranslate"><span class="pre">%e</span></code> or <code class="docutils
literal notranslate"><span class="pre">%f</span></code>, whichever is
+shorter, without trailing zeros. With <code class="docutils literal
notranslate"><span class="pre">#</span></code> the zeros
+stay.</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">%a</span></code>, <code class="docutils literal notranslate"><span
class="pre">%A</span></code></p></td>
+<td><p>A float, exactly, in hexadecimal
+(<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_HEXFLOAT</span></code>).</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">%n</span></code></p></td>
+<td><p>Reads its pointer and prints nothing. It stores nothing,
+so a format never writes to memory.
+<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_PERCENT_N</span></code> stores the count: it is
+dangerous, and no profile has it.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%d", 42) "42"
+printf("%i", -42) "-42"
+printf("%u", 42) "42"
+printf("%o", 8) "10"
+printf("%x", 255) "ff"
+printf("%X", 255) "FF"
+printf("%c", 'A') "A"
+printf("%s", "text") "text"
+printf("%p", (void *)0x1000) "0x1000"
+printf("100%%") "100%"
+printf("%e", 3.14159) "3.141590e+00"
+printf("%E", 3.14159) "3.141590E+00"
+printf("%f", 3.14159) "3.141590"
+printf("%F", 3.14159) "3.141590"
+printf("%g", 3.14159) "3.14159"
+printf("%G", 0.000001) "1E-06"
+printf("%a", 1.5) "0x1.8p+0"
+printf("%A", 1.5) "0X1.8P+0"
+printf("%b", 5) "101"
+printf("%B", 5) "101"
+printf("ab%n|", &n) "ab|"
+</pre></div>
+</div>
+</section>
+<section id="flags">
+<h2>Flags<a class="headerlink" href="#flags" title="Permalink to this
heading"></a></h2>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"><p>Flag</p></th>
+<th class="head"><p>Effect</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">-</span></code></p></td>
+<td><p>Pads on the right (<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_LEFT_JUSTIFY</span></code>).</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">+</span></code></p></td>
+<td><p>Prints the sign of a positive number.</p></td>
+</tr>
+<tr class="row-even"><td><p>space</p></td>
+<td><p>Prints a space in place of the sign of a positive number.</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">#</span></code></p></td>
+<td><p>The alternative form (<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_ALT_FORM</span></code>): <code class="docutils literal
notranslate"><span class="pre">0x</span></code>, <code class="docutils literal
notranslate"><span class="pre">0X</span></code>,
+<code class="docutils literal notranslate"><span class="pre">0b</span></code>,
<code class="docutils literal notranslate"><span class="pre">0B</span></code>,
a first <code class="docutils literal notranslate"><span
class="pre">0</span></code> for <code class="docutils literal
notranslate"><span class="pre">%o</span></code>, the point of a float
+that has no digits after it, and the trailing zeros of <code class="docutils
literal notranslate"><span class="pre">%g</span></code>.</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">0</span></code></p></td>
+<td><p>Pads with zeros after the sign and the prefix.</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">'</span></code></p></td>
+<td><p>Accepted and ignored: the C locale has no separator.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%-5d|", 42) "42 |"
+printf("%+d", 42) "+42"
+printf("% d", 42) " 42"
+printf("%#x", 255) "0xff"
+printf("%#X", 255) "0XFF"
+printf("%#o", 8) "010"
+printf("%#b", 5) "0b101"
+printf("%#.0f", 3.0) "3."
+printf("%#g", 1.0) "1.00000"
+printf("%05d", 42) "00042"
+printf("%'d", 1234567) "1234567"
+</pre></div>
+</div>
+</section>
+<section id="width">
+<h2>Width<a class="headerlink" href="#width" title="Permalink to this
heading"></a></h2>
+<p>The width is the smallest number of bytes. A longer output is not cut.
<code class="docutils literal notranslate"><span class="pre">*</span></code>
+takes the width from an <code class="docutils literal notranslate"><span
class="pre">int</span></code> argument, and a negative value means the <code
class="docutils literal notranslate"><span class="pre">-</span></code>
+flag and a positive width.</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%5d", 42) " 42"
+printf("%*d", 5, 42) " 42"
+printf("%*d|", -5, 42) "42 |"
+printf("%5s", "ab") " ab"
+printf("%-5s|", "ab") "ab |"
+printf("%3d", 12345) "12345"
+</pre></div>
+</div>
+</section>
+<section id="precision">
+<h2>Precision<a class="headerlink" href="#precision" title="Permalink to this
heading"></a></h2>
+<p>For an integer, the precision is the smallest number of digits
+(<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_INT_PRECISION</span></code>). An integer with the
value 0 and a precision
+of 0 prints no digits. For <code class="docutils literal notranslate"><span
class="pre">%e</span></code>, <code class="docutils literal notranslate"><span
class="pre">%f</span></code> and <code class="docutils literal
notranslate"><span class="pre">%a</span></code> it is the number of digits
+after the point. For <code class="docutils literal notranslate"><span
class="pre">%g</span></code> it is the number of significant digits. For
+<code class="docutils literal notranslate"><span class="pre">%s</span></code>
it is the largest number of bytes. <code class="docutils literal
notranslate"><span class="pre">*</span></code> takes it from an <code
class="docutils literal notranslate"><span class="pre">int</span></code>
+argument, and a negative value means no precision.</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%.3d", 5) "005"
+printf("%.0d|", 0) "|"
+printf("%8.3d", 5) " 005"
+printf("%.2f", 3.14159) "3.14"
+printf("%.3e", 3.14159) "3.142e+00"
+printf("%.3g", 3.14159) "3.14"
+printf("%.3s", "abcde") "abc"
+printf("%.*f", 1, 2.25) "2.2"
+printf("%.*d|", -1, 0) "0|"
+printf("%8.2f", 3.14159) " 3.14"
+printf("%.0f", 2.5) "2"
+</pre></div>
+</div>
+</section>
+<section id="length-modifiers">
+<h2>Length modifiers<a class="headerlink" href="#length-modifiers"
title="Permalink to this heading"></a></h2>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"><p>Length</p></th>
+<th class="head"><p>Argument of an integer conversion</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">hh</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">char</span></code> (<code class="docutils literal
notranslate"><span class="pre">LIBC_PRINTF_SHORT</span></code>)</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">h</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">short</span></code> (<code class="docutils literal
notranslate"><span class="pre">LIBC_PRINTF_SHORT</span></code>)</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">l</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">long</span></code></p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">ll</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">long</span> <span class="pre">long</span></code> (<code
class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_LONG_LONG</span></code>)</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">j</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">intmax_t</span></code> (<code class="docutils literal
notranslate"><span class="pre">LIBC_PRINTF_LONG_LONG</span></code>)</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">z</span></code>, <code class="docutils literal notranslate"><span
class="pre">t</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">size_t</span></code>, <code class="docutils literal
notranslate"><span class="pre">ptrdiff_t</span></code></p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">L</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">long</span> <span class="pre">double</span></code> for a float, and
<code class="docutils literal notranslate"><span class="pre">long</span> <span
class="pre">long</span></code>
+for an integer, as in GNU libc</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">w8</span></code>, <code class="docutils literal notranslate"><span
class="pre">w16</span></code>, <code class="docutils literal notranslate"><span
class="pre">w32</span></code>,</p></td>
+<td><p>The exact-width types (C23,</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">w64</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_C23</span></code>)</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">wf8</span></code>, <code class="docutils literal notranslate"><span
class="pre">wf16</span></code>, <code class="docutils literal
notranslate"><span class="pre">wf32</span></code>,</p></td>
+<td><p>The fastest types of that width (C23,</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">wf64</span></code></p></td>
+<td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_C23</span></code>)</p></td>
+</tr>
+</tbody>
+</table>
+<p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_LONG_LONG</span></code> applies where <code
class="docutils literal notranslate"><span class="pre">long</span> <span
class="pre">long</span></code> is longer than <code class="docutils literal
notranslate"><span class="pre">long</span></code>.
+A <code class="docutils literal notranslate"><span class="pre">long</span>
<span class="pre">double</span></code> prints with the precision and range of a
<code class="docutils literal notranslate"><span
class="pre">double</span></code>, but
+<code class="docutils literal notranslate"><span class="pre">%La</span></code>
prints all its bits where it has more than a <code class="docutils literal
notranslate"><span class="pre">double</span></code>.</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%hhd", 300)
"44"
+printf("%hd", 70000) "4464"
+printf("%ld", 1234567L) "1234567"
+printf("%lld", 123456789012LL) "123456789012"
+printf("%llx", 0x123456789abULL) "123456789ab"
+printf("%jd", (intmax_t)-1) "-1"
+printf("%zu", (size_t)42) "42"
+printf("%td", (ptrdiff_t)-42) "-42"
+printf("%Lf", (long double)1.5) "1.500000"
+printf("%La", (long double)1.5) "0x1.8p+0"
+printf("%w8d", 300) "44"
+printf("%w16x", 0x12345) "2345"
+printf("%w32u", 42) "42"
+printf("%w64d", (int64_t)123456789012LL) "123456789012"
+printf("%wf16d", 42) "42"
+</pre></div>
+</div>
+</section>
+<section id="numbered-arguments">
+<h2>Numbered arguments<a class="headerlink" href="#numbered-arguments"
title="Permalink to this heading"></a></h2>
+<p><code class="docutils literal notranslate"><span
class="pre">%n$</span></code> takes argument number <em>n</em> (<code
class="docutils literal notranslate"><span
class="pre">LIBC_NUMBERED_ARGS</span></code>), up to
+<code class="docutils literal notranslate"><span
class="pre">LIBC_NL_ARGMAX</span></code>. <code class="docutils literal
notranslate"><span class="pre">*m$</span></code> takes a width or precision
from argument <em>m</em>.
+POSIX does not allow a mix of numbered and sequential conversions in one
format.</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%2$s %1$s", "world", "hello")
"hello world"
+printf("%1$*2$d|", 42, 5) " 42|"
+printf("%2$.*1$f", 2, 3.14159) "3.14"
+</pre></div>
+</div>
+<p>Each argument before the highest number that the format uses must have a
+number in the format: otherwise its size is not known, so <code
class="docutils literal notranslate"><span class="pre">printf()</span></code>
cannot
+find the arguments after it. Then it reads only the arguments before the gap,
+and a conversion with a later number ends the output.</p>
+</section>
+<section id="floating-point-values">
+<h2>Floating point values<a class="headerlink" href="#floating-point-values"
title="Permalink to this heading"></a></h2>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%f", 1.0 / 0.0) "inf"
+printf("%F", -1.0 / 0.0) "-INF"
+printf("%e", 0.0 / 0.0 * 0.0) "nan"
+printf("%f", -0.0) "-0.000000"
+printf("%g", -0.0) "-0"
+printf("%a", -0.0) "-0x0p+0"
+printf("%s", (char *)NULL) "(null)"
+printf("%a", 0.1) "0x1.999999999999ap-4"
+printf("%.0a", 1.5) "0x2p+0"
+printf("%.1a", 1.09375) "0x1.2p+0"
+printf("%a", 5e-324) "0x0.0000000000001p-1022"
+printf("%a", 1.0 / 0.0) "inf"
+printf("%10.3a|", 1.5) "0x1.800p+0|"
+printf("%#.0a", 1.0) "0x1.p+0"
+printf("%010a", 1.5) "0x001.8p+0"
+</pre></div>
+</div>
+<p><code class="docutils literal notranslate"><span
class="pre">%a</span></code> has no limit on precision and takes all digits
from the bits of the
+value. With a precision it rounds to nearest, ties to even. A subnormal value
+has a first digit of 0 and the exponent of the smallest normal value, as in GNU
+libc.</p>
+</section>
+<section id="unknown-conversions-and-truncated-formats">
+<h2>Unknown conversions and truncated formats<a class="headerlink"
href="#unknown-conversions-and-truncated-formats" title="Permalink to this
heading"></a></h2>
+<p>An unknown conversion has no known argument size. So <code class="docutils
literal notranslate"><span class="pre">printf()</span></code> prints <code
class="docutils literal notranslate"><span class="pre">%</span></code>
+and the letter, then the rest of the format as text, reads no more arguments,
+and ends. A format that ends in the middle of a conversion prints <code
class="docutils literal notranslate"><span class="pre">%</span></code> and
+ends, and no read goes past the terminator. This is always on. A valid C23
+format that this configuration does not know takes the same path, so it cannot
+misread a later <code class="docutils literal notranslate"><span
class="pre">%s</span></code>.</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%d %y %d", 1, 2) "1 %y %d"
+printf("a%-5.3kb%d", 1) "a%kb%d"
+printf("abc%") "abc%"
+printf("abc%5") "abc%"
+printf("abc%l") "abc%"
+printf("%Hf|%s", 1.5, "x") "%Hf|%s"
+printf("%w7d|%d", 1, 2) "%w7d|%d"
+</pre></div>
+</div>
+</section>
+<section id="large-output">
+<h2>Large output<a class="headerlink" href="#large-output" title="Permalink to
this heading"></a></h2>
+<p>There is no cap on width or precision. <code class="docutils literal
notranslate"><span class="pre">%2147483647d</span></code> is legal and prints
all
+of it, which takes about 2 days on a 115200 baud console. A caller with a
small
+buffer must use <code class="docutils literal notranslate"><span
class="pre">snprintf()</span></code>. If the total passes <code
class="docutils literal notranslate"><span class="pre">INT_MAX</span></code>,
the result
+is -1 with <code class="docutils literal notranslate"><span
class="pre">errno</span></code> set to <code class="docutils literal
notranslate"><span class="pre">EOVERFLOW</span></code>. The output written
before that stays.
+A conversion that is longer than <code class="docutils literal
notranslate"><span class="pre">INT_MAX</span></code> fails before its output.
A width
+or precision with too many digits stops at <code class="docutils literal
notranslate"><span class="pre">INT_MAX</span></code>.</p>
+<p>The next examples use <code class="docutils literal notranslate"><span
class="pre">snprintf()</span></code> with a small buffer, and show the return
+value.</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>snprintf(buf, sizeof(buf), "x%2147483647d",
1) returns -1, errno 75 (EOVERFLOW)
+snprintf(buf, sizeof(buf), "%.2147483647f", 1.5) returns -1, errno
75 (EOVERFLOW)
+snprintf(buf, sizeof(buf), "%.99999999999s|", "abc") returns 4
+snprintf(buf, sizeof(buf), "%300d", 1) returns 300
+</pre></div>
+</div>
+</section>
+<section id="options-and-profiles">
+<h2>Options and profiles<a class="headerlink" href="#options-and-profiles"
title="Permalink to this heading"></a></h2>
+<p>Each feature is an option with its own prompt. A profile only sets the
default
+of each option: select one in <em>Library Routines</em>, <em>printf
profile</em>. You can add
+or remove any feature in any profile.</p>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"><p>Option</p></th>
+<th class="head"><p>Minimal</p></th>
+<th class="head"><p>Default</p></th>
+<th class="head"><p>Full</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_FLOATINGPOINT</span></code></p></td>
+<td><p>off</p></td>
+<td><p>see below</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_HEXFLOAT</span></code></p></td>
+<td><p>off</p></td>
+<td><p>off</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_C23</span></code></p></td>
+<td><p>off</p></td>
+<td><p>off</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT</span></code></p></td>
+<td><p>off</p></td>
+<td><p>off</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT_LDOUBLE</span></code></p></td>
+<td><p>off</p></td>
+<td><p>off</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_PERCENT_N</span></code></p></td>
+<td><p>off</p></td>
+<td><p>off</p></td>
+<td><p>off</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_NUMBERED_ARGS</span></code></p></td>
+<td><p>off</p></td>
+<td><p>off</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_LOCALE</span></code></p></td>
+<td><p>off</p></td>
+<td><p>off</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_LONG_LONG</span></code></p></td>
+<td><p>see below</p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_ALT_FORM</span></code></p></td>
+<td><p>off</p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_INT_PRECISION</span></code></p></td>
+<td><p>off</p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_OCTAL</span></code></p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_LEFT_JUSTIFY</span></code></p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_SHORT</span></code></p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+<td><p>on</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">STREAM_OUT_BUFFER_SIZE</span></code></p></td>
+<td><p>0</p></td>
+<td><p>64</p></td>
+<td><p>64</p></td>
+</tr>
+</tbody>
+</table>
+<p>In Default, <code class="docutils literal notranslate"><span
class="pre">LIBC_FLOATINGPOINT</span></code> is on when <code class="docutils
literal notranslate"><span class="pre">DEFAULT_SMALL</span></code> is off and
the
+CPU has an FPU, as before the profiles existed. In Minimal,
+<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_LONG_LONG</span></code> stays on with <code
class="docutils literal notranslate"><span
class="pre">SYSLOG_TIMESTAMP</span></code> or <code class="docutils literal
notranslate"><span class="pre">FS_PROCFS</span></code>,
+because the log time stamps and <code class="docutils literal
notranslate"><span class="pre">/proc</span></code> print <code class="docutils
literal notranslate"><span class="pre">time_t</span></code> and <code
class="docutils literal notranslate"><span
class="pre">uint64_t</span></code>.</p>
+<p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_HEXFLOAT</span></code> does not need <code
class="docutils literal notranslate"><span
class="pre">LIBC_FLOATINGPOINT</span></code>. It uses no
+floating point operation and pulls in no soft-float code, so a small board with
+floating point off can still print the exact value of a <code class="docutils
literal notranslate"><span class="pre">double</span></code>.</p>
+<p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT</span></code> prints the correctly rounded digits
of each <code class="docutils literal notranslate"><span
class="pre">double</span></code>,
+ties to even, with no limit on the number of digits. Most values take the same
+short path as without the option. A value that the short path cannot prove
+correct takes <code class="docutils literal notranslate"><span
class="pre">vsprintf_float_big()</span></code>, with a larger stack frame.
+<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT_LDOUBLE</span></code> does the same for <code
class="docutils literal notranslate"><span class="pre">long</span> <span
class="pre">double</span></code>, and needs
+<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT</span></code>. Its buffer is on the stack of
<code class="docutils literal notranslate"><span
class="pre">vsprintf_ldouble()</span></code>, which
+only <code class="docutils literal notranslate"><span
class="pre">%Le</span></code>, <code class="docutils literal notranslate"><span
class="pre">%Lf</span></code> and <code class="docutils literal
notranslate"><span class="pre">%Lg</span></code> call.</p>
+<p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_PERCENT_N</span></code> is dangerous. With it, <code
class="docutils literal notranslate"><span class="pre">%n</span></code> stores
the count of the
+bytes so far through its pointer, at the size of its length modifier, and
prints
+nothing. A format that an attacker can change then gives a write to any
address.
+A <code class="docutils literal notranslate"><span
class="pre">NULL</span></code> pointer stores nothing. With it on, the call
below stores 2 in <code class="docutils literal notranslate"><span
class="pre">n</span></code>:</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("ab%n|", &n) "ab|"
+</pre></div>
+</div>
+<section id="what-a-feature-prints-when-it-is-off">
+<h3>What a feature prints when it is off<a class="headerlink"
href="#what-a-feature-prints-when-it-is-off" title="Permalink to this
heading"></a></h3>
+<p>Each line shows the same call with the feature on, then with it off. The
<code class="docutils literal notranslate"><span class="pre">?</span></code>
+comes from a conversion that is off: the argument is read at its right size, so
+the next conversion is correct. With <code class="docutils literal
notranslate"><span class="pre">LIBC_PRINTF_ALT_FORM</span></code> off the flag
has
+no effect, but <code class="docutils literal notranslate"><span
class="pre">%p</span></code> keeps <code class="docutils literal
notranslate"><span class="pre">0x</span></code>. With <code class="docutils
literal notranslate"><span class="pre">LIBC_PRINTF_LEFT_JUSTIFY</span></code>
off the
+output pads on the left. With <code class="docutils literal
notranslate"><span class="pre">LIBC_PRINTF_C23</span></code> off <code
class="docutils literal notranslate"><span class="pre">%b</span></code> and
<code class="docutils literal notranslate"><span class="pre">wN</span></code>
are
+unknown conversions, so they print as text and end the conversions. Numbered
+arguments off have the same result.</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>Call
Full All off
+printf("ab%n|", &n) "ab|" "ab|"
+printf("%f", 3.14159) "3.141590" "?"
+printf("%e", 3.14159) "3.141590e+00" "?"
+printf("%g", 3.14159) "3.14159" "?"
+printf("%a", 1.5) "0x1.8p+0" "?"
+printf("%b", 5) "101" "%b"
+printf("%#x", 255) "0xff" "ff"
+printf("%#o", 8) "010" "?"
+printf("%p", (void *)0x1000) "0x1000" "0x1000"
+printf("%.3d", 5) "005" "?"
+printf("%8.3d", 5) " 005" " ?"
+printf("%.3s", "abcde") "abc" "abc"
+printf("%o", 8) "10" "?"
+printf("%-5d|", 42) "42 |" " 42|"
+printf("%-5s|", "ab") "ab |" " ab|"
+printf("%hhd", 300) "44" "?"
+printf("%hd", 70000) "4464" "?"
+printf("%lld", 123456789012LL) "123456789012" "?"
+printf("%llx", 0x123456789abULL) "123456789ab" "?"
+printf("%jd", (intmax_t)-1) "-1" "?"
+printf("%ld", 1234567L) "1234567" "1234567"
+printf("%Lf", (long double)1.5) "1.500000" "?"
+printf("%La", (long double)1.5) "0x1.8p+0" "?"
+printf("%w64d", (int64_t)123456789012LL) "123456789012" "%w64d"
+printf("%2$s %1$s", "world", "hello") "hello world" "%$s %1$s"
+printf("%05d", 42) "00042" "00042"
+</pre></div>
+</div>
+</section>
+</section>
+<section id="correct-and-wrong-usage">
+<h2>Correct and wrong usage<a class="headerlink"
href="#correct-and-wrong-usage" title="Permalink to this heading"></a></h2>
+<p>If the compiler accepts the call with <code class="docutils literal
notranslate"><span class="pre">-Wall</span> <span class="pre">-Wextra</span>
<span class="pre">-Wformat=2</span></code>, it is correct
+usage and <code class="docutils literal notranslate"><span
class="pre">printf()</span></code> must handle it. If the compiler warns, it
is wrong usage.</p>
+<p>These are outside the guarantee, because <code class="docutils literal
notranslate"><span class="pre">printf()</span></code> cannot detect them:</p>
+<ul class="simple">
+<li><p>A wild pointer for <code class="docutils literal notranslate"><span
class="pre">%s</span></code>.</p></li>
+<li><p>An argument of the wrong type, such as a <code class="docutils literal
notranslate"><span class="pre">double</span></code> for <code class="docutils
literal notranslate"><span class="pre">%d</span></code> or an <code
class="docutils literal notranslate"><span class="pre">int</span></code>
+for <code class="docutils literal notranslate"><span
class="pre">%s</span></code>.</p></li>
+<li><p><code class="docutils literal notranslate"><span
class="pre">printf(NULL)</span></code>: <code class="docutils literal
notranslate"><span class="pre">NULL</span></code> is not a format
string.</p></li>
+<li><p>A mix of numbered and sequential conversions.</p></li>
+<li><p>A wild pointer for <code class="docutils literal notranslate"><span
class="pre">%n</span></code> with <code class="docutils literal
notranslate"><span class="pre">LIBC_PRINTF_PERCENT_N</span></code> on.</p></li>
+</ul>
+</section>
+<section id="what-is-outside-the-guarantee">
+<h2>What is outside the guarantee<a class="headerlink"
href="#what-is-outside-the-guarantee" title="Permalink to this
heading"></a></h2>
+<p>The guarantee is about safety. Without <code class="docutils literal
notranslate"><span class="pre">LIBC_PRINTF_EXACT</span></code> the output of
+<code class="docutils literal notranslate"><span class="pre">%e</span></code>,
<code class="docutils literal notranslate"><span class="pre">%f</span></code>
and <code class="docutils literal notranslate"><span
class="pre">%g</span></code> is not exact, and some forms do not match the
standard
+yet. Each call below shows the output of Default, and of Full with the exact
+options on:</p>
+<div class="highlight-text notranslate"><div
class="highlight"><pre><span></span>printf("%.0f", 0.5)
+ Default: "0"
+ Exact: "0"
+printf("%.0f", 2.5)
+ Default: "2"
+ Exact: "2"
+printf("%.2f", 1.005)
+ Default: "1.00"
+ Exact: "1.00"
+printf("%.0f", 1e22)
+ Default: "10000000000000000000000"
+ Exact: "10000000000000000000000"
+printf("%.20f", 0.1)
+ Default: "0.10000000000000001000"
+ Exact: "0.10000000000000000555"
+printf("%.17e", 0.1)
+ Default: "1.00000000000000010e-01"
+ Exact: "1.00000000000000006e-01"
+printf("%.25e", 1e23)
+ Default: "9.9999999999999992000000000e+22"
+ Exact: "9.9999999999999991611392000e+22"
+printf("%g", 1234567.0)
+ Default: "1.23457e+06"
+ Exact: "1.23457e+06"
+printf("%#g", 1.0)
+ Default: "1.00000"
+ Exact: "1.00000"
+printf("%.30Le", 0.1L)
+ Default: "1.000000000000000100000000000000e-01"
+ Exact: "1.000000000000000000000000000000e-01"
+</pre></div>
+</div>
+<ul class="simple">
+<li><p>Without <code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT</span></code>, <code class="docutils literal
notranslate"><span class="pre">%e</span></code>, <code class="docutils literal
notranslate"><span class="pre">%f</span></code> and <code class="docutils
literal notranslate"><span class="pre">%g</span></code> have at most 17
+significant digits. The digits after them print as 0. The last digits can
+differ from a correctly rounded result.</p></li>
+<li><p>Without <code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT_LDOUBLE</span></code>, <code class="docutils
literal notranslate"><span class="pre">%Le</span></code>, <code class="docutils
literal notranslate"><span class="pre">%Lf</span></code> and <code
class="docutils literal notranslate"><span class="pre">%Lg</span></code> have
the
+precision and the range of a <code class="docutils literal notranslate"><span
class="pre">double</span></code>.</p></li>
+<li><p><code class="docutils literal notranslate"><span
class="pre">%lc</span></code> and <code class="docutils literal
notranslate"><span class="pre">%ls</span></code> without <code class="docutils
literal notranslate"><span class="pre">LIBC_LOCALE</span></code> print narrow
characters.</p></li>
+<li><p><code class="docutils literal notranslate"><span
class="pre">dprintf()</span></code> returns the length of the output also when
the write fails.</p></li>
+<li><p><code class="docutils literal notranslate"><span
class="pre">lib_bsprintf()</span></code> has its own smaller format: see <a
class="reference internal" href="stream.html"><span
class="doc">lib_bsprintf</span></a>.</p></li>
+</ul>
+</section>
+<section id="flash-and-stack">
+<h2>Flash and stack<a class="headerlink" href="#flash-and-stack"
title="Permalink to this heading"></a></h2>
+<p>Each number comes from a build of the board’s configuration with <code
class="docutils literal notranslate"><span class="pre">-Os</span></code>, the
+<code class="docutils literal notranslate"><span
class="pre">size</span></code> tool, the linker map and <code class="docutils
literal notranslate"><span class="pre">-fstack-usage</span></code>. The boards
are
+<code class="docutils literal notranslate"><span
class="pre">nucleo-f072rb:nsh</span></code> (Cortex-M0), <code class="docutils
literal notranslate"><span class="pre">nucleo-f103rb:nsh</span></code>
(Cortex-M3),
+<code class="docutils literal notranslate"><span
class="pre">rv-virt:nsh</span></code> (32-bit RISC-V, with an FPU) and <code
class="docutils literal notranslate"><span
class="pre">qemu-armv8a:nsh</span></code> (arm64).
+Other boards and compilers give other numbers, so use them to compare.</p>
+<p>Image text, in bytes:</p>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"></th>
+<th class="head"><p>Cortex-M0</p></th>
+<th class="head"><p>Cortex-M3</p></th>
+<th class="head"><p>rv32</p></th>
+<th class="head"><p>arm64</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p>Minimal</p></td>
+<td><p>46,460</p></td>
+<td><p>33,964</p></td>
+<td><p>228,166</p></td>
+<td><p>325,844</p></td>
+</tr>
+<tr class="row-odd"><td><p>Default</p></td>
+<td><p>46,792</p></td>
+<td><p>34,512</p></td>
+<td><p>231,490</p></td>
+<td><p>329,564</p></td>
+</tr>
+<tr class="row-even"><td><p>Full</p></td>
+<td><p>58,072</p></td>
+<td><p>40,156</p></td>
+<td><p>235,900</p></td>
+<td><p>335,360</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT</span></code> added, floating point on</p></td>
+<td><p>+1544</p></td>
+<td><p>+1352</p></td>
+<td><p>+1628</p></td>
+<td><p>+1912</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_EXACT_LDOUBLE</span></code> added to that</p></td>
+<td><p>+0</p></td>
+<td><p>+0</p></td>
+<td><p>+176</p></td>
+<td><p>+320</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_HEXFLOAT</span></code> added to Minimal</p></td>
+<td><p>+840</p></td>
+<td><p>+820</p></td>
+<td><p>+1048</p></td>
+<td><p>+1472</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_C23</span></code> added to Minimal</p></td>
+<td><p>+160</p></td>
+<td><p>+228</p></td>
+<td><p>+166</p></td>
+<td><p>+192</p></td>
+</tr>
+</tbody>
+</table>
+<p>The objects of printf (text and data), in bytes:</p>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"></th>
+<th class="head"><p>Cortex-M0</p></th>
+<th class="head"><p>Cortex-M3</p></th>
+<th class="head"><p>rv32</p></th>
+<th class="head"><p>arm64</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p>Minimal</p></td>
+<td><p>1,519</p></td>
+<td><p>1,307</p></td>
+<td><p>1,937</p></td>
+<td><p>2,801</p></td>
+</tr>
+<tr class="row-odd"><td><p>Default</p></td>
+<td><p>1,835</p></td>
+<td><p>1,785</p></td>
+<td><p>5,373</p></td>
+<td><p>6,525</p></td>
+</tr>
+<tr class="row-even"><td><p>Full</p></td>
+<td><p>7,635</p></td>
+<td><p>7,269</p></td>
+<td><p>9,743</p></td>
+<td><p>12,077</p></td>
+</tr>
+</tbody>
+</table>
+<p><code class="docutils literal notranslate"><span
class="pre">libgcc</span></code> in the image, in bytes:</p>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"></th>
+<th class="head"><p>Cortex-M0</p></th>
+<th class="head"><p>Cortex-M3</p></th>
+<th class="head"><p>rv32</p></th>
+<th class="head"><p>arm64</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p>Minimal</p></td>
+<td><p>2,028</p></td>
+<td><p>964</p></td>
+<td><p>4,470</p></td>
+<td><p>361</p></td>
+</tr>
+<tr class="row-odd"><td><p>Default</p></td>
+<td><p>2,028</p></td>
+<td><p>1,012</p></td>
+<td><p>4,492</p></td>
+<td><p>361</p></td>
+</tr>
+<tr class="row-even"><td><p>Full</p></td>
+<td><p>7,376</p></td>
+<td><p>1,012</p></td>
+<td><p>4,492</p></td>
+<td><p>361</p></td>
+</tr>
+</tbody>
+</table>
+<p>Stack frame of <code class="docutils literal notranslate"><span
class="pre">vsprintf_internal()</span></code>, in bytes:</p>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"></th>
+<th class="head"><p>Cortex-M0</p></th>
+<th class="head"><p>Cortex-M3</p></th>
+<th class="head"><p>rv32</p></th>
+<th class="head"><p>arm64</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p>Minimal</p></td>
+<td><p>80</p></td>
+<td><p>72</p></td>
+<td><p>96</p></td>
+<td><p>160</p></td>
+</tr>
+<tr class="row-odd"><td><p>Default</p></td>
+<td><p>88</p></td>
+<td><p>72</p></td>
+<td><p>128</p></td>
+<td><p>160</p></td>
+</tr>
+<tr class="row-even"><td><p>Full</p></td>
+<td><p>192</p></td>
+<td><p>184</p></td>
+<td><p>192</p></td>
+<td><p>256</p></td>
+</tr>
+</tbody>
+</table>
+<p>Stack frames of the floating point functions, with both exact options on,
in bytes:</p>
+<table class="docutils align-default">
+<thead>
+<tr class="row-odd"><th class="head"></th>
+<th class="head"><p>Cortex-M0</p></th>
+<th class="head"><p>Cortex-M3</p></th>
+<th class="head"><p>rv32</p></th>
+<th class="head"><p>arm64</p></th>
+</tr>
+</thead>
+<tbody>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">vsprintf_float()</span></code></p></td>
+<td><p>96</p></td>
+<td><p>96</p></td>
+<td><p>96</p></td>
+<td><p>112</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">__dtoa_engine()</span></code></p></td>
+<td><p>104</p></td>
+<td><p>88</p></td>
+<td><p>112</p></td>
+<td><p>64</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">vsprintf_putfloat()</span></code></p></td>
+<td><p>72</p></td>
+<td><p>80</p></td>
+<td><p>96</p></td>
+<td><p>128</p></td>
+</tr>
+<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span
class="pre">vsprintf_float_big()</span></code></p></td>
+<td><p>256</p></td>
+<td><p>256</p></td>
+<td><p>256</p></td>
+<td><p>288</p></td>
+</tr>
+<tr class="row-even"><td><p><code class="docutils literal notranslate"><span
class="pre">vsprintf_ldouble()</span></code></p></td>
+<td><ul class="simple">
+<li></li>
+</ul>
+</td>
+<td><ul class="simple">
+<li></li>
+</ul>
+</td>
+<td><p>2624</p></td>
+<td><p>2624</p></td>
+</tr>
+</tbody>
+</table>
+<p>Floating point is off by default on the two Cortex boards, and on by
default on the other two. Full has it on everywhere.</p>
+<p><code class="docutils literal notranslate"><span
class="pre">%e</span></code>, <code class="docutils literal notranslate"><span
class="pre">%f</span></code> and <code class="docutils literal
notranslate"><span class="pre">%g</span></code> use integer operations only,
and pull in no soft-float
+code. Other code in the image can: see the row of <code class="docutils
literal notranslate"><span class="pre">libgcc</span></code>. <code
class="docutils literal notranslate"><span class="pre">%lld</span></code> needs
a 64-bit division on a
+32-bit CPU, and the kernel clock code often needs it too.</p>
+<p><code class="docutils literal notranslate"><span
class="pre">LIBC_NUMBERED_ARGS</span></code> also adds a variable length array
to the stack of
+<code class="docutils literal notranslate"><span
class="pre">lib_vsprintf()</span></code>: one union for each argument that the
format uses. The size
+of the union is 8 bytes, or the size of <code class="docutils literal
notranslate"><span class="pre">long</span> <span
class="pre">double</span></code> with
+<code class="docutils literal notranslate"><span
class="pre">LIBC_PRINTF_HEXFLOAT</span></code> on a CPU where that is
larger.</p>
+</section>
+</section>
+
+
+ </div>
+ </div>
+ <footer><div class="rst-footer-buttons" role="navigation"
aria-label="Footer">
+ <a href="popen.html" class="btn btn-neutral float-left" title="popen()
and dpopen()" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"
aria-hidden="true"></span> Previous</a>
+ <a href="search.html" class="btn btn-neutral float-right"
title="search" accesskey="n" rel="next">Next <span class="fa
fa-arrow-circle-right" aria-hidden="true"></span></a>
+ </div>
+
+ <hr/>
+
+ <div role="contentinfo">
+ <p>© Copyright 2020-2026, The Apache Software Foundation.</p>
+ </div>
+
+
+
+</footer>
+ </div>
+ </div>
+ </section>
+ </div>
+ <script>
+ jQuery(function () {
+ SphinxRtdTheme.Navigation.enable(true);
+ });
+ </script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/content/docs/latest/os/libs/libc/search.html
b/content/docs/latest/os/libs/libc/search.html
index 32cb604b8d..58136d09b1 100644
--- a/content/docs/latest/os/libs/libc/search.html
+++ b/content/docs/latest/os/libs/libc/search.html
@@ -47,7 +47,7 @@
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="stdbit.h" href="stdbit.html" />
- <link rel="prev" title="popen() and dpopen()" href="popen.html" />
+ <link rel="prev" title="printf" href="printf.html" />
</head>
<body class="wy-body-for-nav">
@@ -506,7 +506,7 @@ recurse to the height of the tree.</p>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation"
aria-label="Footer">
- <a href="popen.html" class="btn btn-neutral float-left" title="popen()
and dpopen()" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"
aria-hidden="true"></span> Previous</a>
+ <a href="printf.html" class="btn btn-neutral float-left"
title="printf" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"
aria-hidden="true"></span> Previous</a>
<a href="stdbit.html" class="btn btn-neutral float-right"
title="stdbit.h" accesskey="n" rel="next">Next <span class="fa
fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
diff --git a/content/docs/latest/os/networking/socketcan.html
b/content/docs/latest/os/networking/socketcan.html
index e6e6588af6..fa48f678b0 100644
--- a/content/docs/latest/os/networking/socketcan.html
+++ b/content/docs/latest/os/networking/socketcan.html
@@ -301,13 +301,11 @@ the <code class="docutils literal notranslate"><span
class="pre">net/can/</span>
<li><p><strong>Header File</strong>: <code class="docutils literal
notranslate"><span class="pre">include/nuttx/net/can.h</span></code></p></li>
<li><p><strong>Main Modules</strong>:</p>
<ul>
-<li><p><code class="docutils literal notranslate"><span
class="pre">can_conn.c</span></code> - Connection management</p></li>
-<li><p><code class="docutils literal notranslate"><span
class="pre">can_sockif.c</span></code> - Socket interface
implementation</p></li>
-<li><p><code class="docutils literal notranslate"><span
class="pre">can_sendmsg.c</span></code> - Message transmission</p></li>
-<li><p><code class="docutils literal notranslate"><span
class="pre">can_sendmsg_buffered.c</span></code> - Message transmission with
buffering</p></li>
-<li><p><code class="docutils literal notranslate"><span
class="pre">can_recvmsg.c</span></code> - Message reception</p></li>
-<li><p><code class="docutils literal notranslate"><span
class="pre">can_poll.c</span></code> - Polling support</p></li>
-<li><p><code class="docutils literal notranslate"><span
class="pre">can_callback.c</span></code> - Callback handling</p></li>
+<li><p><code class="docutils literal notranslate"><span
class="pre">can.c</span></code> - Protocol-independent core: connection
management, input,
+callbacks and polling</p></li>
+<li><p><code class="docutils literal notranslate"><span
class="pre">can_raw.c</span></code> - CAN_RAW protocol: socket interface,
transmission (with
+and without buffering), reception, filters and socket options</p></li>
+<li><p><code class="docutils literal notranslate"><span
class="pre">can_sockif.c</span></code> - Selection of the socket interface of a
CAN protocol</p></li>
</ul>
</li>
</ul>
diff --git
a/content/docs/latest/platforms/arm/stm32f0/boards/stm32f051-discovery/index.html
b/content/docs/latest/platforms/arm/stm32f0/boards/stm32f051-discovery/index.html
index fae71de45b..67698fd326 100644
---
a/content/docs/latest/platforms/arm/stm32f0/boards/stm32f051-discovery/index.html
+++
b/content/docs/latest/platforms/arm/stm32f0/boards/stm32f051-discovery/index.html
@@ -162,48 +162,28 @@
<li class="toctree-l3"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#architecture">Architecture</a></li>
<li class="toctree-l3"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#vendor">Vendor</a></li>
<li class="toctree-l3 current"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#chip">Chip</a><ul class="current">
-<li class="toctree-l4"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#families">Families</a></li>
-<li class="toctree-l4 current"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#parts">Parts</a><ul class="current">
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#atmega">atmega</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#cxd56xx">cxd56xx</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#esp32">esp32</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#fvp-v8r">fvp-v8r</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#ht32f491x3">ht32f491x3</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#imx9">imx9</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#imxrt">imxrt</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#n32h7">n32h7</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#nrf52">nrf52</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#nrf53">nrf53</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#nrf91">nrf91</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#qemu">qemu</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#rp23xx">rp23xx</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#rp23xx-rv">rp23xx-rv</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32c0">stm32c0</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32c5">stm32c5</a></li>
-<li class="toctree-l5 current"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32f0">stm32f0</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32f1">stm32f1</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32f2">stm32f2</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32f3">stm32f3</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32f4">stm32f4</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32f7">stm32f7</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32g0">stm32g0</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32g4">stm32g4</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32h5">stm32h5</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32h7">stm32h7</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32l0">stm32l0</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32l1">stm32l1</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32l4">stm32l4</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32l5">stm32l5</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32n6">stm32n6</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32u0">stm32u0</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32u3">stm32u3</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32u5">stm32u5</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32wb">stm32wb</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#stm32wl5">stm32wl5</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#tiva">tiva</a></li>
-<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#zynq-mpsoc">zynq-mpsoc</a></li>
+<li class="toctree-l4 current"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#families">Families</a><ul
class="current">
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#unknown">(unknown)</a></li>
+<li class="toctree-l5 current"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#arm">arm</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#arm64">arm64</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#avr">avr</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#hc">hc</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#mips">mips</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#misoc">misoc</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#or1k">or1k</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#renesas">renesas</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#risc-v">risc-v</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#sim">sim</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#sparc">sparc</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#tricore">tricore</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#x86">x86</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#x86-64">x86_64</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#xtensa">xtensa</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#z16">z16</a></li>
+<li class="toctree-l5"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#z80">z80</a></li>
</ul>
</li>
+<li class="toctree-l4"><a class="reference internal"
href="../../../../../_tags/tagsindex.html#parts">Parts</a></li>
</ul>
</li>
</ul>
diff --git
a/content/docs/latest/platforms/arm/stm32n6/boards/stm32n6570-dk/index.html
b/content/docs/latest/platforms/arm/stm32n6/boards/stm32n6570-dk/index.html
index 73dc55be84..ebf3243e38 100644
--- a/content/docs/latest/platforms/arm/stm32n6/boards/stm32n6570-dk/index.html
+++ b/content/docs/latest/platforms/arm/stm32n6/boards/stm32n6570-dk/index.html
@@ -334,7 +334,7 @@ flash target.</p>
</tr>
</tbody>
</table>
-<p>The LEDs are available through <code class="docutils literal
notranslate"><span class="pre">/dev/userleds</span></code> and the button
through
+<p>The LEDs are available through <code class="docutils literal
notranslate"><span class="pre">/dev/userleds</span></code> and the buttons
through
<code class="docutils literal notranslate"><span
class="pre">/dev/buttons</span></code> in the nsh configuration.</p>
</section>
<section id="clocking">
@@ -343,8 +343,8 @@ flash target.</p>
fed from the 48 MHz HSE crystal, HCLK and the APB clocks run at 200 MHz and
the timer kernel clock is 200 MHz. 800 MHz requires the VOS high voltage
range, so the board SMPS is switched to its overdrive output through PF4
-before the PLL is started. PLL2, PLL3 and PLL4 are started with the ST
-reference settings for the peripheral kernel clocks.</p>
+before the PLL is started. PLL2, PLL3 and PLL4 are started for the
+peripheral kernel clocks.</p>
<p><code class="docutils literal notranslate"><span
class="pre">CONFIG_STM32N6570_DK_CLOCK_HSI</span></code> selects a conservative
tree instead: PLL1
from the internal 64 MHz HSI, CPU 200 MHz, SYSCLK 100 MHz and VOS low. The
console USART1 is clocked from HSI in both cases.</p>
diff --git a/content/docs/latest/platforms/arm/stm32n6/index.html
b/content/docs/latest/platforms/arm/stm32n6/index.html
index 9e998f1038..627f6a59b7 100644
--- a/content/docs/latest/platforms/arm/stm32n6/index.html
+++ b/content/docs/latest/platforms/arm/stm32n6/index.html
@@ -354,55 +354,55 @@ The STM32N6 is a chip based on the Arm Cortex-M55.</p>
<td><p>HSI/HSE, PLL1-4, IC1-20, bus prescalers and kernel
clock selection from board.h.</p></td>
</tr>
-<tr class="row-odd"><td><p>USART</p></td>
+<tr class="row-odd"><td><p>RNG</p></td>
<td><p>Yes</p></td>
-<td><p>USART1 only.</p></td>
+<td><p>Through the common driver.</p></td>
</tr>
-<tr class="row-even"><td><p>ADC</p></td>
-<td><p>No</p></td>
-<td></td>
+<tr class="row-even"><td><p>USART</p></td>
+<td><p>Yes</p></td>
+<td><p>USART1 only.</p></td>
</tr>
-<tr class="row-odd"><td><p>DCACHE</p></td>
+<tr class="row-odd"><td><p>ADC</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-even"><td><p>DCMIPP</p></td>
+<tr class="row-even"><td><p>DCACHE</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-odd"><td><p>ETH</p></td>
+<tr class="row-odd"><td><p>DCMIPP</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-even"><td><p>I2C</p></td>
+<tr class="row-even"><td><p>ETH</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-odd"><td><p>ICACHE</p></td>
+<tr class="row-odd"><td><p>I2C</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-even"><td><p>IWDG</p></td>
+<tr class="row-even"><td><p>ICACHE</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-odd"><td><p>LPTIM</p></td>
+<tr class="row-odd"><td><p>IWDG</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-even"><td><p>LTDC</p></td>
+<tr class="row-even"><td><p>LPTIM</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-odd"><td><p>MPU</p></td>
+<tr class="row-odd"><td><p>LTDC</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-even"><td><p>NPU</p></td>
+<tr class="row-even"><td><p>MPU</p></td>
<td><p>No</p></td>
<td></td>
</tr>
-<tr class="row-odd"><td><p>RNG</p></td>
+<tr class="row-odd"><td><p>NPU</p></td>
<td><p>No</p></td>
<td></td>
</tr>
diff --git a/content/docs/latest/reference/user/07_signals.html
b/content/docs/latest/reference/user/07_signals.html
index e30e119aac..e656bfa1d4 100644
--- a/content/docs/latest/reference/user/07_signals.html
+++ b/content/docs/latest/reference/user/07_signals.html
@@ -434,7 +434,7 @@ provided by NuttX:</p>
<li><p><a class="reference internal" href="#c.sigaddset"
title="sigaddset"><code class="xref c c-func docutils literal
notranslate"><span class="pre">sigaddset()</span></code></a></p></li>
<li><p><a class="reference internal" href="#c.sigdelset"
title="sigdelset"><code class="xref c c-func docutils literal
notranslate"><span class="pre">sigdelset()</span></code></a></p></li>
<li><p><a class="reference internal" href="#c.sigismember"
title="sigismember"><code class="xref c c-func docutils literal
notranslate"><span class="pre">sigismember()</span></code></a></p></li>
-<li><p><a class="reference internal" href="#c.sigaction"
title="sigaction"><code class="xref c c-func docutils literal
notranslate"><span class="pre">sigaction()</span></code></a></p></li>
+<li><p><a class="reference internal" href="structures.html#c.sigaction"
title="sigaction"><code class="xref c c-func docutils literal
notranslate"><span class="pre">sigaction()</span></code></a></p></li>
<li><p><a class="reference internal" href="#c.sigignore"
title="sigignore"><code class="xref c c-func docutils literal
notranslate"><span class="pre">sigignore()</span></code></a></p></li>
<li><p><a class="reference internal" href="#c.sigset" title="sigset"><code
class="xref c c-func docutils literal notranslate"><span
class="pre">sigset()</span></code></a></p></li>
<li><p><a class="reference internal" href="#c.sigprocmask"
title="sigprocmask"><code class="xref c c-func docutils literal
notranslate"><span class="pre">sigprocmask()</span></code></a></p></li>
@@ -556,7 +556,7 @@ name.</p>
<dl class="c function">
<dt class="sig sig-object c" id="c.sigaction">
-<span class="kt"><span class="pre">int</span></span><span class="w">
</span><span class="sig-name descname"><span class="n"><span
class="pre">sigaction</span></span></span><span class="sig-paren">(</span><span
class="kt"><span class="pre">int</span></span><span class="w"> </span><span
class="n"><span class="pre">signo</span></span>, <span class="k"><span
class="pre">const</span></span><span class="w"> </span><span class="k"><span
class="pre">struct</span></span><span class="w"> </span><a [...]
+<span class="kt"><span class="pre">int</span></span><span class="w">
</span><span class="sig-name descname"><span class="n"><span
class="pre">sigaction</span></span></span><span class="sig-paren">(</span><span
class="kt"><span class="pre">int</span></span><span class="w"> </span><span
class="n"><span class="pre">signo</span></span>, <span class="k"><span
class="pre">const</span></span><span class="w"> </span><span class="k"><span
class="pre">struct</span></span><span class="w"> </span><a [...]
<dd><p>Allows the calling task to examine and/or
specify the action to be associated with a specific signal.</p>
<p>The structure sigaction, used to describe an action to be taken, is
diff --git a/content/docs/latest/reference/user/structures.html
b/content/docs/latest/reference/user/structures.html
index 20d43661d6..53e3fb874d 100644
--- a/content/docs/latest/reference/user/structures.html
+++ b/content/docs/latest/reference/user/structures.html
@@ -345,7 +345,7 @@ NuttX and a MoBY application:</p>
</div>
<dl class="c struct">
<dt class="sig sig-object c" id="c.sigaction">
-<span class="k"><span class="pre">struct</span></span><span class="w">
</span><span class="sig-name descname"><span class="n"><span
class="pre">sigaction</span></span></span><br /></dt>
+<span class="k"><span class="pre">struct</span></span><span class="w">
</span><span class="sig-name descname"><span class="n"><span
class="pre">sigaction</span></span></span><a class="headerlink"
href="#c.sigaction" title="Permalink to this definition"></a><br /></dt>
<dd></dd></dl>
<p>The following structure defines the action to take for given signal:</p>
diff --git a/content/docs/latest/searchindex.js
b/content/docs/latest/searchindex.js
index a601023617..13e4c78457 100644
--- a/content/docs/latest/searchindex.js
+++ b/content/docs/latest/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["ReleaseNotes/NuttX-0.1.0",
"ReleaseNotes/NuttX-0.1.1", "ReleaseNotes/NuttX-0.1.2",
"ReleaseNotes/NuttX-0.2.1", "ReleaseNotes/NuttX-0.2.2",
"ReleaseNotes/NuttX-0.2.3", "ReleaseNotes/NuttX-0.2.4",
"ReleaseNotes/NuttX-0.2.5", "ReleaseNotes/NuttX-0.2.6",
"ReleaseNotes/NuttX-0.2.7", "ReleaseNotes/NuttX-0.2.8",
"ReleaseNotes/NuttX-0.2.9", "ReleaseNotes/NuttX-0.3.0",
"ReleaseNotes/NuttX-0.3.1", "ReleaseNotes/NuttX-0.3.10",
"ReleaseNotes/NuttX-0.3.11", "ReleaseNote [...]
\ No newline at end of file
+Search.setIndex({"docnames": ["ReleaseNotes/NuttX-0.1.0",
"ReleaseNotes/NuttX-0.1.1", "ReleaseNotes/NuttX-0.1.2",
"ReleaseNotes/NuttX-0.2.1", "ReleaseNotes/NuttX-0.2.2",
"ReleaseNotes/NuttX-0.2.3", "ReleaseNotes/NuttX-0.2.4",
"ReleaseNotes/NuttX-0.2.5", "ReleaseNotes/NuttX-0.2.6",
"ReleaseNotes/NuttX-0.2.7", "ReleaseNotes/NuttX-0.2.8",
"ReleaseNotes/NuttX-0.2.9", "ReleaseNotes/NuttX-0.3.0",
"ReleaseNotes/NuttX-0.3.1", "ReleaseNotes/NuttX-0.3.10",
"ReleaseNotes/NuttX-0.3.11", "ReleaseNote [...]
\ No newline at end of file