Build system v1 has the EXCLUDE_COMPONENTS project variable. It removes
the listed names from the initial COMPONENTS list, see
spaces2list(EXCLUDE_COMPONENTS) in tools/cmake/project.cmake. Dependency
resolution adds such a component back when another component requires
it. Build system v2 had no equivalent. A v1 project that sets the
variable lost it when built with IDF_BUILD_V2=1.
Add the EXCLUDE_COMPONENTS build property. __init_component() returns
early for a component whose name is in the list. The component gets no
interface target. Its Kconfig files are not collected and its
project_include.cmake is not included. Every discovery path ends in
__init_component(), including managed components added through
idf_build_component(), so one check covers all sources. A component
that requires an excluded component fails with the existing error
"Failed to resolve component". The breaking changes page documents this
difference from build system v1.
The property is set before idf_project_init(). __init_components()
adds the names from the EXCLUDE_COMPONENTS environment or CMake
variable. This keeps idf.py -DEXCLUDE_COMPONENTS=<name> working, and
also a variable set after include(project.cmake) and before project(),
as in v1. idf_project_init() no longer warns that the EXCLUDE_COMPONENTS
variable is deprecated and ignored.
The v1 test test_exclude_components_not_passed now runs under v2 as
well.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
A component is evaluated with add_subdirectory() while the component
that requires it is still being evaluated. CMake gives the new directory
a copy of every variable and the directory properties visible at the
call. The dependency therefore saw the variables of the requiring
component, for example its srcs list, and appended to them.
Record the variables and the directory properties visible at the first
idf_component_include() call. Before a component is evaluated, a helper
function unsets every other variable. It also sets the directory
properties to the recorded values. The requiring component keeps its
own variables and properties.
This fixes two leaks in the current tree. esp_coex registered its
linker.lf through a leaked ldfragments variable in builds without
coexistence. esp_driver_cam received private include directories of
esp_cam_sensor.
The isolation can be disabled with IDF_COMPONENT_SCOPE_ISOLATION=NO.
COMPONENT_BUILD_DIR is now set for every component, next to
COMPONENT_DIR. The breaking-changes entry about recursive evaluation is
replaced with a Component Scope section in the design documentation. The
section also states that the isolation is not complete. The variables
visible when the record is made stay visible in every component, so a
component must still initialize the variables it sets.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Commands that set this flag, such as mcp-server, cannot be combined
with other actions in one invocation.
- Add CN translation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: renpeiying <renpeiying@espressif.com>
Accidental PIE use silently pins tasks to the PIE core and can congest it.
A debug per-task blacklist makes that easy to find without changing the
upstream TCB.
The hardware is a singleton, so the driver now hands out references
instead of exclusive creates. new/delete stay as a deprecated pair.
csr_cfg is programmed in one RMW, and the wait path no longer queries
the RTOS tick on every poll.