Move 7 trace-related examples (app_trace_basic, app_trace_to_plot,
esp_trace_custom_library, function_tracing, gcov, sysview_tracing,
sysview_tracing_heap_log) from examples/system/ into a dedicated
examples/system/tracing/ subdirectory for better organization.
Update all path references across documentation (en + zh_CN),
build-test-rules, CI configs, Kconfig, and component READMEs.
Keep legacy ULP apps on the CMake v1 build path while buildv2 coverage
is limited to full_subproject ULP apps.
Also add the missing esp_driver_gpio dependency to the esp_pm test app
so buildv2 dependency checks see driver/rtc_io.h explicitly.
Add examples/system/ulp/lp_core/build_system_v2/ demonstrating the
cmakev2 ULP build with native IDF component support, Kconfig
integration, component manager usage, linker scripts (static and
ldgen-processed), and per-project menuconfig.
The example shows a custom ULP project (via ulp_add_project) structured
as a proper IDF-like project with a main component and
idf_build_executable(). The ULP sub-project runs its own kconfgen with
the parent's sdkconfig as SDKCONFIG_DEFAULTS, inheriting the parent's
IDF configuration while adding ULP-specific Kconfig options from its
own components.
Three components demonstrate different integration mechanisms:
- ulp_sum and ulp_math: pure cmakev2 components in the components/
subdirectory, using add_library(${COMPONENT_TARGET}) directly.
Each provides a Kconfig file with configurable options.
- ulp_clamp: an external component in the extra/ subdirectory,
declared as a local path dependency in ulp_sum/idf_component.yml.
The component manager resolves this dependency automatically.
ulp_clamp also provides a Kconfig file with a configurable
maximum clamp value (CONFIG_ULP_CLAMP_MAX_VALUE).
Linker script support is demonstrated in two ways:
- Static linker script: ulp_math registers ulp_math_sections.ld via
idf_component_set_property(LINKER_SCRIPTS), defining a custom
linker symbol (ulp_math_version).
- ldgen-processed template: ulp_math provides a linker fragment file
(ulp_math.lf) that describes a custom .ulp_math_fast section
placement. The main component registers ulp_sections.ld.in via
target_linker_script(PROCESS), which ldgen processes using the
fragment to generate the final linker script. The
ulp_math_multiply() function is placed in .ulp_math_fast using
__attribute__((section)). Both static and ldgen linker scripts
are handled by the standard idf_build_library() flow without any
ULP-specific linker script functions.
The ULP project has its own sdkconfig.defaults that overrides the
ulp_clamp default (100 instead of 255), demonstrating per-project
configuration layering. Users can append to SDKCONFIG_DEFAULTS
before include(idf.cmake) to add project-specific defaults.
A menuconfig-<app_name> target is registered in the parent build,
allowing ULP-specific configuration via:
idf.py --no-hints menuconfig-ulp_build_system_example
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>