Chapter 4. API Guides
• EMBED_TXTFILES - text files to be embedded in the component
idf-component-properties
These are properties that describe a component. Values of component properties can be retrieved by using the build
command idf_component_get_property. For example, to get the directory of the freertos component:
idf_component_get_property(dir freertos
message(STATUS "The 'freertos' component directory is:
• COMPONENT_ALIAS - alias for COMPONENT_LIB used for linking the component to external targets;
set by idf_build_component and alias library itself is created by idf_component_register
• COMPONENT_DIR - component directory; set by idf_build_component
• COMPONENT_OVERRIDEN_DIR - contains the directory of the original component if
rides another component
• COMPONENT_LIB
idf_build_component and library itself is created by idf_component_register
• COMPONENT_NAME - name of the component; set by idf_build_component based on the compo-
nent directory name
• COMPONENT_TYPE - type of the component, whether LIBRARY or CONFIG_ONLY. A component is of
type LIBRARY if it specifies source files or embeds a file
• EMBED_FILES - list of files to embed in component; set from idf_component_register EM-
BED_FILES argument
• EMBED_TXTFILES - list of text files to embed in component; set from idf_component_register
EMBED_TXTFILES argument
• INCLUDE_DIRS - list of component include directories; set from idf_component_register IN-
CLUDE_DIRS argument
• KCONFIG - component Kconfig file; set by idf_build_component
• KCONFIG_PROJBUILD - component Kconfig.projbuild; set by idf_build_component
• LDFRAGMENTS - list of component linker fragment files; set from idf_component_register LD-
FRAGMENTS argument
• PRIV_INCLUDE_DIRS
idf_component_register PRIV_INCLUDE_DIRS on components of type LIBRARY
• PRIV_REQUIRES - list of private component dependentices; set from idf_component_register
PRIV_REQUIRES argument
• REQUIRED_IDF_TARGETS
idf_component_register EMBED_TXTFILES argument
• REQUIRES - list of public component dependencies; set from idf_component_register REQUIRES
argument
• SRCS - list of component source files; set from SRCS or SRC_DIRS/EXCLUDE_SRCS argument of
idf_component_register
4.4.22 File Globbing & Incremental Builds
The preferred way to include source files in an ESP-IDF component is to list them manually via SRCS argument to
idf_component_register:
idf_component_register(SRCS library/a.c library/b.c platform/platform.c
This preference reflects the
when there are lots of source files to add to the build. The ESP-IDF build system provides an alternative way for
specifying source files using SRC_DIRS:
idf_component_register(SRC_DIRS library platform
Espressif Systems
-
name
for
created
-
list
of
component
-
list
of
...)
CMake best practice
of manually listing source files. This could, however, be inconvenient
...)
Submit Document Feedback
COMPONENT_DIR)
${dir}")
component
static/interface
private
include
targets
the
component
1294
this component over-
library;
set
by
directories;
set
from
supports;
set
from
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers