This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new e26e38fefd3 arch/risc-v/espressif: Fix build errors on CMake ULP build 
system
e26e38fefd3 is described below

commit e26e38fefd3a1a91623d333d217466eeed2a65aa
Author: Eren Terzioglu <[email protected]>
AuthorDate: Fri Jul 17 14:30:07 2026 +0200

    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 <[email protected]>
---
 arch/risc-v/src/common/espressif/CMakeLists.txt | 4 +++-
 arch/risc-v/src/common/espressif/esp_ulp.cmake  | 1 +
 arch/risc-v/src/esp32p4/hal_esp32p4.cmake       | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

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

Reply via email to