2 # For a description of the syntax of this configuration file,
3 # see kconfig/kconfig-language.txt.
5 mainmenu "Espressif IoT Development Framework Configuration"
11 menu "SDK tool configuration"
13 string "Compiler toolchain path/prefix"
14 default "xtensa-esp32-elf-"
16 The prefix/path that is used to call the toolchain. The default setting assumes
17 a crosstool-ng gcc setup that is in your PATH.
20 string "Python 2 interpreter"
24 The executable name/path that is used to run python. On some systems Python 2.x
25 may need to be invoked as python2.
27 (Note: This option is used with the GNU Make build system only, not idf.py
28 or CMake-based builds.)
30 config MAKE_WARN_UNDEFINED_VARIABLES
31 bool "'make' warns on undefined variables"
34 Adds --warn-undefined-variables to MAKEFLAGS. This causes make to
35 print a warning any time an undefined variable is referenced.
37 This option helps find places where a variable reference is misspelled
38 or otherwise missing, but it can be unwanted if you have Makefiles which
39 depend on undefined variables expanding to an empty string.
41 endmenu # SDK tool configuration
43 source "$COMPONENT_KCONFIGS_PROJBUILD"
45 menu "Compiler options"
47 choice OPTIMIZATION_COMPILER
48 prompt "Optimization Level"
49 default OPTIMIZATION_LEVEL_DEBUG
51 This option sets compiler optimization level (gcc -O argument).
53 - for "Release" setting, -Os flag is added to CFLAGS.
54 - for "Debug" setting, -Og flag is added to CFLAGS.
56 "Release" with -Os produces smaller & faster compiled code but it
57 may be harder to correlated code addresses to source files when debugging.
59 To add custom optimization settings, set CFLAGS and/or CPPFLAGS
60 in project makefile, before including $(IDF_PATH)/make/project.mk. Note that
61 custom optimization levels may be unsupported.
63 config OPTIMIZATION_LEVEL_DEBUG
65 config OPTIMIZATION_LEVEL_RELEASE
69 choice OPTIMIZATION_ASSERTION_LEVEL
70 prompt "Assertion level"
71 default OPTIMIZATION_ASSERTIONS_ENABLED
75 - Enabled. Failure will print verbose assertion details. This is the default.
77 - Set to "silent" to save code size (failed assertions will abort() but user
78 needs to use the aborting address to find the line number with the failed assertion.)
80 - Disabled entirely (not recommended for most configurations.) -DNDEBUG is added
81 to CPPFLAGS in this case.
83 config OPTIMIZATION_ASSERTIONS_ENABLED
87 Enable assertions. Assertion content and line number will be printed on failure.
89 config OPTIMIZATION_ASSERTIONS_SILENT
90 prompt "Silent (saves code size)"
93 Enable silent assertions. Failed assertions will abort(), user needs to
94 use the aborting address to find the line number with the failed assertion.
96 config OPTIMIZATION_ASSERTIONS_DISABLED
97 prompt "Disabled (sets -DNDEBUG)"
100 If assertions are disabled, -DNDEBUG is added to CPPFLAGS.
102 endchoice # assertions
104 menuconfig CXX_EXCEPTIONS
105 bool "Enable C++ exceptions"
108 Enabling this option compiles all IDF C++ files with exception support enabled.
110 Disabling this option disables C++ exception support in all compiled files, and any libstdc++ code which throws
111 an exception will abort instead.
113 Enabling this option currently adds an additional ~500 bytes of heap overhead
114 when an exception is thrown in user code for the first time.
116 config CXX_EXCEPTIONS_EMG_POOL_SIZE
117 int "Emergency Pool Size"
119 depends on CXX_EXCEPTIONS
121 Size (in bytes) of the emergency memory pool for C++ exceptions. This pool will be used to allocate
122 memory for thrown exceptions when there is not enough memory on the heap.
124 choice STACK_CHECK_MODE
125 prompt "Stack smashing protection mode"
126 default STACK_CHECK_NONE
128 Stack smashing protection mode. Emit extra code to check for buffer overflows, such as stack
129 smashing attacks. This is done by adding a guard variable to functions with vulnerable objects.
130 The guards are initialized when a function is entered and then checked when the function exits.
131 If a guard check fails, program is halted. Protection has the following modes:
133 - In NORMAL mode (GCC flag: -fstack-protector) only functions that call alloca,
134 and functions with buffers larger than 8 bytes are protected.
136 - STRONG mode (GCC flag: -fstack-protector-strong) is like NORMAL, but includes
137 additional functions to be protected -- those that have local array definitions,
138 or have references to local frame addresses.
140 - In OVERALL mode (GCC flag: -fstack-protector-all) all functions are protected.
142 Modes have the following impact on code performance and coverage:
144 - performance: NORMAL > STRONG > OVERALL
146 - coverage: NORMAL < STRONG < OVERALL
149 config STACK_CHECK_NONE
151 config STACK_CHECK_NORM
153 config STACK_CHECK_STRONG
155 config STACK_CHECK_ALL
161 default !STACK_CHECK_NONE
163 Stack smashing protection.
165 config WARN_WRITE_STRINGS
166 bool "Enable -Wwrite-strings warning flag"
169 Adds -Wwrite-strings flag for the C/C++ compilers.
171 For C, this gives string constants the type ``const char[]`` so that
172 copying the address of one into a non-const ``char *`` pointer
173 produces a warning. This warning helps to find at compile time code
174 that tries to write into a string constant.
176 For C++, this warns about the deprecated conversion from string
177 literals to ``char *``.
179 config DISABLE_GCC8_WARNINGS
180 bool "Disable new warnings introduced in GCC 6 - 8"
183 Enable this option if using GCC 6 or newer, and wanting to disable warnings which don't appear with GCC 5.
186 endmenu # Compiler Options
188 menu "Component config"
189 source "$COMPONENT_KCONFIGS"