Skip to content

Commit

Permalink
add flasher section
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Nov 15, 2023
1 parent b188450 commit 5ade34b
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion examples/platform/silabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sample app.
- [Build Script](#Build-Script)
- [Build Arguments](#device-tracing)
- [Flashing](#Flashing)

- [Flasher Arguments](#Flasher-Arguments)
## Requirements

### Hardware Requirements
Expand Down Expand Up @@ -159,3 +159,54 @@ Here is a list of some of the GN arguments that can be added the build command.
On top of the GN arguments specified here, each sample app will specify, if need be, the GN arguments specific to it.
## Flashing
The Matter SDK provides a standard way of flashing a sample app binary onto hardware.
After completing a build, a python script is generated that can be used to flash the binary.
The naming structure of the file is
```sh
matter-silabs-<sample_name>-example.flash.py
```
For example, the lighting-app flasher script will be named
```py
matter-silabs-lighting-example.flash.py
```
To execute the script, the following command can be used:
```sh
python3 <path>/matter-silabs-lighting-example.flash.py
```
where `<path>` is the path to the output directory used in the build script.
> **Note**: It is also possible to flash the built binary with commander directly.
> The commander command is `commander flash <path>/matter-silabs-lighting-example.<s37/rps>` <br />
> The `.s37` binaires are used with the MGM24 and EFR32 families while the `.rps` binaires are only used for the SiWx917 SoC family.
### Flasher Arguments
The flashing scripts provides configuration arguments and operation arguments.
The configuration arguments are used to configure the operation arguments.
Here is a list of the configuration arguments that can be added to the flasher script.
| Argument | Description |
| :------: | :-----------|
| --verbose, -v | Report more verbosely |
| --commander FILE | Path to the commander executable |
| --device, -d DEVICE | Device family or platform to target (EFR32, MGM24, 917) - TODO |
| --serialno, -s SERIAL | Serial number of device to flash. <br /> This argument is necessary when multiple boards of the same family are connected. |
| --ip, -a ADDRESS | IP Address of the device to flash |
Here is a list of the operations arguments that can be added to the flasher script.
| Argument | Description | Commander equivalent |
| :------: | :-----------| :--------------------|
| --erase | Erase the devices flash. <br /> This options completly wipes the devices flash including factory data. | `commander device masserase`
| --application FILE | Specify which binary to flash. <br /> The flasher script provides a default path to the binary that was just built. | `commander flash` |
| --reset | Reset device after flashing | `commander device reset` |
| --skip-reset | Do not reset device after flashing | `commander flash --noreset` |
| --verify-application | Verify the image after flashing | `commander verify` |
Executing the flasher scripts with the `--help / -h` arguments will print a help menu with all the possible arguments.
> **Note**: For a wider range of features, commander tool can be used directly. Running `commander --help/-h` will list all the available options of the tool.

0 comments on commit 5ade34b

Please sign in to comment.