Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
50460c4
initial display experiment
openshwprojects May 3, 2026
32fbb85
fix CI: move display libraries out of src to prevent recursive auto-d…
openshwprojects May 3, 2026
8d7ebae
fix: wrap lvgl_v8_port.cpp in PLATFORM_ESPIDF guard
openshwprojects May 3, 2026
1d7ca93
fix: complete esp32 display component modularization and build pipeline
openshwprojects May 3, 2026
d65e982
initial display experiment
openshwprojects May 3, 2026
6683b8b
Fix display build on other ESP32 platforms and suppress GCC 14 warnings
openshwprojects May 3, 2026
c1e5c8d
Display: dedicated LVGL task, button+counter demo
openshwprojects May 3, 2026
288ba78
Add Display_Shutdown to correctly manage LVGL task lifecycle and upda…
openshwprojects May 4, 2026
7b408b1
Migrate ESP32 Display libraries to Git Submodules
openshwprojects May 10, 2026
8da0a96
ESP32-S3: Refactor display build architecture for dynamic LCD configu…
openshwprojects May 10, 2026
f2601e7
ESP32-S3: Add memory and chip stats to LVGL demo and support flash ar…
openshwprojects May 10, 2026
d478d50
Add new driver files
openshwprojects May 10, 2026
811ae91
Add drv_display_shared.cpp and drv_display_hello.cpp to build files
openshwprojects May 11, 2026
1bba83e
Fix Windows build and add fully featured LVGL DisplayDemo
openshwprojects May 11, 2026
98bb2bb
Fix syntax errors and enum bitwise warnings
openshwprojects May 11, 2026
90a11f4
Switch display drivers to white/light theme
openshwprojects May 11, 2026
f15f450
Implement advanced Pro Landscape UI with fake chat
openshwprojects May 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,19 @@
path = sdk/bouffalo_sdk
url = https://github.com/bouffalolab/bouffalo_sdk
branch = master
[submodule "libraries/ESP32_Display_Panel"]
path = libraries/ESP32_Display_Panel
url = https://github.com/esp-arduino-libs/ESP32_Display_Panel.git
branch = master
[submodule "libraries/ESP32_IO_Expander"]
path = libraries/ESP32_IO_Expander
url = https://github.com/esp-arduino-libs/ESP32_IO_Expander.git
branch = master
[submodule "libraries/esp-lib-utils"]
path = libraries/esp-lib-utils
url = https://github.com/esp-arduino-libs/esp-lib-utils.git
branch = master
[submodule "libraries/lvgl"]
path = libraries/lvgl
url = https://github.com/lvgl/lvgl.git
branch = release/v8.4
109 changes: 109 additions & 0 deletions build_error.txt

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions build_output.txt

Large diffs are not rendered by default.

