Skip to content

Commit

Permalink
Merge branch 'master' into fixes/python-export-dataversion
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng-yang authored Jun 8, 2023
2 parents 1b6081f + d4c7d47 commit 231d513
Show file tree
Hide file tree
Showing 428 changed files with 45,857 additions and 15,544 deletions.
3 changes: 3 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ DCONF
DCONFIG
debianutils
debugText
decrypt
decrypted
DEDEDEDE
deepnote
DefaultOTAProviders
Expand Down Expand Up @@ -1151,6 +1153,7 @@ RPC
RPCs
RPi
RPis
RSA
rsn
RSSI
RST
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build:0.7.3
image: connectedhomeip/chip-build:0.7.16
options: --user root

steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-esp32:0.7.3
image: connectedhomeip/chip-build-esp32:0.7.16
options: --user root

steps:
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-nrf-platform:0.7.3
image: connectedhomeip/chip-build-nrf-platform:0.7.16
options: --user root

steps:
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,6 @@ jobs:
linux debug bridge-app \
out/linux-x64-bridge/chip-bridge-app \
/tmp/bloat_reports/
- name: Build example Dynamic Bridge
timeout-minutes: 10
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-dynamic-bridge-ipv6only \
build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug dynamic-bridge-app-ipv6only \
out/linux-x64-dynamic-bridge-ipv6only/dynamic-chip-bridge-app \
/tmp/bloat_reports/
- name: Build example OTA Provider
timeout-minutes: 10
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-nrf-platform:0.7.3
image: connectedhomeip/chip-build-nrf-platform:0.7.16
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:
- name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK
timeout-minutes: 20
run: |
scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp
scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp -DCONF_FILE=prj_release.conf
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \
examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,3 @@ jobs:
run: |
git grep -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
- name: Check that our hardcoded SHA for clang-format on ARM mac matches the pigweed SHA.
if: always()
run: |
./scripts/lints/clang-format-version-matches.py
6 changes: 6 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-select-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/fan-control-cluster.xml \
Expand All @@ -154,6 +155,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-select-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml \
Expand All @@ -173,8 +175,11 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/proxy-valid-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-select-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml \
src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-select-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-select-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/scene.xml \
src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml \
Expand All @@ -189,6 +194,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \
Expand Down
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
deps += [
"${chip_root}/src/app/server/java",
"${chip_root}/src/controller/java",
"${chip_root}/src/controller/java:onboarding_payload",
"${chip_root}/src/platform/android:java",
"${chip_root}/src/setup_payload/java",
]
}

