Skip to content

Commit

Permalink
Update Pigweed to 9264e686
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Oliver committed Nov 21, 2022
1 parent 669cd47 commit f3c209e
Show file tree
Hide file tree
Showing 104 changed files with 174 additions and 78 deletions.
3 changes: 0 additions & 3 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ default_args = {
pw_build_PIP_CONSTRAINTS = [ "//scripts/constraints.txt" ]
pw_build_PIP_REQUIREMENTS = [ "//scripts/requirements.txt" ]

# Use the new Python build and merged 'pigweed' Python package.
pw_build_USE_NEW_PYTHON_BUILD = true

# GN target to use for the default Python build venv.
pw_build_PYTHON_BUILD_VENV = "//:matter_build_venv"
}
6 changes: 3 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
"$dir_pw_watch/py",
]

# Matter's in-tree pw_python_package or pw_create_python_source_tree targets.
# Matter's in-tree pw_python_package or pw_python_distribution targets.
_matter_python_packages = [
"//integrations/mobly:chip_mobly",
"//examples/chef",
Expand All @@ -119,7 +119,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
source_packages = _matter_python_packages + _pigweed_python_packages
}

pw_internal_pip_install("pip_install_matter_packages") {
pw_python_pip_install("pip_install_matter_packages") {
packages = [ "//examples/common/pigweed/rpc_console:chip_rpc_distribution" ]
}

Expand All @@ -133,7 +133,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
}

