Skip to content

Commit

Permalink
Merge branch 'master' into glib-matter-context
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Apr 24, 2023
2 parents 2b3664c + de0dfcf commit a84d073
Show file tree
Hide file tree
Showing 400 changed files with 14,818 additions and 12,409 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ jobs:
"./scripts/build/build_examples.py \
--target cyw30739-cyw930739m2evb_01-light \
--target cyw30739-cyw930739m2evb_01-lock \
--target cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging \
--target cyw30739-cyw930739m2evb_01-ota-requestor \
--target cyw30739-cyw930739m2evb_01-switch \
build \
--copy-artifacts-to out/artifacts \
"
Expand All @@ -163,8 +164,15 @@ jobs:
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 cyw930739m2evb_01 ota-requestor-no-progress-logging \
out/artifacts/cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging/chip-cyw30739-ota-requestor-example.elf \
cyw30739 cyw930739m2evb_01 ota-requestor \
out/artifacts/cyw30739-cyw930739m2evb_01-ota-requestor/chip-cyw30739-ota-requestor-example.elf \
/tmp/bloat_reports/
- name: Get switch size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 cyw930739m2evb_01 switch \
out/artifacts/cyw30739-cyw930739m2evb_01-switch/chip-cyw30739-light-switch-example.elf \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v3
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,17 @@ 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
2 changes: 1 addition & 1 deletion .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target tizen-arm-tests-no-ble \
--target tizen-arm-tests-no-ble-no-thread \
build
"
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,6 @@
"files.trimFinalNewlines": true,
"C_Cpp.default.cppStandard": "gnu++14",
"C_Cpp.default.cStandard": "gnu11",
"cmake.configureOnOpen": false
"cmake.configureOnOpen": false,
"search.followSymlinks": false
}
5 changes: 3 additions & 2 deletions build/chip/fuzz_test.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("${build_root}/config/compiler/compiler.gni")
import("${chip_root}/build/chip/tests.gni")

declare_args() {
enable_fuzz_test_targets =
is_clang && (current_os == "linux" || current_os == "mac")
enable_fuzz_test_targets = is_clang && chip_build_tests &&
(current_os == "linux" || current_os == "mac")
}

# Define a fuzz target for chip.
Expand Down
23 changes: 23 additions & 0 deletions config/nrfconnect/chip-module/Kconfig.features
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,27 @@ config CHIP_WIFI_CONNECTION_RECOVERY_JITTER
a random jitter interval is added to it to avoid periodicity. The random jitter is selected
within range [-JITTER; +JITTER].

config CHIP_ICD_SUBSCRIPTION_HANDLING
bool "Enables platform specific handling of ICD subscriptions"
help
Enables platform specific implementation that handles ICD subscription requests
and selects subscription report interval value considering maximum interval preferred
by the publisher.

if CHIP_ICD_SUBSCRIPTION_HANDLING

config CHIP_MAX_PREFERRED_SUBSCRIPTION_REPORT_INTERVAL
int "Maximum preferred interval of sending subscription reports (s)"
default 60
help
Provides maximum preferred interval to be used by a publisher for negotiation
of the final maximum subscription report interval, after receiving a subscription
request from the initiator. This value should be selected as a compromise between
keeping the power consumption low due to not sending reports too often, and allowing
the initiator device to detect the publisher absence reasonably fast due to not sending
the reports too rarely. The current algorithm is to select bigger value from the one
requested by the initiator and the one preferred by the publisher.

endif # CHIP_ICD_SUBSCRIPTION_HANDLING

endif # CHIP
16 changes: 16 additions & 0 deletions config/openiotsdk/cmake/sdk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ FetchContent_Declare(
GIT_PROGRESS ON
)

# Apply a patch to TF-M to support GCC 12
FetchContent_Declare(
trusted-firmware-m
GIT_REPOSITORY https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
GIT_TAG d0c0a67f1b412e89d09b0987091c12998c4e4660
GIT_SHALLOW OFF
GIT_PROGRESS ON
# Note: This prevents FetchContent_MakeAvailable() from calling
# add_subdirectory() on the fetched repository. TF-M needs a
# standalone build because it relies on functions defined in its
# own toolchain files and contains paths that reference the
# top-level project instead of its own project.
SOURCE_SUBDIR NONE
PATCH_COMMAND git reset --hard --quiet && git clean --force -dx --quiet && git apply ${CMAKE_CURRENT_LIST_DIR}/tf-m.patch
)

