Kconfig 5.4 KB

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