Skip to content

Commit

Permalink
Merge branch 'master' into ember_tlv_reader_encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Oct 23, 2024
2 parents ecdca36 + a4a911c commit e0811b7
Show file tree
Hide file tree
Showing 115 changed files with 1,800 additions and 3,624 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:81
image: ghcr.io/project-chip/chip-build-efr32:85
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/examples-linux-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
--target linux-arm64-lit-icd-no-ble-clang \
--target linux-arm64-fabric-admin-clang-rpc \
--target linux-arm64-fabric-bridge-no-ble-clang-rpc \
--target linux-arm64-fabric-sync-no-ble-clang \
build \
"
- name: Bloat report - chip-tool
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ jobs:
linux debug fabric-bridge-app \
out/linux-x64-fabric-bridge-no-ble-rpc/fabric-bridge-app \
/tmp/bloat_reports/
- name: Build example Fabric Sync
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-fabric-sync-no-ble \
build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux debug fabric-sync \
out/linux-x64-fabric-sync-no-ble/fabric-sync \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
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:81
image: ghcr.io/project-chip/chip-build-efr32:85
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,17 @@
[submodule "third_party/silabs/simplicity_sdk"]
path = third_party/silabs/simplicity_sdk
url = https://github.com/SiliconLabs/simplicity_sdk.git
branch = v2024.6.1-0
branch = v2024.6.2
platforms = silabs
[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
url = https://github.com/SiliconLabs/wiseconnect.git
branch = v3.3.2
branch = v3.3.3
platforms = silabs
[submodule "editline"]
path = third_party/editline/repo
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
51 changes: 30 additions & 21 deletions docs/development_controllers/chip-tool/chip_tool_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,29 @@ the setup payload or performing discovery actions.

<hr>

## Source files
## Installation

You can find source files of the CHIP Tool in the `examples/chip-tool`
directory.

> **Note:** The CHIP Tool caches the configuration state in the
> `/tmp/chip_tool_config.ini` file. Deleting this and other `.ini` files in the
> `/tmp` directory can sometimes resolve issues related to stale configuration.
On Linux distributions
[running snapd](https://snapcraft.io/docs/installing-snapd), such as Ubuntu, the
CHIP Tool can be installed using the
[chip-tool snap](https://snapcraft.io/chip-tool). To do this, run:

> **Note:** To make the configuration persistent (since `/tmp` directory might
> be flushed at each reboot) you can change the directory where CHIP Tool caches
> its configuration by using the option `--storage-directory`
```
sudo snap install chip-tool
```

<hr>
## Building from source

## Building and running the CHIP Tool
The source files of the CHIP Tool are available in the `examples/chip-tool`
directory.

Before you can use the CHIP Tool, you must compile it from source on Linux
(amd64/aarch64) or macOS. If you want to run it on Raspberry Pi, it must use a
64-bit OS.
The source can be compiled on Linux (amd64/aarch64) or macOS. If you want to run
it on Raspberry Pi, you must use a 64-bit OS.

> **Note:** To ensure compatibility, always build the CHIP Tool and the Matter
> device from the same revision of the `connectedhomeip` repository.
### Building the CHIP Tool

To build and run the CHIP Tool:
To build the CHIP Tool:

1. Install all required packages for Matter and prepare the source code and the
build system. Read the [Building Matter](../../guides/BUILDING.md) guide for
Expand All @@ -50,10 +46,16 @@ To build and run the CHIP Tool:
In this command, `BUILD_PATH` specifies where the target binaries are to be
placed.
### Running the CHIP Tool
## Running the CHIP Tool
If you installed the CHIP Tool as a snap, the command to run it would be:
```
$ chip-tool
```
To check if the CHIP Tool runs correctly, execute the following command from the
`BUILD_PATH` directory:
If you compiled the CHIP Tool from source, it can be executed with the following
command from the `BUILD_PATH` directory:
```
$ ./chip-tool
Expand All @@ -68,6 +70,13 @@ more complex command by appending it with sub-commands. Examples of specific
commands and their use cases are described in the
[Supported commands and options](#supported-commands-and-options) section.
> **Note:** The CHIP Tool caches the configuration state in the
> `/tmp/chip_tool_config.ini` file. Deleting this and other `.ini` files in the
> `/tmp` directory can sometimes resolve issues related to stale configuration.
> To make the configuration persistent you can change the directory where CHIP
> Tool caches its configuration by using the command line option
> `--storage-directory`
<hr>
## CHIP Tool modes
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
4 changes: 2 additions & 2 deletions examples/light-switch-app/nrfconnect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ same Matter network.
To perform the unicast binding process, complete the following steps:
1. Build the CHIP Tool according to the steps from the
[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-and-running-the-chip-tool).
[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-from-source).
2. Go to the CHIP Tool build directory.
3. Add an ACL to the development kit that is programmed with the
[Lighting Application Example](../../lighting-app/nrfconnect/README.md) by
Expand Down Expand Up @@ -690,7 +690,7 @@ same Matter network.
To perform the unicast binding process, complete the following steps:
1. Build the CHIP Tool according to the steps from the
[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-and-running-the-chip-tool).
[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-from-source).
2. Go to the CHIP Tool build directory.
3. Add the light switch device to the multicast group by running the following
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
8 changes: 8 additions & 0 deletions examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
//! Disable feature
#define RSI_DISABLE 0

// Temmporary work-around for wifi-init failure in ACX modules with WiseConnect v3.3.3. This can be removed after integrating with
// WiseConnect v3.4.0
#if (SL_SI91X_ACX_MODULE == 1)
#define REGION_CODE IGNORE_REGION
#else
#define REGION_CODE US
#endif

static const sl_wifi_device_configuration_t config = {
.boot_option = LOAD_NWP_FW,
.mac_address = NULL,
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
1 change: 0 additions & 1 deletion examples/platform/silabs/uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ extern "C" {
#include "rsi_board.h"
#include "rsi_debug.h"
#include "rsi_rom_egpio.h"
#include "sl_si91x_usart.h"
#else // For EFR32
#if (_SILICON_LABS_32B_SERIES < 3)
#include "em_core.h"
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
Loading

0 comments on commit e0811b7

Please sign in to comment.