diff --git a/arch/risc-v/src/common/espressif/CMakeLists.txt b/arch/risc-v/src/common/espressif/CMakeLists.txt index 81f658556d2..6975d861c8f 100644 --- a/arch/risc-v/src/common/espressif/CMakeLists.txt +++ b/arch/risc-v/src/common/espressif/CMakeLists.txt @@ -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) diff --git a/arch/risc-v/src/common/espressif/esp_ulp.cmake b/arch/risc-v/src/common/espressif/esp_ulp.cmake index 610bcd5a1c2..95a1de95933 100644 --- a/arch/risc-v/src/common/espressif/esp_ulp.cmake +++ b/arch/risc-v/src/common/espressif/esp_ulp.cmake @@ -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 diff --git a/arch/risc-v/src/esp32p4/hal_esp32p4.cmake b/arch/risc-v/src/esp32p4/hal_esp32p4.cmake index 18df08eb17c..cc36c66decb 100644 --- a/arch/risc-v/src/esp32p4/hal_esp32p4.cmake +++ b/arch/risc-v/src/esp32p4/hal_esp32p4.cmake @@ -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