Skip to content

Commit

Permalink
Merge branch 'master' into Silabs_Identiy_endpoints_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak-Shaha authored Oct 23, 2024
2 parents 6bce0ac + 42421c4 commit 5be3c5f
Show file tree
Hide file tree
Showing 80 changed files with 1,183 additions and 3,228 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-efr32:83
image: ghcr.io/project-chip/chip-build-efr32:84
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build-efr32:83
image: ghcr.io/project-chip/chip-build-efr32:84
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
[submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"]
path = third_party/silabs/wiseconnect-wifi-bt-sdk
url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git
branch = 2.10.0
branch = 2.10.3
platforms = silabs
[submodule "third_party/silabs/wifi_sdk"]
path = third_party/silabs/wifi_sdk
Expand Down
8 changes: 8 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,14 @@
"cwd": "${workspaceFolder}"
},

{
"name": "Fabric Sync (Linux)",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/out/debug/standalone/fabric-sync",
"cwd": "${workspaceFolder}"
},

{
"name": "OTA Requestor App (Linux)",
"type": "lldb",
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/nxp/common/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE];

using namespace ::chip::DeviceLayer;

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
TaskHandle_t taskHandle;

Expand Down
2 changes: 1 addition & 1 deletion examples/contact-sensor-app/nxp/common/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" void main_task(void const * argument)
chip::NXP::App::GetAppTask().Start();
}
#else
extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
chip::DeviceLayer::PlatformMgrImpl().HardwareInit();
chip::NXP::App::GetAppTask().Start();
Expand Down
2 changes: 1 addition & 1 deletion examples/laundry-washer-app/nxp/common/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE];

using namespace ::chip::DeviceLayer;

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
TaskHandle_t taskHandle;

Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void ApplicationShutdown()
}
}

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
if (ChipLinuxAppInit(argc, argv) != 0)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
13 changes: 12 additions & 1 deletion examples/lighting-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ void ApplicationShutdown()
}
}

extern "C" int main(int argc, char * argv[])
#ifdef __NuttX__
// NuttX requires the main function to be defined with C-linkage. However, marking
// the main as extern "C" is not strictly conformant with the C++ standard. Since
// clang >= 20 such code triggers -Wmain warning.
extern "C" {
#endif

int main(int argc, char * argv[])
{
if (ChipLinuxAppInit(argc, argv) != 0)
{
Expand Down Expand Up @@ -124,3 +131,7 @@ extern "C" int main(int argc, char * argv[])

return 0;
}

#ifdef __NuttX__
}
#endif
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/common/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" void main_task(void const * argument)
chip::NXP::App::GetAppTask().Start();
}
#else
extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
chip::DeviceLayer::PlatformMgrImpl().HardwareInit();
chip::NXP::App::GetAppTask().Start();
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/nxp/common/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern "C" void main_task(void const * argument)
chip::NXP::App::GetAppTask().Start();
}
#else
extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
chip::DeviceLayer::PlatformMgrImpl().HardwareInit();
chip::NXP::App::GetAppTask().Start();
Expand Down
2 changes: 1 addition & 1 deletion examples/ota-requestor-app/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ alignas(8) static uint8_t malloc_mutex_obj[80];

// C runtime import: constructor initialization and main
extern "C" void __libc_init_array(void);
extern "C" int main(void);
int main(void);

// IOT SDK serial declarations
#define STDIN_FILENO 0
Expand Down
4 changes: 4 additions & 0 deletions examples/platform/silabs/efr32/rs911x/rsi_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ static void wfx_rsi_save_ap_info(void) // translation
case SME_WPA2_ENTERPRISE:
wfx_rsi.sec.security = WFX_SEC_WPA2;
break;
case SME_WPA_WPA2_MIXED_MODE:
wfx_rsi.sec.security = WFX_SEC_WPA_WPA2_MIXED;
break;
case SME_WEP:
wfx_rsi.sec.security = WFX_SEC_WEP;
break;
Expand Down Expand Up @@ -551,6 +554,7 @@ static void wfx_rsi_do_join(void)
break;
case WFX_SEC_WPA:
case WFX_SEC_WPA2:
case WFX_SEC_WPA_WPA2_MIXED:
connect_security_mode = RSI_WPA_WPA2_MIXED;
break;
#if WIFI_ENABLE_SECURITY_WPA3_TRANSITION
Expand Down
2 changes: 1 addition & 1 deletion examples/shell/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/genio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters)
* Main Function
****************************************************************************/

extern "C" int main(void)
int main(void)
{
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);

Expand Down
2 changes: 1 addition & 1 deletion examples/thermostat/nxp/common/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE];

using namespace ::chip::DeviceLayer;

