2016-08-17 15:08:22 +00:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
|
|
|
# see kconfig/kconfig-language.txt.
|
|
|
|
#
|
2016-08-19 06:30:39 +00:00
|
|
|
mainmenu "Espressif IoT Development Framework Configuration"
|
2016-08-17 15:08:22 +00:00
|
|
|
|
2018-12-06 14:08:18 +00:00
|
|
|
config IDF_CMAKE
|
|
|
|
bool
|
|
|
|
option env="IDF_CMAKE"
|
|
|
|
|
2019-11-28 13:08:20 +00:00
|
|
|
config IDF_ENV_FPGA
|
|
|
|
# This option is for internal use only
|
|
|
|
bool
|
|
|
|
|
2018-12-06 14:08:18 +00:00
|
|
|
config IDF_TARGET
|
|
|
|
# This option records the IDF target when sdkconfig is generated the first time.
|
|
|
|
# It is not updated if environment variable $IDF_TARGET changes later, and
|
|
|
|
# the build system is responsible for detecting the mismatch between
|
|
|
|
# CONFIG_IDF_TARGET and $IDF_TARGET.
|
|
|
|
string
|
2019-11-08 13:40:28 +00:00
|
|
|
default "$IDF_TARGET"
|
2018-12-06 14:08:18 +00:00
|
|
|
|
2019-04-03 09:08:02 +00:00
|
|
|
config IDF_TARGET_ESP32
|
|
|
|
bool
|
2019-04-08 10:02:05 +00:00
|
|
|
default "y" if IDF_TARGET="esp32"
|
2019-04-03 09:08:02 +00:00
|
|
|
|
|
|
|
config IDF_TARGET_ESP32S2BETA
|
|
|
|
bool
|
2019-04-08 10:02:05 +00:00
|
|
|
default "y" if IDF_TARGET="esp32s2beta"
|
2019-08-19 05:02:34 +00:00
|
|
|
select FREERTOS_UNICORE
|
2018-12-06 14:08:18 +00:00
|
|
|
|
2019-09-16 03:47:23 +00:00
|
|
|
config IDF_FIRMWARE_CHIP_ID
|
|
|
|
hex
|
2019-09-19 11:17:31 +00:00
|
|
|
default 0x0000 if IDF_TARGET_ESP32
|
2019-12-26 07:25:24 +00:00
|
|
|
default 0x0002 if IDF_TARGET_ESP32S2BETA
|
2019-09-16 03:47:23 +00:00
|
|
|
default 0xFFFF
|
2018-12-06 14:08:18 +00:00
|
|
|
|
|
|
|
menu "SDK tool configuration"
|
2019-03-14 08:54:04 +00:00
|
|
|
config SDK_TOOLPREFIX
|
2018-12-06 14:08:18 +00:00
|
|
|
string "Compiler toolchain path/prefix"
|
2019-04-03 11:43:37 +00:00
|
|
|
default "xtensa-esp32-elf-" if IDF_TARGET_ESP32
|
2019-06-07 10:21:54 +00:00
|
|
|
default "xtensa-esp32s2-elf-" if IDF_TARGET_ESP32S2BETA
|
2018-12-06 14:08:18 +00:00
|
|
|
help
|
|
|
|
The prefix/path that is used to call the toolchain. The default setting assumes
|
|
|
|
a crosstool-ng gcc setup that is in your PATH.
|
|
|
|
|
2019-03-14 08:54:04 +00:00
|
|
|
config SDK_PYTHON
|
2018-12-06 14:08:18 +00:00
|
|
|
string "Python 2 interpreter"
|
|
|
|
depends on !IDF_CMAKE
|
|
|
|
default "python"
|
|
|
|
help
|
|
|
|
The executable name/path that is used to run python. On some systems Python 2.x
|
|
|
|
may need to be invoked as python2.
|
|
|
|
|
2019-06-23 01:54:31 +00:00
|
|
|
(Note: This option is used with the legacy GNU Make build system only.)
|
2018-12-06 14:08:18 +00:00
|
|
|
|
2019-03-14 08:54:04 +00:00
|
|
|
config SDK_MAKE_WARN_UNDEFINED_VARIABLES
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "'make' warns on undefined variables"
|
2019-06-23 01:54:31 +00:00
|
|
|
depends on !IDF_CMAKE
|
2018-12-06 14:08:18 +00:00
|
|
|
default "y"
|
|
|
|
help
|
|
|
|
Adds --warn-undefined-variables to MAKEFLAGS. This causes make to
|
|
|
|
print a warning any time an undefined variable is referenced.
|
|
|
|
|
|
|
|
This option helps find places where a variable reference is misspelled
|
|
|
|
or otherwise missing, but it can be unwanted if you have Makefiles which
|
|
|
|
depend on undefined variables expanding to an empty string.
|
|
|
|
|
2019-06-23 01:54:31 +00:00
|
|
|
(Note: this option is used with the legacy GNU Make build system only.)
|
|
|
|
|
2020-01-10 04:58:54 +00:00
|
|
|
config SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS
|
|
|
|
bool "Toolchain supports time_t wide 64-bits"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Enable this option in case you have a custom toolchain which supports time_t wide 64-bits.
|
|
|
|
This option checks time_t is 64-bits and disables ROM time functions
|
|
|
|
to use the time functions from the toolchain instead.
|
|
|
|
This option allows resolving the Y2K38 problem.
|
|
|
|
See "Setup Linux Toolchain from Scratch" to build
|
|
|
|
a custom toolchain which supports 64-bits time_t.
|
|
|
|
|
|
|
|
Note: ESP-IDF does not currently come with any pre-compiled toolchain
|
|
|
|
that supports 64-bit wide time_t.
|
|
|
|
This will change in a future major release,
|
|
|
|
but currently 64-bit time_t requires a custom built toolchain.
|
|
|
|
|
2018-12-06 14:08:18 +00:00
|
|
|
endmenu # SDK tool configuration
|
|
|
|
|
2019-07-22 14:04:03 +00:00
|
|
|
menu "Build type"
|
|
|
|
|
|
|
|
choice APP_BUILD_TYPE
|
|
|
|
prompt "Application build type"
|
|
|
|
default APP_BUILD_TYPE_APP_2NDBOOT
|
|
|
|
help
|
|
|
|
Select the way the application is built.
|
|
|
|
|
|
|
|
By default, the application is built as a binary file in a format compatible with
|
|
|
|
the ESP32 bootloader. In addition to this application, 2nd stage bootloader is
|
|
|
|
also built. Application and bootloader binaries can be written into flash and
|
|
|
|
loaded/executed from there.
|
|
|
|
|
|
|
|
Another option, useful for only very small and limited applications, is to only link
|
|
|
|
the .elf file of the application, such that it can be loaded directly into RAM over
|
|
|
|
JTAG. Note that since IRAM and DRAM sizes are very limited, it is not possible to
|
|
|
|
build any complex application this way. However for kinds of testing and debugging,
|
|
|
|
this option may provide faster iterations, since the application does not need to be
|
|
|
|
written into flash.
|
|
|
|
Note that at the moment, ESP-IDF does not contain all the startup code required to
|
|
|
|
initialize the CPUs and ROM memory (data/bss). Therefore it is necessary to execute
|
|
|
|
a bit of ROM code prior to executing the application. A gdbinit file may look as follows:
|
|
|
|
|
|
|
|
# Connect to a running instance of OpenOCD
|
|
|
|
target remote :3333
|
|
|
|
# Reset and halt the target
|
|
|
|
mon reset halt
|
|
|
|
# Run to a specific point in ROM code,
|
|
|
|
# where most of initialization is complete.
|
|
|
|
thb *0x40007901
|
|
|
|
c
|
|
|
|
# Load the application into RAM
|
|
|
|
load
|
|
|
|
# Run till app_main
|
|
|
|
tb app_main
|
|
|
|
c
|
|
|
|
|
|
|
|
Execute this gdbinit file as follows:
|
|
|
|
|
|
|
|
xtensa-esp32-elf-gdb build/app-name.elf -x gdbinit
|
|
|
|
|
|
|
|
Recommended sdkconfig.defaults for building loadable ELF files is as follows.
|
|
|
|
CONFIG_APP_BUILD_TYPE_ELF_RAM is required, other options help reduce application
|
|
|
|
memory footprint.
|
|
|
|
|
|
|
|
CONFIG_APP_BUILD_TYPE_ELF_RAM=y
|
|
|
|
CONFIG_VFS_SUPPORT_TERMIOS=
|
|
|
|
CONFIG_NEWLIB_NANO_FORMAT=y
|
|
|
|
CONFIG_ESP32_PANIC_PRINT_HALT=y
|
|
|
|
CONFIG_ESP32_DEBUG_STUBS_ENABLE=
|
|
|
|
CONFIG_ESP_ERR_TO_NAME_LOOKUP=
|
|
|
|
|
|
|
|
|
|
|
|
config APP_BUILD_TYPE_APP_2NDBOOT
|
|
|
|
bool
|
|
|
|
prompt "Default (binary application + 2nd stage bootloader)"
|
|
|
|
select APP_BUILD_GENERATE_BINARIES
|
|
|
|
select APP_BUILD_BOOTLOADER
|
|
|
|
select APP_BUILD_USE_FLASH_SECTIONS
|
|
|
|
|
|
|
|
config APP_BUILD_TYPE_ELF_RAM
|
|
|
|
bool
|
|
|
|
prompt "ELF file, loadable into RAM (EXPERIMENTAL))"
|
|
|
|
endchoice # APP_BUILD_TYPE
|
|
|
|
|
|
|
|
# Hidden options, set according to the choice above
|
|
|
|
config APP_BUILD_GENERATE_BINARIES
|
|
|
|
bool # Whether to generate .bin files or not
|
|
|
|
|
|
|
|
config APP_BUILD_BOOTLOADER
|
|
|
|
bool # Whether to build the bootloader
|
|
|
|
|
|
|
|
config APP_BUILD_USE_FLASH_SECTIONS
|
|
|
|
bool # Whether to place code/data into memory-mapped flash sections
|
|
|
|
|
|
|
|
endmenu # Build type
|
|
|
|
|
2019-09-10 07:58:52 +00:00
|
|
|
source "$COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE"
|
2018-12-06 14:08:18 +00:00
|
|
|
|
|
|
|
menu "Compiler options"
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
choice COMPILER_OPTIMIZATION
|
2018-12-06 14:08:18 +00:00
|
|
|
prompt "Optimization Level"
|
2019-09-03 05:12:58 +00:00
|
|
|
default COMPILER_OPTIMIZATION_DEFAULT
|
2018-12-06 14:08:18 +00:00
|
|
|
help
|
|
|
|
This option sets compiler optimization level (gcc -O argument).
|
|
|
|
|
2019-09-03 05:12:58 +00:00
|
|
|
- The "Default" setting will add the -0g flag to CFLAGS.
|
|
|
|
- The "Size" setting will add the -0s flag to CFLAGS.
|
|
|
|
- The "Performance" setting will add the -O2 flag to CFLAGS.
|
|
|
|
- The "None" setting will add the -O0 flag to CFLAGS.
|
2018-12-06 14:08:18 +00:00
|
|
|
|
2019-09-03 05:12:58 +00:00
|
|
|
The "Size" setting cause the compiled code to be smaller and faster, but
|
|
|
|
may lead to difficulties of correlating code addresses to source file
|
|
|
|
lines when debugging.
|
2018-12-06 14:08:18 +00:00
|
|
|
|
2019-09-03 05:12:58 +00:00
|
|
|
The "Performance" setting causes the compiled code to be larger and faster,
|
|
|
|
but will be easier to correlated code addresses to source file lines.
|
2018-12-06 14:08:18 +00:00
|
|
|
|
2019-09-03 05:12:58 +00:00
|
|
|
"None" with -O0 produces compiled code without optimization.
|
2018-12-06 14:08:18 +00:00
|
|
|
|
2019-09-03 05:12:58 +00:00
|
|
|
Note that custom optimization levels may be unsupported.
|
|
|
|
|
|
|
|
config COMPILER_OPTIMIZATION_DEFAULT
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "Debug (-Og)"
|
2019-09-03 05:12:58 +00:00
|
|
|
config COMPILER_OPTIMIZATION_SIZE
|
|
|
|
bool "Optimize for size (-Os)"
|
|
|
|
config COMPILER_OPTIMIZATION_PERF
|
|
|
|
bool "Optimize for performance (-O2)"
|
|
|
|
config COMPILER_OPTIMIZATION_NONE
|
|
|
|
bool "Debug without optimization (-O0)"
|
|
|
|
|
2018-12-06 14:08:18 +00:00
|
|
|
endchoice
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
choice COMPILER_OPTIMIZATION_ASSERTION_LEVEL
|
2018-12-06 14:08:18 +00:00
|
|
|
prompt "Assertion level"
|
2019-04-24 13:02:25 +00:00
|
|
|
default COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE
|
2018-12-06 14:08:18 +00:00
|
|
|
help
|
|
|
|
Assertions can be:
|
|
|
|
|
|
|
|
- Enabled. Failure will print verbose assertion details. This is the default.
|
|
|
|
|
|
|
|
- Set to "silent" to save code size (failed assertions will abort() but user
|
|
|
|
needs to use the aborting address to find the line number with the failed assertion.)
|
|
|
|
|
|
|
|
- Disabled entirely (not recommended for most configurations.) -DNDEBUG is added
|
|
|
|
to CPPFLAGS in this case.
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE
|
2018-12-06 14:08:18 +00:00
|
|
|
prompt "Enabled"
|
|
|
|
bool
|
|
|
|
help
|
|
|
|
Enable assertions. Assertion content and line number will be printed on failure.
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_OPTIMIZATION_ASSERTIONS_SILENT
|
2018-12-06 14:08:18 +00:00
|
|
|
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.
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
|
2018-12-06 14:08:18 +00:00
|
|
|
prompt "Disabled (sets -DNDEBUG)"
|
|
|
|
bool
|
|
|
|
help
|
|
|
|
If assertions are disabled, -DNDEBUG is added to CPPFLAGS.
|
|
|
|
|
|
|
|
endchoice # assertions
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
menuconfig COMPILER_CXX_EXCEPTIONS
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "Enable C++ exceptions"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
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.
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE
|
2018-12-06 14:08:18 +00:00
|
|
|
int "Emergency Pool Size"
|
|
|
|
default 0
|
2019-04-24 13:02:25 +00:00
|
|
|
depends on COMPILER_CXX_EXCEPTIONS
|
2018-12-06 14:08:18 +00:00
|
|
|
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.
|
|
|
|
|
2019-06-06 08:53:26 +00:00
|
|
|
config COMPILER_CXX_RTTI
|
2019-10-13 12:59:43 +00:00
|
|
|
bool "Enable C++ run-time type info (RTTI)"
|
|
|
|
default n
|
2019-06-06 08:53:26 +00:00
|
|
|
help
|
|
|
|
Enabling this option compiles all C++ files with RTTI support enabled.
|
|
|
|
This increases binary size (typically by tens of kB) but allows using
|
|
|
|
dynamic_cast conversion and typeid operator.
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
choice COMPILER_STACK_CHECK_MODE
|
2018-12-06 14:08:18 +00:00
|
|
|
prompt "Stack smashing protection mode"
|
2019-04-24 13:02:25 +00:00
|
|
|
default COMPILER_STACK_CHECK_MODE_NONE
|
2018-12-06 14:08:18 +00:00
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
- In OVERALL mode (GCC flag: -fstack-protector-all) all functions are protected.
|
|
|
|
|
|
|
|
Modes have the following impact on code performance and coverage:
|
|
|
|
|
|
|
|
- performance: NORMAL > STRONG > OVERALL
|
|
|
|
|
|
|
|
- coverage: NORMAL < STRONG < OVERALL
|
|
|
|
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_STACK_CHECK_MODE_NONE
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "None"
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_STACK_CHECK_MODE_NORM
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "Normal"
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_STACK_CHECK_MODE_STRONG
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "Strong"
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_STACK_CHECK_MODE_ALL
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "Overall"
|
|
|
|
endchoice
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_STACK_CHECK
|
2018-12-06 14:08:18 +00:00
|
|
|
bool
|
2019-04-24 13:02:25 +00:00
|
|
|
default !COMPILER_STACK_CHECK_MODE_NONE
|
2018-12-06 14:08:18 +00:00
|
|
|
help
|
|
|
|
Stack smashing protection.
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_WARN_WRITE_STRINGS
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "Enable -Wwrite-strings warning flag"
|
|
|
|
default "n"
|
|
|
|
help
|
|
|
|
Adds -Wwrite-strings flag for the C/C++ compilers.
|
|
|
|
|
|
|
|
For C, this gives string constants the type ``const char[]`` so that
|
|
|
|
copying the address of one into a non-const ``char *`` pointer
|
|
|
|
produces a warning. This warning helps to find at compile time code
|
|
|
|
that tries to write into a string constant.
|
|
|
|
|
|
|
|
For C++, this warns about the deprecated conversion from string
|
|
|
|
literals to ``char *``.
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
config COMPILER_DISABLE_GCC8_WARNINGS
|
2018-12-06 14:08:18 +00:00
|
|
|
bool "Disable new warnings introduced in GCC 6 - 8"
|
|
|
|
default "n"
|
|
|
|
help
|
|
|
|
Enable this option if using GCC 6 or newer, and wanting to disable warnings which don't appear with
|
|
|
|
GCC 5.
|
|
|
|
|
|
|
|
|
|
|
|
endmenu # Compiler Options
|
|
|
|
|
|
|
|
menu "Component config"
|
2019-09-10 07:58:52 +00:00
|
|
|
source "$COMPONENT_KCONFIGS_SOURCE_FILE"
|
2018-12-06 14:08:18 +00:00
|
|
|
endmenu
|
global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.
Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.
In CMAKE, we have two kinds of header visibilities (set by include path visibility):
(Assume component A --(depends on)--> B, B is the current component)
1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)
and we have two kinds of depending ways:
(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)
1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)
1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)
This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:
- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h
The major broken include chain includes:
1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h
some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h
BREAKING CHANGE
2019-04-03 05:17:38 +00:00
|
|
|
|
|
|
|
menu "Compatibility options"
|
|
|
|
config LEGACY_INCLUDE_COMMON_HEADERS
|
2019-11-28 13:08:20 +00:00
|
|
|
bool "Include headers across components as before IDF v4.0"
|
global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.
Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.
In CMAKE, we have two kinds of header visibilities (set by include path visibility):
(Assume component A --(depends on)--> B, B is the current component)
1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)
and we have two kinds of depending ways:
(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)
1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)
1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)
This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:
- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h
The major broken include chain includes:
1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h
some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h
BREAKING CHANGE
2019-04-03 05:17:38 +00:00
|
|
|
default n
|
|
|
|
help
|
|
|
|
Soc, esp32, and driver components, the most common
|
|
|
|
components. Some header of these components are included
|
|
|
|
implicitly by headers of other components before IDF v4.0.
|
|
|
|
It's not required for high-level components, but still
|
|
|
|
included through long header chain everywhere.
|
|
|
|
|
|
|
|
This is harmful to the modularity. So it's changed in IDF
|
|
|
|
v4.0.
|
|
|
|
|
|
|
|
You can still include these headers in a legacy way until it
|
|
|
|
is totally deprecated by enable this option.
|
|
|
|
|
2019-04-24 13:02:25 +00:00
|
|
|
endmenu #Compatibility options
|