Expand Down
2 changes: 1 addition & 1 deletion build/chip/java/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ java_path = getenv("JAVA_PATH")
declare_args() {
java_matter_controller_dependent_paths = []
matter_enable_java_compilation = false
if (java_path != "" && current_os != "android") {
if (java_path != "" && current_os == "linux") {
java_matter_controller_dependent_paths += [ "${java_path}/include/" ]

if (current_os == "mac") {
Expand Down
12 changes: 12 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ chip_gn_arg_append("esp32_cxx" "\"${CMAKE_CXX_COMPILER}\"")
chip_gn_arg_append("esp32_cpu" "\"esp32\"")
chip_gn_arg_bool("is_debug" ${is_debug})

if (CONFIG_CHIP_CONFIG_IM_PRETTY_PRINT)
chip_gn_arg_bool("enable_im_pretty_print" "true")
endif()

# Config the chip log level by IDF menuconfig
if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 1)
chip_gn_arg_bool ("chip_error_logging" "true")
Expand Down Expand Up @@ -384,6 +388,11 @@ if((NOT CONFIG_USE_MINIMAL_MDNS) AND (CONFIG_ENABLE_WIFI_STATION OR CONFIG_ENABL
list(APPEND chip_libraries $<TARGET_FILE:${mdns_lib}>)
endif()

if (CONFIG_ENABLE_ENCRYPTED_OTA)
idf_component_get_property(esp_encrypted_img_lib espressif__esp_encrypted_img COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${esp_encrypted_img_lib}>)
endif()

idf_component_get_property(main_lib main COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${main_lib}>)

Expand All @@ -409,6 +418,9 @@ if (CONFIG_ESP32_WIFI_ENABLED)
foreach(blob ${blobs})
list(APPEND chip_libraries "${esp_wifi_dir}/lib/${target_name}/lib${blob}.a")
endforeach()

idf_component_get_property(wpa_supplicant_lib wpa_supplicant COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${wpa_supplicant_lib}>)
endif()

idf_component_get_property(esp_netif_lib esp_netif COMPONENT_LIB)
Expand Down
19 changes: 15 additions & 4 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,15 @@ menu "CHIP Core"
int "Set threshold in ms"
default 700
help
Time threshold for warning that dispatched took too long. You can
set this default set to 0 to to disable event dispatching time
measurement and suppress the logs "Long dispatch time:...".
Time threshold for warning that dispatched took too long. You can
set this default set to 0 to to disable event dispatching time
measurement and suppress the logs "Long dispatch time:...".

# TODO: add log level selection
config CHIP_LOG_FILTERING
bool "CHIP log level filtering APIs"
default n
help
Option to enable/disable CHIP log level filtering APIs.

endmenu # "General Options"

Expand Down Expand Up @@ -186,6 +190,13 @@ menu "CHIP Core"
help
Enable this option to enable OTA Requestor for example

config ENABLE_ENCRYPTED_OTA
bool "Enable pre encrypted OTA"
depends on ENABLE_OTA_REQUESTOR
default n
help
Enable this option to use the pre encrypted OTA image

config OTA_AUTO_REBOOT_ON_APPLY
bool "Reboot the device after applying the OTA image"
depends on ENABLE_OTA_REQUESTOR
Expand Down
5 changes: 5 additions & 0 deletions config/esp32/components/chip/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ dependencies:
version: "^2.3.0"
rules:
- if: "idf_version >=4.3"

espressif/esp_encrypted_img:
version: "2.0.3"
rules:
- if: "idf_version >=4.4"
2 changes: 1 addition & 1 deletion config/nrfconnect/.nrfconnect-recommended-revision
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.3.0
v2.4.0
2 changes: 1 addition & 1 deletion config/nrfconnect/app/flashing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ add_custom_command(OUTPUT "${FLASHBUNDLE_FLASHER_PLATFORM}"
VERBATIM)

if (merged_hex_to_flash)
set(flashbundle_hex_to_copy "${merged_hex_to_flash}")
set(flashbundle_hex_to_copy "zephyr/${merged_hex_to_flash}")
else()
set(flashbundle_hex_to_copy "zephyr/${KERNEL_HEX_NAME}")
endif()
Expand Down
15 changes: 7 additions & 8 deletions config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,16 @@ include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake)
include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake)

# Prepare compiler flags
matter_add_flags(-D_DEFAULT_SOURCE)

if (CHIP_CFLAGS)
matter_add_flags("${CHIP_CFLAGS}")
endif()

matter_add_flags(-D_POSIX_C_SOURCE=200809)

if (CONFIG_ARM)
matter_add_cflags(--specs=nosys.specs)
endif()

if (CONFIG_POSIX_API)
matter_add_flags(-D_SYS__PTHREADTYPES_H_)
matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix)
endif()

if (CONFIG_NORDIC_SECURITY_BACKEND)
zephyr_include_directories($<TARGET_PROPERTY:mbedtls_external,INTERFACE_INCLUDE_DIRECTORIES>)
zephyr_include_directories($<TARGET_PROPERTY:mbedcrypto_common,INTERFACE_INCLUDE_DIRECTORIES>)
Expand Down Expand Up @@ -197,8 +192,12 @@ matter_build(chip
DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER}
GN_DEPENDENCIES kernel
)

set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip)
target_compile_definitions(chip INTERFACE _DEFAULT_SOURCE)
# Enable visibility of POSIX.1-2008 functions, such as strnlen
target_compile_definitions(chip INTERFACE _POSIX_C_SOURCE=200809)
# Make sure that kernel symbols that are only referenced by the Matter libraries are resolved.
target_link_libraries(chip INTERFACE $<TARGET_FILE:kernel>)

