]> granicus.if.org Git - esp-idf/blob - Kconfig
wpa_supplicant: Remove tags file which was added by mistake
[esp-idf] / Kconfig
1 #
2 # For a description of the syntax of this configuration file,
3 # see kconfig/kconfig-language.txt.
4 #
5 mainmenu "Espressif IoT Development Framework Configuration"
6
7     # Hidden option to support checking for this specific target in C code and Kconfig files
8     config IDF_TARGET_ESP32
9         bool
10         default "y" if IDF_TARGET="esp32"
11         default "n"
12
13     config IDF_CMAKE
14         bool
15         option env="IDF_CMAKE"
16
17
18     config IDF_TARGET_ENV
19         # A proxy to get environment variable $IDF_TARGET
20         string
21         option env="IDF_TARGET"
22
23     config IDF_TARGET
24         # This option records the IDF target when sdkconfig is generated the first time.
25         # It is not updated if environment variable $IDF_TARGET changes later, and
26         # the build system is responsible for detecting the mismatch between
27         # CONFIG_IDF_TARGET and $IDF_TARGET.
28         string
29         default "IDF_TARGET_NOT_SET" if IDF_TARGET_ENV=""
30         default IDF_TARGET_ENV
31
32
33     menu "SDK tool configuration"
34         config SDK_TOOLPREFIX
35             string "Compiler toolchain path/prefix"
36             default "xtensa-esp32-elf-"
37             help
38                 The prefix/path that is used to call the toolchain. The default setting assumes
39                 a crosstool-ng gcc setup that is in your PATH.
40
41         config SDK_PYTHON
42             string "Python 2 interpreter"
43             depends on !IDF_CMAKE
44             default "python"
45             help
46                 The executable name/path that is used to run python. On some systems Python 2.x
47                 may need to be invoked as python2.
48
49                 (Note: This option is used with the GNU Make build system only, not idf.py
50                 or CMake-based builds.)
51
52         config SDK_MAKE_WARN_UNDEFINED_VARIABLES
53             bool "'make' warns on undefined variables"
54             default "y"
55             help
56                 Adds --warn-undefined-variables to MAKEFLAGS. This causes make to
57                 print a warning any time an undefined variable is referenced.
58
59                 This option helps find places where a variable reference is misspelled
60                 or otherwise missing, but it can be unwanted if you have Makefiles which
61                 depend on undefined variables expanding to an empty string.
62
63     endmenu  # SDK tool configuration
64
65     source "$COMPONENT_KCONFIGS_PROJBUILD"
66
67     menu "Compiler options"
68
69         choice COMPILER_OPTIMIZATION
70             prompt "Optimization Level"
71             default COMPILER_OPTIMIZATION_LEVEL_DEBUG
72             help
73                 This option sets compiler optimization level (gcc -O argument).
74
75                 - for "Release" setting, -Os flag is added to CFLAGS.
76                 - for "Debug" setting, -Og flag is added to CFLAGS.
77
78                 "Release" with -Os produces smaller & faster compiled code but it
79                 may be harder to correlated code addresses to source files when debugging.
80
81                 To add custom optimization settings, set CFLAGS and/or CPPFLAGS
82                 in project makefile, before including $(IDF_PATH)/make/project.mk. Note that
83                 custom optimization levels may be unsupported.
84
85             config COMPILER_OPTIMIZATION_LEVEL_DEBUG
86                 bool "Debug (-Og)"
87             config COMPILER_OPTIMIZATION_LEVEL_RELEASE
88                 bool "Release (-Os)"
89         endchoice
90
91         choice COMPILER_OPTIMIZATION_ASSERTION_LEVEL
92             prompt "Assertion level"
93             default COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE
94             help
95                 Assertions can be:
96
97                 - Enabled. Failure will print verbose assertion details. This is the default.
98
99                 - Set to "silent" to save code size (failed assertions will abort() but user
100                   needs to use the aborting address to find the line number with the failed assertion.)
101
102                 - Disabled entirely (not recommended for most configurations.) -DNDEBUG is added
103                   to CPPFLAGS in this case.
104
105             config COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE
106                 prompt "Enabled"
107                 bool
108                 help
109                     Enable assertions. Assertion content and line number will be printed on failure.
110
111             config COMPILER_OPTIMIZATION_ASSERTIONS_SILENT
112                 prompt "Silent (saves code size)"
113                 bool
114                 help
115                     Enable silent assertions. Failed assertions will abort(), user needs to
116                     use the aborting address to find the line number with the failed assertion.
117
118             config COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
119                 prompt "Disabled (sets -DNDEBUG)"
120                 bool
121                 help
122                     If assertions are disabled, -DNDEBUG is added to CPPFLAGS.
123
124         endchoice # assertions
125
126         menuconfig COMPILER_CXX_EXCEPTIONS
127             bool "Enable C++ exceptions"
128             default n
129             help
130                 Enabling this option compiles all IDF C++ files with exception support enabled.
131
132                 Disabling this option disables C++ exception support in all compiled files, and any libstdc++ code
133                 which throws an exception will abort instead.
134
135                 Enabling this option currently adds an additional ~500 bytes of heap overhead
136                 when an exception is thrown in user code for the first time.
137
138         config COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE
139             int "Emergency Pool Size"
140             default 0
141             depends on COMPILER_CXX_EXCEPTIONS
142             help
143                 Size (in bytes) of the emergency memory pool for C++ exceptions. This pool will be used to allocate
144                 memory for thrown exceptions when there is not enough memory on the heap.
145
146         choice COMPILER_STACK_CHECK_MODE
147             prompt "Stack smashing protection mode"
148             default COMPILER_STACK_CHECK_MODE_NONE
149             help
150                 Stack smashing protection mode. Emit extra code to check for buffer overflows, such as stack
151                 smashing attacks. This is done by adding a guard variable to functions with vulnerable objects.
152                 The guards are initialized when a function is entered and then checked when the function exits.
153                 If a guard check fails, program is halted. Protection has the following modes:
154
155                 - In NORMAL mode (GCC flag: -fstack-protector) only functions that call alloca, and functions with
156                   buffers larger than 8 bytes are protected.
157
158                 - STRONG mode (GCC flag: -fstack-protector-strong) is like NORMAL, but includes additional functions
159                   to be protected -- those that have local array definitions, or have references to local frame
160                   addresses.
161
162                 - In OVERALL mode (GCC flag: -fstack-protector-all) all functions are protected.
163
164                 Modes have the following impact on code performance and coverage:
165
166                 - performance: NORMAL > STRONG > OVERALL
167
168                 - coverage: NORMAL < STRONG < OVERALL
169
170
171             config COMPILER_STACK_CHECK_MODE_NONE
172                 bool "None"
173             config COMPILER_STACK_CHECK_MODE_NORM
174                 bool "Normal"
175             config COMPILER_STACK_CHECK_MODE_STRONG
176                 bool "Strong"
177             config COMPILER_STACK_CHECK_MODE_ALL
178                 bool "Overall"
179         endchoice
180
181         config COMPILER_STACK_CHECK
182             bool
183             default !COMPILER_STACK_CHECK_MODE_NONE
184             help
185                 Stack smashing protection.
186
187         config COMPILER_WARN_WRITE_STRINGS
188             bool "Enable -Wwrite-strings warning flag"
189             default "n"
190             help
191                 Adds -Wwrite-strings flag for the C/C++ compilers.
192
193                 For C, this gives string constants the type ``const char[]`` so that
194                 copying the address of one into a non-const ``char *`` pointer
195                 produces a warning. This warning helps to find at compile time code
196                 that tries to write into a string constant.
197
198                 For C++, this warns about the deprecated conversion from string
199                 literals to ``char *``.
200
201         config COMPILER_DISABLE_GCC8_WARNINGS
202             bool "Disable new warnings introduced in GCC 6 - 8"
203             default "n"
204             help
205                 Enable this option if using GCC 6 or newer, and wanting to disable warnings which don't appear with
206                 GCC 5.
207
208
209     endmenu # Compiler Options
210
211     menu "Component config"
212         source "$COMPONENT_KCONFIGS"
213     endmenu
214
215     menu "Compatibility options"
216         config LEGACY_INCLUDE_COMMON_HEADERS
217             bool "Include headers accross components as before IDF v4.0"
218             default n
219             help
220                 Soc, esp32, and driver components, the most common
221                 components. Some header of these components are included
222                 implicitly by headers of other components before IDF v4.0.
223                 It's not required for high-level components, but still
224                 included through long header chain everywhere.
225
226                 This is harmful to the modularity. So it's changed in IDF
227                 v4.0.
228
229                 You can still include these headers in a legacy way until it
230                 is totally deprecated by enable this option.
231
232     endmenu #Compatibility options