Kconfig 8.2 KB

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