Skip to content

Commit

Permalink
Merge branch 'master' into initialization_fiasco
Browse files Browse the repository at this point in the history
  • Loading branch information
mwswartwout authored Apr 18, 2024
2 parents 42026d5 + 8a4dffc commit a19b540
Show file tree
Hide file tree
Showing 200 changed files with 1,964 additions and 722 deletions.
2 changes: 1 addition & 1 deletion examples/all-clusters-app/asr/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include "AppEvent.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <lega_rtos_api.h>
#include <platform/CHIPDeviceLayer.h>
#include <stdbool.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/infineon/psoc6/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "AppEvent.h"
#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

// Application-defined error codes in the CHIP_ERROR space.
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-minimal-app/asr/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "AppEvent.h"
#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

// Application-defined error codes in the CHIP_ERROR space.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "AppEvent.h"
#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

// Application-defined error codes in the CHIP_ERROR space.
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "AppEvent.h"
#include "BaseApplication.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/asr/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

// Application-defined error codes in the CHIP_ERROR space.
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "AppEvent.h"
#include "BaseApplication.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/infineon/psoc6/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

// Application-defined error codes in the CHIP_ERROR space.
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "AppEvent.h"
#include "BaseApplication.h"
#include "LightingManager.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/lit-icd-app/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "AppEvent.h"
#include "BaseApplication.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/asr/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

// Application-defined error codes in the CHIP_ERROR space.
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/esp32/main/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <lock/BoltLockManager.h>

#include "freertos/FreeRTOS.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <lib/support/CodeUtils.h>
#include <platform/CHIPDeviceLayer.h>

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/infineon/psoc6/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

// Application-defined error codes in the CHIP_ERROR space.
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/qpg/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "AppEvent.h"
#include "BaseApplication.h"
#include "LockManager.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
7 changes: 7 additions & 0 deletions examples/platform/nxp/common/app_task/source/AppTaskBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
#include <app/clusters/ota-requestor/OTATestEventTriggerDelegate.h>
#endif

#ifdef ENABLE_CHIP_SHELL
#include <lib/shell/commands/WiFi.h>
#endif

using namespace chip;
using namespace chip::TLV;
using namespace ::chip::Credentials;
Expand Down Expand Up @@ -202,6 +206,9 @@ CHIP_ERROR chip::NXP::App::AppTaskBase::Init()

#if CONFIG_CHIP_WIFI || CHIP_DEVICE_CONFIG_ENABLE_WPA
sNetworkCommissioningInstance.Init();
#ifdef ENABLE_CHIP_SHELL
Shell::SetWiFiDriver(chip::NXP::App::GetAppTask().GetWifiDriverInstance());
#endif
#endif
#if CONFIG_CHIP_OTA_REQUESTOR
if (err == CHIP_NO_ERROR)
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/silabs/BaseApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <app/clusters/identify-server/identify-server.h>
#include <app/server/AppDelegate.h>
#include <app/util/config.h>
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceEvent.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/pump-app/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "AppEvent.h"
#include "BaseApplication.h"
#include "PumpManager.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/smoke-co-alarm-app/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "AppEvent.h"
#include "BaseApplication.h"
#include "SmokeCoAlarmManager.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/temperature-measurement-app/asr/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "AppEvent.h"
#include "FreeRTOS.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

// Application-defined error codes in the CHIP_ERROR space.
Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/asr/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "SensorManager.h"
#include "TemperatureManager.h"
#include "timers.h" // provides FreeRTOS timer support
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <platform/CHIPDeviceLayer.h>

#include <FreeRTOS.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "BaseApplication.h"
#include "SensorManager.h"
#include "TemperatureManager.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class TargetVideoPlayerInfo
public:
TargetVideoPlayerInfo() {}

bool operator==(const TargetVideoPlayerInfo & other) { return this->mNodeId == other.mNodeId; }
bool operator==(const TargetVideoPlayerInfo & other) const { return this->mNodeId == other.mNodeId; }

bool IsInitialized() { return mInitialized; }
void Reset();
Expand Down
2 changes: 1 addition & 1 deletion examples/window-app/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <stdint.h>