# Open IoT SDK configuration
set(IOTSDK_FETCH_LIST
mcu-driver-reference-platforms-for-arm
Expand Down
12 changes: 12 additions & 0 deletions config/openiotsdk/cmake/tf-m.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/toolchain_GNUARM.cmake b/toolchain_GNUARM.cmake
index d044ed4a5..3d8f64d17 100644
--- a/toolchain_GNUARM.cmake
+++ b/toolchain_GNUARM.cmake
@@ -71,7 +71,6 @@ macro(tfm_toolchain_reset_linker_flags)
--entry=Reset_Handler
--specs=nano.specs
LINKER:-check-sections
- LINKER:-fatal-warnings
LINKER:--gc-sections
LINKER:--no-wchar-size-warning
${MEMORY_USAGE_FLAG}
8 changes: 3 additions & 5 deletions config/telink/app/zephyr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ CONFIG_SERIAL=y
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_PRINTK=y
CONFIG_ASSERT=y
# CONFIG_ASSERT=y
CONFIG_CBPRINTF_LIBC_SUBSTS=y

# Set the maximum log level (DEBUG)
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_MATTER_LOG_LEVEL_DBG=y
CONFIG_MCUBOOT_BOOTUTIL_LIB=y
CONFIG_MCUBOOT_UTIL_LOG_LEVEL_DBG=y
CONFIG_NET_LOG=y
CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y
CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_OPENTHREAD_LOG_LEVEL_DEBG=y
Expand Down Expand Up @@ -125,10 +127,6 @@ CONFIG_TELINK_B91_REBOOT_ON_FAULT=y

# Shell settings
CONFIG_SHELL=n
CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=255

# Legacy
CONFIG_LEGACY_INCLUDE_PATH=y

# BLE MAC address
CONFIG_B91_BLE_CTRL_MAC_FLASH_ADDR=0x1FE000
10 changes: 7 additions & 3 deletions config/telink/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,20 @@ config CHIP_LOG_SIZE_OPTIMIZATION

config CHIP_BUTTON_MANAGER_IRQ_MODE
bool "Use GPIO in an IRQ mode instead of polling the GPIO"
default n
default PM
help
Use GPIO in an IRQ mode to avoid button polling loop and extend the battery lifetime by waking up by GPIO event.
GPIO events are working only with GPIO IRQ. This option changes button matrix configuration.

config CHIP_ENABLE_APPLICATION_STATUS_LED
bool "Enable application status LED"
default y
default !(PM)
help
Enable application status LED.

config CHIP_ENABLE_PM_DURING_BLE
bool "Enable PM during BLE operation"
default y
default PM
help
Enable PM during BLE operation.

Expand All @@ -175,3 +175,7 @@ config CHIP_OPENTHREAD_TX_POWER
default 0
help
OpenThread Transmission power in dBm.

config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE
int
default 255 if SHELL_BACKEND_SERIAL
16 changes: 16 additions & 0 deletions docs/guides/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,26 @@ sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \
python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
```

#### UI builds

If building `-with-ui` variant, also install SDL2:

```
sudo apt-get install libsdl2-dev
```

### Installing prerequisites on macOS

On macOS, install Xcode from the Mac App Store.

#### UI builds

If building `-with-ui` variant, also install SDL2:

```
brew install sdl2
```

### Installing prerequisites on Raspberry Pi 4

Complete the following steps:
Expand Down
5 changes: 4 additions & 1 deletion docs/guides/esp32/build_app_and_commission.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ $ out/debug/chip-tool pairing onnetwork 12345 20202021

Note: In order to commission an ethernet device, from all-clusters-app enable
these config options: select `ESP32-Ethernet-Kit` under `Demo->Device Type` and
select `On-Network` rendezvous mode under `Demo->Rendezvous Mode`
select `On-Network` rendezvous mode under `Demo->Rendezvous Mode`. Currently
default ethernet board supported is IP101, if you want to use other types of
ethernet board then override the current implementation under
`ConnectivityManagerImpl::InitEthernet`

#### Commissioning Parameters

Expand Down
3 changes: 3 additions & 0 deletions docs/guides/esp32/factory_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Following data can be added to the manufacturing partition using
- Fixed Labels
- Supported locales
- Supported calendar types
- Supported modes
- Note: As per spec at max size of label should be 64 and `\0` will be
added at the end.

### Configuration Options

Expand Down
16 changes: 8 additions & 8 deletions docs/guides/esp32/setup_idf_chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ step.

### Install Prerequisites

- [Linux](https://docs.espressif.com/projects/esp-idf/en/v4.4.3/esp32/get-started/linux-setup.html)
- [macOS](https://docs.espressif.com/projects/esp-idf/en/v4.4.3/esp32/get-started/macos-setup.html)
- [Linux](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/get-started/linux-setup.html)
- [macOS](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/get-started/macos-setup.html)

### Get IDF v4.4.3
### Get IDF v4.4.4

- Clone ESP-IDF
[v4.4.3 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.3)
[v4.4.4 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.4)

```
$ git clone -b v4.4.3 --recursive https://github.com/espressif/esp-idf.git
$ git clone -b v4.4.4 --recursive https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ ./install.sh
```

- To update an existing esp-idf toolchain to v4.4.3:
- To update an existing esp-idf toolchain to v4.4.4:

```
$ cd path/to/esp-idf
$ git fetch origin
$ git checkout v4.4.3
$ git reset --hard origin/v4.4.3
$ git checkout v4.4.4
$ git reset --hard origin/v4.4.4
$ git submodule update --recursive --init
$ git clean -fdx
$ ./install.sh
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 @@ -32,6 +32,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/mode-support"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
Expand Down Expand Up @@ -91,6 +92,9 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src"
)


