Skip to content

Commit

Permalink
Add Waveshare 7 TFT Support
Browse files Browse the repository at this point in the history
* Extract hardware target from common make to define resolution
* Fix compilation failed if disable Time
* Fix compilation issue if nothing is enabled but SD and WiFi
* Fix warning  if nothing is enabled but SD and WiFi
* Update esp3d_version.h
  • Loading branch information
luc-github authored Aug 14, 2024
1 parent 74df62e commit 7ccc509
Show file tree
Hide file tree
Showing 38 changed files with 3,667 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .github/ci/ESP32S3_8048S070C.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/ESP32S3_8048S070C "TFT TARGET is ESP32S3_8048S070C - 7.0in. 800x480 (Capacitive)" OFF/ESP32S3_8048S070C "TFT TARGET is ESP32S3_8048S070C - 7.0in. 800x480 (Capacitive)" ON/g' ./CMakeLists.txt
sed -i '1,36s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,36s/ESP32S3_8048S070C "TFT TARGET is ESP32S3_8048S070C - 7.0in. 800x480 (Capacitive)" OFF/ESP32S3_8048S070C "TFT TARGET is ESP32S3_8048S070C - 7.0in. 800x480 (Capacitive)" ON/g' ./CMakeLists.txt
idf.py fullclean
head ./CMakeLists.txt -n 9
idf.py -DIDF_TARGET=esp32s3 reconfigure
Expand Down
4 changes: 2 additions & 2 deletions .github/ci/ESP32S3_FREENOVE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/OPTION(ESP32S3_FREENOVE_1_1 "HARDWARE TARGET is ESP32S3 Freenove v1.1" OFF/OPTION(ESP32S3_FREENOVE_1_1 "HARDWARE TARGET is ESP32S3 Freenove v1.1" ON/g' ./CMakeLists.txt
sed -i '1,36s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,36s/OPTION(ESP32S3_FREENOVE_1_1 "HARDWARE TARGET is ESP32S3 Freenove v1.1" OFF/OPTION(ESP32S3_FREENOVE_1_1 "HARDWARE TARGET is ESP32S3 Freenove v1.1" ON/g' ./CMakeLists.txt
sed -i 's/OPTION(CAMERA_SERVICE "Camera service" OFF/OPTION(CAMERA_SERVICE "Camera service" ON/g' ./CMakeLists.txt
sed -i 's/OPTION(TFT_UI_SERVICE "TFT UI service" ON/OPTION(TFT_UI_SERVICE "TFT UI service" OFF/g' ./CMakeLists.txt
idf.py fullclean
Expand Down
4 changes: 2 additions & 2 deletions .github/ci/ESP32S3_HMI43V3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/OPTION(ESP32S3_HMI43V3 "TFT TARGET is ESP32S3 HMI 4.3inches" OFF/OPTION(ESP32S3_HMI43V3 "TFT TARGET is ESP32S3 HMI 4.3inches" ON/g' ./CMakeLists.txt
sed -i '1,36s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,36s/OPTION(ESP32S3_HMI43V3 "TFT TARGET is ESP32S3 HMI 4.3inches" OFF/OPTION(ESP32S3_HMI43V3 "TFT TARGET is ESP32S3 HMI 4.3inches" ON/g' ./CMakeLists.txt
idf.py fullclean
head ./CMakeLists.txt -n 9
idf.py -DIDF_TARGET=esp32s3 reconfigure
Expand Down
4 changes: 2 additions & 2 deletions .github/ci/ESP32_2432S028R.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/OPTION(ESP32_2432S028R "TFT TARGET is ESP32_2432S028R - 2.8in. 320x240 (Resistive)" OFF/OPTION(ESP32_2432S028R "TFT TARGET is ESP32_2432S028R - 2.8in. 320x240 (Resistive)" ON/g' ./CMakeLists.txt
sed -i '1,36s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,36s/OPTION(ESP32_2432S028R "TFT TARGET is ESP32_2432S028R - 2.8in. 320x240 (Resistive)" OFF/OPTION(ESP32_2432S028R "TFT TARGET is ESP32_2432S028R - 2.8in. 320x240 (Resistive)" ON/g' ./CMakeLists.txt
idf.py fullclean
head ./CMakeLists.txt -n 9
idf.py -DIDF_TARGET=esp32 reconfigure
Expand Down
4 changes: 2 additions & 2 deletions .github/ci/ESP32_ROTRICS_DEXARM35.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/OPTION(ESP32_ROTRICS_DEXARM35 "TFT TARGET is ESP32 Rotrics DexArm 3.5inches" OFF/OPTION(ESP32_ROTRICS_DEXARM35 "TFT TARGET is ESP32 Rotrics DexArm 3.5inches" ON/g' ./CMakeLists.txt
sed -i '1,36s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,36s/OPTION(ESP32_ROTRICS_DEXARM35 "TFT TARGET is ESP32 Rotrics DexArm 3.5inches" OFF/OPTION(ESP32_ROTRICS_DEXARM35 "TFT TARGET is ESP32 Rotrics DexArm 3.5inches" ON/g' ./CMakeLists.txt
idf.py fullclean
head ./CMakeLists.txt -n 9
idf.py -DIDF_TARGET=esp32 reconfigure
Expand Down
4 changes: 2 additions & 2 deletions .github/ci/ZX3D50CE02S-SRC-4832.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cd $GITHUB_WORKSPACE/esp-idf
source ./export.sh
cd $GITHUB_WORKSPACE
idf.py fullclean
sed -i '1,32s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,32s/ESP32S3_ZX3D50CE02S_USRC_4832 "TFT TARGET is ESP32S3 Panlee ZX3D50CE02S-SRC-4832 3.5inches" OFF/ESP32S3_ZX3D50CE02S_USRC_4832 "TFT TARGET is ESP32S3 Panlee ZX3D50CE02S-SRC-4832 3.5inches" ON/g' ./CMakeLists.txt
sed -i '1,36s/ ON/ OFF/g' ./CMakeLists.txt
sed -i '1,36s/ESP32S3_ZX3D50CE02S_USRC_4832 "TFT TARGET is ESP32S3 Panlee ZX3D50CE02S-SRC-4832 3.5inches" OFF/ESP32S3_ZX3D50CE02S_USRC_4832 "TFT TARGET is ESP32S3 Panlee ZX3D50CE02S-SRC-4832 3.5inches" ON/g' ./CMakeLists.txt
idf.py fullclean
head ./CMakeLists.txt -n 9
idf.py -DIDF_TARGET=esp32s3 reconfigure
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
OPTION(ESP32S3_HMI43V3 "TFT TARGET is ESP32S3 HMI 4.3inches" ON)
OPTION(ESP32S3_ZX3D50CE02S_USRC_4832 "TFT TARGET is ESP32S3 Panlee ZX3D50CE02S-SRC-4832 3.5inches" OFF)
OPTION(ESP32S3_BZM_TFT35_GT911 "TFT TARGET is ESP32S3 Panlee BZM 3.5inches" OFF)
OPTION (ESP32S3_8048_TOUCH_LCD_7 "TFT TARGET is ESP32S3 - 7.0in. 800x480 (Capacitive)" OFF)
OPTION(ESP32S3_8048S070C "TFT TARGET is ESP32S3_8048S070C - 7.0in. 800x480 (Capacitive)" OFF)
OPTION(ESP32S3_8048S050C "TFT TARGET is ESP32S3_8048S050C - 5.0in. 800x480 (Capacitive)" OFF)
OPTION(ESP32S3_8048S043C "TFT TARGET is ESP32S3_8048S043C - 4.3in. 800x480 (Capacitive)" OFF)
Expand Down Expand Up @@ -64,7 +65,7 @@ OPTION(TFT_UI_SERVICE "TFT UI service" ON)
OPTION(SD_CARD_SERVICE "SD card service" ON)
OPTION(NOTIFICATIONS_SERVICE "Notifications service" ON)
OPTION(UPDATE_SERVICE "Update service" ON)
OPTION(USB_SERIAL_SERVICE "Use USB Serial if Available" ON)
OPTION(USB_SERIAL_SERVICE "Use USB Serial if Available" OFF)
OPTION(USE_FAT_INSTEAD_OF_LITTLEFS "Use FAT instead of LittleFS" OFF)

# ===========================================
Expand All @@ -87,6 +88,7 @@ set(PLATFORMS_LIST
ESP32S3_SEEED_STUDIO_XIAO
ESP32S3_CUSTOM
ESP32_CUSTOM
ESP32S3_8048_TOUCH_LCD_7
)

set(FIRMWARES_LIST
Expand Down
10 changes: 9 additions & 1 deletion cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,18 @@ message(STATUS "${Cyan}Update Service: ${White}${UPDATE_SERVICE} ${ColourReset}
message(STATUS "${Cyan}Use FAT instead of LittleFS: ${White}${USE_FAT_INSTEAD_OF_LITTLEFS} ${ColourReset}")
message(STATUS "${Cyan}Authentication: ${White}${ESP3D_AUTHENTICATION} ${ColourReset}")
message(STATUS "${Cyan}Time Service: ${White}${TIME_SERVICE} ${ColourReset}")
message(STATUS "${Cyan}SSDP Service: ${White}${SSDP_SERVICE} ${ColourReset}")
message(STATUS "${Cyan}MDNS Service: ${White}${MDNS_SERVICE} ${ColourReset}")
message(STATUS "${Cyan}Web Services: ${White}${WEB_SERVICES} ${ColourReset}")
message(STATUS "${Cyan}Camera Service: ${White}${CAMERA_SERVICE} ${ColourReset}")
message(STATUS "${Cyan}WebDav Services: ${White}${WEBDAV_SERVICES} ${ColourReset}")
message(STATUS "${Cyan}Telnet Service: ${White}${TELNET_SERVICE} ${ColourReset}")
message(STATUS "${Cyan}WebSocket Service: ${White}${WS_SERVICE} ${ColourReset}")
message(STATUS "${Cyan}Notifications Service: ${White}${NOTIFICATIONS_SERVICE} ${ColourReset}")
message(STATUS "${Cyan}USB Serial Service: ${White}${USB_SERIAL_SERVICE} ${ColourReset}")
message(STATUS "${Cyan}------------------------${ColourReset}")
message(STATUS "")


# ===========================================
# Development Configuration Summary
# ===========================================
Expand Down
1 change: 1 addition & 0 deletions cmake/targets/ESP32S3_4827S043C.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ if (ESP32S3_4827S043C)
if(HARDWARE_MOD_GT911_INT)
add_compile_options(-DWITH_GT911_INT=1)
endif()
set (RESOLUTION_SCREEN "res_480_272")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32S3_8048S043C.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ if(ESP32S3_8048S043C)
if(HARDWARE_MOD_GT911_INT)
add_compile_options(-DWITH_GT911_INT=1)
endif()
set (RESOLUTION_SCREEN "res_800_480")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32S3_8048S050C.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ if(ESP32S3_8048S050C)
if(HARDWARE_MOD_GT911_INT)
add_compile_options(-DWITH_GT911_INT=1)
endif()
set (RESOLUTION_SCREEN "res_800_480")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32S3_8048S070C.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ if(ESP32S3_8048S070C)
if(HARDWARE_MOD_GT911_INT)
add_compile_options(-DWITH_GT911_INT=1)
endif()
set (RESOLUTION_SCREEN "res_800_480")
endif()
15 changes: 15 additions & 0 deletions cmake/targets/ESP32S3_8048_TOUCH_LCD_7.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if(ESP32S3_8048_TOUCH_LCD_7)
set(TFT_TARGET "ESP32S3_8048_TOUCH_LCD_7")
set(SDKCONFIG ${CMAKE_SOURCE_DIR}/hardware/common/sdkconfig/ESP32-S3/with_PSRAM/8MB_Flash)
list(APPEND EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/hardware/ESP32S3_8048_TOUCH_LCD_7/components)
list(APPEND EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/hardware/drivers_video_rgb)
add_compile_options("-I${CMAKE_SOURCE_DIR}/hardware/ESP32S3_8048_TOUCH_LCD_7/components/bsp")
add_compile_options(-DWITH_GT911_INT=1)
# Add specific usb driver for otg
list(APPEND EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/hardware/drivers_usb_otg)
if (USB_SERIAL_SERVICE)
# Enable USB-OTG as serial alternative for communications
add_compile_options(-DESP3D_USB_SERIAL_FEATURE=1)
endif()
set (RESOLUTION_SCREEN "res_800_480")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32S3_BZM_TFT35_GT911.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ if(ESP32S3_BZM_TFT35_GT911)
# Enable USB-OTG as serial alternative for communications
add_compile_options(-DESP3D_USB_SERIAL_FEATURE=1)
endif()
set (RESOLUTION_SCREEN "res_480_320")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32S3_HMI43V3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ if(ESP32S3_HMI43V3)
# Enable USB-OTG as serial alternative for communications
add_compile_options(-DESP3D_USB_SERIAL_FEATURE=1)
endif()
set (RESOLUTION_SCREEN "res_800_480")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32S3_ZX3D50CE02S_USRC_4832.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ if(ESP32S3_ZX3D50CE02S_USRC_4832)
# Enable USB-OTG as serial alternative for communications
add_compile_options(-DESP3D_USB_SERIAL_FEATURE=1)
endif()
set (RESOLUTION_SCREEN "res_480_320")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32_2432S028R.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ if (ESP32_2432S028R)
set(SDKCONFIG ${CMAKE_SOURCE_DIR}/hardware/common/sdkconfig/ESP32/with_PSRAM/4MB_Flash)
endif()
endif()
set (RESOLUTION_SCREEN "res_320_240")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32_3248S035C.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ if(ESP32_3248S035C)
set(SDKCONFIG ${CMAKE_SOURCE_DIR}/hardware/common/sdkconfig/ESP32/with_PSRAM/4MB_Flash)
endif()
endif()
set (RESOLUTION_SCREEN "res_480_320")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32_3248S035R.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ if(ESP32_3248S035R)
set(SDKCONFIG ${CMAKE_SOURCE_DIR}/hardware/common/sdkconfig/ESP32/with_PSRAM/4MB_Flash)
endif()
endif()
set (RESOLUTION_SCREEN "res_480_320")
endif()
1 change: 1 addition & 0 deletions cmake/targets/ESP32_ROTRICS_DEXARM35.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ if(ESP32_ROTRICS_DEXARM35)
set(SDKCONFIG ${CMAKE_SOURCE_DIR}/hardware/ESP32_ROTRICS_DEXARM35/sdkconfig)
set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/hardware/ESP32_ROTRICS_DEXARM35/components)
add_compile_options("-I${CMAKE_SOURCE_DIR}/hardware/ESP32_ROTRICS_DEXARM35/components/bsp")
set (RESOLUTION_SCREEN "res_480_320")
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Component directive
idf_component_register(
SRCS "bsp.c"
INCLUDE_DIRS .
REQUIRES esp3d_log lvgl esp_lcd i2c_bus st7262 gt911 usb_serial
)
Loading

0 comments on commit 7ccc509

Please sign in to comment.