fix(esp_coex): move coex init from esp_system to esp_coex component

CMakev2's DEFERRED mode for idf_component_optional_requires only links
optional components already present in the dependency graph. This caused
esp_coex headers to be unavailable when building minimal examples on
targets with both WiFi and IEEE802154 (e.g. esp32c5, esp32c6).

Moving init_coexist to esp_coex removes the cross-component dependency
and ensures the init function is only compiled when esp_coex itself is
part of the build. A linker hook is added to guarantee the object file
is not silently discarded by the linker.

Made-with: Cursor
This commit is contained in:
Marius Vikhammer
2026-03-20 08:16:46 +01:00
committed by Frantisek Hrbata
parent 700c86d0c9
commit ea84e9118d
5 changed files with 19 additions and 20 deletions
-4
View File
@@ -153,10 +153,6 @@ if(CONFIG_VFS_SUPPORT_IO)
idf_component_optional_requires(PRIVATE vfs)
endif()
if(CONFIG_SW_COEXIST_ENABLE OR CONFIG_EXTERNAL_COEX_ENABLE)
idf_component_optional_requires(PRIVATE esp_coex)
endif()
if(NOT BOOTLOADER_BUILD)
if(CONFIG_SPIRAM)
idf_component_optional_requires(PRIVATE esp_psram)