# These pw_python_package targets will be installed using 'pip install --editable'
pw_internal_pip_install("pip_install_editable_matter_packages") {
pw_python_pip_install("pip_install_editable_matter_packages") {
packages = [
"//integrations/mobly:chip_mobly",
"//examples/chef",
Expand Down
11 changes: 7 additions & 4 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,8 @@ config("optimize_default") {
config("disabled_warnings") {
cflags = [
"-Wno-deprecated-declarations",
"-Wno-unknown-warning-option",
"-Wno-maybe-uninitialized",
"-Wno-missing-field-initializers",
"-Wno-unknown-warning-option",
"-Wno-unused-parameter",
]
if (!is_debug) {
Expand All @@ -205,8 +204,9 @@ config("disabled_warnings") {
}
if (!is_clang) {
cflags += [
"-Wno-psabi",
"-Wno-cast-function-type",
"-Wno-psabi",
"-Wno-maybe-uninitialized",
]
}
}
Expand Down Expand Up @@ -291,9 +291,12 @@ config("disabled_warnings_third_party") {
cflags = [
"-Wno-unused",
"-Wno-format",
"-Wno-maybe-uninitialized",
"-Wno-address",
]

if (!is_clang) {
cflags += [ "-Wno-maybe-uninitialized" ]
}
}

config("warnings_third_party") {
Expand Down
2 changes: 1 addition & 1 deletion build/config/mac/mac_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (current_os != "mac") {
target_sdk = current_os
}

deployment_target = "10.15"
deployment_target = "11.0"
if (current_os == "mac") {
if (current_cpu == "arm64") {
deployment_target = "11.0"
Expand Down
2 changes: 0 additions & 2 deletions config/ameba/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# options are used from examples/.

import("//build_overrides/pigweed.gni")
import("$dir_pw_span/polyfill.gni")

chip_device_platform = "ameba"

Expand All @@ -38,5 +37,4 @@ custom_toolchain = "//third_party/connectedhomeip/config/ameba/toolchain:ameba"

pw_build_PIP_CONSTRAINTS =
[ "//third_party/connectedhomeip/scripts/constraints.txt" ]
pw_span_ENABLE_STD_SPAN_POLYFILL = false
cpp_standard = "c++17"
1 change: 0 additions & 1 deletion config/bouffalolab/common/lib/pw_rpc/pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pw_log_BACKEND = "$dir_pw_log_basic"
pw_assert_BACKEND = "$dir_pw_assert_log"
pw_sys_io_BACKEND =
"${chip_root}/examples/platform/bouffalolab/common/rpc/pw_sys_io:pw_sys_io"
pw_span_ENABLE_STD_SPAN_POLYFILL = false

pw_string_CONFIG =
"${chip_root}/config/bouffalolab/common/lib/pw_rpc:pw_string_dep"
Expand Down
1 change: 0 additions & 1 deletion config/efr32/lib/pw_rpc/pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pw_log_BACKEND = "$dir_pw_log_basic"
pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_sys_io_BACKEND =
"${chip_root}/examples/platform/efr32/pw_sys_io:pw_sys_io_efr32"
pw_span_ENABLE_STD_SPAN_POLYFILL = false

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
Expand Down
5 changes: 5 additions & 0 deletions config/esp32/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@ default_args = {
target_cpu = "esp32"
target_os = "freertos"

pw_build_PIP_CONSTRAINTS =
[ "//third_party/connectedhomeip/scripts/constraints.txt" ]
pw_build_PIP_REQUIREMENTS =
[ "//third_party/connectedhomeip/scripts/requirements.txt" ]

import("//args.gni")
}
2 changes: 0 additions & 2 deletions config/esp32/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# Options from standalone-chip.mk that differ from configure defaults. These
# options are used from examples/.
import("//build_overrides/pigweed.gni")
import("$dir_pw_span/polyfill.gni")
chip_device_platform = "esp32"

chip_project_config_include = ""
Expand All @@ -39,4 +38,3 @@ custom_toolchain = "//third_party/connectedhomeip/config/esp32/toolchain:esp32"
# whatever pigweed ships with
pw_build_PIP_CONSTRAINTS =
[ "//third_party/connectedhomeip/scripts/constraints.txt" ]
pw_span_ENABLE_STD_SPAN_POLYFILL = false
3 changes: 3 additions & 0 deletions config/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ target_include_directories(${APP_TARGET} PRIVATE
${PIGWEED_ROOT}/pw_log_basic/public_overrides
${PIGWEED_ROOT}/pw_span/public_overrides
${PIGWEED_ROOT}/pw_span/public
${PIGWEED_ROOT}/pw_string/public
${PIGWEED_ROOT}/pw_sync/public
${PIGWEED_ROOT}/pw_polyfill/public
${PIGWEED_ROOT}/pw_polyfill/standard_library_public
Expand All @@ -410,6 +411,8 @@ target_include_directories(${APP_TARGET} PRIVATE
${PIGWEED_ROOT}/pw_function/public
${PIGWEED_ROOT}/pw_preprocessor/public
${PIGWEED_ROOT}/pw_rpc/system_server/public
${PIGWEED_ROOT}/third_party/fuchsia/repo/sdk/lib/fit/include
${PIGWEED_ROOT}/third_party/fuchsia/repo/sdk/lib/stdcompat/include
${CHIP_ROOT}/third_party/nanopb/repo

${CHIP_ROOT}/examples/common
Expand Down
1 change: 0 additions & 1 deletion config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pw_sys_io_BACKEND =
"${chip_root}/examples/platform/mbed/pw_sys_io:pw_sys_io_mbed"
pw_rpc_system_server_BACKEND =
"${chip_root}/examples/common/pigweed:system_rpc_server"
pw_span_ENABLE_STD_SPAN_POLYFILL = false

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
Expand Down
1 change: 0 additions & 1 deletion config/qpg/lib/pw_rpc/pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import("//build_overrides/pigweed.gni")
pw_log_BACKEND = "$dir_pw_log_basic"
pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_sys_io_BACKEND = "${chip_root}/examples/platform/qpg/pw_sys_io:pw_sys_io_qpg"
pw_span_ENABLE_STD_SPAN_POLYFILL = false

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
Expand Down
1 change: 1 addition & 0 deletions config/standalone/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ import("//build_overrides/chip.gni")
chip_build_tests = false

pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/constraints.txt" ]
pw_build_PIP_REQUIREMENTS = [ "${chip_root}/scripts/requirements.txt" ]
1 change: 1 addition & 0 deletions examples/all-clusters-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ target_link_libraries(${chip_main} PUBLIC
pw_hdlc
pw_log
pw_rpc.server
pw_sys_io
pw_trace_tokenized
pw_trace_tokenized.trace_buffer
pw_trace_tokenized.rpc_service
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/cc13x2x7_26x2x7/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import("//build_overrides/chip.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/examples/platform/cc13x2_26x2/args.gni")

ti_simplelink_sdk_target = get_label_info(":sdk", "label_no_toolchain")
Expand Down
4 changes: 0 additions & 4 deletions examples/all-clusters-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,4 @@ add_subdirectory(third_party/connectedhomeip/third_party/pigweed/repo)
add_subdirectory(third_party/connectedhomeip/third_party/nanopb/repo)
add_subdirectory(third_party/connectedhomeip/examples/platform/esp32/pw_sys_io)

get_target_property(_target_cxx_flags pw_build.cpp17 INTERFACE_COMPILE_OPTIONS)
list(REMOVE_ITEM _target_cxx_flags $<$<COMPILE_LANGUAGE:CXX>:-std=c++17>)
list(APPEND _target_cxx_flags $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>)
set_target_properties(pw_build.cpp17 PROPERTIES INTERFACE_COMPILE_OPTIONS "${_target_cxx_flags}")
endif(CONFIG_ENABLE_PW_RPC)
1 change: 1 addition & 0 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
pw_hdlc
pw_log
pw_rpc.server
pw_sys_io
pw_trace_tokenized
pw_trace_tokenized.trace_buffer
pw_trace_tokenized.rpc_service
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/infineon/psoc6/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/src/platform/Infineon/PSOC6/args.gni")

psoc6_target_project =
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/nxp/mw320/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import("//build_overrides/chip.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/examples/platform/nxp/mw320/args.gni")

mw320_sdk_target = get_label_info(":sdk", "label_no_toolchain")
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/tizen/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ check_system_includes = true

default_args = {
target_os = "tizen"

import("//args.gni")
}
1 change: 0 additions & 1 deletion examples/all-clusters-minimal-app/cc13x2x7_26x2x7/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ check_system_includes = true
default_args = {
target_cpu = "arm"
target_os = "freertos"

import("//args.gni")
}
1 change: 1 addition & 0 deletions examples/all-clusters-minimal-app/cc13x2x7_26x2x7/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import("//build_overrides/chip.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/examples/platform/cc13x2_26x2/args.gni")

ti_simplelink_sdk_target = get_label_info(":sdk", "label_no_toolchain")
Expand Down
4 changes: 0 additions & 4 deletions examples/all-clusters-minimal-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,4 @@ add_subdirectory(third_party/connectedhomeip/third_party/pigweed/repo)
add_subdirectory(third_party/connectedhomeip/third_party/nanopb/repo)
add_subdirectory(third_party/connectedhomeip/examples/platform/esp32/pw_sys_io)

get_target_property(_target_cxx_flags pw_build.cpp17 INTERFACE_COMPILE_OPTIONS)
list(REMOVE_ITEM _target_cxx_flags $<$<COMPILE_LANGUAGE:CXX>:-std=c++17>)
list(APPEND _target_cxx_flags $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>)
set_target_properties(pw_build.cpp17 PROPERTIES INTERFACE_COMPILE_OPTIONS "${_target_cxx_flags}")
endif(CONFIG_ENABLE_PW_RPC)
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
pw_hdlc
pw_log
pw_rpc.server
pw_sys_io
pw_trace_tokenized
pw_trace_tokenized.trace_buffer
pw_trace_tokenized.rpc_service
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-minimal-app/infineon/psoc6/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/src/platform/Infineon/PSOC6/args.gni")

psoc6_target_project =
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-minimal-app/tizen/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ check_system_includes = true

default_args = {
target_os = "tizen"

import("//args.gni")
}
13 changes: 7 additions & 6 deletions examples/build_overrides/pigweed_environment.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ _bootstrap_root = "//third_party/connectedhomeip"
import("${_bootstrap_root}/build_overrides/pigweed_environment.gni")

# Rebase paths to our root.
dir_cipd_arm = get_path_info("${_bootstrap_root}/${dir_cipd_arm}", "abspath")
dir_cipd_pigweed =
get_path_info("${_bootstrap_root}/${dir_cipd_pigweed}", "abspath")
dir_cipd_python =
get_path_info("${_bootstrap_root}/${dir_cipd_python}", "abspath")
dir_virtual_env =
pw_env_setup_CIPD_ARM =
get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_ARM}", "abspath")
pw_env_setup_CIPD_PIGWEED =
get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_PIGWEED}", "abspath")
pw_env_setup_CIPD_PYTHON =
get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_PYTHON}", "abspath")
pw_env_setup_VIRTUAL_ENV =
get_path_info("${_bootstrap_root}/${pw_env_setup_VIRTUAL_ENV}", "abspath")
1 change: 1 addition & 0 deletions examples/chef/efr32/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ default_args = {
target_cpu = "arm"
target_os = "freertos"
chip_openthread_ftd = true

import("//args.gni")
}
1 change: 1 addition & 0 deletions examples/chef/efr32/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/src/platform/EFR32/args.gni")

efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
Expand Down
4 changes: 0 additions & 4 deletions examples/chef/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,4 @@ add_subdirectory(third_party/connectedhomeip/third_party/pigweed/repo)
add_subdirectory(third_party/connectedhomeip/third_party/nanopb/repo)
add_subdirectory(third_party/connectedhomeip/examples/platform/esp32/pw_sys_io)

get_target_property(_target_cxx_flags pw_build.cpp17 INTERFACE_COMPILE_OPTIONS)
list(REMOVE_ITEM _target_cxx_flags $<$<COMPILE_LANGUAGE:CXX>:-std=c++17>)
list(APPEND _target_cxx_flags $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>)
set_target_properties(pw_build.cpp17 PROPERTIES INTERFACE_COMPILE_OPTIONS "${_target_cxx_flags}")
endif(CONFIG_ENABLE_PW_RPC)
1 change: 1 addition & 0 deletions examples/chef/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
pw_hdlc
pw_log
pw_rpc.server
pw_sys_io
pw_trace_tokenized
pw_trace_tokenized.trace_buffer
pw_trace_tokenized.rpc_service
Expand Down
7 changes: 6 additions & 1 deletion examples/chef/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("${build_root}/config/compiler/compiler.gni")
import("${chip_root}/build/chip/tools.gni")
import("${chip_root}/src/app/chip_data_model.gni")
import("${chip_root}/src/app/common_flags.gni")
Expand Down Expand Up @@ -92,7 +94,10 @@ executable("${sample_name}") {

deps += pw_build_LINK_DEPS

cflags = [ "-Wno-gnu-designator" ]
cflags = []
if (is_clang) {
cflags += [ "-Wno-gnu-designator" ]
}

include_dirs += [ "${chip_root}/examples/common" ]
} else {
Expand Down
1 change: 0 additions & 1 deletion examples/chef/linux/with_pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc"
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
pw_span_ENABLE_STD_SPAN_POLYFILL = false

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
Expand Down
13 changes: 2 additions & 11 deletions examples/chef/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ pw_set_backend(pw_log pw_log_basic)
pw_set_backend(pw_assert.check pw_assert_log.check_backend)
pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend)
pw_set_backend(pw_sys_io pw_sys_io.nrfconnect)
pw_set_backend(pw_trace pw_trace_tokenized)
set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE)

add_subdirectory(third_party/connectedhomeip/examples/platform/nrfconnect/pw_sys_io)
Expand Down Expand Up @@ -209,7 +208,6 @@ target_compile_options(app PRIVATE
"-DPW_RPC_DESCRIPTOR_SERVICE=1"
"-DPW_RPC_DEVICE_SERVICE=1"
"-DPW_RPC_THREAD_SERVICE=1"
"-DPW_RPC_TRACING_SERVICE=1"
)

target_link_libraries(app PRIVATE
Expand All @@ -219,17 +217,10 @@ target_link_libraries(app PRIVATE
thread_service.nanopb_rpc
pw_checksum
pw_hdlc
pw_hdlc.pw_rpc
pw_log
pw_rpc.server
pw_trace_tokenized
pw_trace_tokenized.trace_buffer
pw_trace_tokenized.rpc_service
pw_trace_tokenized.protos.nanopb_rpc
)

target_link_options(app
PUBLIC
"-T${PIGWEED_ROOT}/pw_tokenizer/pw_tokenizer_linker_sections.ld"
pw_sys_io
)

endif(CONFIG_ENABLE_PW_RPC)
Loading

0 comments on commit f3c209e

Please sign in to comment.