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

simbit18 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 9b02dead5da boards/esp32s3-ws-lcd128: use esp_hr_timer_init(), fix 
Wi-Fi build
9b02dead5da is described below

commit 9b02dead5dac925c51b7a7b2e34922418f884f03
Author: Ricard Rosson <[email protected]>
AuthorDate: Tue Aug 11 09:29:23 2026 +0100

    boards/esp32s3-ws-lcd128: use esp_hr_timer_init(), fix Wi-Fi build
    
    esp32s3_bringup.c still guards on CONFIG_ESP32S3_RT_TIMER, includes
    "esp32s3_rt_timer.h" and calls esp32s3_rt_timer_init().  None of those
    exist any more: c17e16eaed ("xtensa/espressif: Update common-source
    integration for Xtensa devices") deleted the chip-specific RT timer and
    replaced it with the common-source HR Timer, and updated every other
    esp32s3 board's bringup to CONFIG_ESPRESSIF_HR_TIMER /
    "espressif/esp_hr_timer.h" / esp_hr_timer_init().  This board was missed.
    
    The stale guard is not dead code: ESPRESSIF_WIRELESS selects
    ESP32S3_RT_TIMER (which survives only as a deprecated alias that selects
    ESPRESSIF_HR_TIMER), so enabling Wi-Fi on this board turns the guard on and
    the build fails outright:
    
      board/esp32s3_bringup.c:61:12: fatal error: esp32s3_rt_timer.h:
      No such file or directory
    
    No esp32s3-ws-lcd128 defconfig enables Wi-Fi, which is why CI has not
    caught it.
    
    Switch to the same guard, include and initializer the other esp32s3 boards
    use.  No functional change for the existing defconfigs: they leave both
    ESP32S3_RT_TIMER and ESPRESSIF_HR_TIMER unset, so the block stays compiled
    out.
    
    Verified with esp32s3-ws-lcd128:nsh plus CONFIG_ESPRESSIF_WIFI=y (and the
    Wi-Fi prerequisites the in-tree wifi defconfigs set: SCHED_LPWORK,
    DRIVERS_WIRELESS/DRIVERS_IEEE80211, NETDEV_WIRELESS_IOCTL, IOB_NCHAINS,
    TLS_TASK_NELEM, TIMER): the fatal error above before the change, a clean
    build and image after it, with no other change to the configuration.
    
    Signed-off-by: Ricard Rosson <[email protected]>
    Assisted-by: Claude Opus 5 (Claude Code)
---
 boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_bringup.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_bringup.c 
b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_bringup.c
index 4287b88da9d..c91f7ed28d7 100644
--- a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_bringup.c
+++ b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_bringup.c
@@ -57,8 +57,8 @@
 #  include "esp32s3_wifi_adapter.h"
 #endif
 
-#ifdef CONFIG_ESP32S3_RT_TIMER
-#  include "esp32s3_rt_timer.h"
+#ifdef CONFIG_ESPRESSIF_HR_TIMER
+#  include "espressif/esp_hr_timer.h"
 #endif
 
 #ifdef CONFIG_ESP32S3_I2C
@@ -314,11 +314,11 @@ int esp32s3_bringup(void)
     }
 #endif
 
-#ifdef CONFIG_ESP32S3_RT_TIMER
-  ret = esp32s3_rt_timer_init();
+#ifdef CONFIG_ESPRESSIF_HR_TIMER
+  ret = esp_hr_timer_init();
   if (ret < 0)
     {
-      syslog(LOG_ERR, "Failed to initialize RT timer: %d\n", ret);
+      syslog(LOG_ERR, "ERROR: esp_hr_timer_init() failed: %d\n", ret);
     }
 #endif
 

Reply via email to