Skip to content

Commit

Permalink
Merge branch 'master' into dac_revocation_guide
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdp authored Jan 23, 2025
2 parents 839ab64 + 17ad72e commit 9ac1043
Show file tree
Hide file tree
Showing 185 changed files with 4,333 additions and 3,369 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,18 @@ jobs:
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx ${{ matrix.options.arguments }} \
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" \
-resultBundlePath /tmp/darwin/framework-tests/TestResults.xcresult \
-sdk macosx ${{ matrix.options.arguments }} \
CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \
> >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
- name: Generate Summary
if: always()
working-directory: /tmp
run: |
wget https://github.com/a7ex/xcresultparser/releases/download/1.8.4/xcresultparser.zip
unzip -j xcresultparser.zip
./xcresultparser --output-format md --failed-tests-only /tmp/darwin/framework-tests/TestResults.xcresult >>"$GITHUB_STEP_SUMMARY"
- name: Collect crash logs
if: failure() && !env.ACT
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/restyled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
uses: actions/checkout@v4

- uses: restyled-io/actions/setup@v4
with:
# Pin the Restyler version to v0.6.0.2
tag: 'v0.6.0.2'

- id: restyler
uses: restyled-io/actions/run@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ jobs:
- name: Verify Testing Support
run: |
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/test_IDM_10_4.py'
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/test_TC_ICDM_2_1.py'
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/test_TC_ICDM_2_1_full_pics.py'
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/test_TC_ICDM_2_1_min_pics.py'
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/test_TC_SC_7_1.py'
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/TestDecorators.py'
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/TestChoiceConformanceSupport.py'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/third-party-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
paths:
- "third_party/**"
- ".gitmodules"
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
check-submodule-update-label:
Expand All @@ -32,7 +33,7 @@ jobs:
run: |
echo This pull request attempts to update submodules without the changing-submodules-on-purpose label. Please apply that label if the changes are intentional, or remove those changes.
exit 1
- if: ${{ contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }}
- if: ${{ contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }}
name: Success
run: |
echo PR looks good.
Expand Down
45 changes: 45 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,30 @@
]
}
},
{
"label": "Build EFR32 Unit Tests and Test Runner",
"type": "shell",
"command": "source scripts/activate.sh; scripts/build/build_examples.py --target efr32-${input:efr32Board}-unit-test build; scripts/build/build_examples.py --target linux-x64-efr32-test-runner build; pip3 install out/linux-x64-efr32-test-runner/chip_pw_test_runner_wheels/*.whl --force-reinstall",
"problemMatcher": []
},
{
"label": "Rebuild EFR32 Unit Tests and Test Runner",
"type": "shell",
"command": "source scripts/activate.sh; rm -rf out/efr32-brd*-unit-test out/linux-x64-efr32-test-runner; scripts/build/build_examples.py --target efr32-${input:efr32Board}-unit-test build; scripts/build/build_examples.py --target linux-x64-efr32-test-runner build; pip3 install out/linux-x64-efr32-test-runner/chip_pw_test_runner_wheels/*.whl --force-reinstall",
"problemMatcher": []
},
{
"label": "Clean EFR32 Unit Tests and Test Runner",
"type": "shell",
"command": "rm -rf out/efr32-brd*-unit-test out/linux-x64-efr32-test-runner",
"problemMatcher": []
},
{
"label": "Run EFR32 Unit Tests",
"type": "shell",
"command": "source scripts/activate.sh; python -m src.test_driver.efr32.py.pw_test_runner.pw_test_runner -d /dev/ttyACM1 -f out/efr32-brd2703a-unit-test/tests -o out.log",
"problemMatcher": []
},
{
"label": "Flash EFR32 board",
"type": "shell",
Expand Down Expand Up @@ -646,6 +670,27 @@
"tizen-arm-light"
]
},
{
"type": "pickString",
"id": "efr32Board",
"description": "Which board",
"options": [
"brd2704b",
"brd4316a",
"brd4317a",
"brd4318a",
"brd4319a",
"brd4186a",
"brd4187a",
"brd2601b",
"brd4187c",
"brd4186c",
"brd2703a",
"brd4338a",
"brd2605a",
"brd4343a"
]
},
{
"type": "promptString",
"id": "tizenTargetDeviceAddress",
Expand Down
8 changes: 7 additions & 1 deletion credentials/generate_revocation_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,13 @@ def generate_revocation_set_from_crl(crl_file: x509.CertificateRevocationList,
except Exception:
pass

serialnumber_list.append(bytes(str('{:02X}'.format(revoked_cert.serial_number)), 'utf-8').decode('utf-8'))
# Ensure the serial number is always a 2-byte aligned hex string.
# TestDACRevocationDelegateImpl encodes the serial number as an even-length hex string
# using BytesToHex in src/lib/support/BytesToHex.cpp.
# As the primary consumer of this data, we should use the same here.
serialnumber = '{:02X}'.format(revoked_cert.serial_number)
serialnumber = serialnumber if len(serialnumber) % 2 == 0 else '0' + serialnumber
serialnumber_list.append(serialnumber)

entry = {
"type": "revocation_set",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"issuer_subject_key_id": "63540E47F64B1C38D13884A462D16C195D8FFB3C",
"issuer_name": "MD0xJTAjBgNVBAMMHE1hdHRlciBEZXYgUEFJIDB4RkZGMSBubyBQSUQxFDASBgorBgEEAYKifAIBDARGRkYx",
"revoked_serial_numbers": [
"AB042494323FE54",
"0AB042494323FE54",
"19367D978EAC533A",
"2569383D24BB36EA"
],
Expand Down
14 changes: 14 additions & 0 deletions data_model/1.4/clusters/EcosystemInformationCluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,18 @@ Davis, CA 95616, USA
<access fabricScoped="true"/>
</struct>
</dataTypes>
<attributes>
<attribute id="0x0000" name="DeviceDirectory" type="list">
<entry type="EcosystemDeviceStruct"/>
<access read="true" readPrivilege="manage" fabricScoped="true"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="nonVolatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform/>
</attribute>
<attribute id="0x0001" name="LocationDirectory" type="list">
<entry type="EcosystemLocationStruct"/>
<access read="true" readPrivilege="manage" fabricScoped="true"/>
<quality changeOmitted="false" nullable="false" scene="false" persistence="nonVolatile" reportable="false" sourceAttribution="false" quieterReporting="false"/>
<mandatoryConform/>
</attribute>
</attributes>
</cluster>
2 changes: 1 addition & 1 deletion data_model/1.4/spec_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3d8fc9ae05045a53fdaffd7e3593f92a48b10e30
21812107312887c416632ed6dd2399af1f077548
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_enable_wifi = true
chip_device_platform = "SiWx917"
import("//build_for_wifi_args.gni")
}
5 changes: 4 additions & 1 deletion examples/common/pigweed/rpc_services/Attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <app/InteractionModelEngine.h>
#include <app/MessageDef/AttributeReportIBs.h>
#include <app/data-model-provider/ActionReturnStatus.h>
#include <app/data-model-provider/MetadataLookup.h>
#include <app/data-model-provider/OperationTypes.h>
#include <app/data-model-provider/Provider.h>
#include <app/util/attribute-storage.h>
Expand Down Expand Up @@ -221,7 +222,9 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service<Attributes>
request.operationFlags.Set(app::DataModel::OperationFlags::kInternal);
request.subjectDescriptor = &subjectDescriptor;

std::optional<app::DataModel::ClusterInfo> info = provider->GetServerClusterInfo(path);
app::DataModel::ServerClusterFinder serverClusterFinder(provider);
auto info = serverClusterFinder.Find(path);

if (!info.has_value())
{
return ::pw::Status::NotFound();
Expand Down
2 changes: 2 additions & 0 deletions examples/common/tracing/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ source_set("trace_handlers_decoder") {

deps = [
":trace_handlers",
"${chip_root}/src/app/common:cluster-objects",
"${chip_root}/src/lib",
"${chip_root}/src/lib/core:types",
]
Expand Down Expand Up @@ -123,6 +124,7 @@ executable("chip-trace-decoder") {
deps = [ "${chip_root}/src/platform/logging:stdio" ]

public_deps = [
"${chip_root}/src/app/common:cluster-objects",
"${chip_root}/src/lib",
"${chip_root}/src/lib/core:types",
"${chip_root}/third_party/jsoncpp",
Expand Down
8 changes: 0 additions & 8 deletions examples/contact-sensor-app/nxp/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ mcxw71_k32w1_sdk("sdk") {
defines += [
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
]

if (nxp_nvm_component == "littlefs") {
include_dirs += [ "${example_platform_dir}/board" ]
sources += [
"${example_platform_dir}/board/peripherals.c",
"${example_platform_dir}/board/peripherals.h",
]
}
}

mcxw71_k32w1_executable("contact_sensor_app") {
Expand Down
2 changes: 0 additions & 2 deletions examples/contact-sensor-app/nxp/k32w1/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,3 @@ chip_openthread_ftd = false
nxp_enable_ot_cli = false

chip_with_diag_logs_demo = true

nxp_nvm_component = "nvs"
8 changes: 0 additions & 8 deletions examples/contact-sensor-app/nxp/mcxw71/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ mcxw71_k32w1_sdk("sdk") {
defines += [
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
]

if (nxp_nvm_component == "littlefs") {
include_dirs += [ "${example_platform_dir}/board" ]
sources += [
"${example_platform_dir}/board/peripherals.c",
"${example_platform_dir}/board/peripherals.h",
]
}
}

mcxw71_k32w1_executable("contact_sensor_app") {
Expand Down
2 changes: 0 additions & 2 deletions examples/contact-sensor-app/nxp/mcxw71/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,3 @@ chip_openthread_ftd = false
nxp_enable_ot_cli = false

chip_with_diag_logs_demo = true

nxp_nvm_component = "nvs"
9 changes: 9 additions & 0 deletions examples/dishwasher-app/silabs/src/DeviceEnergyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,12 @@ DeviceEnergyManagementDelegate * DeviceEnergyManager::GetDEMDelegate()
{
return gDEMDelegate.get();
};

/**
* @brief Returns the EndpointID of the DeviceEnergyManagement cluster.
* The energy management cluster assumes this functions is global to be able to leverage it.
*/
EndpointId GetEnergyDeviceEndpointId()
{
return DataModelHelper::GetEndpointIdFromCluster(DeviceEnergyManagement::Id);
}
2 changes: 1 addition & 1 deletion examples/energy-management-app/silabs/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ AppTask AppTask::sAppTask;

EndpointId GetEnergyDeviceEndpointId()
{
#if defined(SL_CONFIG_ENABLE_EXAMPLE_WATER_HEATER_DEVICE)
#if SL_CONFIG_ENABLE_EXAMPLE_WATER_HEATER_DEVICE
return kWaterHeaterEndpoint;
#else
return kEvseEndpoint;
Expand Down
8 changes: 0 additions & 8 deletions examples/lighting-app/nxp/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ mcxw71_k32w1_sdk("sdk") {
defines += [
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
]

if (nxp_nvm_component == "littlefs") {
include_dirs += [ "${example_platform_dir}/board" ]
sources += [
"${example_platform_dir}/board/peripherals.c",
"${example_platform_dir}/board/peripherals.h",
]
}
}

mcxw71_k32w1_executable("light_app") {
Expand Down
2 changes: 0 additions & 2 deletions examples/lighting-app/nxp/k32w1/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ chip_system_config_provide_statistics = false
chip_system_config_use_open_thread_inet_endpoints = true
chip_with_lwip = false

nxp_nvm_component = "nvs"

nxp_use_smu2_static = true
nxp_use_smu2_dynamic = true
8 changes: 0 additions & 8 deletions examples/lighting-app/nxp/mcxw71/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ mcxw71_k32w1_sdk("sdk") {
defines += [
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
]

if (nxp_nvm_component == "littlefs") {
include_dirs += [ "${example_platform_dir}/board" ]
sources += [
"${example_platform_dir}/board/peripherals.c",
"${example_platform_dir}/board/peripherals.h",
]
}
}

mcxw71_k32w1_executable("light_app") {
Expand Down
2 changes: 0 additions & 2 deletions examples/lighting-app/nxp/mcxw71/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ chip_system_config_provide_statistics = false
chip_system_config_use_open_thread_inet_endpoints = true
chip_with_lwip = false

nxp_nvm_component = "nvs"

nxp_use_smu2_static = true
nxp_use_smu2_dynamic = true
1 change: 1 addition & 0 deletions examples/lit-icd-app/silabs/build_for_wifi_gnfile.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ default_args = {
target_cpu = "arm"
target_os = "freertos"
chip_enable_wifi = true
chip_device_platform = "SiWx917"
import("//build_for_wifi_args.gni")
}
8 changes: 0 additions & 8 deletions examples/lock-app/nxp/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ mcxw71_k32w1_sdk("sdk") {
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
]

if (nxp_nvm_component == "littlefs") {
include_dirs += [ "${example_platform_dir}/board" ]
sources += [
"${example_platform_dir}/board/peripherals.c",
"${example_platform_dir}/board/peripherals.h",
]
}

if (nxp_multiple_ble_connections) {
include_dirs += [ "${example_platform_dir}/app_ble/include" ]
defines += [
Expand Down
8 changes: 0 additions & 8 deletions examples/lock-app/nxp/mcxw71/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ mcxw71_k32w1_sdk("sdk") {
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
]

if (nxp_nvm_component == "littlefs") {
include_dirs += [ "${example_platform_dir}/board" ]
sources += [
"${example_platform_dir}/board/peripherals.c",
"${example_platform_dir}/board/peripherals.h",
]
}

if (nxp_multiple_ble_connections) {
include_dirs += [ "${example_platform_dir}/app_ble/include" ]
defines += [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ static_library("ESP32_custom") {
]

deps = [
"${chip_root}/src/app:app_config",
"${chip_root}/src/lib/dnssd:platform_header",
"${chip_root}/src/platform/logging:headers",
"${chip_root}/src/setup_payload",
Expand Down
2 changes: 0 additions & 2 deletions examples/platform/nxp/mcxw71_k32w1/app/support/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ source_set("freertos_memory_utils") {

if (nxp_nvm_component == "fwk_nvm") {
defines = [ "CHIP_PLAT_NVM_SUPPORT=1" ]
} else if (nxp_nvm_component == "littlefs") {
defines = [ "CHIP_PLAT_NVM_SUPPORT=3" ]
}

public_configs = [
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ CHIP_ERROR BaseApplication::Init()
* Wait for the WiFi to be initialized
*/
ChipLogProgress(AppServer, "APP: Wait WiFi Init");
while (!wfx_hw_ready())
while (!IsStationReady())
{
osDelay(pdMS_TO_TICKS(10));
}
Expand Down
Loading

0 comments on commit 9ac1043

Please sign in to comment.