arch/risc-v/espressif: Fix build errors on CMake ULP build system

Fix build errors on ULP usage with CMake (e.g lp_mailbox usage, hal assertions enabled)

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
This commit is contained in:
Eren Terzioglu 2026-07-17 14:30:07 +02:00 committed by Alan C. Assis
parent 4e33f0e711
commit e26e38fefd
3 changed files with 6 additions and 1 deletions

View file

@ -202,7 +202,9 @@ if(CONFIG_ESPRESSIF_USE_LP_CORE)
list(APPEND SRCS esp_ulp.c)
endif()
# if(CONFIG_ESPRESSIF_LP_MAILBOX) list(APPEND SRCS esp_lp_mailbox.c) endif()
if(CONFIG_ESPRESSIF_LP_MAILBOX)
list(APPEND SRCS esp_lp_mailbox.c)
endif()
if(CONFIG_PM)
if(NOT CONFIG_ARCH_CUSTOM_PMINIT)

View file

@ -378,6 +378,7 @@ if(CONFIG_ESPRESSIF_USE_LP_CORE)
target_compile_options(
${ULP_FIRMWARE_TARGET}
PRIVATE ${ULP_COMPILE_OPTS}
-U__NuttX__
-include
${HAL}/nuttx/${CHIP_SERIES}/include/sdkconfig.h
-Wno-shadow

View file

@ -434,6 +434,8 @@ list(
${ESP_HAL_3RDPARTY_REPO}/components/ulp/lp_core/lp_core_i2c.c
${ESP_HAL_3RDPARTY_REPO}/components/ulp/lp_core/lp_core_spi.c
${ESP_HAL_3RDPARTY_REPO}/components/ulp/lp_core/lp_core.c
${ESP_HAL_3RDPARTY_REPO}/components/ulp/lp_core/lp_core_mailbox.c
${ESP_HAL_3RDPARTY_REPO}/components/ulp/lp_core/lp_core_mailbox_impl_hw.c
${ESP_HAL_3RDPARTY_REPO}/components/ulp/lp_core/shared/ulp_lp_core_memory_shared.c
${ESP_HAL_3RDPARTY_REPO}/components/ulp/lp_core/shared/ulp_lp_core_lp_timer_shared.c
${ESP_HAL_3RDPARTY_REPO}/components/upper_hal_ana_cmpr/ana_cmpr.c