Chapter 2. API Reference
This option passes -fmacro-prefix-map options to the GCC command line. To replace additional paths in
your binaries, modify the project CMakeLists.txt file to pass custom -fmacro-prefix-map or -ffile-prefix-
map arguments.
CONFIG_COMPILER_CXX_EXCEPTIONS
Enable C++ exceptions
Found in: Compiler options
Enabling this option compiles all IDF C++ files with exception support enabled.
Disabling this option disables C++ exception support in all compiled files, and any libstdc++ code which
throws an exception will abort instead.
Enabling this option currently adds an additional ~500 bytes of heap overhead when an exception is
thrown in user code for the first time.
Default value:
• No (disabled)
Contains:
• CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE
CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE
Emergency Pool Size
Found in: Compiler options > CONFIG_COMPILER_CXX_EXCEPTIONS
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.
Default value:
• 0 if CONFIG_COMPILER_CXX_EXCEPTIONS
CONFIG_COMPILER_CXX_RTTI
Enable C++ run-time type info (RTTI)
Found in: Compiler options
Enabling this option compiles all C++ files with RTTI support enabled. This increases binary size (typ-
ically by tens of kB) but allows using dynamic_cast conversion and typeid operator.
Default value:
• No (disabled)
CONFIG_COMPILER_STACK_CHECK_MODE
Stack smashing protection mode
Found in: Compiler options
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. The guards are
initialized when a function is entered and then checked when the function exits. If a guard check fails,
program is halted. Protection has the following modes:
• In NORMAL mode (GCC flag: -fstack-protector) only functions that call alloca, and functions
with buffers larger than 8 bytes are protected.
• STRONG mode (GCC flag: -fstack-protector-strong) is like NORMAL, but includes additional
functions to be protected –those that have local array definitions, or have references to local frame
addresses.
Espressif Systems 1083
Submit Document Feedback
Release v4.4