366 lines
10 KiB
Plaintext
366 lines
10 KiB
Plaintext
# Kconfig - miscellany configuration options
|
|
|
|
#
|
|
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
menu "Compile and Link Features"
|
|
|
|
menu "Linker Options"
|
|
config HAS_FLASH_LOAD_OFFSET
|
|
bool
|
|
help
|
|
This option is selected by targets having a FLASH_LOAD_OFFSET
|
|
and FLASH_LOAD_SIZE.
|
|
|
|
config FLASH_LOAD_OFFSET
|
|
hex "Kernel load offset"
|
|
default 0
|
|
depends on HAS_FLASH_LOAD_OFFSET
|
|
help
|
|
This option specifies the byte offset from the beginning of flash that
|
|
the kernel should be loaded into. Changing this value from zero will
|
|
affect the Zephyr image's link, and will decrease the total amount of
|
|
flash available for use by application code.
|
|
|
|
If unsure, leave at the default value 0.
|
|
|
|
config FLASH_LOAD_SIZE
|
|
hex "Kernel load size"
|
|
default 0
|
|
depends on HAS_FLASH_LOAD_OFFSET
|
|
help
|
|
If non-zero, this option specifies the size, in bytes, of the flash
|
|
area that the Zephyr image will be allowed to occupy. If zero, the
|
|
image will be able to occupy from the FLASH_LOAD_OFFSET to the end of
|
|
the device.
|
|
|
|
If unsure, leave at the default value 0.
|
|
|
|
config TEXT_SECTION_OFFSET
|
|
hex "TEXT section offset"
|
|
default 0
|
|
help
|
|
This sets and offset before the text section and allows booting images
|
|
with custom headers that are inserted at the beginning of the image.
|
|
|
|
config HAVE_CUSTOM_LINKER_SCRIPT
|
|
prompt "Custom linker scripts provided"
|
|
def_bool n
|
|
help
|
|
Set this option if you have a custom linker script which needed to
|
|
be define in CUSTOM_LINKER_SCRIPT.
|
|
|
|
config CUSTOM_LINKER_SCRIPT
|
|
string "Path to custom linker script"
|
|
default ""
|
|
depends on HAVE_CUSTOM_LINKER_SCRIPT
|
|
help
|
|
Path to the linker script to be used instead of the one define by the
|
|
board.
|
|
|
|
The linker script must be based on a version provided by Zephyr since
|
|
the kernel can expect a certain layout/certain regions.
|
|
|
|
This is useful when an application needs to add sections into the
|
|
linker script and avoid having to change the script provided by
|
|
Zephyr.
|
|
|
|
config CUSTOM_RODATA_LD
|
|
bool "Include custom-rodata.ld"
|
|
default n
|
|
help
|
|
Include a customized linker script fragment for inserting additional
|
|
data and linker directives into the rodata section.
|
|
|
|
config CUSTOM_RWDATA_LD
|
|
bool "Include custom-rwdata.ld"
|
|
default n
|
|
help
|
|
Include a customized linker script fragment for inserting additional
|
|
data and linker directives into the data section.
|
|
|
|
config CUSTOM_SECTIONS_LD
|
|
bool "Include custom-sections.ld"
|
|
default n
|
|
help
|
|
Include a customized linker script fragment for inserting additional
|
|
arbitrary sections.
|
|
|
|
config LINK_WHOLE_ARCHIVE
|
|
bool "Allow linking with --whole-archive"
|
|
default n
|
|
help
|
|
This options allows linking external libraries with the
|
|
--whole-archive option to keep all symbols.
|
|
|
|
endmenu
|
|
|
|
menu "Compiler Options"
|
|
config CROSS_COMPILE
|
|
string "Cross-compiler tool prefix"
|
|
help
|
|
Same as running 'make CROSS_COMPILE=prefix-' but stored for
|
|
default make runs in this kernel build directory. You don't
|
|
need to set this unless you want the configured kernel build
|
|
directory to select the cross-compiler automatically.
|
|
|
|
config COMPILER_OPT
|
|
string
|
|
prompt "Custom compiler options"
|
|
default ""
|
|
help
|
|
This option is a free-form string that is passed to the compiler
|
|
when building all parts of a project (i.e. kernel).
|
|
The compiler options specified by this string supplement the
|
|
predefined set of compiler supplied by the build system,
|
|
and can be used to change compiler optimization, warning and error
|
|
messages, and so on.
|
|
|
|
config TOOLCHAIN_VARIANT
|
|
string "Cross-compiler variant name"
|
|
help
|
|
For optimized compilers with reduced features, specify the name
|
|
of the variant.
|
|
|
|
endmenu
|
|
|
|
config CPLUSPLUS
|
|
bool "Enable C++ support for the application"
|
|
default n
|
|
help
|
|
This option enables the use of applications built with C++.
|
|
|
|
config GDB_INFO
|
|
bool
|
|
prompt "Task-aware debugging with GDB"
|
|
default n
|
|
help
|
|
This option enables the kernel to collect additional information
|
|
during interrupts, exceptions, and context switches. This information
|
|
is required for task-aware debugging with GDB.
|
|
|
|
config KERNEL_BIN_NAME
|
|
string "The kernel binary name"
|
|
default "zephyr"
|
|
help
|
|
This option sets the name of the generated kernel binary.
|
|
|
|
endmenu
|
|
|
|
menu "Debugging Options"
|
|
|
|
config DEBUG
|
|
bool "Build kernel with debugging enabled"
|
|
default n
|
|
help
|
|
Build a kernel suitable for debugging. Right now, this option
|
|
only disables optimization, more debugging variants can be selected
|
|
from here to allow more debugging.
|
|
|
|
config STACK_USAGE
|
|
bool "Generate stack usage information"
|
|
default n
|
|
help
|
|
Generate an extra file that specifies the maximum amount of stack used,
|
|
on a per-function basis.
|
|
|
|
config PRINTK
|
|
bool
|
|
prompt "Send printk() to console"
|
|
depends on CONSOLE_HAS_DRIVER
|
|
default y
|
|
help
|
|
This option directs printk() debugging output to the supported
|
|
console device, rather than suppressing the generation
|
|
of printk() output entirely. Output is sent immediately, without
|
|
any mutual exclusion or buffering.
|
|
|
|
config STDOUT_CONSOLE
|
|
bool
|
|
prompt "Send stdout to console"
|
|
depends on CONSOLE_HAS_DRIVER
|
|
default n
|
|
help
|
|
This option directs standard output (e.g. printf) to the console
|
|
device, rather than suppressing it entirely.
|
|
|
|
config EARLY_CONSOLE
|
|
bool
|
|
prompt "Send stdout at the earliest stage possible"
|
|
default n
|
|
help
|
|
This option will enable stdout as early as possible, for debugging
|
|
purpose. For instance, in case of STDOUT_CONSOLE being set it will
|
|
initialize its driver earlier than normal, in order to get the stdout
|
|
sent through the console at the earliest stage possible.
|
|
|
|
config ASSERT
|
|
bool
|
|
prompt "Enable __ASSERT() macro"
|
|
default n
|
|
help
|
|
This enables the __ASSERT() macro in the kernel code. If an assertion
|
|
fails, the calling thread is put on an infinite tight loop. Since
|
|
enabling this adds a significant footprint, it should only be enabled
|
|
in a non-production system.
|
|
|
|
config ASSERT_LEVEL
|
|
int
|
|
prompt "__ASSERT() level"
|
|
default 2
|
|
range 0 2
|
|
depends on ASSERT
|
|
help
|
|
This option specifies the assertion level used by the __ASSERT()
|
|
macro. It can be set to one of three possible values:
|
|
|
|
Level 0: off
|
|
Level 1: on + warning in every file that includes __assert.h
|
|
Level 2: on + no warning
|
|
|
|
config DEBUG_TRACING_KERNEL_OBJECTS
|
|
bool "Kernel object tracing (deprecated)"
|
|
select OBJECT_TRACING
|
|
default n
|
|
help
|
|
For backward compatibility only
|
|
|
|
config OBJECT_TRACING
|
|
bool
|
|
prompt "Kernel object tracing"
|
|
default n
|
|
help
|
|
This option enable the feature for tracing kernel objects. This option
|
|
is for debug purposes and increases the memory footprint of the kernel.
|
|
|
|
config OVERRIDE_FRAME_POINTER_DEFAULT
|
|
bool
|
|
prompt "Override compiler defaults for -fomit-frame-pointer"
|
|
default n
|
|
help
|
|
Omitting the frame pointer prevents the compiler from putting the stack
|
|
frame pointer into a register. Saves a few instructions in function
|
|
prologues/epilogues and frees up a register for general-purpose use,
|
|
which can provide good performance improvements on register-constrained
|
|
architectures like x86. On some architectures (including x86) omitting
|
|
frame pointers impedes debugging as local variables are harder to
|
|
locate. At -O1 and above gcc will enable -fomit-frame-pointer
|
|
automatically but only if the architecture does not require if for
|
|
effective debugging.
|
|
|
|
Choose Y if you want to override the default frame pointer behavior
|
|
of your compiler, otherwise choose N.
|
|
|
|
config OMIT_FRAME_POINTER
|
|
bool
|
|
prompt "Omit frame pointer"
|
|
default n
|
|
depends on OVERRIDE_FRAME_POINTER_DEFAULT
|
|
help
|
|
Choose Y for best performance. On some architectures (including x86)
|
|
this will favor code size and performance over debugability.
|
|
|
|
Choose N in you wish to retain the frame pointer. This option may
|
|
be useful if your application uses runtime backtracing and does not
|
|
support parsing unwind tables.
|
|
|
|
If unsure, disable OVERRIDE_FRAME_POINTER_DEFAULT to allow the compiler
|
|
to adopt sensible defaults for your architecture.
|
|
|
|
endmenu
|
|
|
|
menu "System Monitoring Options"
|
|
|
|
config PERFORMANCE_METRICS
|
|
bool
|
|
prompt "Enable performance metrics [EXPERIMENTAL]"
|
|
default n
|
|
help
|
|
Enable Performance Metrics.
|
|
|
|
config BOOT_TIME_MEASUREMENT
|
|
bool
|
|
prompt "Boot time measurements [EXPERIMENTAL]"
|
|
default n
|
|
depends on PERFORMANCE_METRICS
|
|
help
|
|
This option enables the recording of timestamps during system start
|
|
up. The global variable __start_tsc records the time kernel begins
|
|
executing, while __main_tsc records when main() begins executing,
|
|
and __idle_tsc records when the CPU becomes idle. All values are
|
|
recorded in terms of CPU clock cycles since system reset.
|
|
|
|
config CPU_CLOCK_FREQ_MHZ
|
|
int
|
|
prompt "CPU CLock Frequency in MHz"
|
|
default 20
|
|
depends on BOOT_TIME_MEASUREMENT
|
|
help
|
|
This option specifies the CPU Clock Frequency in MHz in order to
|
|
convert Intel RDTSC timestamp to microseconds.
|
|
|
|
endmenu
|
|
|
|
menu "Boot Options"
|
|
|
|
config IS_BOOTLOADER
|
|
bool "Act as a bootloader"
|
|
default n
|
|
depends on XIP
|
|
depends on ARM
|
|
help
|
|
This option indicates that Zephyr will act as a bootloader to execute
|
|
a separate Zephyr image payload.
|
|
|
|
config BOOTLOADER_SRAM_SIZE
|
|
int "SRAM reserved for when Zephyr acts as a bootloader"
|
|
default 16
|
|
depends on !XIP || IS_BOOTLOADER
|
|
depends on ARM
|
|
help
|
|
This option specifies the amount of SRAM (measure in kB) reserved for
|
|
when Zephyr is to act as a bootloader.
|
|
|
|
config BOOTLOADER_KEXEC
|
|
bool
|
|
prompt "Boot using Linux kexec() system call"
|
|
depends on X86
|
|
default n
|
|
help
|
|
This option signifies that Linux boots the kernel using kexec system call
|
|
and utility. This method is used to boot the kernel over the network.
|
|
|
|
config BOOTLOADER_UNKNOWN
|
|
bool
|
|
prompt "Generic boot loader support"
|
|
default n
|
|
depends on X86
|
|
help
|
|
This option signifies that the target has a generic bootloader
|
|
or that it supports multiple ways of booting and it isn't clear
|
|
at build time which method is to be used. When this option is enabled
|
|
the board may have to do extra work to ensure a proper startup.
|
|
|
|
config BOOTLOADER_CONTEXT_RESTORE
|
|
bool
|
|
prompt "Boot loader has context restore support"
|
|
default y
|
|
depends on SYS_POWER_DEEP_SLEEP && BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
|
|
help
|
|
This option signifies that the target has a bootloader
|
|
that restores CPU context upon resuming from deep sleep
|
|
power state.
|
|
|
|
config REBOOT
|
|
bool "Reboot functionality"
|
|
default n
|
|
select SYSTEM_CLOCK_DISABLE
|
|
help
|
|
Enable the sys_reboot() API. Enabling this can drag in other subsystems
|
|
needed to perform a "safe" reboot (e.g. SYSTEM_CLOCK_DISABLE, to stop the
|
|
system clock before issuing a reset).
|
|
endmenu
|