Skip to content

Conversation

@pillo79
Copy link

@pillo79 pillo79 commented Oct 28, 2025

Fix issues with include directories and compile options of modules (e.g. littlefs, fatfs) not being properly exported to sketches.

This changes the LLEXT EDK flag filtering to be done after the main
Zephyr build is completed. Instead of filtering the flags via genexes,
the full set is passed to the script along with the set of filters to be
applied, and the filter is applied later.

No functional change is intended.

Signed-off-by: Luca Burelli <[email protected]>
The current implementation of the LLEXT EDK exports only a partial set
of compiler settings to the EDK build system, specifically only the ones
defined by the Zephyr core (the 'zephyr_interface' target). Extending
this to include application and module-specific settings (from the 'app'
target and its dependencies) is tricky, because:
- while evaluating the main CMakeLists.txt, the 'app' target is not
  fully configured yet, and
- using generator expressions is not possible due to CMake not allowing
  expansion of $<COMPILE_LANGUAGE:...> outside of a proper compile
  context.

To work around this, this change introduces a new CMake subdirectory
(misc/llext_edk) that creates a dummy target which imports the build
configuration from 'app', but overrides the C compile rules to simply
output the resulting properties (defines, include directories, flags)
to text files. The EDK generation script then reads those text files
to get the full set of build properties, and includes them in the EDK
tarball.

Signed-off-by: Luca Burelli <[email protected]>
Add an interface library to the test application that defines a macro
whose value is later used in the extension. This verifies the full
dependency chain for 'app' is evaluated during EDK generation.

Signed-off-by: Luca Burelli <[email protected]>
@pillo79 pillo79 merged commit a894821 into arduino:zephyr-arduino-v4.2.0 Oct 28, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant