mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-14 00:31:56 +00:00
The intent of this Kconfig is to allow libc stdout functions like printf() to send their output to the active console driver instead of discarding it. This somehow evolved into preferring to use printf() instead of printk() for all test case output if enabled. Libc printf() implementation for both minimal libc and newlib use considerably more stack space than printk(), with nothing gained by using them. Remove all instances where we are conditionally sending test case output based on this config, enable it by default, and adjust a few tests that disabled this because they were blowing stack. printk() and vprintk() now work as expected for unit_testing targets, they are just wrappers for host printf(). Fixes: #13701 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
# Kconfig - C library
|
|
|
|
#
|
|
# Copyright (c) 2016 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
menu "C Library"
|
|
depends on !NATIVE_APPLICATION
|
|
|
|
config NEWLIB_LIBC
|
|
bool "Build with newlib c library"
|
|
depends on !X86_64
|
|
help
|
|
Build with newlib library. The newlib library is expected to be
|
|
part of the SDK in this case.
|
|
|
|
config NEWLIB_LIBC_ALIGNED_HEAP_SIZE
|
|
int "Newlib aligned heap size"
|
|
depends on MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT
|
|
depends on NEWLIB_LIBC
|
|
depends on USERSPACE
|
|
default 0
|
|
help
|
|
If user mode is enabled, and MPU hardware has requirements that
|
|
regions be sized to a power of two and aligned to their size,
|
|
and user mode threads need to access this heap, then this is necessary
|
|
to properly define an MPU region for the heap.
|
|
|
|
If this is left at 0, then remaining system RAM will be used for this
|
|
area and it may not be possible to program it as an MPU region.
|
|
|
|
config NEWLIB_LIBC_FLOAT_PRINTF
|
|
bool "Build with newlib float printf"
|
|
depends on NEWLIB_LIBC
|
|
help
|
|
Build with floating point printf enabled. This will increase the size of
|
|
the image.
|
|
|
|
config NEWLIB_LIBC_FLOAT_SCANF
|
|
bool "Build with newlib float scanf"
|
|
depends on NEWLIB_LIBC
|
|
help
|
|
Build with floating point scanf enabled. This will increase the size of
|
|
the image.
|
|
|
|
config STDOUT_CONSOLE
|
|
bool "Send stdout to console"
|
|
depends on CONSOLE_HAS_DRIVER
|
|
default y
|
|
help
|
|
This option directs standard output (e.g. printf) to the console
|
|
device, rather than suppressing it entirely. See also EARLY_CONSOLE
|
|
option.
|
|
|
|
# Minimal libc options
|
|
|
|
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
|
|
int "Size of the minimal libc malloc arena"
|
|
depends on !NEWLIB_LIBC
|
|
default 0
|
|
help
|
|
Indicate the size of the memory arena used for minimal libc's
|
|
malloc() implementation. This size value must be compatible with
|
|
a sys_mem_pool definition with nmax of 1 and minsz of 16.
|
|
|
|
endmenu
|