2.6 KiB
2.6 KiB
Repository Instructions
Scope
This repository targets Waveshare's ESP32-C6-Touch-AMOLED-2.16 board. Keep changes aligned with the current split between the main app, reusable board support components.
Build And Validate
- When changing the active app, validate with a full rebuild rather than editing build outputs.
Project Layout
- main/app/app_main.cpp is the entrypoint and orchestration layer.
- main/modules/desktop_ui/ contains the LVGL desktop UI module.
- main/modules/wifi_provisioning/ contains Wi-Fi bootstrap, provisioning, and SNTP handling.
- components/app_bsp/, components/port_bsp/, components/pmicpower/, and components/hw_platform/ are the reusable hardware and board-support layers.
- 02_Example/ contains isolated example projects; do not mix example changes into the main app unless the user explicitly asks.
Editing Conventions
- Update main/CMakeLists.txt when adding, moving, or removing source files in
main/. - Keep the root CMakeLists.txt workarounds for ESP-IDF v6 and managed-component warnings unless there is a verified replacement.
- Prefer small, module-scoped edits over broad rewrites.
- Preserve existing public function names unless a change is explicitly requested.
Known Pitfalls
- ESP-IDF v6.0.1 moves
driver/i2c_master.hundercomponents/esp_driver_i2c/include; the root CMake workaround exposes that include path. - Managed components may surface warnings that are intentionally suppressed at the root CMake level.
- Display rotation changes need the existing LVGL refresh path to avoid partial redraw artifacts.
Hardware Platform Profiles
- Board-specific configuration lives in components/hw_platform/profiles/.
- The active profile is selected via Kconfig (
CONFIG_HW_PLATFORM_*); default isESP32C6_AMOLED_480X480. - components/hw_platform/hw_platform.h is the single include for all
BSP_*andPLATFORM_*macros. - main/user_config.h is now a backward-compat shim that includes
hw_platform.h. - To add a new board: (1) add
profiles/<new_board>.h, (2) add aconfigentry incomponents/hw_platform/Kconfig, (3) add the#elifbranch inhw_platform.h.