InitializeTouch() declares its touch handle uninitialised, ignores the
return value of both init calls, and then asserts on the handle:
esp_lcd_touch_handle_t tp;
esp_lcd_new_panel_io_i2c(i2c_bus_, &tp_io_config, &tp_io_handle);
esp_lcd_touch_new_i2c_ft5x06(tp_io_handle, &tp_cfg, &tp);
assert(tp);
When the controller does not respond, esp_lcd_touch_new_i2c_ft5x06()
leaves tp untouched, so assert(tp) tests whatever was on the stack.
A non-zero stack value passes, and lvgl_port_add_touch() then
dereferences it:
E FT5x06: esp_lcd_touch_new_i2c_ft5x06(161): FT5x06 init failed
E FT5x06: Error (0x108)! Touch controller FT5x06 initialization failed!
Guru Meditation Error: Core 0 panic'ed (LoadProhibited)
Backtrace: lvgl_port_add_touch -> LichuangDevBoard::InitializeTouch()
This happens on every boot, so the board never gets past construction.
Seen on a unit with no touch panel fitted: an I2C scan finds only 0x18
(ES8311), 0x19 (PCA9557) and 0x41 (ES7210), no 0x38.
Initialise the handle, check both return values, and treat a missing
controller as "no touch" instead. Touch is optional here: the display,
audio and buttons are all unaffected, and boards that do have the
controller are unchanged.
Verified on hardware: boots to idle, connects, holds a conversation.
Note: rymcu/bigsmart has the same uninitialised-handle pattern, but it
wraps the calls in ESP_ERROR_CHECK, so it aborts with a diagnosable
error rather than dereferencing garbage. Left alone, as I have no such
board to test on.
* 38 interface languages, with localized voice prompts where available and English fallback - **plus Marathi (mr-IN) in this fork**
* Windows Build fix
* Add Marathi (mr-IN) Indian interface language Support
---------
Co-authored-by: Chanchal Sakarde <chanchaljsakarde@gmail.com>
- Removed the intermediate step of storing all variants in an environment variable to prevent exceeding size limits.
- Updated the logic for selecting variants based on changes in the GitHub Actions workflow.
- Enhanced the LCD panel configuration for `esp_lcd_ili9486` and `esp_lcd_nv3030b` to support new RGB element order handling.
- Adjusted SSD1306 display initialization to ensure compatibility with different IDF versions by using individual field assignments.
- Added `failure_summary` function to extract actionable errors from compiler logs.
- Updated manifest to include error details when firmware build fails.
- Added unit tests to verify the functionality of the new failure summary feature.
- Added retry mechanism for transient OSS upload errors with exponential backoff.
- Updated `upload_outputs` function to utilize the new upload logic.
- Enhanced documentation to reflect the new retry behavior for OSS uploads.
- Added unit tests to verify retry functionality and error handling.
- Introduced config.json for bread-compact-wifi-lcd with LCD ST7789 support.
- Added config.json for bread-compact-wifi-s3cam with camera build options and LCD ST7789 support.
- Removed camera horizontal mirroring setting from bread-compact-wifi-s3cam implementation.
- Incremented project version from 2.4.1 to 2.4.2 in CMakeLists.txt.
- Added support for `--build-options-json` in firmware_builder.py to allow custom build options.
- Implemented validation for build options to ensure correct data types and structure.
- Updated tests to cover new build options functionality and validation logic.
- Changed Docker image from `espressif/idf:release-v6.1` to `espressif/idf:v6.0.2` for existing jobs.
- Added new job for building ESP32-S31 variants with IDF 6.1, including configurations for `esp32-s31-function-coreboard-1` and `esp32-s31-korvo-1`.
- Enhanced build steps to include artifact upload for the new board configurations.
- Updated Docker image in GitHub Actions workflow from `espressif/idf:v6.0.1` to `espressif/idf:release-v6.1`.
- Removed obsolete build configurations for ESP32-S31 and BluFi options.
- Enhanced `firmware_builder.py` to emit build stage markers and handle board configurations more effectively.
- Updated documentation to reflect changes in build process and configuration handling.
- Added tests to verify board display names and configuration resolution logic.
- Introduced a Dockerfile for building firmware for XiaoZhi boards.
- Added entrypoint script to initialize the environment and execute the firmware build.
- Implemented firmware_builder.py for handling the build process, including validation and artifact collection.
- Created README.md with build instructions and usage examples.
- Added test suite for firmware builder functionality.
- Included .dockerignore to exclude unnecessary files from the Docker context.
* Add support for LCD Wiki ES3C35P (3.5" ESP32-S3) board
* fix: update variant counts in test for new ES3C35P board
---------
Co-authored-by: Eivs <eivs@Eivss-MacBook-Pro.local>
- Updated BoxAudioCodec constructor to include parameters for input gain, reference gain channel, and reference gain.
- Modified EnableInput method to set gain for the reference channel if applicable.
- Adjusted CustomAudioCodec initialization to utilize new gain parameters for improved audio processing.
- Added PressToTalkMcpTool to manage press-to-talk and click-to-talk modes.
- Updated button event handling to support listening state transitions based on press-to-talk status.
- Initialized press-to-talk tool during board setup for enhanced user interaction.
* feat: migrate firmware to xiaozhi-fonts 2.0.0
* fix: restart scrolling subtitles on text change
* docs: add AGENTS.md for project overview, architecture, rules, and commands
- Introduced AGENTS.md to document the XiaoZhi voice-assistant firmware architecture, required rules for development, board configuration process, and validation steps.
- Included detailed sections on project structure, commands for building and testing, and authoritative documentation references.
* feat: finalize glyph push protocol
* fix: remove stale emoji font include
* build: use xiaozhi-fonts 2.0.0
* fix: decouple custom fonts from glyph push
* refactor: improve wake word invocation handling
- Introduced BeginWakeWordInvoke method to streamline the wake word processing flow.
- Updated HandleWakeWordDetectedEvent to utilize the new method, ensuring proper state transitions and scheduling.
- Enhanced error handling to prevent the device from getting stuck in the connecting state.
- Refactored audio channel management to improve responsiveness during wake word detection.
---------
Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
* Migrate board builds to ESP-IDF 6.0.1
* Document upstream IDF 6 CI blockers
* Use IDF 6 patched registry components
* Fix board-specific ESP-IDF 6 build errors
* Fix remaining ESP-IDF 6 board builds
* Document final ESP-IDF 6 matrix results [skip ci]
* update IDF 6 component releases
* rebase IDF 6 migration and use upstream SSCMA
* Enhance audio input management in AudioService
- Introduced AS_EVENT_AUDIO_INPUT_STOP_REQUEST to manage audio input stopping more effectively.
- Updated AudioService::Start() to clear the new stop request event.
- Modified AudioService::AudioInputTask() to handle the stop request and ensure proper input disabling.
- Adjusted AdcPdmAudioCodec::Start() to reflect lazy input opening, ensuring start/stop operations run in the same task.
* Refactor audio codec management and configuration
- Added output_device_opened_ flag to track the state of the output device in Es8388 and Es8389 codecs.
- Updated EnableOutput method to prevent unnecessary device reopening and added mute functionality to manage audio output more effectively.
- Enhanced error handling in Es8311AudioCodec by ensuring proper closure and deletion of the codec device.
- Adjusted sample rates in board configurations for atk-dnesp32s3-box2 to 24000 Hz and introduced AUDIO_CODEC_USE_MCLK for improved clock management.
* Update build configurations and documentation for ESP-IDF 6 compatibility
- Added container specification for the build workflow using espressif/idf:v6.0.1.
- Updated the version of the espressif/esp_video component to ^2.3.0.
- Enhanced documentation to clarify the support status of ESP32-P4 variants, specifying that legacy Rev < 3 variants are excluded from the IDF 6 matrix.
- Adjusted board configurations to include IDF version constraints and necessary SDK configurations for legacy support.
- Improved handling of YUV formats in EspVideo to maintain compatibility with previous versions.
* Implement playback drained event handling in Application
- Added MAIN_EVENT_PLAYBACK_DRAINED to manage playback state transitions.
- Introduced callbacks for playback drained events in AudioService to trigger listening state changes.
- Refactored Application::Run() to handle deferred listening start based on playback queue status.
- Enhanced audio processing logic to prevent audio truncation during state changes.
- Updated related methods to ensure proper wake word detection configuration during listening mode.
* Fix variant selection shell in CI
* Update project version to 2.4.0 and adjust component dependencies
- Bump project version in CMakeLists.txt to 2.4.0.
- Change espressif/esp_video component version to ^2.0.1 in idf_component.yml.
- Modify AUDIO_INPUT_REFERENCE setting in config.h to false for m5stack-core-s3.
- Remove unnecessary infinite loops in xmini_c3_board.cc during initialization.
---------
Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
- Implemented a new function, IsEs8311Present(), to verify the presence of the ES8311 codec by checking its chip ID registers instead of relying solely on I2C bus probing.
- Updated error logging to provide clearer messages when the ES8311 codec is not detected.
- Added a continuous logging loop to indicate waiting for the boot button to be pressed during initialization.
* Update QQ group contact in README.md
* Update dependencies in idf_component.yml and modify AFE audio processor configuration
- Updated versions for several dependencies in idf_component.yml to improve compatibility and performance.
- Changed AFE audio processor initialization to use low-cost mode and adjusted AEC settings for enhanced audio processing.
* Update audio dependencies in idf_component.yml
- Downgraded versions for espressif/esp_audio_effects and espressif/esp_audio_codec to improve compatibility with existing components.
* refactor(audio): unify speech processing engines
---------
Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>