Kconfig 6.1 KB

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