extern "C" int main(int argc, char * argv[])
int main(int argc, char * argv[])
{
TaskHandle_t taskHandle;

Expand Down
14 changes: 7 additions & 7 deletions integrations/cloudbuild/smoke-test.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
steps:
- name: "ghcr.io/project-chip/chip-build-vscode:83"
- name: "ghcr.io/project-chip/chip-build-vscode:84"
entrypoint: "bash"
args:
- "-c"
- |
git config --global --add safe.directory "*"
python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android
id: Submodules
- name: "ghcr.io/project-chip/chip-build-vscode:83"
- name: "ghcr.io/project-chip/chip-build-vscode:84"
# NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting
# jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3)
env:
Expand All @@ -24,7 +24,7 @@ steps:
path: /pwenv
timeout: 900s

- name: "ghcr.io/project-chip/chip-build-vscode:83"
- name: "ghcr.io/project-chip/chip-build-vscode:84"
id: ESP32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -45,7 +45,7 @@ steps:
volumes:
- name: pwenv
path: /pwenv
- name: "ghcr.io/project-chip/chip-build-vscode:83"
- name: "ghcr.io/project-chip/chip-build-vscode:84"
id: NRFConnect
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -66,7 +66,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "ghcr.io/project-chip/chip-build-vscode:83"
- name: "ghcr.io/project-chip/chip-build-vscode:84"
id: EFR32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -88,7 +88,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "ghcr.io/project-chip/chip-build-vscode:83"
- name: "ghcr.io/project-chip/chip-build-vscode:84"
id: Linux
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand Down Expand Up @@ -141,7 +141,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "ghcr.io/project-chip/chip-build-vscode:83"
- name: "ghcr.io/project-chip/chip-build-vscode:84"
id: Android
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand Down
4 changes: 2 additions & 2 deletions scripts/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import("$dir_pw_build/python_dist.gni")

# This target creates a single Python package and wheel for yamltests. It will
# merge all Python dependencies Matter. The output is located in:
# out/obj/matter_yamltests_distribution/ <- source files here
# out/obj/matter_yamltests_distribution._build_wheel/matter_yamltests-0.0.1-py3-none-any.whl
# out/obj/scripts/matter_yamltests_distribution/ <- source files here
# out/obj/scripts/matter_yamltests_distribution._build_wheel/matter_yamltests-0.0.1-py3-none-any.whl
pw_python_distribution("matter_yamltests_distribution") {
packages = [ "${chip_root}/scripts/py_matter_yamltests:matter_yamltests" ]
generate_setup_cfg = {
Expand Down
28 changes: 5 additions & 23 deletions scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,6 @@ tracing_options="matter_log_json_payload_hex=true matter_log_json_payload_decode

gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="$tracing_options chip_detail_logging=$chip_detail_logging chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg chip_config_network_layer_ble=$enable_ble chip_enable_ble=$enable_ble chip_crypto=\"boringssl\""

function ninja_target() {
# Print the ninja target required to build a gn label.
local GN_LABEL="$1"
local NINJA_TARGET="$(gn ls "$OUTPUT_ROOT" --as=output "$GN_LABEL")"
echo "$NINJA_TARGET"
}

function wheel_output_dir() {
# Print the wheel output directory for a pw_python_package or
# pw_python_distribution. The label must end in "._build_wheel".
local GN_LABEL="$1"
local NINJA_TARGET="$(ninja_target "$GN_LABEL")"
local WHEEL_DIR="$OUTPUT_ROOT"/"$(dirname "$NINJA_TARGET")/$(basename -s .stamp "$NINJA_TARGET")"
echo "$WHEEL_DIR"
}

# Compile Python wheels
ninja -C "$OUTPUT_ROOT" python_wheels

Expand All @@ -200,6 +184,11 @@ WHEEL=("$OUTPUT_ROOT"/controller/python/chip*.whl)
# Add the matter_testing_infrastructure wheel
WHEEL+=("$OUTPUT_ROOT"/python/obj/src/python_testing/matter_testing_infrastructure/chip-testing._build_wheel/chip_testing-*.whl)

if [ "$install_pytest_requirements" = "yes" ]; then
# Add the matter_yamltests_distribution wheel
WHEEL+=("$OUTPUT_ROOT"/obj/scripts/matter_yamltests_distribution._build_wheel/matter_yamltests-*.whl)
fi

if [ -n "$extra_packages" ]; then
WHEEL+=("$extra_packages")
fi
Expand All @@ -221,14 +210,7 @@ if [ -n "$install_virtual_env" ]; then
"$ENVIRONMENT_ROOT"/bin/python -m pip install --upgrade "${WHEEL[@]}"

if [ "$install_pytest_requirements" = "yes" ]; then
YAMLTESTS_GN_LABEL="//scripts:matter_yamltests_distribution._build_wheel"
# Add wheels from pw_python_package or pw_python_distribution templates.
YAMLTEST_WHEEL=(
"$(ls -tr "$(wheel_output_dir "$YAMLTESTS_GN_LABEL")"/*.whl | head -n 1)"
)

echo_blue "Installing python test dependencies ..."
"$ENVIRONMENT_ROOT"/bin/pip install --upgrade "${YAMLTEST_WHEEL[@]}"
"$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/scripts/tests/requirements.txt"
"$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/src/python_testing/requirements.txt"
fi
Expand Down
Loading

0 comments on commit 5be3c5f

Please sign in to comment.