]> granicus.if.org Git - esp-idf/commitdiff
Rename Kconfig options (root)
authorRoland Dobai <dobai.roland@gmail.com>
Wed, 24 Apr 2019 13:02:25 +0000 (15:02 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Tue, 21 May 2019 07:09:01 +0000 (09:09 +0200)
28 files changed:
CMakeLists.txt
Kconfig
components/asio/port/include/esp_asio_config.h
components/asio/port/include/esp_exception.h
components/cxx/CMakeLists.txt
components/cxx/component.mk
components/cxx/cxx_exception_stubs.cpp
components/cxx/test/test_cxx.cpp
components/esp32/Kconfig
components/esp32/cpu_start.c
components/esp32/test/test_stack_check.c
components/esp32/test/test_stack_check_cxx.cpp
components/esp_common/include/esp_err.h
components/esp_common/src/stack_check.c
components/freertos/Kconfig
components/heap/multi_heap_platform.h
components/newlib/platform_include/assert.h
docs/en/api-guides/error-handling.rst
docs/en/api-guides/fatal-errors.rst
docs/zh_CN/api-guides/error-handling.rst
examples/system/cpp_exceptions/README.md
examples/system/cpp_exceptions/sdkconfig.defaults
make/project.mk
sdkconfig.rename
tools/check_kconfigs.py
tools/ldgen/samples/sdkconfig
tools/unit-test-app/configs/release
tools/unit-test-app/sdkconfig.defaults

index 139dce9c65291b96f5dc46b2f43df5fe5073e7ff..a844c0576983b7064975f5d5636ea63d3443440f 100644 (file)
@@ -18,19 +18,19 @@ endif()
 
 list(APPEND compile_definitions "-DGCC_NOT_5_2_0=${GCC_NOT_5_2_0}")
 
-if(CONFIG_OPTIMIZATION_LEVEL_RELEASE)
+if(CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE)
     list(APPEND compile_options "-Os")
 else()
     list(APPEND compile_options "-Og")
 endif()
 
-if(CONFIG_CXX_EXCEPTIONS)
+if(CONFIG_COMPILER_CXX_EXCEPTIONS)
     list(APPEND cxx_compile_options "-fexceptions")
 else()
     list(APPEND cxx_compile_options "-fno-exceptions")
 endif()
 
-if(CONFIG_DISABLE_GCC8_WARNINGS)
+if(CONFIG_COMPILER_DISABLE_GCC8_WARNINGS)
     list(APPEND compile_options "-Wno-parentheses"
                                 "-Wno-sizeof-pointer-memaccess"
                                 "-Wno-clobbered")
@@ -50,15 +50,15 @@ if(CONFIG_DISABLE_GCC8_WARNINGS)
     endif()
 endif()
 
-if(CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED)
+if(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE)
     list(APPEND compile_definitions "NDEBUG")
 endif()
 
-if(CONFIG_STACK_CHECK_NORM)
+if(CONFIG_COMPILER_STACK_CHECK_MODE_NORM)
     list(APPEND compile_options "-fstack-protector")
-elseif(CONFIG_STACK_CHECK_STRONG)
+elseif(CONFIG_COMPILER_STACK_CHECK_MODE_STRONG)
     list(APPEND compile_options "-fstack-protector-strong")
-elseif(CONFIG_STACK_CHECK_ALL)
+elseif(CONFIG_COMPILER_STACK_CHECK_MODE_ALL)
     list(APPEND compile_options "-fstack-protector-all")
 endif()
 
@@ -117,4 +117,4 @@ foreach(build_component ${build_components})
             endif()
         endforeach()
     endif()
-endforeach()
\ No newline at end of file
+endforeach()
diff --git a/Kconfig b/Kconfig
index 874bb6e9a61938349a7099d2010137a382f3afa5..dd61783abcc68c0ab42c7993770542e1f059fc7c 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -60,9 +60,9 @@ mainmenu "Espressif IoT Development Framework Configuration"
 
     menu "Compiler options"
 
-        choice OPTIMIZATION_COMPILER
+        choice COMPILER_OPTIMIZATION
             prompt "Optimization Level"
-            default OPTIMIZATION_LEVEL_DEBUG
+            default COMPILER_OPTIMIZATION_LEVEL_DEBUG
             help
                 This option sets compiler optimization level (gcc -O argument).
 
@@ -76,15 +76,15 @@ mainmenu "Espressif IoT Development Framework Configuration"
                 in project makefile, before including $(IDF_PATH)/make/project.mk. Note that
                 custom optimization levels may be unsupported.
 
-            config OPTIMIZATION_LEVEL_DEBUG
+            config COMPILER_OPTIMIZATION_LEVEL_DEBUG
                 bool "Debug (-Og)"
-            config OPTIMIZATION_LEVEL_RELEASE
+            config COMPILER_OPTIMIZATION_LEVEL_RELEASE
                 bool "Release (-Os)"
         endchoice
 
-        choice OPTIMIZATION_ASSERTION_LEVEL
+        choice COMPILER_OPTIMIZATION_ASSERTION_LEVEL
             prompt "Assertion level"
-            default OPTIMIZATION_ASSERTIONS_ENABLED
+            default COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE
             help
                 Assertions can be:
 
@@ -96,20 +96,20 @@ mainmenu "Espressif IoT Development Framework Configuration"
                 - Disabled entirely (not recommended for most configurations.) -DNDEBUG is added
                   to CPPFLAGS in this case.
 
-            config OPTIMIZATION_ASSERTIONS_ENABLED
+            config COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE
                 prompt "Enabled"
                 bool
                 help
                     Enable assertions. Assertion content and line number will be printed on failure.
 
-            config OPTIMIZATION_ASSERTIONS_SILENT
+            config COMPILER_OPTIMIZATION_ASSERTIONS_SILENT
                 prompt "Silent (saves code size)"
                 bool
                 help
                     Enable silent assertions. Failed assertions will abort(), user needs to
                     use the aborting address to find the line number with the failed assertion.
 
-            config OPTIMIZATION_ASSERTIONS_DISABLED
+            config COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
                 prompt "Disabled (sets -DNDEBUG)"
                 bool
                 help
@@ -117,7 +117,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
 
         endchoice # assertions
 
-        menuconfig CXX_EXCEPTIONS
+        menuconfig COMPILER_CXX_EXCEPTIONS
             bool "Enable C++ exceptions"
             default n
             help
@@ -129,17 +129,17 @@ mainmenu "Espressif IoT Development Framework Configuration"
                 Enabling this option currently adds an additional ~500 bytes of heap overhead
                 when an exception is thrown in user code for the first time.
 
-        config CXX_EXCEPTIONS_EMG_POOL_SIZE
+        config COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE
             int "Emergency Pool Size"
             default 0
-            depends on CXX_EXCEPTIONS
+            depends on COMPILER_CXX_EXCEPTIONS
             help
                 Size (in bytes) of the emergency memory pool for C++ exceptions. This pool will be used to allocate
                 memory for thrown exceptions when there is not enough memory on the heap.
 
-        choice STACK_CHECK_MODE
+        choice COMPILER_STACK_CHECK_MODE
             prompt "Stack smashing protection mode"
-            default STACK_CHECK_NONE
+            default COMPILER_STACK_CHECK_MODE_NONE
             help
                 Stack smashing protection mode. Emit extra code to check for buffer overflows, such as stack
                 smashing attacks. This is done by adding a guard variable to functions with vulnerable objects.
@@ -162,23 +162,23 @@ mainmenu "Espressif IoT Development Framework Configuration"
                 - coverage: NORMAL < STRONG < OVERALL
 
 
-            config STACK_CHECK_NONE
+            config COMPILER_STACK_CHECK_MODE_NONE
                 bool "None"
-            config STACK_CHECK_NORM
+            config COMPILER_STACK_CHECK_MODE_NORM
                 bool "Normal"
-            config STACK_CHECK_STRONG
+            config COMPILER_STACK_CHECK_MODE_STRONG
                 bool "Strong"
-            config STACK_CHECK_ALL
+            config COMPILER_STACK_CHECK_MODE_ALL
                 bool "Overall"
         endchoice
 
-        config STACK_CHECK
+        config COMPILER_STACK_CHECK
             bool
-            default !STACK_CHECK_NONE
+            default !COMPILER_STACK_CHECK_MODE_NONE
             help
                 Stack smashing protection.
 
-        config WARN_WRITE_STRINGS
+        config COMPILER_WARN_WRITE_STRINGS
             bool "Enable -Wwrite-strings warning flag"
             default "n"
             help
@@ -192,7 +192,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
                 For C++, this warns about the deprecated conversion from string
                 literals to ``char *``.
 
-        config DISABLE_GCC8_WARNINGS
+        config COMPILER_DISABLE_GCC8_WARNINGS
             bool "Disable new warnings introduced in GCC 6 - 8"
             default "n"
             help
@@ -223,4 +223,4 @@ mainmenu "Espressif IoT Development Framework Configuration"
                 You can still include these headers in a legacy way until it
                 is totally deprecated by enable this option.
 
-    endmenu #Compatibility options
\ No newline at end of file
+    endmenu #Compatibility options
index accccad0da749ae44350b176aa3d96074d90576a..f8617fcc99f7f11a4978520925e9a8ae1b5f32b8 100644 (file)
@@ -18,9 +18,9 @@
 // Enabling exceptions only when they are enabled in menuconfig
 //
 # include <sdkconfig.h>
-# ifndef CONFIG_CXX_EXCEPTIONS
+# ifndef CONFIG_COMPILER_CXX_EXCEPTIONS
 #  define ASIO_NO_EXCEPTIONS
-# endif   // CONFIG_CXX_EXCEPTIONS
+# endif   // CONFIG_COMPILER_CXX_EXCEPTIONS
 
 //
 // LWIP compatifility inet and address macros/functions
index 3c5c043755f0dd9f6b7927dbef8d9957c64be084..a4a316013190741526382eefd82fa521d0555197 100644 (file)
@@ -18,7 +18,7 @@
 //
 // This exception stub is enabled only if exceptions are disabled in menuconfig
 //
-#if !defined(CONFIG_CXX_EXCEPTIONS) && defined (ASIO_NO_EXCEPTIONS)
+#if !defined(CONFIG_COMPILER_CXX_EXCEPTIONS) && defined (ASIO_NO_EXCEPTIONS)
 
 #include "esp_log.h"
 
@@ -34,6 +34,6 @@ void throw_exception(const Exception& e)
   abort();
 }
 }}