set(EXCLUDE_SRCS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp")

if (CONFIG_ENABLE_PW_RPC)
# Append additional directories for RPC build
set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}"
Expand Down Expand Up @@ -119,7 +123,7 @@ endif()

idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST}
SRC_DIRS ${SRC_DIRS_LIST}
EXCLUDE_SRCS ${EXCLUDE_SRCS_LIST}
EXCLUDE_SRCS ${EXCLUDE_SRCS}
PRIV_REQUIRES ${PRIV_REQUIRES_LIST})

get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
Expand Down
4 changes: 3 additions & 1 deletion examples/all-clusters-app/telink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ target_include_directories(app PRIVATE
${ALL_CLUSTERS_COMMON_DIR}/include
${GEN_DIR}/app-common
${GEN_DIR}/all-clusters-app
${TELINK_COMMON}/common/include
${TELINK_COMMON}/util/include)

add_definitions(
Expand All @@ -69,11 +70,12 @@ add_definitions(

target_sources(app PRIVATE
src/AppTask.cpp
src/main.cpp
src/ZclDoorLockCallbacks.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp
${TELINK_COMMON}/common/src/mainCommon.cpp
${TELINK_COMMON}/common/src/AppTaskCommon.cpp
${TELINK_COMMON}/util/src/LEDWidget.cpp
${TELINK_COMMON}/util/src/ButtonManager.cpp
${TELINK_COMMON}/util/src/ThreadUtil.cpp
Expand Down
18 changes: 6 additions & 12 deletions examples/all-clusters-app/telink/include/AppConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,10 @@
#pragma once

// ---- All Clusters Application example config ----
#define APP_USE_EXAMPLE_START_BUTTON 0
#define APP_USE_THREAD_START_BUTTON 1
#define APP_SET_DEVICE_INFO_PROVIDER 1
#define APP_SET_NETWORK_COMM_ENDPOINT_SEC 1
#define APP_USE_IDENTIFY_PWM 1 // APP_USE_IDENTIFY_PWM must be defined before including "AppConfigCommon.h"

// Buttons config
#define BUTTON_PORT DEVICE_DT_GET(DT_NODELABEL(gpioc))

#define BUTTON_PIN_1 2
#define BUTTON_PIN_3 3
#define BUTTON_PIN_4 1
#define BUTTON_PIN_2 0

// LEDs config
#define LEDS_PORT DEVICE_DT_GET(DT_NODELABEL(gpiob))
#define SYSTEM_STATE_LED 7
#define LIGHTING_PWM_SPEC_IDENTIFY_GREEN PWM_DT_SPEC_GET(DT_ALIAS(pwm_led3))
#include "AppConfigCommon.h"
Loading

0 comments on commit a84d073

Please sign in to comment.