Skip to content

Commit

Permalink
Merge branch 'master' into DFT_asan_tsan_proper_supports
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored Apr 14, 2023
2 parents 89d82e3 + c5216d1 commit 0d34d96
Show file tree
Hide file tree
Showing 142 changed files with 7,511 additions and 1,877 deletions.
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
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
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: 2 additions & 2 deletions examples/chef/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <matter_config.h>
#ifdef EFR32_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
#include <examples/platform/efr32/EFR32DeviceAttestationCreds.h>
#else
#include <credentials/examples/DeviceAttestationCredsExample.h>
Expand Down Expand Up @@ -58,7 +58,7 @@ int main(void)

chip::DeviceLayer::PlatformMgr().LockChipStack();
// Initialize device attestation config
#ifdef EFR32_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
SetDeviceAttestationCredentialsProvider(EFR32::GetEFR32DacProvider());
#else
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/silabs/SiWx917/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction)
button_event.Handler = SwitchActionEventHandler;
sAppTask.PostEvent(&button_event);
}
else if (button == SIWx917_BTN0)
else if (button == SIWx917_BTN0 && btnAction == SL_SIMPLE_BUTTON_PRESSED)
{
button_event.Handler = BaseApplication::ButtonHandler;
sAppTask.PostEvent(&button_event);
Expand Down
4 changes: 2 additions & 2 deletions examples/light-switch-app/silabs/SiWx917/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <matter_config.h>
#ifdef SI917_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
#include <examples/platform/silabs/SilabsDeviceAttestationCreds.h>
#else
#include <credentials/examples/DeviceAttestationCredsExample.h>
Expand Down Expand Up @@ -61,7 +61,7 @@ int main(void)

chip::DeviceLayer::PlatformMgr().LockChipStack();
// Initialize device attestation config
#ifdef SI917_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
SetDeviceAttestationCredentialsProvider(SIWx917::GetSIWx917DacProvider());
#else
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
Expand Down
4 changes: 2 additions & 2 deletions examples/light-switch-app/silabs/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <matter_config.h>
#ifdef EFR32_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
#include <examples/platform/silabs/SilabsDeviceAttestationCreds.h>
#else
#include <credentials/examples/DeviceAttestationCredsExample.h>
Expand Down Expand Up @@ -58,7 +58,7 @@ int main(void)

chip::DeviceLayer::PlatformMgr().LockChipStack();
// Initialize device attestation config
#ifdef EFR32_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
SetDeviceAttestationCredentialsProvider(Silabs::GetSilabsDacProvider());
#else
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
Expand Down
8 changes: 6 additions & 2 deletions examples/lighting-app/bouffalolab/bl602/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ declare_args() {
chip_print_memory_usage = true

# OTA periodic query timeout in seconds
ota_periodic_query_timeout = 86400
ota_periodic_query_timeout_seconds = 86400

# reboot delay in seconds to apply new OTA image
ota_auto_reboot_delay_seconds = 5

enable_heap_monitoring = false

Expand All @@ -66,7 +69,8 @@ bl_iot_sdk("sdk") {
"INCLUDE_xSemaphoreGetMutexHolder=1",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
"OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout}",
"OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout_seconds}",
"OTA_AUTO_REBOOT_DELAY=${ota_auto_reboot_delay_seconds}",
"CHIP_UART_BAUDRATE=${baudrate}",
"SYS_AOS_LOOP_ENABLE",
]
Expand Down
7 changes: 6 additions & 1 deletion examples/lighting-app/bouffalolab/bl602/with_pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ chip_enable_pw_rpc = true
chip_build_pw_trace_lib = false

cpp_standard = "gnu++17"
#pw_trace_BACKEND = "$dir_pw_trace_tokenized"

# pigweed updated to a1bd248 makes compile conversion errors;
# it seems riscv gcc (version > 10) can fixes this issue.
# let's disable strict warnings for RPC enabled for now.
remove_default_configs = [ "$dir_pw_build:strict_warnings" ]
treat_warnings_as_errors = false
8 changes: 6 additions & 2 deletions examples/lighting-app/bouffalolab/bl702/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ declare_args() {
chip_print_memory_usage = true

# OTA periodic query timeout in seconds
ota_periodic_query_timeout = 86400
ota_periodic_query_timeout_seconds = 86400

# reboot delay in seconds to apply new OTA image
ota_auto_reboot_delay_seconds = 5

config_cache_size = 8192

Expand Down Expand Up @@ -69,7 +72,8 @@ bl_iot_sdk("sdk") {
"INCLUDE_xSemaphoreGetMutexHolder=1",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
"OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout}",
"OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout_seconds}",
"OTA_AUTO_REBOOT_DELAY=${ota_auto_reboot_delay_seconds}",
"OPENTHREAD_CONFIG_PLATFORM_XTAL_ACCURACY=40",
"PRINT_DEBUG=0",
]
Expand Down
7 changes: 6 additions & 1 deletion examples/lighting-app/bouffalolab/bl702/with_pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ chip_enable_pw_rpc = true
chip_build_pw_trace_lib = false

cpp_standard = "gnu++17"
#pw_trace_BACKEND = "$dir_pw_trace_tokenized"

# pigweed updated to a1bd248 makes compile conversion errors;
# it seems riscv gcc (version > 10) can fixes this issue.
# let's disable strict warnings for RPC enabled for now.
remove_default_configs = [ "$dir_pw_build:strict_warnings" ]
treat_warnings_as_errors = false
4 changes: 4 additions & 0 deletions examples/lighting-app/qpg/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ CHIP_ERROR AppTask::Init()
ConfigurationMgr().LogDeviceConfig();
PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE));

sIsThreadProvisioned = ConnectivityMgr().IsThreadProvisioned();
sIsThreadEnabled = ConnectivityMgr().IsThreadEnabled();
sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0);
sIsBLEAdvertisingEnabled = ConnectivityMgr().IsBLEAdvertisingEnabled();
UpdateLEDs();

