From fe1a943d4a40c377ceeb05ec17c403c11724016c Mon Sep 17 00:00:00 2001 From: Ricard Rosson Date: Tue, 11 Aug 2026 09:29:23 +0100 Subject: [PATCH] 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 Assisted-by: Claude Opus 5 (Claude Code) --- .../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 4287b88da9dc3..c91f7ed28d7f2 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