-#endif // CONFIG_CXX_EXCEPTIONS==1 && defined (ASIO_NO_EXCEPTIONS)
+#endif // CONFIG_COMPILER_CXX_EXCEPTIONS==1 && defined (ASIO_NO_EXCEPTIONS)
 
 #endif // _ESP_EXCEPTION_H_
index 0d9b14f134b00f97abe4685de5b7187cce5cf32f..cb5609d2a98598658c508093fec80e6ae1ffff67 100644 (file)
@@ -5,6 +5,6 @@ register_component()
 target_link_libraries(${COMPONENT_LIB} stdc++)
 target_link_libraries(${COMPONENT_LIB} "-u __cxa_guard_dummy")
 
-if(NOT CONFIG_CXX_EXCEPTIONS)
+if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)
     target_link_libraries(${COMPONENT_LIB} "-u __cxx_fatal_exception")
 endif()
index 7d819675a892bee46c5417d8647e46996d5c6b23..a5d6e55ccf71fb1a210135713421a08ac6bee1df 100644 (file)
@@ -2,7 +2,7 @@
 # is taken from cxx_guards.o instead of libstdc++.a
 COMPONENT_ADD_LDFLAGS += -u __cxa_guard_dummy
 
-ifndef CONFIG_CXX_EXCEPTIONS
+ifndef CONFIG_COMPILER_CXX_EXCEPTIONS
 # If exceptions are disabled, ensure our fatal exception
 # hooks are preferentially linked over libstdc++ which
 # has full exception support
