examples/README.md: clarify xtask subcommand usage and arguments (#4067)

- Update example commands to use the new `--chip` argument format for `build examples` and `run example` subcommands.
- Improve clarity by showing explicit argument order and usage.
- Reflect recent changes in xtask interface for building and running examples.

Signed-off-by: Alexei Pastuchov <info@maximka.de>
This commit is contained in:
Alexei Pastuchov 2025-09-06 12:01:15 +02:00 committed by GitHub
parent 7248d3d7d2
commit 6aaf12a08d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,7 @@ For more information regarding the examples, refer to the `README.md` file in an
You can build all examples for a given device using the `build examples` subcommand: You can build all examples for a given device using the `build examples` subcommand:
```shell ```shell
cargo xtask build examples esp-hal esp32 cargo xtask build examples esp-hal --chip esp32 all
``` ```
Note that we must specify which package to build the examples for, since this repository contains multiple packages. Specifying `esp-hal` will build the examples in the `examples/` directory instead. Note that we must specify which package to build the examples for, since this repository contains multiple packages. Specifying `esp-hal` will build the examples in the `examples/` directory instead.
@ -23,7 +23,7 @@ Note that we must specify which package to build the examples for, since this re
You can also build and then subsequently flash and run an example using the `run example` subcommand. With a target device connected to your host system, run: You can also build and then subsequently flash and run an example using the `run example` subcommand. With a target device connected to your host system, run:
```shell ```shell
cargo xtask run example esp-hal esp32c6 --example embassy_hello_world cargo xtask run example embassy_hello_world --chip=esp32c6
``` ```
Again, note that we must specify which package to build the example from, plus which example to build and flash to the target device. Again, note that we must specify which package to build the example from, plus which example to build and flash to the target device.