Another round of repeated words cleanup. This commit tries to keep the
diff minimal and line wrapping was mostly left intact in the touched
files, as having them consistent across the documentation is probably
the topic of a future tree-wide cleanup (or not)
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This adds a few words about using Picolibc without native support
from toolchain, and how to enable this behavior for toolchain.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit clarifies that the toolchain-bundled Picolibc in the Zephyr
SDK must also be updated when updating the Picolibc module.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
This commit adds the "Functions" section to the minimal libc
documentation that describes the scope of the C standard library
functions available in the minimal libc.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Enable the common malloc implementation when using picolibc. Support
existing Picolibc configurations by respecting existing PICOLIBC_HEAP_SIZE
settings.
When PICOLIBC_HEAP_SIZE is set to a value other than -2, then
*always* set COMMON_LIBC_MALLOC_ARENA_SIZE to that value.
Signed-off-by: Keith Packard <keithp@keithp.com>
This will (eventually) permit use of a common malloc implementation with
other C libraries, reducing the amount of Zephyr-specific code required
to support each C library.
Signed-off-by: Keith Packard <keithp@keithp.com>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Signed-off-by: Keith Packard <keithp@keithp.com>
This describes the capabilities offered by Picolibc along with some of the
requirements applications have when using it.
Signed-off-by: Keith Packard <keithp@keithp.com>
The newlib nano variant is currently enabled by default when
`CONFIG_NEWLIB_LIBC=y` and the selected toolchain-architecture
combination includes the newlib nano variant support, even if
`CONFIG_NEWLIB_LIBC_NANO` is not selected by the user.
When `CONFIG_NEWLIB_LIBC=y`, this results in the newlib nano variant
being selected for some architectures (e.g. ARC, ARM and RISC-V), while
the full variant is selected for the rest of the architectures.
The above behaviour is problematic because there exist functional
differences between the newlib full and nano variants (e.g. C99 format
modifiers such as `hh`, `ll`, `z`, `j` and `t` are not available in the
newlib nano variant), and this effectively leads to different level of
C standard support across different architectures when
`CONFIG_NEWLIB_LIBC=y`.
This commit fixes this problem by making the `CONFIG_NEWLIB_LIBC_NANO`
not `default y` and requiring its user to explicitly set this symbol to
`y` when they want to use the newlib nano variant.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
This commit adds "Formatted Output" section to the "C Language Support"
documentation that describes the C library-specific formatted output
support details.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit adds the sections describing how the dynamic memory
management is handled to the C language support and standard library
documentations.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit reworks the C language support documentation such that it
is more up to date and contains more information about the Newlib.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>