EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1309 background imageLoading...
Page #1309 background image
Chapter 4. API Guides
CMakeLists.txt file and adding REQUIRES and/or PRIV_REQUIRES clauses. Otherwise, source files in the
component will fail to compile as headers from other components are not found. See Component Requirements.
The conversion tool is not capable of dealing with complex Makefile logic or unusual targets. These will need to be
converted by hand.
No Longer Available in CMake
Some features are significantly different or removed in the CMake-based system. The following variables no longer
exist in the CMake-based build system:
COMPONENT_BUILD_DIR: Use CMAKE_CURRENT_BINARY_DIR instead.
COMPONENT_LIBRARY: Defaulted to $(COMPONENT_NAME).a, but the library name could be overriden
by the component. The name of the component library can no longer be overriden by the component.
CC, LD, AR, OBJCOPY: Full paths to each tool from the gcc xtensa cross-toolchain. Use
CMAKE_C_COMPILER, CMAKE_C_LINK_EXECUTABLE, CMAKE_OBJCOPY, etc instead. Full list here.
HOSTCC, HOSTLD, HOSTAR: Full names of each tool from the host native toolchain. These are no longer
provided, external projects should detect any required host toolchain manually.
COMPONENT_ADD_LDFLAGS: Used to override linker flags. Use the CMake target_link_libraries command
instead.
COMPONENT_ADD_LINKER_DEPS: List of files that linking should depend on. target_link_libraries will
usually infer these dependencies automatically. For linker scripts, use the provided custom CMake function
target_linker_scripts.
COMPONENT_SUBMODULES: No longer used, the build system will automatically enumerate all submodules
in the ESP-IDF repository.
COMPONENT_EXTRA_INCLUDES: Used to be an alternative to COMPONENT_PRIV_INCLUDEDIRS for
absolute paths. Use PRIV_INCLUDE_DIRS argument to idf_component_register for all cases now
(can be relative or absolute).
COMPONENT_OBJS: Previously, component sources could be specified as a list of object files. Now they can
be specified as a list of source files via SRCS argument to idf_component_register.
COMPONENT_OBJEXCLUDE: Has been replaced with EXCLUDE_SRCS argument to
idf_component_register. Specify source files (as absolute paths or relative to component di-
rectory), instead.
COMPONENT_EXTRA_CLEAN: Set property ADDITIONAL_MAKE_CLEAN_FILES instead but note
CMake has some restrictions around this functionality.
COMPONENT_OWNBUILDTARGET & COMPONENT_OWNCLEANTARGET: Use CMake ExternalProject in-
stead. See Fully Overriding The Component Build Process for full details.
COMPONENT_CONFIG_ONLY: Call idf_component_register without any arguments instead. See
Configuration-Only Components.
CFLAGS, CPPFLAGS, CXXFLAGS: Use equivalent CMake commands instead. See Controlling Component
Compilation.
No Default Values
Unlike in the legacy Make-based build system, the following have no default values:
Source directories (COMPONENT_SRCDIRS variable in Make, SRC_DIRS argument to
idf_component_register in CMake)
Include directories (COMPONENT_ADD_INCLUDEDIRS variable in Make, INCLUDE_DIRS argument to
idf_component_register in CMake)
No Longer Necessary
In the legacy Make-based build system, it is required to also set COMPONENT_SRCDIRS if COM-
PONENT_SRCS is set. In CMake, the equivalent is not necessary i.e. specifying SRC_DIRS to
Espressif Systems 1298
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish