Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[esp32] Fix build failure with PW_RPC after update to IDF v4.4 #11825

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,8 @@ target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group

# Make the component dependent on our CHIP build
add_dependencies(${COMPONENT_LIB} chip_gn)

if(CONFIG_ENABLE_PW_RPC)
set(WRAP_FUNCTIONS esp_log_write)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")
endif()
11 changes: 0 additions & 11 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ target_compile_options(${COMPONENT_LIB} PRIVATE "-DLWIP_IPV6_SCOPES=0" "-DCHIP_H

if (CONFIG_ENABLE_PW_RPC)

idf_component_get_property(chip_lib chip COMPONENT_LIB)

set(WRAP_FUNCTIONS esp_log_write)
target_link_libraries(${chip_lib} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")

get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)

set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")
Expand Down Expand Up @@ -225,10 +220,4 @@ target_link_options(${COMPONENT_LIB}
"-T${PIGWEED_ROOT}/pw_tokenizer/pw_tokenizer_linker_sections.ld"
)

set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})
target_include_directories(${chip_lib} PUBLIC
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc"
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb"
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/pwpb")

endif (CONFIG_ENABLE_PW_RPC)
7 changes: 0 additions & 7 deletions examples/ipv6only-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ idf_component_register(INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/../../common/pigweed/esp32"
PRIV_REQUIRES bt chip)

idf_component_get_property(chip_lib chip COMPONENT_LIB)

set(WRAP_FUNCTIONS esp_log_write)
target_link_libraries(${chip_lib} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")

set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})

get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)
get_filename_component(IPV6_EXAMPLE_ROOT ../.. REALPATH)
set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")
Expand Down
11 changes: 0 additions & 11 deletions examples/lock-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ idf_component_register(INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general_diagnostics_server"
PRIV_REQUIRES bt chip QRCode)

idf_component_get_property(chip_lib chip COMPONENT_LIB)

set(WRAP_FUNCTIONS esp_log_write)
target_link_libraries(${chip_lib} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")

get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)

set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")
Expand Down Expand Up @@ -112,12 +107,6 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
pw_rpc.server
)

set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})
target_include_directories(${chip_lib} PUBLIC
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc"
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb"
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/pwpb")

else (CONFIG_ENABLE_PW_RPC)
idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/"
Expand Down
11 changes: 0 additions & 11 deletions examples/pigweed-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ idf_component_register(INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/../../common/pigweed/esp32"
PRIV_REQUIRES bt chip)

idf_component_get_property(chip_lib chip COMPONENT_LIB)

get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)
set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")

Expand All @@ -46,12 +44,3 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
pw_rpc.nanopb.echo_service
pw_rpc.server
)

set(WRAP_FUNCTIONS esp_log_write)
target_link_libraries(${chip_lib} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")

set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})
target_include_directories(${chip_lib} PUBLIC
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc"
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb"
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/pwpb")