Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Picolibc 1.8.5 #62882

Merged
merged 8 commits into from
Nov 20, 2023
Merged

Picolibc 1.8.5 #62882

merged 8 commits into from
Nov 20, 2023

Commits on Nov 16, 2023

  1. net/lwm2m: Provide initialization for path_list_size

    The compiler cannot tell that path_list_size is never used without being
    set, so help it out by providing a reasonable initialization value.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    keith-packard committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    c42b103 View commit details
    Browse the repository at this point in the history
  2. lib/os: With CBPRINTF_NANO, picolibc long-long printf isn't required

    CBPRINTF_FULL_INTEGRAL doesn't happen to explicitly conflict with
    CBPRINTF_NANO, but when CBPRINTF_NANO is enabled, there's no long long I/O
    support provided.
    
    Allow picolibc long-long I/O support to also be elided when CBPRINTF_NANO
    is enabled to save similar amounts of space.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    keith-packard committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    78f7291 View commit details
    Browse the repository at this point in the history
  3. west: Update picolibc to version 1.8.5

    Picolibc version 1.8.5 offers additional memory savings and new long-long
    and minimal printf variants which can be selected from either the SDK or
    module version of the library.
    
    This needed a patch to the Zephyr cmake support bits to enable one of the
    new picolibc 1.8.5 features.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    keith-packard committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    b21b11e View commit details
    Browse the repository at this point in the history
  4. libc/picolibc: Support picolibc's assert-verbose option

    This option in picolibc switches the assert macro between a chatty version
    and one which provides no information at all. This latter mode avoids
    placing the associated strings in memory.
    
    The Zephyr option is PICOLIBC_ASSERT_VERBOSE and it is disable by default.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    keith-packard committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    ac5cc28 View commit details
    Browse the repository at this point in the history
  5. libc/picolibc: Support 'long long' and 'minimal' printf variants

    Picolibc's 'minimal' printf mode reduces functionality and size even more
    than the 'integer' mode. Use this where memory is at a premium and where
    the application knows that it does not require exact printf semantics.
    
    1.8.5 adds two more printf variants, 'long long' and 'minimal'. The 'long
    long' variant is the same as the 'integer' variant but with long long
    support enabled. The 'minimal' variant reduces functionality and size even
    more than the 'integer' mode. Applications can use this where memory is at
    a premium and where the application does not require exact printf
    semantics.
    
    With these two added variants, the SDK has enough options so that all of
    the cbprintf modes can be supported with the pre-compiled bits:
    
     1. CBPRINTF_NANO - picolibc's 'minimal' variant
     2. CBPRINTF_REDUCED_INTEGRAL - picolibc's 'integer' variant
     3. CBPRINTF_FULL_INTEGRAL - picolibc's 'long long' variant
     4. CBPRINTF_FB_SUPPORT - picolibc's 'double' variant
    
    This patch makes the cbprintf Kconfig values drive the default picolibc
    variant, disables picolibc variants not capable of supporting the required
    cbprintf level, but allows applications to select more functionality in
    picolibc than cbprintf requires.
    
    Note that this depends on the SDK including picolibc 1.8.5. Without that,
    selecting the 'minimal' or 'long long' variant in Zephyr will end up with
    the default variant from picolibc, which is the full version with floating
    point support. When using the module things will work as specified.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    keith-packard committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    4795ff5 View commit details
    Browse the repository at this point in the history
  6. tests/kernel: Fix test printk output for new printf variants

    In minimal mode, format modifiers are not supported, leading to a lack
    of width and precision support.
    
    long long values are presented correctly in either long long or floating
    mode.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    keith-packard committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    12ce35e View commit details
    Browse the repository at this point in the history
  7. samples/code_relocation_nocopy: Increase fake flash size

    When linking with the 0.16.3 SDK version of picolibc, using long long
    cbprintf support pulls in the full floating point printf which is much
    larger than the integer-only version. This ends up overflowing the memory
    region available for it. Increase the size of that by bumping the start of
    the fake region by 8kB.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    keith-packard committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    9fec59b View commit details
    Browse the repository at this point in the history
  8. doc: Update picolibc section in 3.5 migration guide for 1.8.5

    Picolibc 1.8.5 includes more control over printf capabilities, document
    those in the migration guide.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    keith-packard committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    3f81bd8 View commit details
    Browse the repository at this point in the history