index f09f946ddc25e4f876764ae34b0012c78813c78f..858ed0bfc86c556d352ce0ccb4e97d5d77c02c94 100644 (file)
@@ -4,7 +4,7 @@
 #include <bits/functexcept.h>
 #include <sdkconfig.h>
 
-#ifndef CONFIG_CXX_EXCEPTIONS
+#ifndef CONFIG_COMPILER_CXX_EXCEPTIONS
 
 const char *FATAL_EXCEPTION = "Fatal C++ exception: ";
 
@@ -81,4 +81,4 @@ extern "C" void __cxa_call_terminate(void) __attribute__((alias("__cxx_fatal_exc
 
 bool std::uncaught_exception() __attribute__((alias("__cxx_fatal_exception_bool")));
 
-#endif // CONFIG_CXX_EXCEPTIONS
+#endif // CONFIG_COMPILER_CXX_EXCEPTIONS
index 3ba121ca5f3405ab6956c505c0524538f179ed54..0f5cce331853ee4ea4303dc5812e1e4156ac93f1 100644 (file)
@@ -196,7 +196,7 @@ TEST_CASE("before scheduler has started, static initializers work correctly", "[
     TEST_ASSERT_EQUAL(2, StaticInitTestBeforeScheduler::order);
 }
 
-#ifdef CONFIG_CXX_EXCEPTIONS
+#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
 
 TEST_CASE("c++ exceptions work", "[cxx]")
 {
@@ -259,7 +259,7 @@ TEST_CASE("c++ exceptions emergency pool", "[cxx] [ignore]")
         thrown_value = e;
         printf("Got exception %d\n", thrown_value);
     }
-#if CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE > 0
+#if CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE > 0
     // free all memory
     while (pprev) {
         p = (void **)(*pprev);
@@ -274,7 +274,7 @@ TEST_CASE("c++ exceptions emergency pool", "[cxx] [ignore]")
 #endif
 }
 
-#else // !CONFIG_CXX_EXCEPTIONS
+#else // !CONFIG_COMPILER_CXX_EXCEPTIONS
 
 TEST_CASE("std::out_of_range exception when -fno-exceptions", "[cxx][reset=abort,SW_CPU_RESET]")
 {
index d9de4fd303d082a5cbbd77a51bc33097e34ff6fb..b22c73940d53355fb1b15ed6c618311c22d3a2cc 100644 (file)
@@ -570,7 +570,7 @@ menu "ESP32-specific"
 
     config ESP32_DEBUG_STUBS_ENABLE
         bool "OpenOCD debug stubs"
-        default OPTIMIZATION_LEVEL_DEBUG
+        default COMPILER_OPTIMIZATION_LEVEL_DEBUG
         depends on !ESP32_TRAX
         help
             Debug stubs are used by OpenOCD to execute pre-compiled onboard code which does some useful debugging,
index d7fe6141f07be8684cc53fb104df2028b3fe8c34..ed701a1a7352ea295ded8ddf8b2feaa73e03120f 100644 (file)
@@ -454,16 +454,16 @@ void start_cpu1_default(void)
 }
 #endif //!CONFIG_FREERTOS_UNICORE
 
-#ifdef CONFIG_CXX_EXCEPTIONS
+#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
 size_t __cxx_eh_arena_size_get()
 {
-    return CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE;
+    return CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE;
 }
 #endif
 
 static void do_global_ctors(void)
 {
-#ifdef CONFIG_CXX_EXCEPTIONS
+#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
     static struct object ob;
     __register_frame_info( __eh_frame, &ob );
 #endif
index 5dc9062c5483fb8366f28db8cd4e7c5d2e70af06..0fa6c7bfed8035240e1353f7eaf18b8841a33093 100644 (file)
@@ -1,6 +1,6 @@
 #include "unity.h"
 
-#if CONFIG_STACK_CHECK
+#if CONFIG_COMPILER_STACK_CHECK
 
 static void recur_and_smash()
 {
index 5c2c489e74b68bd6c6bd4758e2565681eee24112..cb6e5a770180c181d7054ffef0e9ac49455aab0a 100644 (file)
@@ -1,6 +1,6 @@
 #include "unity.h"
 
-#if CONFIG_STACK_CHECK
+#if CONFIG_COMPILER_STACK_CHECK
 
 static void recur_and_smash_cxx()
 {
index 794f32e1eb90271bb16c1f70c7eccde4b5b6adbe..c46ae38372bfe1cdbae9dfe9b7a938925ae3bfa9 100644 (file)
@@ -105,7 +105,7 @@ void _esp_error_check_failed_without_abort(esp_err_t rc, const char *file, int l
         esp_err_t __err_rc = (x);                                       \
         (void) sizeof(__err_rc);                                        \
     } while(0)
-#elif defined(CONFIG_OPTIMIZATION_ASSERTIONS_SILENT)
+#elif defined(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT)
 #define ESP_ERROR_CHECK(x) do {                                         \
         esp_err_t __err_rc = (x);                                       \
         if (__err_rc != ESP_OK) {                                       \
index f79b50a6c9a10f601943336d8ec47401b1496c2e..d22102a4712fad5575a4ad3b1b66c55971b443cb 100644 (file)
@@ -15,7 +15,7 @@
 #include "sdkconfig.h"
 #include "esp_system.h"
 
-#if CONFIG_STACK_CHECK
+#if CONFIG_COMPILER_STACK_CHECK
 
 #define LOG_LOCAL_LEVEL CONFIG_LOG_DEFAULT_LEVEL
 #include "esp_log.h"
index 777ca7b604296be0fc8d17941b67ab2654b3494d..343fc89ac6b84b50f6dcbb3c11a23433898998ab 100644 (file)
@@ -410,7 +410,7 @@ menu "FreeRTOS"
 
     config FREERTOS_TASK_FUNCTION_WRAPPER
         bool "Enclose all task functions in a wrapper function"
-        depends on OPTIMIZATION_LEVEL_DEBUG
+        depends on COMPILER_OPTIMIZATION_LEVEL_DEBUG
         default y
         help
             If enabled, all FreeRTOS task functions will be enclosed in a wrapper function.
index 7ff1f00ae030bc9c391eb1e168e3ac9792f88249..a3a0acc67b25c639d563b5e8badc047b3e9d4c9f 100644 (file)
@@ -48,9 +48,9 @@ inline static void multi_heap_assert(bool condition, const char *format, int lin
     */
 #ifndef NDEBUG
     if(!condition) {
-#ifndef CONFIG_OPTIMIZATION_ASSERTIONS_SILENT
+#ifndef CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT
         ets_printf(format, line, address);
-#endif  // CONFIG_OPTIMIZATION_ASSERTIONS_SILENT
+#endif  // CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT
         abort();
     }
 #else // NDEBUG
index afbea986edcb16247d9fddc00bbf83056398b53f..35687272126eee9bfe81844dc1135f688b47f213 100644 (file)
@@ -22,7 +22,7 @@
 
 #include_next <assert.h>
 
-#if defined(CONFIG_OPTIMIZATION_ASSERTIONS_SILENT) && !defined(NDEBUG)
+#if defined(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT) && !defined(NDEBUG)
 #undef assert
 #define assert(__e) ((__e) ? (void)0 : abort())
 #endif
index 8c470d2bce5e803c5250de636b847da72a8c88b7..d465a414c5ec0182ec25c42b117796abe20fb8ad 100644 (file)
@@ -114,9 +114,9 @@ Error handling patterns
 C++ Exceptions
 --------------
 
-Support for C++ Exceptions in ESP-IDF is disabled by default, but can be enabled using :ref:`CONFIG_CXX_EXCEPTIONS` option.
+Support for C++ Exceptions in ESP-IDF is disabled by default, but can be enabled using :ref:`CONFIG_COMPILER_CXX_EXCEPTIONS` option.
 
-Enabling exception handling normally increases application binary size by a few kB. Additionally it may be necessary to reserve some amount of RAM for exception emergency pool. Memory from this pool will be used if it is not possible to allocate exception object from the heap. Amount of memory in the emergency pool can be set using :ref:`CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE` variable.
+Enabling exception handling normally increases application binary size by a few kB. Additionally it may be necessary to reserve some amount of RAM for exception emergency pool. Memory from this pool will be used if it is not possible to allocate exception object from the heap. Amount of memory in the emergency pool can be set using :ref:`CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE` variable.
 
 If an exception is thrown, but there is no ``catch`` block, the program will be terminated by ``abort`` function, and backtrace will be printed. See :doc:`Fatal Errors <fatal-errors>` for more information about backtraces.
 
index 3cea89c88f3a489df2a256cd0517e0f1b8c8ed54..06883edb5aeee67fe9cb825b0c5b488a6a196a38 100644 (file)
@@ -283,7 +283,7 @@ Consult :doc:`Heap Memory Debugging <../api-reference/system/heap_debug>` docume
 Stack Smashing
 ^^^^^^^^^^^^^^
 
-Stack smashing protection (based on GCC ``-fstack-protector*`` flags) can be enabled in ESP-IDF using :ref:`CONFIG_STACK_CHECK_MODE` option. If stack smashing is detected, message similar to the following will be printed::
+Stack smashing protection (based on GCC ``-fstack-protector*`` flags) can be enabled in ESP-IDF using :ref:`CONFIG_COMPILER_STACK_CHECK_MODE` option. If stack smashing is detected, message similar to the following will be printed::
 
     Stack smashing protect failure!
 
index 40ac8c1dbc970f9acfadabc4917b36489edad8be..025d3695a892ba5a6e30b0c93166b2a948d94760 100644 (file)
@@ -126,8 +126,8 @@ ESP-IDF 中大多数函数会返回 :cpp:type:`esp_err_t` 类型的错误码,
 C++ 异常
 --------
 
-默认情况下,ESP-IDF 会禁用对 C++ 异常的支持,但是可以通过 :ref:`CONFIG_CXX_EXCEPTIONS` 选项启用。
+默认情况下,ESP-IDF 会禁用对 C++ 异常的支持,但是可以通过 :ref:`CONFIG_COMPILER_CXX_EXCEPTIONS` 选项启用。
 
-通常情况下,启用异常处理会让应用程序的二进制文件增加几 kB。此外,启用该功能时还应为异常事故池预留一定内存。当应用程序无法从堆中分配异常对象时,就可以使用这个池中的内存。该内存池的大小可以通过 :ref:`CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE` 来设定。
+通常情况下,启用异常处理会让应用程序的二进制文件增加几 kB。此外,启用该功能时还应为异常事故池预留一定内存。当应用程序无法从堆中分配异常对象时,就可以使用这个池中的内存。该内存池的大小可以通过 :ref:`CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE` 来设定。
 
 如果 C++ 程序抛出了异常,但是程序中并没有 ``catch`` 代码块来捕获该异常,那么程序的运行就会被 ``abort`` 函数中止,然后打印回溯信息。有关回溯的更多信息,请参阅 :doc:`不可恢复错误 <fatal-errors>` 。
index 0ff49f352027233784238a4e201036fe535b09db..2056379edf6d49ca69cbeb2c6a243785ecd90a02 100644 (file)
@@ -4,9 +4,9 @@
 
 This example demonstrates usage of C++ exceptions in ESP-IDF.
 
-By default, C++ exceptions support is disabled in ESP-IDF. It can be enabled using `CONFIG_CXX_EXCEPTIONS` configuration option.
+By default, C++ exceptions support is disabled in ESP-IDF. It can be enabled using `CONFIG_COMPILER_CXX_EXCEPTIONS` configuration option.
 
-In this example, `sdkconfig.defaults` file sets `CONFIG_CXX_EXCEPTIONS` option. This enables both compile time support (`-fexceptions` compiler flag) and run-time support for C++ exception handling.
+In this example, `sdkconfig.defaults` file sets `CONFIG_COMPILER_CXX_EXCEPTIONS` option. This enables both compile time support (`-fexceptions` compiler flag) and run-time support for C++ exception handling.
 
 Example source code declares a class which can throw exception from the constructor, depending on the argument. It illustrates that exceptions can be thrown and caught using standard C++ facilities.
 
index e9d7fca37bc024cd3f1f6bb0aae0a4217c585949..a365ac65899045dcdc2427c3f6a7947fe8246a8e 100644 (file)
@@ -1,3 +1,3 @@
 # Enable C++ exceptions and set emergency pool size for exception objects
-CONFIG_CXX_EXCEPTIONS=y
-CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE=1024
+CONFIG_COMPILER_CXX_EXCEPTIONS=y
+CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE=1024
index 2f1def70d27c18e1c5c599477bf7098c15891e2b..449badb202fea954135545dde53b85ffa3d22810 100644 (file)
@@ -375,7 +375,7 @@ COMMON_WARNING_FLAGS = -Wall -Werror=all \
        -Wextra \
        -Wno-unused-parameter -Wno-sign-compare
 
-ifdef CONFIG_DISABLE_GCC8_WARNINGS
+ifdef CONFIG_COMPILER_DISABLE_GCC8_WARNINGS
 COMMON_WARNING_FLAGS += -Wno-parentheses \
        -Wno-sizeof-pointer-memaccess \
        -Wno-clobbered \
@@ -391,9 +391,9 @@ COMMON_WARNING_FLAGS += -Wno-parentheses \
        -Wno-int-in-bool-context
 endif
 
-ifdef CONFIG_WARN_WRITE_STRINGS
+ifdef CONFIG_COMPILER_WARN_WRITE_STRINGS
 COMMON_WARNING_FLAGS += -Wwrite-strings
-endif #CONFIG_WARN_WRITE_STRINGS
+endif #CONFIG_COMPILER_WARN_WRITE_STRINGS
 
 # Flags which control code generation and dependency generation, both for C and C++
 COMMON_FLAGS = \
@@ -405,25 +405,25 @@ COMMON_FLAGS = \
 
 ifndef IS_BOOTLOADER_BUILD
 # stack protection (only one option can be selected in menuconfig)
-ifdef CONFIG_STACK_CHECK_NORM
+ifdef CONFIG_COMPILER_STACK_CHECK_MODE_NORM
 COMMON_FLAGS += -fstack-protector
 endif
-ifdef CONFIG_STACK_CHECK_STRONG
+ifdef CONFIG_COMPILER_STACK_CHECK_MODE_STRONG
 COMMON_FLAGS += -fstack-protector-strong
 endif
-ifdef CONFIG_STACK_CHECK_ALL
+ifdef CONFIG_COMPILER_STACK_CHECK_MODE_ALL
 COMMON_FLAGS += -fstack-protector-all
 endif
 endif
 
 # Optimization flags are set based on menuconfig choice
-ifdef CONFIG_OPTIMIZATION_LEVEL_RELEASE
+ifdef CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE
 OPTIMIZATION_FLAGS = -Os
 else
 OPTIMIZATION_FLAGS = -Og
 endif
 
-ifdef CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED
+ifdef CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
 CPPFLAGS += -DNDEBUG
 endif
 
@@ -459,7 +459,7 @@ CXXFLAGS := $(strip \
        $(CXXFLAGS) \
        $(EXTRA_CXXFLAGS))
 
-ifdef CONFIG_CXX_EXCEPTIONS
+ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
 CXXFLAGS += -fexceptions
 else
 CXXFLAGS += -fno-exceptions
index c2f45861c6bd12900d10240196bdc05bc1bfd680..6ff0f574764c01c831625cbe65e3c81aee8b3ebb 100644 (file)
@@ -2,6 +2,25 @@
 # CONFIG_DEPRECATED_OPTION CONFIG_NEW_OPTION
 
 # SDK tool configuration
-CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX
-CONFIG_PYTHON CONFIG_SDK_PYTHON
-CONFIG_MAKE_WARN_UNDEFINED_VARIABLES CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES
+CONFIG_TOOLPREFIX                      CONFIG_SDK_TOOLPREFIX
+CONFIG_PYTHON                          CONFIG_SDK_PYTHON
+CONFIG_MAKE_WARN_UNDEFINED_VARIABLES   CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES
+
+# Compiler options
+CONFIG_OPTIMIZATION_COMPILER              CONFIG_COMPILER_OPTIMIZATION
+CONFIG_OPTIMIZATION_LEVEL_DEBUG           CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG
+CONFIG_OPTIMIZATION_LEVEL_RELEASE         CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE
+CONFIG_OPTIMIZATION_ASSERTION_LEVEL       CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL
+CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED    CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE
+CONFIG_OPTIMIZATION_ASSERTIONS_SILENT     CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT
+CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED   CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
+CONFIG_CXX_EXCEPTIONS                     CONFIG_COMPILER_CXX_EXCEPTIONS
+CONFIG_CXX_EXCEPTIONS_EMG_POOL_SIZE       CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE
+CONFIG_STACK_CHECK_MODE                   CONFIG_COMPILER_STACK_CHECK_MODE
+CONFIG_STACK_CHECK_NONE                   CONFIG_COMPILER_STACK_CHECK_MODE_NONE
+CONFIG_STACK_CHECK_NORM                   CONFIG_COMPILER_STACK_CHECK_MODE_NORM
+CONFIG_STACK_CHECK_STRONG                 CONFIG_COMPILER_STACK_CHECK_MODE_STRONG
+CONFIG_STACK_CHECK_ALL                    CONFIG_COMPILER_STACK_CHECK_MODE_ALL
+CONFIG_STACK_CHECK                        CONFIG_COMPILER_STACK_CHECK
+CONFIG_WARN_WRITE_STRINGS                 CONFIG_COMPILER_WARN_WRITE_STRINGS
+CONFIG_DISABLE_GCC8_WARNINGS              CONFIG_COMPILER_DISABLE_GCC8_WARNINGS
index 843502cb10c8b961ee19094ec810f4e7830a9d8c..05f0168cd1515f4b1469e9f983d53df25fe7aab2 100755 (executable)
@@ -41,11 +41,9 @@ IGNORE_DIRS = (
 
 SPACES_PER_INDENT = 4
 
-# TODO decrease the value (after the names have been refactored)
-CONFIG_NAME_MAX_LENGTH = 60
+CONFIG_NAME_MAX_LENGTH = 40
 
-# TODO increase prefix length (after the names have been refactored)
-CONFIG_NAME_MIN_PREFIX_LENGTH = 0
+CONFIG_NAME_MIN_PREFIX_LENGTH = 4
 
 # The checker will not fail if it encounters this string (it can be used for temporarily resolve conflicts)
 RE_NOERROR = re.compile(r'\s+#\s+NOERROR\s+$')
index 4c3c94b9736929d330630bffbdd6ac9804fefe91..d5b44b6a440657cf1be2029b535fa083c6316330 100644 (file)
@@ -84,18 +84,18 @@ CONFIG_PARTITION_TABLE_MD5=y
 #
 # Compiler options
 #
-CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
-CONFIG_OPTIMIZATION_LEVEL_RELEASE=
-CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
-CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=
-CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=
-CONFIG_CXX_EXCEPTIONS=
-CONFIG_STACK_CHECK_NONE=y
-CONFIG_STACK_CHECK_NORM=
-CONFIG_STACK_CHECK_STRONG=
-CONFIG_STACK_CHECK_ALL=
-CONFIG_STACK_CHECK=
-CONFIG_WARN_WRITE_STRINGS=
+CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y
+CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=
+CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
+CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=
+CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=
+CONFIG_COMPILER_CXX_EXCEPTIONS=
+CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
+CONFIG_COMPILER_STACK_CHECK_MODE_NORM=
+CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=
+CONFIG_COMPILER_STACK_CHECK_MODE_ALL=
+CONFIG_COMPILER_STACK_CHECK=
+CONFIG_COMPILER_WARN_WRITE_STRINGS=
 
 #
 # Component config
index 86fbc9a49e085fd1b8eb2e491d5bdeb7529d50f0..d58d949976fb13f3f94c134cd56795b9ca2b7021 100644 (file)
@@ -1,3 +1,3 @@
 TEST_EXCLUDE_COMPONENTS=bt app_update
-CONFIG_OPTIMIZATION_LEVEL_RELEASE=y
-CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y
\ No newline at end of file
+CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y
+CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
index afaf11031b2d09f66b17398de362bc02be461a2a..4efe0e26449ceeb19477dec478d4bc1e375b3544 100644 (file)
@@ -21,12 +21,12 @@ CONFIG_ULP_COPROC_ENABLED=y
 CONFIG_TASK_WDT=n
 CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS=y
 CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=7
-CONFIG_STACK_CHECK_STRONG=y
-CONFIG_STACK_CHECK=y
+CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=y
+CONFIG_COMPILER_STACK_CHECK=y
 CONFIG_SUPPORT_STATIC_ALLOCATION=y
 CONFIG_ESP_TIMER_PROFILING=y
 CONFIG_ADC2_DISABLE_DAC=n
-CONFIG_WARN_WRITE_STRINGS=y
+CONFIG_COMPILER_WARN_WRITE_STRINGS=y
 CONFIG_SPI_MASTER_IN_IRAM=y
 CONFIG_EFUSE_VIRTUAL=y
 CONFIG_SPIRAM_BANKSWITCH_ENABLE=n