]> granicus.if.org Git - esp-idf/blob - Kconfig
Merge branch 'bugfix/bt_rfcomm_pr1923' 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
8 menu "SDK tool configuration"
9 config TOOLPREFIX
10     string "Compiler toolchain path/prefix"
11     default "xtensa-esp32-elf-"
12     help
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.
15
16 config PYTHON
17     string "Python 2 interpreter"
18     default "python"
19     help
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.
22
23 config MAKE_WARN_UNDEFINED_VARIABLES
24     bool "'make' warns on undefined variables"
25     default "y"
26     help
27         Adds --warn-undefined-variables to MAKEFLAGS. This causes make to
28         print a warning any time an undefined variable is referenced.
29
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.
33
34 endmenu  # SDK tool configuration
35
36 source "$COMPONENT_KCONFIGS_PROJBUILD"
37
38 menu "Compiler options"
39
40 choice OPTIMIZATION_COMPILER
41     prompt "Optimization Level"
42     default OPTIMIZATION_LEVEL_DEBUG
43     help
44         This option sets compiler optimization level (gcc -O argument).
45
46         - for "Release" setting, -Os flag is added to CFLAGS.
47         - for "Debug" setting, -Og flag is added to CFLAGS.
48
49         "Release" with -Os produces smaller & faster compiled code but it
50         may be harder to correlated code addresses to source files when debugging.
51
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.
55
56 config OPTIMIZATION_LEVEL_DEBUG
57     bool "Debug (-Og)"
58 config OPTIMIZATION_LEVEL_RELEASE
59     bool "Release (-Os)"
60 endchoice
61
62 choice OPTIMIZATION_ASSERTION_LEVEL
63     prompt "Assertion level"
64     default OPTIMIZATION_ASSERTIONS_ENABLED
65     help
66         Assertions can be:
67         - Enabled. Failure will print verbose assertion details. This is the default.
68
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.)
71
72         - Disabled entirely (not recommended for most configurations.) -DNDEBUG is added
73           to CPPFLAGS in this case.
74
75 config OPTIMIZATION_ASSERTIONS_ENABLED
76     prompt "Enabled"
77     bool
78     help
79         Enable assertions. Assertion content and line number will be printed on failure.
80
81 config OPTIMIZATION_ASSERTIONS_SILENT
82     prompt "Silent (saves code size)"
83     bool
84     help
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.
87
88 config OPTIMIZATION_ASSERTIONS_DISABLED
89     prompt "Disabled (sets -DNDEBUG)"
90     bool
91     help
92         If assertions are disabled, -DNDEBUG is added to CPPFLAGS.
93
94 endchoice # assertions
95
96 menuconfig CXX_EXCEPTIONS
97    bool "Enable C++ exceptions"
98    default n
99    help
100        Enabling this option compiles all IDF C++ files with exception support enabled.
101
102        Disabling this option disables C++ exception support in all compiled files, and any libstdc++ code which throws
103        an exception will abort instead.
104
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.
107
108 config CXX_EXCEPTIONS_EMG_POOL_SIZE
109     int "Emergency Pool Size"
110     default 0
111     depends on CXX_EXCEPTIONS
112     help
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.
115
116 choice STACK_CHECK_MODE
117     prompt "Stack smashing protection mode"
118     default STACK_CHECK_NONE
119     help
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.
129
130         Modes have the following impact on code performance and coverage:
131           - performance: NORMAL > STRONG > OVERALL
132           - coverage: NORMAL < STRONG < OVERALL
133
134
135 config STACK_CHECK_NONE
136     bool "None"
137 config STACK_CHECK_NORM
138     bool "Normal"
139 config STACK_CHECK_STRONG
140     bool "Strong"
141 config STACK_CHECK_ALL
142     bool "Overall"
143 endchoice
144
145 config STACK_CHECK
146     bool
147     default !STACK_CHECK_NONE
148     help
149         Stack smashing protection.
150
151 config WARN_WRITE_STRINGS
152     bool "Enable -Wwrite-strings warning flag"
153     default "n"
154     help
155         Adds -Wwrite-strings flag for the C/C++ compilers.
156
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.
161
162         For C++, this warns about the deprecated conversion from string
163         literals to "char *".
164
165 endmenu # Compiler Options
166
167 menu "Component config"
168 source "$COMPONENT_KCONFIGS"
169 endmenu