2 # For a description of the syntax of this configuration file,
3 # see kconfig/kconfig-language.txt.
5 mainmenu "Espressif IoT Development Framework Configuration"
8 menu "SDK tool configuration"
10 string "Compiler toolchain path/prefix"
11 default "xtensa-esp32-elf-"
13 The prefix/path that is used to call the toolchain. The default setting assumes
14 a crosstool-ng gcc setup that is in your PATH.
17 string "Python 2 interpreter"
20 The executable name/path that is used to run python. On some systems Python 2.x
21 may need to be invoked as python2.
23 config MAKE_WARN_UNDEFINED_VARIABLES
24 bool "'make' warns on undefined variables"
27 Adds --warn-undefined-variables to MAKEFLAGS. This causes make to
28 print a warning any time an undefined variable is referenced.
30 This option helps find places where a variable reference is misspelled
31 or otherwise missing, but it can be unwanted if you have Makefiles which
32 depend on undefined variables expanding to an empty string.
34 endmenu # SDK tool configuration
36 source "$COMPONENT_KCONFIGS_PROJBUILD"
38 menu "Compiler options"
40 choice OPTIMIZATION_COMPILER
41 prompt "Optimization Level"
42 default OPTIMIZATION_LEVEL_DEBUG
44 This option sets compiler optimization level (gcc -O argument).
46 - for "Release" setting, -Os flag is added to CFLAGS.
47 - for "Debug" setting, -Og flag is added to CFLAGS.
49 "Release" with -Os produces smaller & faster compiled code but it
50 may be harder to correlated code addresses to source files when debugging.
52 To add custom optimization settings, set CFLAGS and/or CPPFLAGS
53 in project makefile, before including $(IDF_PATH)/make/project.mk. Note that
54 custom optimization levels may be unsupported.
56 config OPTIMIZATION_LEVEL_DEBUG
58 config OPTIMIZATION_LEVEL_RELEASE
62 choice OPTIMIZATION_ASSERTION_LEVEL
63 prompt "Assertion level"
64 default OPTIMIZATION_ASSERTIONS_ENABLED
67 - Enabled. Failure will print verbose assertion details. This is the default.
69 - Set to "silent" to save code size (failed assertions will abort() but user
70 needs to use the aborting address to find the line number with the failed assertion.)
72 - Disabled entirely (not recommended for most configurations.) -DNDEBUG is added
73 to CPPFLAGS in this case.
75 config OPTIMIZATION_ASSERTIONS_ENABLED
79 Enable assertions. Assertion content and line number will be printed on failure.
81 config OPTIMIZATION_ASSERTIONS_SILENT
82 prompt "Silent (saves code size)"
85 Enable silent assertions. Failed assertions will abort(), user needs to
86 use the aborting address to find the line number with the failed assertion.
88 config OPTIMIZATION_ASSERTIONS_DISABLED
89 prompt "Disabled (sets -DNDEBUG)"
92 If assertions are disabled, -DNDEBUG is added to CPPFLAGS.
94 endchoice # assertions
96 menuconfig CXX_EXCEPTIONS
97 bool "Enable C++ exceptions"
100 Enabling this option compiles all IDF C++ files with exception support enabled.
102 Disabling this option disables C++ exception support in all compiled files, and any libstdc++ code which throws
103 an exception will abort instead.
105 Enabling this option currently adds an additional ~500 bytes of heap overhead
106 when an exception is thrown in user code for the first time.
108 config CXX_EXCEPTIONS_EMG_POOL_SIZE
109 int "Emergency Pool Size"
111 depends on CXX_EXCEPTIONS
113 Size (in bytes) of the emergency memory pool for C++ exceptions. This pool will be used to allocate
114 memory for thrown exceptions when there is not enough memory on the heap.
116 choice STACK_CHECK_MODE
117 prompt "Stack smashing protection mode"
118 default STACK_CHECK_NONE
120 Stack smashing protection mode. Emit extra code to check for buffer overflows, such as stack
121 smashing attacks. This is done by adding a guard variable to functions with vulnerable objects.
122 The guards are initialized when a function is entered and then checked when the function exits.
123 If a guard check fails, program is halted. Protection has the following modes:
124 - In NORMAL mode (GCC flag: -fstack-protector) only functions that call alloca, and functions with buffers larger than
125 8 bytes are protected.
126 - STRONG mode (GCC flag: -fstack-protector-strong) is like NORMAL, but includes additional functions to be protected -- those that
127 have local array definitions, or have references to local frame addresses.
128 - In OVERALL mode (GCC flag: -fstack-protector-all) all functions are protected.
130 Modes have the following impact on code performance and coverage:
131 - performance: NORMAL > STRONG > OVERALL
132 - coverage: NORMAL < STRONG < OVERALL
135 config STACK_CHECK_NONE
137 config STACK_CHECK_NORM
139 config STACK_CHECK_STRONG
141 config STACK_CHECK_ALL
147 default !STACK_CHECK_NONE
149 Stack smashing protection.
151 config WARN_WRITE_STRINGS
152 bool "Enable -Wwrite-strings warning flag"
155 Adds -Wwrite-strings flag for the C/C++ compilers.
157 For C, this gives string constants the type "const char[]" so that
158 copying the address of one into a non-"const" "char *" pointer
159 produces a warning. This warning helps to find at compile time code
160 that tries to write into a string constant.
162 For C++, this warns about the deprecated conversion from string
163 literals to "char *".
165 endmenu # Compiler Options
167 menu "Component config"
168 source "$COMPONENT_KCONFIGS"