boards/esp32s3-ws-lcd128: use esp_hr_timer_init(), fix Wi-Fi build - #19787
Open
ricardgb wants to merge 1 commit into
Open
boards/esp32s3-ws-lcd128: use esp_hr_timer_init(), fix Wi-Fi build#19787ricardgb wants to merge 1 commit into
ricardgb wants to merge 1 commit into
Conversation
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: c17e16e ("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 <ricard@groundbits.com> Assisted-by: Claude Opus 5 (Claude Code)
xiaoxiang781216
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_bringup.cwas missed whenthe chip-specific RT timer was replaced by the common-source HR Timer. It still
guards on
CONFIG_ESP32S3_RT_TIMER, includes"esp32s3_rt_timer.h"and callsesp32s3_rt_timer_init()— none of which exist in the tree any more:c17e16eaed("xtensa/espressif: Update common-source integration for Xtensadevices") deleted
arch/xtensa/src/esp32s3/esp32s3_rt_timer.{c,h}and convertedevery other esp32s3 board's bringup to
CONFIG_ESPRESSIF_HR_TIMER/"espressif/esp_hr_timer.h"/esp_hr_timer_init(). This board kept the oldform.
Why it is a build breakage, not dead code
ESP32S3_RT_TIMERstill exists as a deprecated alias whose only job isselect ESPRESSIF_HR_TIMER, andESPRESSIF_WIRELESSselects it(
arch/xtensa/src/common/espressif/Kconfig):So enabling Wi-Fi on this board switches the stale block on and the build dies:
No
esp32s3-ws-lcd128defconfig enables Wi-Fi, so CI never compiles thatcombination — which is why this has gone unnoticed.
The change
Switch to the guard, include and initializer every other esp32s3 board uses
(
esp32s3-devkit,esp32s3-eye,esp32s3-box,esp32s3-korvo-2, …), includingtheir
"ERROR: esp_hr_timer_init() failed: %d\n"message form. No new variant isintroduced.
No functional change for the board's existing defconfigs (
nsh,coremark,ostest,watchdog,imu-qmi8658,notouch-lvgl,touch-lvgl): none of themset
ESP32S3_RT_TIMERorESPRESSIF_HR_TIMER, so the block stays compiled outexactly as before.
Testing
Reproduced and verified by compiling, with the same configuration before and
after the patch:
The extra options beyond
CONFIG_ESPRESSIF_WIFIare the ordinary Wi-Fiprerequisites that the in-tree Wi-Fi defconfigs (e.g.
esp32s3-devkit:wifi) already set; they are unrelated to this patch and wereneeded only to get a Wi-Fi-enabled ws-lcd128 configuration to build at all.
board/esp32s3_bringup.c:61:12: fatal error: esp32s3_rt_timer.h: No such file or directorynuttx,nuttx.bingenerated), no newwarnings from the board file.
tools/checkpatch.sh -g HEAD: all checks pass.Not tested on hardware — no ESP32-S3-LCD-1.28 board here. The change is a
mechanical rename to the current API, and the affected block is compiled out in
all of the board's existing defconfigs.
Disclosure
This root-cause analysis, patch, and build verification were performed by an AI
agent (Claude Code, operated and directed by the submitter), and the result was
reviewed by the submitter before posting.