506 lines
No EOL
14 KiB
Text
506 lines
No EOL
14 KiB
Text
menu "Build Setup"
|
|
|
|
config EXPERIMENTAL
|
|
bool "Show experimental options"
|
|
---help---
|
|
Some features and drivers are considered "experimental" or
|
|
development/work-in-progress status. By default, these options are
|
|
hidden in the Kconfig menus. Enabling "Show experimental options"
|
|
makes these options visible and makes it possible to enable them.
|
|
|
|
config DEFAULT_SMALL
|
|
bool "Default to smallest size"
|
|
default n
|
|
---help---
|
|
When options are present, the default value for certain options will
|
|
be the one the results in the smallest size (at a loss of features).
|
|
The default is a fuller feature set at a larger size.
|
|
|
|
NOTE: This option does not prevent you from overriding the default
|
|
to select another alternative. Nor does it affect the settings that
|
|
have already been selected in your configuration file. This applies
|
|
only to new settings that require a default value.
|
|
|
|
choice
|
|
prompt "Build Host Platform"
|
|
default HOST_LINUX
|
|
|
|
config HOST_LINUX
|
|
bool "Linux"
|
|
|
|
config HOST_MACOS
|
|
bool "macOS"
|
|
|
|
endchoice # Build Host Platform
|
|
|
|
choice
|
|
prompt "Windows Build Environment"
|
|
default WINDOWS_MSYS
|
|
depends on HOST_WINDOWS
|
|
|
|
config WINDOWS_MSYS
|
|
bool "MSYS or MSYS2"
|
|
select TOOLCHAIN_WINDOWS
|
|
---help---
|
|
Build natively in a Cygwin environment with POSIX style paths (like
|
|
/cygdrive/c/cygwin/home)
|
|
|
|
endchoice # Windows Build Environment
|
|
|
|
menu "Build Configuration"
|
|
|
|
config BASE_DEFCONFIG
|
|
string "Base Configuration"
|
|
default ""
|
|
---help---
|
|
This will be automatically be updated by the configuration
|
|
script. This is the base configuration file that was used to create the
|
|
current configuration. It is useful for getting the current configuration
|
|
on runtime.
|
|
|
|
config MODULES
|
|
bool
|
|
option modules
|
|
---help---
|
|
Automatically selected if KERNEL build is selected.
|
|
This selection marks the implementation of Kconfig
|
|
to enable the module build function, and is used to
|
|
enable 'm' in the triate state. Its semantics are
|
|
consistent with Kernel. This selection also effects
|
|
the behavior of the 'make export' target and currently
|
|
has no effect unless you wish to build loadable applications
|
|
in a FLAT build.
|
|
|
|
choice
|
|
prompt "Memory organization"
|
|
default BUILD_FLAT
|
|
|
|
config BUILD_FLAT
|
|
bool "Flat address space"
|
|
---help---
|
|
Build NuttX as one large, executable "blob". All of the code
|
|
within the blob can interrupt with all of the other code within
|
|
the blob. There are no special privileges, protections, or
|
|
restraints.
|
|
|
|
config BUILD_PROTECTED
|
|
bool "NuttX protected build"
|
|
depends on ARCH_USE_MPU
|
|
select LIB_SYSCALL
|
|
select BUILD_2PASS
|
|
---help---
|
|
Builds NuttX and selected applications as two "blobs": A protected,
|
|
privileged kernel blob and a separate unprivileged, user blob. This
|
|
requires use of the two pass build with each blob being build on
|
|
each pass.
|
|
|
|
NOTE: This build configuration requires that the platform support
|
|
a memory protection unit (MPU). Support, however, may not be
|
|
implemented on all platforms.
|
|
|
|
config BUILD_KERNEL
|
|
bool "NuttX kernel build"
|
|
depends on ARCH_USE_MMU && ARCH_ADDRENV
|
|
select LIB_SYSCALL
|
|
select MODULES
|
|
---help---
|
|
Builds NuttX as a separately compiled kernel. No applications are
|
|
built. All user applications must reside in a file system where
|
|
they can be loaded into memory for execution.
|
|
|
|
NOTE: This build configuration requires that the platform support
|
|
a memory management unit (MMU) and address environments. Support,
|
|
however, may not be implemented on all platforms.
|
|
|
|
endchoice # Build configuration
|
|
|
|
config BUILD_PIC
|
|
bool "NuttX PIC build"
|
|
default n
|
|
---help---
|
|
Builds NuttX with position-independent code (PIC). This will allow
|
|
load NuttX into memory at any address and run it.
|
|
|
|
endmenu # Build Setup
|
|
|
|
menu "Customize Header Files"
|
|
|
|
config ARCH_HAVE_STDINT_H
|
|
bool
|
|
default n
|
|
---help---
|
|
Selected by architecture specific logic if the architecture provides
|
|
a stdint.h header file.
|
|
|
|
config ARCH_STDINT_H
|
|
bool "stdint.h"
|
|
default n
|
|
depends on ARCH_HAVE_STDINT_H
|
|
---help---
|
|
The stdint.h header file can be found at nuttx/include/stdint.h.
|
|
However, that header includes logic to redirect the inclusion of an
|
|
architecture specific header file like:
|
|
|
|
#ifdef CONFIG_ARCH_STDINT_H
|
|
# include <arch/stdint.h>
|
|
#else
|
|
...
|
|
#endif
|
|
|
|
Recall that that include path, include/arch, is a symbolic link and
|
|
will refer to a version of stdint.h at nuttx/arch/<architecture>/include/stdint.h.
|
|
|
|
config ARCH_HAVE_STDBOOL_H
|
|
bool
|
|
default n
|
|
---help---
|
|
Selected by architecture specific logic if the architecture provides
|
|
a stdbool.h header file.
|
|
|
|
config ARCH_STDBOOL_H
|
|
bool "stdbool.h"
|
|
default n
|
|
depends on ARCH_HAVE_STDBOOL_H
|
|
---help---
|
|
The stdbool.h header file can be found at nuttx/include/stdbool.h.
|
|
However, that header includes logic to redirect the inclusion of an
|
|
architecture specific header file like:
|
|
|
|
#ifdef CONFIG_ARCH_STDBOOL_H
|
|
# include <arch/stdbool.h>
|
|
#else
|
|
...
|
|
#endif
|
|
|
|
Recall that that include path, include/arch, is a symbolic link and
|
|
will refer to a version of stdbool.h at nuttx/arch/<architecture>/include/stdbool.h.
|
|
|
|
config ARCH_HAVE_MATH_H
|
|
bool
|
|
default n
|
|
---help---
|
|
Selected by architecture specific logic if the architecture provides
|
|
a math.h header file.
|
|
|
|
config ARCH_MATH_H
|
|
bool "math.h"
|
|
depends on ARCH_HAVE_MATH_H
|
|
default n
|
|
---help---
|
|
There is also a re-directing version of math.h in the source tree.
|
|
However, it resides out-of-the-way at include/nuttx/lib/math.h because it
|
|
conflicts too often with the system math.h. If ARCH_MATH_H=y is
|
|
defined, however, the top-level makefile will copy the redirecting
|
|
math.h header file from include/nuttx/lib/math.h to include/math.h. math.h
|
|
will then include the architecture-specific version of math.h that you
|
|
must provide at nuttx/arch/>architecture</include/math.h.
|
|
|
|
#ifdef CONFIG_ARCH_MATH_H
|
|
# include <arch/math.h>
|
|
#endif
|
|
|
|
So for the architectures that define ARCH_MATH_H=y, include/math.h
|
|
will be the redirecting math.h header file; for the architectures
|
|
that don't select ARCH_MATH_H, the redirecting math.h header file
|
|
will stay out-of-the-way in include/nuttx/.
|
|
|
|
config ARCH_FLOAT_H
|
|
bool "float.h"
|
|
default n
|
|
---help---
|
|
The float.h header file defines the properties of your floating
|
|
point implementation. It would always be best to use your
|
|
toolchain's float.h header file but if none is available, a default
|
|
float.h header file will provided if this option is selected. However
|
|
there is no assurance that the settings in this float.h are actually
|
|
correct for your platform!
|
|
|
|
config DISABLE_FLOAT
|
|
bool "Disable floating point"
|
|
default n
|
|
---help---
|
|
Disable floating point support in the compiler. This will reduce
|
|
code size and increase performance. This option is only available
|
|
on some architectures.
|
|
|
|
config ARCH_HAVE_STDARG_H
|
|
bool
|
|
default n
|
|
---help---
|
|
Selected by architecture specific logic if the architecture provides
|
|
a math.h header file.
|
|
|
|
config ARCH_STDARG_H
|
|
bool "stdarg.h"
|
|
depends on ARCH_HAVE_STDARG_H
|
|
default n
|
|
---help---
|
|
There is a redirecting version of stdarg.h in the source tree. It
|
|
resides out-of-the-way at include/nuttx/lib/stdarg.h. This is
|
|
because you should normally use your toolchain's stdarg.h file. But
|
|
sometimes, your toolchain's stdarg.h file may have other header
|
|
file dependencies and so may not be usable in the NuttX build
|
|
environment. In those cases, you may have to create a architecture-
|
|
specific stdarg.h header file at nuttx/arch/<architecture>/include/stdarg.h
|
|
|
|
If ARCH_STDARG_H=y is defined, the top-level makefile will copy the
|
|
re-directing stdarg.h header file from include/nuttx/lib/stdarg.h to
|
|
include/stdarg.h. So for the architectures that cannot use their
|
|
toolchain's stdarg.h file, they can use this alternative by defining
|
|
ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then
|
|
the stdarg.h header file will stay out-of-the-way in include/nuttx/.
|
|
|
|
config ARCH_HAVE_SETJMP
|
|
bool
|
|
default n
|
|
|
|
config ARCH_SETJMP_H
|
|
bool "setjmp.h"
|
|
default n
|
|
depends on ARCH_HAVE_SETJMP
|
|
---help---
|
|
There is a redirecting version of setjmp.h in the source tree. It
|
|
resides out-of-the-way at include/nuttx/lib/setjmp.h. This is
|
|
because you should normally use your toolchain's setjmp.h file. But
|
|
sometimes, your toolchain's setjmp.h file may have other header
|
|
file dependencies and so may not be usable in the NuttX build
|
|
environment. In those cases, you may have to create a architecture-
|
|
specific setjmp.h header file at nuttx/arch/<architecture>/include/setjmp.h
|
|
|
|
If ARCH_SETJMP_H=y is defined, the top-level makefile will copy the
|
|
re-directing setjmp.h header file from include/nuttx/lib/setjmp.h to
|
|
include/setjmp.h. So for the architectures that cannot use their
|
|
toolchain's setjmp.h file, they can use this alternative by defining
|
|
ARCH_SETJMP_H=y and providing. If ARCH_SETJMP_H, is not defined, then
|
|
the setjmp.h header file will stay out-of-the-way in include/nuttx/.
|
|
|
|
choice
|
|
prompt "debug.h selection"
|
|
default ARCH_NONE_DEBUG_H
|
|
|
|
config ARCH_NONE_DEBUG_H
|
|
bool "None"
|
|
---help---
|
|
No debug.h under include/arch/ and include/arch/chip.
|
|
|
|
config ARCH_DEBUG_H
|
|
bool "debug.h"
|
|
---help---
|
|
The debug.h under include/arch contains architecture dependent debugging primitives
|
|
|
|
config ARCH_CHIP_DEBUG_H
|
|
bool "chip debug.h"
|
|
---help---
|
|
The debug.h under include/arch/chip contains architecture dependent debugging primitives
|
|
|
|
config ARCH_BOARD_DEBUG_H
|
|
bool "board debug.h"
|
|
---help---
|
|
The debug.h under include/arch/board contains board dependent debugging primitives
|
|
|
|
endchoice # debug.h selection
|
|
|
|
endmenu # Customize Header Files
|
|
|
|
source "Kconfig.debug"
|
|
|
|
menuconfig TRACE
|
|
bool "Enable tracepoints"
|
|
default n
|
|
depends on SCHED_INSTRUMENTATION_DUMP
|
|
---help---
|
|
If this option is enabled, tracepoints at critical code in
|
|
the kernel will be enabled.
|
|
|
|
if TRACE
|
|
config TRACE_APP
|
|
bool "Enable tracepoints in app"
|
|
default n
|
|
|
|
config TRACE_ARCH
|
|
bool "Enable tracepoints in arch"
|
|
default n
|
|
|
|
config TRACE_AUDIO
|
|
bool "Enable tracepoints in audio"
|
|
default n
|
|
|
|
config TRACE_BOARDS
|
|
bool "Enable tracepoints in boards"
|
|
default n
|
|
|
|
config TRACE_CRYPTO
|
|
bool "Enable tracepoints in crypto"
|
|
default n
|
|
|
|
config TRACE_DRIVERS
|
|
bool "Enable tracepoints in drivers"
|
|
default n
|
|
|
|
config TRACE_FS
|
|
bool "Enable tracepoints in fs"
|
|
default n
|
|
|
|
if TRACE_FS
|
|
menu "Trace Fs Support"
|
|
|
|
config TRACE_LITTLEFS_FS
|
|
bool "Enable tracepoints in littlefs"
|
|
default n
|
|
|
|
config TRACE_ROMFS_FS
|
|
bool "Enable tracepoints in romfs"
|
|
default n
|
|
|
|
config TRACE_RPMSGFS_FS
|
|
bool "Enable tracepoints in rpmsgfs"
|
|
default n
|
|
|
|
endmenu # Trace Fs Support
|
|
endif
|
|
|
|
config TRACE_GRAPHICS
|
|
bool "Enable tracepoints in graphics"
|
|
default n
|
|
|
|
config TRACE_INPUT
|
|
bool "Enable tracepoints in input"
|
|
default n
|
|
|
|
config TRACE_LIBS
|
|
bool "Enable tracepoints in libs"
|
|
default n
|
|
|
|
config TRACE_MM
|
|
bool "Enable tracepoints in mm"
|
|
default n
|
|
|
|
config TRACE_NET
|
|
bool "Enable tracepoints in net"
|
|
default n
|
|
|
|
config TRACE_SCHED
|
|
bool "Enable tracepoints in sched"
|
|
default n
|
|
|
|
config TRACE_VIDEO
|
|
bool "Enable tracepoints in video"
|
|
default n
|
|
|
|
config TRACE_WIRELESS
|
|
bool "Enable tracepoints in wireless"
|
|
default n
|
|
|
|
endif #TRACE
|
|
|
|
choice
|
|
prompt "Optimization Level"
|
|
default DEBUG_NOOPT if DEBUG_SYMBOLS
|
|
default DEBUG_FULLOPT if !DEBUG_SYMBOLS
|
|
|
|
config DEBUG_NOOPT
|
|
bool "Suppress Optimization"
|
|
---help---
|
|
Build without optimization. This is often helpful when debugging code.
|
|
|
|
config DEBUG_CUSTOMOPT
|
|
bool "Custom Optimization"
|
|
depends on ARCH_HAVE_CUSTOMOPT
|
|
---help---
|
|
Select a custom debug level. This is often helpful if you suspect an
|
|
optimization level error and want to lower the level of optimization.
|
|
|
|
config DEBUG_FULLOPT
|
|
bool "Normal, Full optimization"
|
|
---help---
|
|
Build full optimization. This is the normal case for production
|
|
firmware.
|
|
|
|
endchoice # Optimization Level
|
|
|
|
config DEBUG_OPTLEVEL
|
|
string "Custom Optimization Level"
|
|
default "/O2" if HOST_WINDOWS
|
|
default "-O2"
|
|
depends on DEBUG_CUSTOMOPT
|
|
---help---
|
|
This string represents the custom optimization level that will be
|
|
used if DEBUG_CUSTOMOPT.
|
|
|
|
choice
|
|
prompt "Link Time Optimization (LTO)"
|
|
default LTO_NONE
|
|
---help---
|
|
This option enables Link Time Optimization (LTO), which allows the
|
|
compiler to optimize binaries globally.
|
|
|
|
If unsure, select LTO_NONE. Note that LTO is very resource-intensive
|
|
so it's disabled by default.
|
|
|
|
config LTO_NONE
|
|
bool "None"
|
|
---help---
|
|
Build the kernel normally, without Link Time Optimization (LTO).
|
|
|
|
config LTO_FULL
|
|
bool "GNU Full LTO (EXPERIMENTAL)"
|
|
depends on ARCH_TOOLCHAIN_GNU
|
|
---help---
|
|
Link time optimization is implemented as a GCC front end for a bytecode
|
|
bytecode representation of GIMPLE that is emitted in special sections
|
|
of .o files. Currently, LTO support is enabled in most ELF-based systems,
|
|
as well as darwin, cygwin and mingw systems.
|
|
|
|
config LTO_THIN
|
|
bool "Clang ThinLTO (EXPERIMENTAL)"
|
|
depends on ARCH_TOOLCHAIN_CLANG
|
|
---help---
|
|
This option enables Clang's ThinLTO, which allows for parallel
|
|
optimization and faster incremental compiles compared to the
|
|
CONFIG_LTO_FULL option. More information can be found
|
|
from Clang's documentation:
|
|
|
|
https://clang.llvm.org/docs/ThinLTO.html
|
|
|
|
If unsure, say Y.
|
|
endchoice
|
|
|
|
config DEBUG_OPT_UNUSED_SECTIONS
|
|
bool "Optimization to eliminate the unused input sections"
|
|
default y
|
|
depends on ARCH_TOOLCHAIN_GNU
|
|
---help---
|
|
Use these options on systems where the linker can perform optimizations
|
|
to improve locality of reference in the instruction space. Most systems
|
|
using the ELF object format have linkers with such optimizations.
|
|
|
|
Enable this option to optimization the unused input sections with the
|
|
linker by compiling with " -ffunction-sections -fdata-sections ", and
|
|
linking with " --gc-sections ".
|
|
|
|
config DEBUG_LINK_WHOLE_ARCHIVE
|
|
bool "Force every object to be included in the resulting shared library."
|
|
default n
|
|
depends on DEBUG_OPT_UNUSED_SECTIONS
|
|
---help---
|
|
Selecting this option will pass "--whole-archive" to ld
|
|
when linking NuttX ELF.
|
|
|
|
config DEBUG_LINK_MAP
|
|
bool "Generate link map file"
|
|
default y
|
|
---help---
|
|
Selecting this option will pass "-Map=$(TOPDIR)$(DELIM)nuttx.map" to ld
|
|
when linking NuttX ELF. That file can be useful for verifying
|
|
and debugging magic section games, and for seeing which
|
|
pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS.
|
|
|
|
config CCACHE
|
|
bool "Use ccache"
|
|
default n
|
|
---help---
|
|
If enabled, ccache will be used during the build.
|
|
Build artifacts will be cached to a local storage, considerably
|
|
reducing build times.
|
|
|
|
endmenu # Build Setup |