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