Commit graph

15 commits

Author SHA1 Message Date
Benjamin Cabé
0bd8a2faca doc: use proper pygment for Kconfig code-blocks
Kconfig snippets should use "kconfig" pygment to get proper highlighting

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Benjamin Cabé
155420522b doc: Fix occurrences of repeated words
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>
2023-11-15 17:34:39 -05:00
Daniel Leung
26ffa9f59a doc: picolibc: a few words about building without native support
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>
2023-09-13 17:36:46 -04:00
Stephanos Ioannidis
69d0dce978 doc: picolibc: Add module and toolchain Picolibc synchronisation policy
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>
2023-05-25 16:23:50 +02:00
Stephanos Ioannidis
8ac36c5b3e doc: languages: c: Add minimal libc function scope description
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>
2023-05-22 23:32:31 +09:00
Keith Packard
9b90f2a351 libc/picolibc: Switch to common malloc implementation
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>
2023-05-09 01:29:16 +09:00
Keith Packard
a9c62caab7 lib/libc: Move malloc from minimal to common library
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>
2023-04-27 20:17:24 +09:00
Keith Packard
22320db5f7 doc/develop: Document common C library APIs
Right now, there's only 'time', which makes this doc pretty short.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-27 20:17:24 +09:00
Keith Packard
3a197934fc doc: Switch main return type from void to int.
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>
2023-04-14 07:49:41 +09:00
Keith Packard
ed51e48ba5 doc/develop: Add picolibc documentation
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>
2023-02-01 10:07:05 -08:00
Stephanos Ioannidis
28b22b276a lib: libc: newlib: Make newlib nano variant optional
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>
2022-10-19 16:02:51 +02:00
Stephanos Ioannidis
81de0276fc doc: languages: c: Add formatted output section
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>
2022-09-21 12:37:04 +02:00
Stephanos Ioannidis
3d5a28a394 doc: develop: Fix typo in newlib page
Add a missing space to fix documentation display issues.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-06-02 12:56:25 +02:00
Stephanos Ioannidis
31b9d00e55 doc: develop: c: Add dynamic memory management documentations
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>
2022-06-01 15:26:48 +02:00
Stephanos Ioannidis
3013f21a5c doc: develop: Improve C language support documentation
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>
2022-06-01 15:26:48 +02:00