Skip to content

Commit

Permalink
Merge branch 'master' into SLC_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
CuRahman authored Nov 7, 2022
2 parents 4c870d7 + b278e34 commit ae9860f
Show file tree
Hide file tree
Showing 574 changed files with 52,618 additions and 41,798 deletions.
40 changes: 23 additions & 17 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
---
Checks: >
readability-else-after-return,
modernize-use-nullptr,
bugprone-*,
-bugprone-not-null-terminated-result,
-bugprone-unused-return-value,
modernize-use-bool-literals,
modernize-use-nullptr,
performance-for-range-copy,
readability-const-return-type,
readability-else-after-return,
readability-redundant-control-flow,
readability-redundant-string-cstr,
readability-redundant-string-init,
-bugprone-branch-clone,
-bugprone-copy-constructor-init,
-bugprone-easily-swappable-parameters,
-bugprone-reserved-identifier,
-bugprone-macro-parentheses,
-bugprone-forward-declaration-namespace,
-bugprone-forwarding-reference-overload,
-bugprone-undelegated-constructor,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-narrowing-conversions,
-bugprone-macro-parentheses,
-bugprone-misplaced-widening-cast,
-bugprone-suspicious-include,
-bugprone-narrowing-conversions,
-bugprone-not-null-terminated-result,
-bugprone-reserved-identifier,
-bugprone-signed-char-misuse,
-bugprone-copy-constructor-init,
-bugprone-suspicious-include,
-bugprone-undelegated-constructor,
-bugprone-unused-return-value,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-core.NullDereference,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.performance,
-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,
-clang-analyzer-deadcode.DeadStores,
-clang-analyzer-cplusplus.Move,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-analyzer-security.insecureAPI.strcpy,
-clang-analyzer-deadcode.DeadStores,
-clang-analyzer-nullability.NullablePassedToNonnull,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,
-clang-analyzer-optin.performance,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-security.insecureAPI.rand,
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-security.insecureAPI.strcpy,
-clang-analyzer-unix.Malloc,
-clang-diagnostic-implicit-int-conversion
WarningsAsErrors: '*'
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ updates:
allow:
- dependency-name: "third_party/pigweed/repo"
- dependency-name: "third_party/mbedtls/repo"
- dependancy-name: "third_party/openthread/repo"
- dependency-name: "third_party/openthread/repo"
4 changes: 4 additions & 0 deletions config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -284,5 +284,9 @@ config CHIP_CERTIFiCATION_DECLARATION_OTA_IMAGE_ID

endif

# See config/zephyr/Kconfig for full definition
config CHIP_FACTORY_RESET_ERASE_NVS
bool
default y if CHIP_FACTORY_DATA || CHIP_FACTORY_DATA_CUSTOM_BACKEND

endif
11 changes: 11 additions & 0 deletions config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ config CHIP_CRYPTO_PSA
Use the backend for the Matter crypto layer that is based on PSA crypto
API instead of the default, based on legacy mbedTLS APIs.

config CHIP_FACTORY_RESET_ERASE_NVS
bool "Erase NVS flash pages on factory reset"
depends on SETTINGS_NVS
help
When factory reset is requested, erase flash pages occupied by non-volatile storage
instead of removing Matter-related settings only. This provides a more robust
factory reset mechanism and allows to regain the original storage performance if any
firmware issue has brought it to an unexpected state. For this reason, it is
advisable to set this option if all configuration, including device-specific
entries, is supposed to be cleared on a factory reset.

config CHIP_MALLOC_SYS_HEAP
bool "Memory allocator based on Zephyr sys_heap"
imply SYS_HEAP_RUNTIME_STATS
Expand Down
9 changes: 9 additions & 0 deletions docs/guides/nrfconnect_examples_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,15 @@ instead of using a QR code, which is the default configuration.
To enable NFC for commissioning and share the onboarding payload in an NFC tag,
set the `CONFIG_CHIP_NFC_COMMISSIONING` option.

**Factory reset behavior**

By default, the factory reset procedure implemented in the Matter stack removes
Matter-related settings only. If your application does not depend on any
device-lifelong data stored in the non-volatile storage, set the
`CONFIG_CHIP_FACTORY_RESET_ERASE_NVS` option to fully erase the NVS partition at
the factory reset. This approach is more robust and regains the original NVS
performance in case it has been polluted with unwanted entries.

