Kconfig 6.8 KB

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