#include "BaseApplication.h"
#include <ble/BLEEndPoint.h>
#include <ble/Ble.h>
#include <cmsis_os2.h>
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down
55 changes: 27 additions & 28 deletions scripts/helpers/iwyu-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,38 @@ def find_program(names):
@click.command()
@click.option(
'--log-level',
default='INFO',
show_default=True,
default='info',
type=click.Choice(__LOG_LEVELS__.keys(), case_sensitive=False),
help='Determines the verbosity of script output.')
help='Set the verbosity of script output.')
@click.option(
'--no-log-timestamps',
default=False,
is_flag=True,
help='Skip timestamps in log output')
help='Skip timestamps in log output.')
@click.option(
'--compile-commands-glob',
show_default=True,
default=os.path.join(proj_root_dir, "out", "debug", "compile_commands*.json"),
help='Set global pattern for compile_commands.json files'
)
@click.option(
'--scanning-destination',
show_default=True,
default=os.path.join(proj_root_dir, "src", "platform"),
help='Set scanning destination file(s) or directory /ies in project'
)
default=os.path.join(proj_root_dir, "out", "debug",
"compile_commands*.json"),
help='Set global pattern for compile_commands.json files.')
@click.option(
'--mapping-file-dir',
help='Set mapping file directory /ies manually. File should have name iwyu.imp'
)
help='Set directory with iwyu.imp mapping file.')
@click.option(
'--iwyu-args',
show_default=True,
default="-Xiwyu --no_fwd_decls",
help='Set custom arg(s) for include what you use'
)
help='Set custom arg(s) for include what you use.')
@click.option(
'--clang-args',
default="",
help='Set custom arg(s) for clang'
)
def main(compile_commands_glob, scanning_destination, mapping_file_dir,
help='Set custom arg(s) for clang.')
@click.argument(
'source',
nargs=-1,
type=click.Path(exists=True))
def main(compile_commands_glob, source, mapping_file_dir,
iwyu_args, clang_args, log_level, no_log_timestamps):
# Ensures somewhat pretty logging of what is going on
log_fmt = '%(asctime)s %(levelname)-7s %(message)s'
Expand Down Expand Up @@ -114,8 +110,10 @@ def main(compile_commands_glob, scanning_destination, mapping_file_dir,
for compile_commands in compile_commands_glob:

compile_commands_path = os.path.dirname(compile_commands)
compile_commands_file = os.path.join(compile_commands_path, "compile_commands.json")
logging.debug("Copy compile command file %s to %s", compile_commands, compile_commands_file)
compile_commands_file = os.path.join(
compile_commands_path, "compile_commands.json")
logging.debug("Copy compile command file %s to %s",
compile_commands, compile_commands_file)

with contextlib.suppress(shutil.SameFileError):
shutil.copyfile(compile_commands, compile_commands_file)
Expand Down Expand Up @@ -153,14 +151,14 @@ def main(compile_commands_glob, scanning_destination, mapping_file_dir,

command_arr = [
iwyu,
"-p", compile_commands_path, scanning_destination,
"-p", compile_commands_path, *source,
"--", iwyu_args,
"-Xiwyu", "--mapping_file=" + mapping_file_dir + "/iwyu.imp",
] + platform_clang_args + [clang_args]

logging.info("Used compile commands: %s", compile_commands)
logging.info("Scanning includes for platform: %s", platform)
logging.info("Scanning destination: %s", scanning_destination)
logging.info("Scanning sources(s): %s", ", ".join(source))

logging.debug("Command: %s", " ".join(command_arr))
status = subprocess.Popen(" ".join(command_arr),
Expand All @@ -175,13 +173,13 @@ def main(compile_commands_glob, scanning_destination, mapping_file_dir,
for line in status.stdout:
line = line.rstrip()

if re.match(r"^warning:.*$", line):
if re.search(r"^warning:", line):
logger = logging.warning
elif re.match(r"^.*([A-Za-z0-9]+(/[A-Za-z0-9]+)+)\.cpp should [a-zA-Z]+ these lines:$", line):
elif re.search(r"should (add|remove)? these lines:$", line):
logger = logging.warning
elif re.match(r"^.*([A-Za-z0-9]+(/[A-Za-z0-9]+)+)\.[a-zA-Z]+ has correct #includes/fwd-decls\)$", line):
elif re.search(r"has correct #includes/fwd-decls\)$", line):
logger = logging.info
elif re.match(r"^The full include-list for .*$", line):
elif re.search(r"^The full include-list for", line):
logger = logging.warning
warning_in_files += 1

Expand All @@ -190,7 +188,8 @@ def main(compile_commands_glob, scanning_destination, mapping_file_dir,
logging.info("============== IWYU output end ================")

if warning_in_files:
logging.error("Number of files with include issues: %d", warning_in_files)
logging.error("Number of files with include issues: %d",
warning_in_files)
sys.exit(2)
else:
logging.info("Every include looks good!")
Expand Down
4 changes: 2 additions & 2 deletions scripts/setup/zap.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"mac-amd64",
"windows-amd64"
],
"tags": ["version:2@v2024.03.14-nightly.1"]
"tags": ["version:2@v2024.04.15-nightly.1"]
},
{
"_comment": "Always get the amd64 version on mac until usable arm64 zap build is available",
"path": "fuchsia/third_party/zap/mac-amd64",
"platforms": ["mac-arm64"],
"tags": ["version:2@v2024.03.14-nightly.1"]
"tags": ["version:2@v2024.04.15-nightly.1"]
}
]
}
2 changes: 1 addition & 1 deletion scripts/setup/zap.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2024.03.14-nightly
v2024.04.15-nightly
2 changes: 1 addition & 1 deletion scripts/tools/zap/zap_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Use scripts/tools/zap/version_update.py to manage ZAP versioning as many
# files may need updating for versions
#
MIN_ZAP_VERSION = '2024.3.14'
MIN_ZAP_VERSION = '2024.4.15'


class ZapTool:
Expand Down
5 changes: 4 additions & 1 deletion src/app/ConcreteAttributePath.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ struct ConcreteDataAttributePath : public ConcreteAttributePath
ChipLogValueMEI(mClusterId), ChipLogValueMEI(mAttributeId));
}

bool MatchesConcreteAttributePath(const ConcreteAttributePath & aOther) { return ConcreteAttributePath::operator==(aOther); }
bool MatchesConcreteAttributePath(const ConcreteAttributePath & aOther) const
{
return ConcreteAttributePath::operator==(aOther);
}

bool operator==(const ConcreteDataAttributePath & aOther) const
{
Expand Down
4 changes: 2 additions & 2 deletions src/app/clusters/bindings/PendingNotificationMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class PendingNotificationMap
return *this;
}

bool operator!=(const Iterator & rhs) { return mIndex != rhs.mIndex; }
bool operator!=(const Iterator & rhs) const { return mIndex != rhs.mIndex; }

bool operator==(const Iterator & rhs) { return mIndex == rhs.mIndex; }
bool operator==(const Iterator & rhs) const { return mIndex == rhs.mIndex; }

private:
PendingNotificationMap * mMap;
Expand Down
Loading

0 comments on commit a19b540

Please sign in to comment.