if (CONFIG_CHIP_MALLOC_SYS_HEAP_OVERRIDE)
target_link_options(chip INTERFACE
Expand Down
31 changes: 30 additions & 1 deletion config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ rsource "../../zephyr/Kconfig"

if CHIP

config CHIP_NRF_PLATFORM
bool
default y
help
States that the configuration uses Matter nRF platform,
what can be used to conditionally deviate from Zephyr generic configuration
for nRF platform related purposes.

# See config/zephyr/Kconfig for full definition
config CHIP_DEVICE_VENDOR_NAME
default "Nordic Semiconductor ASA"
Expand Down Expand Up @@ -94,7 +102,7 @@ config CHIP_MALLOC_SYS_HEAP
config CHIP_FACTORY_DATA
bool "Factory data provider"
select ZCBOR
select FPROTECT
imply FPROTECT
help
Enables the default nRF Connect factory data provider implementation that
supports reading the factory data encoded in the CBOR format from the
Expand Down Expand Up @@ -127,6 +135,27 @@ config CHIP_FACTORY_DATA_VERSION
this value in the factory data provider implementation to verify that the
factory data saved in the flash memory has the expected version.

config CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN
int "Maximum length of rotating device ID unique ID in bytes"
default 16
depends on CHIP_FACTORY_DATA
help
Maximum acceptable length of rotating device ID unique ID in bytes.

config CHIP_FACTORY_DATA_WRITE_PROTECT
bool "Enable Factory Data write protection"
select FPROTECT
depends on CHIP_FACTORY_DATA
default y if CHIP_FACTORY_DATA
help
Enables the write protection of the Factory Data partition in the flash memory.
This is a recommended feature, but it requires the Settings partition size to be
a multiple of FPROTECT_BLOCK_SIZE and the Factory Data partition to be placed
right after the application partition in the address space (the Factory Data
partition offset must be equal to the last address of the application partition).
The second requirement is valid only when the FPROTECT_BLOCK_SIZE is bigger than
the flash memory page size.

if CHIP_FACTORY_DATA_BUILD

# Factory data definitions
Expand Down
26 changes: 18 additions & 8 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ config CHIP_APP_LOG_LEVEL
default 4 # debug

config LOG_DEFAULT_LEVEL
default 2 # warning
default 1 # error

config CHIP_LOG_SIZE_OPTIMIZATION
default y
Expand All @@ -50,6 +50,12 @@ config PRINTK_SYNC
config ASSERT
default y

config ASSERT_NO_COND_INFO
default y

config ASSERT_NO_MSG_INFO
default y

config HW_STACK_PROTECTION
default y

Expand All @@ -63,9 +69,9 @@ config PTHREAD_IPC
bool
default n

# Generic networking options
config NET_SOCKETS_POSIX_NAMES
default n
config POSIX_MAX_FDS
int
default 16

# Application stack size
config MAIN_STACK_SIZE
Expand Down Expand Up @@ -216,14 +222,18 @@ endif

if CHIP_WIFI

choice WPA_SUPP_LOG_LEVEL_CHOICE
default WPA_SUPP_LOG_LEVEL_ERR
endchoice

config NRF_WIFI_LOW_POWER
default n

config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
default n

config SYSTEM_WORKQUEUE_STACK_SIZE
default 2048
default 2560

# align these numbers to match the OpenThread config
config NET_IF_UNICAST_IPV6_ADDR_COUNT
Expand All @@ -232,9 +242,6 @@ config NET_IF_UNICAST_IPV6_ADDR_COUNT
config NET_IF_MCAST_IPV6_ADDR_COUNT
default 8

config NET_SOCKETS_POSIX_NAMES
default n

config NET_SOCKETS_POLL_MAX
default 4

Expand Down Expand Up @@ -436,6 +443,9 @@ endif # SOC_SERIES_NRF52X

if SOC_SERIES_NRF53X

config BOOT_IMAGE_ACCESS_HOOKS
default y

config UPDATEABLE_IMAGE_NUMBER
default 2

Expand Down
Loading

0 comments on commit 231d513

Please sign in to comment.