Skip to content

Commit 1641036

Browse files
chshupull[bot]
authored andcommitted
[esp32] Fix build failure with PW_RPC after update to IDF-v4.4 (#11825)
1 parent fda47a2 commit 1641036

File tree

5 files changed

+5
-40
lines changed

5 files changed

+5
-40
lines changed

config/esp32/components/chip/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,8 @@ target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group
234234

235235
# Make the component dependent on our CHIP build
236236
add_dependencies(${COMPONENT_LIB} chip_gn)
237+
238+
if(CONFIG_ENABLE_PW_RPC)
239+
set(WRAP_FUNCTIONS esp_log_write)
240+
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")
241+
endif()

examples/all-clusters-app/esp32/main/CMakeLists.txt

-11
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,6 @@ target_compile_options(${COMPONENT_LIB} PRIVATE "-DLWIP_IPV6_SCOPES=0" "-DCHIP_H
119119

120120
if (CONFIG_ENABLE_PW_RPC)
121121

122-
idf_component_get_property(chip_lib chip COMPONENT_LIB)
123-
124-
set(WRAP_FUNCTIONS esp_log_write)
125-
target_link_libraries(${chip_lib} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")
126-
127122
get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)
128123

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

228-
set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})
229-
target_include_directories(${chip_lib} PUBLIC
230-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc"
231-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb"
232-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/pwpb")
233-
234223
endif (CONFIG_ENABLE_PW_RPC)

examples/ipv6only-app/esp32/main/CMakeLists.txt

-7
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ idf_component_register(INCLUDE_DIRS
3131
"${CMAKE_SOURCE_DIR}/../../common/pigweed/esp32"
3232
PRIV_REQUIRES bt chip)
3333

34-
idf_component_get_property(chip_lib chip COMPONENT_LIB)
35-
36-
set(WRAP_FUNCTIONS esp_log_write)
37-
target_link_libraries(${chip_lib} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")
38-
39-
set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})
40-
4134
get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)
4235
get_filename_component(IPV6_EXAMPLE_ROOT ../.. REALPATH)
4336
set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")

examples/lock-app/esp32/main/CMakeLists.txt

-11
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ idf_component_register(INCLUDE_DIRS
5555
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general_diagnostics_server"
5656
PRIV_REQUIRES bt chip QRCode)
5757

58-
idf_component_get_property(chip_lib chip COMPONENT_LIB)
59-
60-
set(WRAP_FUNCTIONS esp_log_write)
61-
target_link_libraries(${chip_lib} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")
62-
6358
get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)
6459

6560
set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")
@@ -112,12 +107,6 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
112107
pw_rpc.server
113108
)
114109

115-
set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})
116-
target_include_directories(${chip_lib} PUBLIC
117-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc"
118-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb"
119-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/pwpb")
120-
121110
else (CONFIG_ENABLE_PW_RPC)
122111
idf_component_register(PRIV_INCLUDE_DIRS
123112
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/"

examples/pigweed-app/esp32/main/CMakeLists.txt

-11
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ idf_component_register(INCLUDE_DIRS
3030
"${CMAKE_SOURCE_DIR}/../../common/pigweed/esp32"
3131
PRIV_REQUIRES bt chip)
3232

33-
idf_component_get_property(chip_lib chip COMPONENT_LIB)
34-
3533
get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)
3634
set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo")
3735

@@ -46,12 +44,3 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
4644
pw_rpc.nanopb.echo_service
4745
pw_rpc.server
4846
)
49-
50-
set(WRAP_FUNCTIONS esp_log_write)
51-
target_link_libraries(${chip_lib} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}")
52-
53-
set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})
54-
target_include_directories(${chip_lib} PUBLIC
55-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc"
56-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb"
57-
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/pwpb")

0 commit comments

Comments
 (0)