Skip to content

Commit

Permalink
Examples supporting display must build for non esp32 targets
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdp committed Aug 1, 2023
1 parent 09fee4e commit 2af90fb
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ foreach(phy_blob ${phy_blobs})
list(APPEND chip_libraries "${esp_phy_dir}/lib/${target_name}/lib${phy_blob}.a")
endforeach()

set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex)
set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos)
foreach(component ${components_to_link})
idf_component_get_property(lib_name ${component} COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${lib_name}>)
Expand Down
5 changes: 4 additions & 1 deletion examples/all-clusters-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm
set(EXTRA_COMPONENT_DIRS
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components"
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common"
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components"
)

if(${IDF_TARGET} STREQUAL "esp32")
list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components")
endif()

project(chip-all-clusters-app)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND)
Expand Down
6 changes: 5 additions & 1 deletion examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}"
)
endif (CONFIG_ENABLE_PW_RPC)

set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread tft spidriver screen-framework)
set(PRIV_REQUIRES_LIST chip QRCode bt app_update nvs_flash spi_flash openthread)

if(${IDF_TARGET} STREQUAL "esp32")
list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework)
endif()

if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM)
list(APPEND PRIV_REQUIRES_LIST led_strip)
Expand Down
5 changes: 4 additions & 1 deletion examples/all-clusters-minimal-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm
set(EXTRA_COMPONENT_DIRS
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components"
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common"
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components"
)

if(${IDF_TARGET} STREQUAL "esp32")
list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components")
endif()

project(chip-all-clusters-minimal-app)
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND)
Expand Down
6 changes: 5 additions & 1 deletion examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}"
)
endif (CONFIG_ENABLE_PW_RPC)

set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread tft spidriver screen-framework)
set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread)

if(${IDF_TARGET} STREQUAL "esp32")
list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework)
endif()

if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM)
list(APPEND PRIV_REQUIRES_LIST led_strip)
Expand Down
8 changes: 7 additions & 1 deletion examples/common/screen-framework/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
set(require_list chip driver)

if(${IDF_TARGET} STREQUAL "esp32")
list(APPEND require_list tft)
endif()

idf_component_register(SRCS "Display.cpp"
"ScreenManager.cpp"
"Screen.cpp"
"ListScreen.cpp"
INCLUDE_DIRS "include"
PRIV_REQUIRES tft chip driver)
REQUIRES ${require_list})
6 changes: 5 additions & 1 deletion examples/lighting-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm
set(EXTRA_COMPONENT_DIRS
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components"
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common"
"${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components"
)

if(${IDF_TARGET} STREQUAL "esp32")
list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components")
endif()


project(chip-lighting-app)

# WARNING: This is just an example for using key for decrypting the encrypted OTA image
Expand Down
6 changes: 5 additions & 1 deletion examples/lighting-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes-server"
)

set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash tft screen-framework)
set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash)

if(${IDF_TARGET} STREQUAL "esp32")
list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework)
endif()

if (CONFIG_ENABLE_PW_RPC)
# Append additional directories for RPC build
Expand Down

0 comments on commit 2af90fb

Please sign in to comment.