**Logging**

You can enable logging for both the stack and Zephyr’s
Expand Down
44 changes: 22 additions & 22 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@
"name": "OTA Software Update Provider",
"code": 41,
"mfgCode": null,
"define": "OTA_PROVIDER_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER",
"side": "client",
"enabled": 1,
"commands": [
Expand Down Expand Up @@ -1582,7 +1582,7 @@
"name": "OTA Software Update Provider",
"code": 41,
"mfgCode": null,
"define": "OTA_PROVIDER_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER",
"side": "server",
"enabled": 0,
"commands": [
Expand Down Expand Up @@ -1658,7 +1658,7 @@
"name": "OTA Software Update Requestor",
"code": 42,
"mfgCode": null,
"define": "OTA_REQUESTOR_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
Expand Down Expand Up @@ -1694,7 +1694,7 @@
"name": "OTA Software Update Requestor",
"code": 42,
"mfgCode": null,
"define": "OTA_REQUESTOR_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
Expand Down Expand Up @@ -7710,7 +7710,7 @@
"name": "Temperature Measurement",
"code": 1026,
"mfgCode": null,
"define": "TEMP_MEASUREMENT_CLUSTER",
"define": "TEMPERATURE_MEASUREMENT_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
Expand All @@ -7736,7 +7736,7 @@
"name": "Temperature Measurement",
"code": 1026,
"mfgCode": null,
"define": "TEMP_MEASUREMENT_CLUSTER",
"define": "TEMPERATURE_MEASUREMENT_CLUSTER",
"side": "server",
"enabled": 0,
"attributes": [
Expand Down Expand Up @@ -9396,7 +9396,7 @@
"name": "On/off Switch Configuration",
"code": 7,
"mfgCode": null,
"define": "ON_OFF_SWITCH_CONFIG_CLUSTER",
"define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
Expand All @@ -9422,7 +9422,7 @@
"name": "On/off Switch Configuration",
"code": 7,
"mfgCode": null,
"define": "ON_OFF_SWITCH_CONFIG_CLUSTER",
"define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
Expand Down Expand Up @@ -10770,7 +10770,7 @@
"name": "OTA Software Update Provider",
"code": 41,
"mfgCode": null,
"define": "OTA_PROVIDER_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
Expand Down Expand Up @@ -10814,7 +10814,7 @@
"name": "OTA Software Update Provider",
"code": 41,
"mfgCode": null,
"define": "OTA_PROVIDER_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER",
"side": "server",
"enabled": 0,
"commands": [
Expand Down Expand Up @@ -10850,7 +10850,7 @@
"name": "OTA Software Update Requestor",
"code": 42,
"mfgCode": null,
"define": "OTA_REQUESTOR_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
Expand All @@ -10876,7 +10876,7 @@
"name": "OTA Software Update Requestor",
"code": 42,
"mfgCode": null,
"define": "OTA_REQUESTOR_CLUSTER",
"define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER",
"side": "server",
"enabled": 0,
"attributes": [
Expand Down Expand Up @@ -14102,7 +14102,7 @@
"name": "Pump Configuration and Control",
"code": 512,
"mfgCode": null,
"define": "PUMP_CONFIG_CONTROL_CLUSTER",
"define": "PUMP_CONFIGURATION_AND_CONTROL_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
Expand All @@ -14128,7 +14128,7 @@
"name": "Pump Configuration and Control",
"code": 512,
"mfgCode": null,
"define": "PUMP_CONFIG_CONTROL_CLUSTER",
"define": "PUMP_CONFIGURATION_AND_CONTROL_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
Expand Down Expand Up @@ -15308,7 +15308,7 @@
"name": "Thermostat User Interface Configuration",
"code": 516,
"mfgCode": null,
"define": "THERMOSTAT_UI_CONFIG_CLUSTER",
"define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
Expand All @@ -15334,7 +15334,7 @@
"name": "Thermostat User Interface Configuration",
"code": 516,
"mfgCode": null,
"define": "THERMOSTAT_UI_CONFIG_CLUSTER",
"define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
Expand Down Expand Up @@ -16626,7 +16626,7 @@
"name": "Temperature Measurement",
"code": 1026,
"mfgCode": null,
"define": "TEMP_MEASUREMENT_CLUSTER",
"define": "TEMPERATURE_MEASUREMENT_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
Expand All @@ -16652,7 +16652,7 @@
"name": "Temperature Measurement",
"code": 1026,
"mfgCode": null,
"define": "TEMP_MEASUREMENT_CLUSTER",
"define": "TEMPERATURE_MEASUREMENT_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
Expand Down Expand Up @@ -18314,7 +18314,7 @@
"name": "Content Launcher",
"code": 1290,
"mfgCode": null,
"define": "CONTENT_LAUNCH_CLUSTER",
"define": "CONTENT_LAUNCHER_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
Expand Down Expand Up @@ -18358,7 +18358,7 @@
"name": "Content Launcher",
"code": 1290,
"mfgCode": null,
"define": "CONTENT_LAUNCH_CLUSTER",
"define": "CONTENT_LAUNCHER_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
Expand Down Expand Up @@ -24128,7 +24128,7 @@
"name": "Temperature Measurement",
"code": 1026,
"mfgCode": null,
"define": "TEMP_MEASUREMENT_CLUSTER",
"define": "TEMPERATURE_MEASUREMENT_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
Expand All @@ -24154,7 +24154,7 @@
"name": "Temperature Measurement",
"code": 1026,
"mfgCode": null,
"define": "TEMP_MEASUREMENT_CLUSTER",
"define": "TEMPERATURE_MEASUREMENT_CLUSTER",
"side": "server",
"enabled": 0,
"attributes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class StaticSupportedModesManager : public chip::app::Clusters::ModeSelect::Supp
public:
static const StaticSupportedModesManager instance;

const SupportedModesManager::ModeOptionsProvider getModeOptionsProvider(EndpointId endpointId) const override;
SupportedModesManager::ModeOptionsProvider getModeOptionsProvider(EndpointId endpointId) const override;

EmberAfStatus getModeOptionByMode(EndpointId endpointId, uint8_t mode, const ModeOptionStructType ** dataPtr) const override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const StaticSupportedModesManager::EndpointSpanPair

const StaticSupportedModesManager StaticSupportedModesManager::instance = StaticSupportedModesManager();

const SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeOptionsProvider(EndpointId endpointId) const
SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeOptionsProvider(EndpointId endpointId) const
{
for (auto & endpointSpanPair : supportedOptionsByEndpoints)
{
Expand Down
16 changes: 8 additions & 8 deletions examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int AppTask::StartAppTask()
if (sAppEventQueue == NULL)
{
PLAT_LOG("Failed to allocate app event queue");
while (1)
while (true)
;
}

Expand All @@ -157,7 +157,7 @@ int AppTask::StartAppTask()
pdPASS)
{
PLAT_LOG("Failed to create app task");
while (1)
while (true)
;
}
return ret;
Expand Down Expand Up @@ -205,39 +205,39 @@ int AppTask::Init()
if (ret != CHIP_NO_ERROR)
{
PLAT_LOG("PlatformMgr().InitChipStack() failed");
while (1)
while (true)
;
}

ret = ThreadStackMgr().InitThreadStack();
if (ret != CHIP_NO_ERROR)
{
PLAT_LOG("ThreadStackMgr().InitThreadStack() failed");
while (1)
while (true)
;
}

ret = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice);
if (ret != CHIP_NO_ERROR)
{
PLAT_LOG("ConnectivityMgr().SetThreadDeviceType() failed");
while (1)
while (true)
;
}

ret = PlatformMgr().StartEventLoopTask();
if (ret != CHIP_NO_ERROR)
{
PLAT_LOG("PlatformMgr().StartEventLoopTask() failed");
while (1)
while (true)
;
}

ret = ThreadStackMgrImpl().StartThreadTask();
if (ret != CHIP_NO_ERROR)
{
PLAT_LOG("ThreadStackMgr().StartThreadTask() failed");
while (1)
while (true)
;
}

Expand Down Expand Up @@ -279,7 +279,7 @@ void AppTask::AppTaskMain(void * pvParameter)

sAppTask.Init();

while (1)
while (true)
{
/* Task pend until we have stuff to do */
if (xQueueReceive(sAppEventQueue, &event, portMAX_DELAY) == pdTRUE)
Expand Down
Loading

0 comments on commit ae9860f

Please sign in to comment.