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 #1304 background imageLoading...
Page #1304 background image
Chapter 4. API Guides
idf-component-commands
idf_component_get_property(var component property [GENERATOR_EXPRESSION])
Retrieve a specified components component property, property and store it in var accessible from the current scope.
Specifying GENERATOR_EXPRESSION will retrieve the generator expression string for that property, instead of the
actual value, which can be used with CMake commands that support generator expressions.
idf_component_set_property(component property val [APPEND])
Set a specified components component property, property with value val. Specifying APPEND will append the
specified value to the current value of the property. If the property does not previously exist or it is currently empty,
the specified value becomes the first element/member instead.
idf_component_register([[SRCS src1 src2 ...] | [[SRC_DIRS dir1 dir2 ...] [EXCLUDE_
,SRCS src1 src2 ...]]
[INCLUDE_DIRS dir1 dir2 ...]
[PRIV_INCLUDE_DIRS dir1 dir2 ...]
[REQUIRES component1 component2 ...]
[PRIV_REQUIRES component1 component2 ...]
[LDFRAGMENTS ldfragment1 ldfragment2 ...]
[REQUIRED_IDF_TARGETS target1 target2 ...]
[EMBED_FILES file1 file2 ...]
[EMBED_TXTFILES file1 file2 ...]
[KCONFIG kconfig]
[KCONFIG_PROJBUILD kconfig_projbuild])
Register a component to the build system. Much like the project() CMake command, this should be called
from the components CMakeLists.txt directly (not through a function or macro) and is recommended to be
called before any other command. Here are some guidelines on what commands can not be called before
idf_component_register:
commands that are not valid in CMake script mode
custom commands defined in project_include.cmake
build system API commands except idf_build_get_property; although consider whether the property
may not have been set yet
Commands that set and operate on variables are generally okay to call before idf_component_register.
The arguments for idf_component_register include:
SRCS - component source files used for creating a static library for the component; if not specified, component
is a treated as a config-only component and an interface library is created instead.
SRC_DIRS, EXCLUDE_SRCS - used to glob source files (.c, .cpp, .S) by specifying directories, instead of
specifying source files manually via SRCS. Note that this is subject to the limitations of globbing in CMake.
Source files specified in EXCLUDE_SRCS are removed from the globbed files.
INCLUDE_DIRS - paths, relative to the component directory, which will be added to the include search path
for all other components which require the current component
PRIV_INCLUDE_DIRS - directory paths, must be relative to the component directory, which will be added
to the include search path for this components source files only
REQUIRES - public component requirements for the component
PRIV_REQUIRES - private component requirements for the component; ignored on config-only components
LDFRAGMENTS - component linker fragment files
REQUIRED_IDF_TARGETS - specify the only target the component supports
KCONFIG - override the default Kconfig file
KCONFIG_PROJBUILD - override the default Kconfig.projbuild file
The following are used for embedding data into the component, and is considered as source files when determining if
a component is config-only. This means that even if the component does not specify source files, a static library is
still created internally for the component if it specifies either:
EMBED_FILES - binary files to be embedded in the component
Espressif Systems 1293
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