73 changes: 68 additions & 5 deletions build_scripts/build_esp32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ if "%TARGET%"=="esp32" (
) else if "%TARGET%"=="esp32s3" (
set BUILD_DIR=platforms\ESP-IDF\build-s3
set BOOTLOADER_ADDR=0x0
) else if "%TARGET%"=="esp32s3ram" (
set BUILD_DIR=platforms\ESP-IDF\build-s3ram
set BOOTLOADER_ADDR=0x0
) else if "%TARGET%"=="esp32s3ram_waveshare_5" (
set BUILD_DIR=platforms\ESP-IDF\build-s3ram-waveshare-5
set BOOTLOADER_ADDR=0x0
) else if "%TARGET%"=="esp32s3ram_waveshare_4_3" (
set BUILD_DIR=platforms\ESP-IDF\build-s3ram-waveshare-4-3
set BOOTLOADER_ADDR=0x0
) else if "%TARGET%"=="esp32s3ram_elecrow_7" (
set BUILD_DIR=platforms\ESP-IDF\build-s3ram-elecrow-7
set BOOTLOADER_ADDR=0x0
) else (
echo [ERROR] Unknown target: %TARGET%
exit /b 1
Expand Down Expand Up @@ -104,15 +116,44 @@ if exist platforms\ESP-IDF\partitions.csv del platforms\ESP-IDF\partitions.csv
copy /y platforms\ESP-IDF\partitions-4mb.csv platforms\ESP-IDF\partitions.csv >nul

:: Set environment variables for IDF cmake
set IDF_TARGET=%TARGET%

set CMAKE_ARGS=
if "%TARGET%"=="esp32s3ram" (
set IDF_TARGET=esp32s3
set SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.esp32s3ram
set ENABLE_DISPLAY=1
set CMAKE_ARGS=-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32s3ram" -DENABLE_DISPLAY=1
) else if "%TARGET%"=="esp32s3ram_waveshare_5" (
set IDF_TARGET=esp32s3
echo CONFIG_BOARD_WAVESHARE_ESP32_S3_TOUCH_LCD_5=y > platforms\ESP-IDF\sdkconfig.tmp
echo CONFIG_ESP_PANEL_BOARD_DEFAULT_USE_SUPPORTED=y >> platforms\ESP-IDF\sdkconfig.tmp
set SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.esp32s3ram;sdkconfig.tmp
set ENABLE_DISPLAY=1
set CMAKE_ARGS=-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32s3ram;sdkconfig.tmp" -DENABLE_DISPLAY=1
) else if "%TARGET%"=="esp32s3ram_waveshare_4_3" (
set IDF_TARGET=esp32s3
echo CONFIG_BOARD_WAVESHARE_ESP32_S3_TOUCH_LCD_4_3=y > platforms\ESP-IDF\sdkconfig.tmp
echo CONFIG_ESP_PANEL_BOARD_DEFAULT_USE_SUPPORTED=y >> platforms\ESP-IDF\sdkconfig.tmp
set SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.esp32s3ram;sdkconfig.tmp
set ENABLE_DISPLAY=1
set CMAKE_ARGS=-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32s3ram;sdkconfig.tmp" -DENABLE_DISPLAY=1
) else if "%TARGET%"=="esp32s3ram_elecrow_7" (
set IDF_TARGET=esp32s3
echo CONFIG_BOARD_ELECROW_CROWPANEL_7_0=y > platforms\ESP-IDF\sdkconfig.tmp
echo CONFIG_ESP_PANEL_BOARD_DEFAULT_USE_SUPPORTED=y >> platforms\ESP-IDF\sdkconfig.tmp
set SDKCONFIG_DEFAULTS=sdkconfig.defaults;sdkconfig.defaults.esp32s3ram;sdkconfig.tmp
set ENABLE_DISPLAY=1
set CMAKE_ARGS=-DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.defaults.esp32s3ram;sdkconfig.tmp" -DENABLE_DISPLAY=1
) else (
set ENABLE_DISPLAY=0
set IDF_TARGET=%TARGET%
)

:: --- Berry prebuild ---
call build_scripts\berry_prebuild.bat

:: Configure CMake via ESP-IDF toolchain
echo [INFO] Running CMake configuration for %TARGET%...
cmake platforms\ESP-IDF -B %BUILD_DIR% -G "Ninja"
cmake platforms\ESP-IDF -B %BUILD_DIR% -G "Ninja" %CMAKE_ARGS%
if !errorlevel! neq 0 (
echo [ERROR] CMake configuration failed!
exit /b 1
Expand Down Expand Up @@ -147,6 +188,14 @@ if "%TARGET%"=="esp32" (
set OUT_NAME=OpenESP32S2
) else if "%TARGET%"=="esp32s3" (
set OUT_NAME=OpenESP32S3
) else if "%TARGET%"=="esp32s3ram" (
set OUT_NAME=OpenESP32S3RAM
) else if "%TARGET%"=="esp32s3ram_waveshare_5" (
set OUT_NAME=OpenESP32S3RAM_WAVESHARE_5
) else if "%TARGET%"=="esp32s3ram_waveshare_4_3" (
set OUT_NAME=OpenESP32S3RAM_WAVESHARE_4_3
) else if "%TARGET%"=="esp32s3ram_elecrow_7" (
set OUT_NAME=OpenESP32S3RAM_ELECROW_7
) else (
set OUT_NAME=Open%TARGET%
)
Expand All @@ -156,9 +205,13 @@ echo [INFO] Merging binaries with esptool...
set FACTORY_BIN=output\%APP_VERSION%\!OUT_NAME!_%APP_VERSION%.factory.bin
set IMG_BIN=output\%APP_VERSION%\!OUT_NAME!_%APP_VERSION%.img

python -m esptool -c %TARGET% merge_bin -o !FACTORY_BIN! --flash_mode dio --flash_size %ESP_FSIZE% %BOOTLOADER_ADDR% %BUILD_DIR%\bootloader\bootloader.bin 0x8000 %BUILD_DIR%\partition_table\partition-table.bin 0x10000 %BUILD_DIR%\OpenBeken.bin
python -m esptool --chip %IDF_TARGET% merge_bin -o "output\%APP_VERSION%\%OUT_NAME%.factory.bin" ^
--flash_mode dio --flash_freq 40m --flash_size %ESP_FSIZE% ^
%BOOTLOADER_ADDR% "%BUILD_DIR%\bootloader\bootloader.bin" ^
0x8000 "%BUILD_DIR%\partition_table\partition-table.bin" ^
0x10000 "%BUILD_DIR%\OpenBeken.bin"
if !errorlevel! neq 0 (
echo [ERROR] esptool merge failed!
echo [ERROR] esptool merge failed
exit /b 1
)

Expand All @@ -170,5 +223,15 @@ echo Output files located in output\%APP_VERSION%
echo Factory Bin: !FACTORY_BIN!
echo OTA Bin: !IMG_BIN!
echo ==============================================

if "%ACTION%"=="flash" (
echo [INFO] Flashing via UART...
python -m esptool --chip %IDF_TARGET% write_flash 0x0 "output\%APP_VERSION%\%OUT_NAME%.factory.bin"
if !errorlevel! neq 0 (
echo [ERROR] esptool flash failed
exit /b 1
)
)

exit /b 0

2 changes: 2 additions & 0 deletions build_scripts/obk_esp32s3ram_build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0build_esp32.bat" esp32s3ram build
2 changes: 2 additions & 0 deletions build_scripts/obk_esp32s3ram_elecrow_7_build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0build_esp32.bat" esp32s3ram_elecrow_7 build
2 changes: 2 additions & 0 deletions build_scripts/obk_esp32s3ram_waveshare_4_3_build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0build_esp32.bat" esp32s3ram_waveshare_4_3 build
2 changes: 2 additions & 0 deletions build_scripts/obk_esp32s3ram_waveshare_5_build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
call "%~dp0build_esp32.bat" esp32s3ram_waveshare_5 build
1 change: 1 addition & 0 deletions libraries/ESP32_Display_Panel
Submodule ESP32_Display_Panel added at 31771b
1 change: 1 addition & 0 deletions libraries/ESP32_IO_Expander
Submodule ESP32_IO_Expander added at e79a63
1 change: 1 addition & 0 deletions libraries/esp-lib-utils
Submodule esp-lib-utils added at bb9ea3
1 change: 1 addition & 0 deletions libraries/lvgl
Submodule lvgl added at 4495f4
2 changes: 1 addition & 1 deletion openBeken_win32_mvsc2017.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\..\platforms\bk7231t\bk7231t_os\beken378\driver\common\dd.c" />
Expand Down
5 changes: 4 additions & 1 deletion platforms/ESP-IDF/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
build*
sdkconfig
partitions.csv
sdkconfig.old
partitions.csv
managed_components/
dependencies.lock
13 changes: 11 additions & 2 deletions platforms/ESP-IDF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@ add_definitions( -DUSER_SW_VER="$ENV{APP_VERSION}" )
add_definitions( -DOBK_VARIANT=$ENV{OBK_VARIANT} )
include_directories("$ENV{IDF_PATH}/../../libraries/berry/src")
include_directories("$ENV{IDF_PATH}/../../include")
include_directories("$ENV{IDF_PATH}/../../src/driver/display")

if(ENABLE_DISPLAY OR (DEFINED ENV{ENABLE_DISPLAY} AND "$ENV{ENABLE_DISPLAY}" EQUAL "1"))
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/../../libraries/ESP32_Display_Panel" "$ENV{IDF_PATH}/../../libraries/lvgl" "$ENV{IDF_PATH}/../../libraries/ESP32_IO_Expander" "$ENV{IDF_PATH}/../../libraries/esp-lib-utils")
endif()

#set(PROJECT_VER "$ENV{APP_VERSION}")
project(OpenBeken)
idf_build_set_property(COMPILE_OPTIONS "-Wno-error=format-truncation" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Wno-error=incompatible-pointer-types" APPEND)
idf_build_set_property(COMPILE_OPTIONS "-Wno-error=format-truncation" "-Wno-error=incompatible-pointer-types" "-Wno-error=int-conversion" "-Wno-error=unused-but-set-variable" "-Wno-error=unused-function" "-Wno-error=unused-variable" "-Wno-error=implicit-fallthrough" APPEND)


if(ENABLE_DISPLAY OR (DEFINED ENV{ENABLE_DISPLAY} AND "$ENV{ENABLE_DISPLAY}" EQUAL "1"))
idf_build_set_property(COMPILE_OPTIONS "-DENABLE_DISPLAY=1" "-DLV_CONF_INCLUDE_SIMPLE=1" "-DBOARD_WAVESHARE_ESP32_S3_TOUCH_LCD_5=1" "-DESP_PANEL_BOARD_DEFAULT_USE_SUPPORTED=1" "-DESP_PANEL_BOARD_USE_SUPPORTED_FILE=1" "-DESP_PANEL_BOARD_INCLUDE_SUPPORTED_SIMPLE=1" APPEND)
endif()
11 changes: 10 additions & 1 deletion platforms/ESP-IDF/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set(PROJ_ALL_SRC
${OBK_SRCS}hal/espidf/hal_uart_espidf.c
${OBK_SRCS}hal/espidf/hal_ota_espidf.c
${OBKM_SRC}
${OBKM_SRC_CXX}
${BERRY_SRC_C}
../../../libraries/mqtt_patched.c
)
Expand All @@ -35,8 +36,16 @@ if(ENABLE_MDNS_ESPIDF)
../../../sdk/esp-idf/components/lwip/lwip/src/apps/mdns/mdns_out.c
)
endif()
set(PRIV_REQ_COMPONENTS mqtt lwip esp_wifi nvs_flash esp_driver_tsens esp_driver_gpio esp_pm esp_partition app_update esp_adc esp_driver_uart esp_driver_ledc spi_flash esp_driver_spi esp_driver_gptimer)
message(STATUS "ENABLE_DISPLAY is '${ENABLE_DISPLAY}' in main/CMakeLists.txt")
if(ENABLE_DISPLAY OR (DEFINED ENV{ENABLE_DISPLAY} AND "$ENV{ENABLE_DISPLAY}" EQUAL "1"))
list(APPEND PRIV_REQ_COMPONENTS ESP32_Display_Panel lvgl)
endif()

idf_component_register(SRCS ${PROJ_ALL_SRC} WHOLE_ARCHIVE
PRIV_REQUIRES mqtt lwip esp_wifi nvs_flash esp_driver_tsens esp_driver_gpio esp_pm esp_partition app_update esp_adc esp_driver_uart esp_driver_ledc spi_flash esp_driver_spi esp_driver_gptimer)
PRIV_REQUIRES ${PRIV_REQ_COMPONENTS})

target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-error=format-truncation" "-Wno-error=incompatible-pointer-types" "-Wno-error=int-conversion" "-Wno-error=unused-but-set-variable" "-Wno-error=unused-function" "-Wno-error=unused-variable" "-Wno-error=implicit-fallthrough" "-Wno-error=maybe-uninitialized")

target_compile_definitions(${COMPONENT_LIB} PRIVATE USER_SW_VER="$ENV{APP_VERSION}")
target_compile_definitions(${COMPONENT_LIB} PRIVATE OBK_VARIANT=$ENV{OBK_VARIANT})
8 changes: 8 additions & 0 deletions platforms/ESP-IDF/sdkconfig.defaults.esp32s3ram
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CONFIG_PM_ENABLE=y
CONFIG_PM_DFS_INIT_AUTO=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_SPIRAM=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y
4 changes: 4 additions & 0 deletions platforms/obk_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ endif()
set(OBKM_SRC_CXX
${OBK_SRCS}driver/drv_ir.cpp
${OBK_SRCS}driver/drv_ir_new.cpp
${OBK_SRCS}driver/drv_display_shared.cpp
${OBK_SRCS}driver/drv_display_hello.cpp
${OBK_SRCS}driver/drv_display_demo.cpp
${OBK_SRCS}driver/display/lvgl_v8_port.cpp
${OBK_SRCS}libraries/IRremoteESP8266/src/IRac.cpp
${OBK_SRCS}libraries/IRremoteESP8266/src/IRproto.cpp
${OBK_SRCS}libraries/IRremoteESP8266/src/IRrecv.cpp
Expand Down
3 changes: 3 additions & 0 deletions src/cmnds/cmd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,9 @@ void CMD_Init_Delayed() {
CMD_StartTCPCommandLine();
}
#endif
#if ENABLE_DRIVER_DISPLAY
CMD_ExecuteCommand("startDriver DisplayDemo", 0);
#endif
#if PLATFORM_BEKEN || WINDOWS || PLATFORM_BL602 || PLATFORM_ESPIDF || PLATFORM_ESP8266 \
|| PLATFORM_REALTEK || PLATFORM_ECR6600 || PLATFORM_XRADIO
UART_AddCommands();
Expand Down
Loading
Loading