return err;
Expand Down
12 changes: 6 additions & 6 deletions examples/lighting-app/qpg/zap/light.matter
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ server cluster OnOff = 6 {
kLighting = 0x1;
}

readonly nosubscribe attribute boolean onOff = 0;
readonly attribute boolean onOff = 0;
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
Expand Down Expand Up @@ -1452,12 +1452,12 @@ server cluster ColorControl = 768 {
kUpdateStartHue = 0x8;
}

readonly nosubscribe attribute int8u currentHue = 0;
readonly nosubscribe attribute int8u currentSaturation = 1;
readonly attribute int8u currentHue = 0;
readonly attribute int8u currentSaturation = 1;
readonly attribute int16u remainingTime = 2;
readonly nosubscribe attribute int16u currentX = 3;
readonly nosubscribe attribute int16u currentY = 4;
readonly nosubscribe attribute int16u colorTemperatureMireds = 7;
readonly attribute int16u currentX = 3;
readonly attribute int16u currentY = 4;
readonly attribute int16u colorTemperatureMireds = 7;
readonly attribute enum8 colorMode = 8;
attribute bitmap8 options = 15;
readonly attribute nullable int8u numberOfPrimaries = 16;
Expand Down
12 changes: 6 additions & 6 deletions examples/lighting-app/qpg/zap/light.zap
Original file line number Diff line number Diff line change
Expand Up @@ -7328,7 +7328,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
Expand Down Expand Up @@ -9224,7 +9224,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
Expand All @@ -9240,7 +9240,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
Expand Down Expand Up @@ -9272,7 +9272,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0x616B",
"reportable": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
Expand All @@ -9288,7 +9288,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0x607D",
"reportable": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
Expand Down Expand Up @@ -9336,7 +9336,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00FA",
"reportable": 0,
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/silabs/SiWx917/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction)
button_event.Handler = LightActionEventHandler;
sAppTask.PostEvent(&button_event);
}
else if (button == SIWx917_BTN0)
else if (button == SIWx917_BTN0 && btnAction == SL_SIMPLE_BUTTON_PRESSED)
{
button_event.Handler = BaseApplication::ButtonHandler;
sAppTask.PostEvent(&button_event);
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/silabs/SiWx917/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <matter_config.h>
#ifdef SI917_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
#include <examples/platform/silabs/SilabsDeviceAttestationCreds.h>
#else
#include <credentials/examples/DeviceAttestationCredsExample.h>
Expand Down Expand Up @@ -62,7 +62,7 @@ int main(void)

chip::DeviceLayer::PlatformMgr().LockChipStack();
// Initialize device attestation config
#ifdef SI917_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
SetDeviceAttestationCredentialsProvider(Silabs::GetSilabsDacProvider());
#else
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/silabs/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <matter_config.h>
#ifdef EFR32_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
#include <examples/platform/silabs/SilabsDeviceAttestationCreds.h>
#else
#include <credentials/examples/DeviceAttestationCredsExample.h>
Expand Down Expand Up @@ -60,7 +60,7 @@ int main(void)

chip::DeviceLayer::PlatformMgr().LockChipStack();
// Initialize device attestation config
#ifdef EFR32_ATTESTATION_CREDENTIALS
#ifdef SILABS_ATTESTATION_CREDENTIALS
SetDeviceAttestationCredentialsProvider(Silabs::GetSilabsDacProvider());
#else
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
Expand Down
4 changes: 4 additions & 0 deletions examples/lock-app/qpg/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ CHIP_ERROR AppTask::Init()
ConfigurationMgr().LogDeviceConfig();
PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE));

sIsThreadProvisioned = ConnectivityMgr().IsThreadProvisioned();
sIsThreadEnabled = ConnectivityMgr().IsThreadEnabled();
sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0);
sIsBLEAdvertisingEnabled = ConnectivityMgr().IsBLEAdvertisingEnabled();
UpdateLEDs();

return err;
Expand Down
14 changes: 7 additions & 7 deletions examples/lock-app/qpg/zap/lock.zap
Original file line number Diff line number Diff line change
Expand Up @@ -8897,7 +8897,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 0,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
Expand Down Expand Up @@ -8977,7 +8977,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 0,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
Expand All @@ -8993,7 +8993,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 0,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
Expand Down Expand Up @@ -9025,7 +9025,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 0,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
Expand Down Expand Up @@ -9057,7 +9057,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 0,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
Expand Down Expand Up @@ -9105,7 +9105,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 0,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
Expand Down Expand Up @@ -9137,7 +9137,7 @@
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/silabs/SiWx917/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction)
button_event.Handler = LockActionEventHandler;
sAppTask.PostEvent(&button_event);
}
else if (button == SIWx917_BTN0)
else if (button == SIWx917_BTN0 && btnAction == SL_SIMPLE_BUTTON_PRESSED)
{
button_event.Handler = BaseApplication::ButtonHandler;
sAppTask.PostEvent(&button_event);
Expand Down
Loading

0 comments on commit 0d34d96

Please sign in to comment.