From 7eac8f23a2f3292a051958154556fc108e8e041a Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Thu, 24 Nov 2022 10:29:45 +0100 Subject: [PATCH 1/8] =?UTF-8?q?docs:=20=F0=9F=94=A5=20Remove=20espmonitor?= =?UTF-8?q?=20chapter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tooling/espmonitor.md | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 src/tooling/espmonitor.md diff --git a/src/tooling/espmonitor.md b/src/tooling/espmonitor.md deleted file mode 100644 index c3e3e4a2..00000000 --- a/src/tooling/espmonitor.md +++ /dev/null @@ -1,17 +0,0 @@ -# espmonitor - -The [esp-rs/espmonitor] repository contains two crates, `cargo-espmonitor` and `espmonitor`. - -## cargo-espmonitor - -```bash -cargo install cargo-espmonitor -``` - -## espmonitor - -```bash -cargo install espmonitor -``` - -[esp-rs/espmonitor]: https://github.com/esp-rs/espmonitor From 8611ad3d67dffcb91dd153ceaf8aaef7687a0b23 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Thu, 24 Nov 2022 10:29:52 +0100 Subject: [PATCH 2/8] =?UTF-8?q?docs:=20=F0=9F=94=A5=20Remove=20espmonitor?= =?UTF-8?q?=20chapter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SUMMARY.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 9039025e..d956de92 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -11,7 +11,6 @@ - [Tooling](./tooling/index.md) - [Text Editors and IDEs](./tooling/text-editors-and-ides.md) - [espflash](./tooling/espflash.md) - - [espmonitor](./tooling/espmonitor.md) - [Debugging](./tooling/debugging/index.md) - [probe-rs](./tooling/debugging/probe-rs.md) - [OpenOCD](./tooling/debugging/openocd.md) From 751354ff6992e700a4968aade7e9d19febf30888 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Thu, 24 Nov 2022 10:30:17 +0100 Subject: [PATCH 3/8] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Update=20espflash=20?= =?UTF-8?q?chapter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tooling/espflash.md | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/tooling/espflash.md b/src/tooling/espflash.md index f92e95ed..804bfa7f 100644 --- a/src/tooling/espflash.md +++ b/src/tooling/espflash.md @@ -4,46 +4,45 @@ A serial flasher utility for ESP devices. Supports flashing _ESP32_, _ESP32-C2_, The [esp-rs/espflash] repository contains two crates, `cargo-espflash` and `espflash`. You can find more information on both of these in their respective sections below. +> #### A note on `espflash` and `cargo-espflash`. +> +> The `espflash` and `cargo-espflash` commands showed bellow, assume that version `2.0` or +> greater is installed. + [esp-rs/espflash]: https://github.com/esp-rs/espflash ## cargo-espflash Provides a subcommand for `cargo` which handles cross-compilation and flashing. Note that this requires the unstable `build-std` cargo feature; for more information on this please refer to [the cargo documentation]. -To install: - -```bash -cargo install cargo-espflash -``` +See [Installation section of cargo-espflash README] for details on how to install it. This command must be run within a Cargo project, ie.) a directory containing a `Cargo.toml` file. For example, to build an example named 'blinky' in `release` mode, flash the resulting binary to a device, and then subsequently start a serial monitor: ```bash -cargo espflash --example=blinky --release --monitor +cargo espflash flash --example=blinky --release --monitor ``` -For more information please see to the [cargo-espflash README]. +For more information about usage, please see [Usage section of cargo-espflash README]. [the cargo documentation]: https://doc.rust-lang.org/cargo/reference/unstable.html#build-std -[cargo-espflash readme]: https://github.com/esp-rs/espflash/blob/master/cargo-espflash/README.md +[Installation section of cargo-espflash README]: https://github.com/esp-rs/espflash/tree/main/cargo-espflash#installation +[Usage section of cargo-espflash README]: https://github.com/esp-rs/espflash/tree/main/cargo-espflash#usage ## espflash Provides a standalone command-line application which flashes an ELF file to a device. -To install: +See [Installation section of espflash README] for details on how to install it. -```bash -cargo install espflash -``` - -Assuming you have built an ELF binary by other means already, `espflash` can be used to download it to your device. For example, if you have built the `getting-started/blinky` example from [esp-idf] using `idf.py` you might run something like: +Assuming you have built an ELF binary by other means already, `espflash` can be used to download it to your device and monitor the serial port. For example, if you have built the `getting-started/blinky` example from [esp-idf] using `idf.py` you might run something like: ```bash -espflash build/blinky +espflash flash build/blinky --monitor ``` +See [Usage section of espflash README] for more details and other commands. -For more information please see to the [espflash README]. - +[Installation section of espflash README]: https://github.com/esp-rs/espflash/tree/main/espflash#installation [esp-idf]: https://github.com/espressif/esp-idf [espflash readme]: https://github.com/esp-rs/espflash/blob/master/espflash/README.md +[Usage section of espflash README]: https://github.com/esp-rs/espflash/tree/main/espflash#usage From 82906c361fa8ff9d669ffb3740d752f73777cb2d Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Thu, 24 Nov 2022 10:39:36 +0100 Subject: [PATCH 4/8] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Fix=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tooling/espflash.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tooling/espflash.md b/src/tooling/espflash.md index 804bfa7f..19fe517a 100644 --- a/src/tooling/espflash.md +++ b/src/tooling/espflash.md @@ -6,14 +6,14 @@ The [esp-rs/espflash] repository contains two crates, `cargo-espflash` and `espf > #### A note on `espflash` and `cargo-espflash`. > -> The `espflash` and `cargo-espflash` commands showed bellow, assume that version `2.0` or +> The `espflash` and `cargo-espflash` commands shown below, assume that version `2.0` or > greater is installed. [esp-rs/espflash]: https://github.com/esp-rs/espflash ## cargo-espflash -Provides a subcommand for `cargo` which handles cross-compilation and flashing. Note that this requires the unstable `build-std` cargo feature; for more information on this please refer to [the cargo documentation]. +Provides a subcommand for `cargo` that handles cross-compilation and flashing. Note that this requires the unstable `build-std` cargo feature; for more information on this please refer to [the cargo documentation]. See [Installation section of cargo-espflash README] for details on how to install it. @@ -31,7 +31,7 @@ For more information about usage, please see [Usage section of cargo-espflash RE ## espflash -Provides a standalone command-line application which flashes an ELF file to a device. +Provides a standalone command-line application that flashes an ELF file to a device. See [Installation section of espflash README] for details on how to install it. From 757459f7a78f37eddebd25982e362721c4fb3119 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Thu, 24 Nov 2022 10:44:53 +0100 Subject: [PATCH 5/8] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Fix=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tooling/espflash.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tooling/espflash.md b/src/tooling/espflash.md index 19fe517a..3aca7170 100644 --- a/src/tooling/espflash.md +++ b/src/tooling/espflash.md @@ -6,8 +6,7 @@ The [esp-rs/espflash] repository contains two crates, `cargo-espflash` and `espf > #### A note on `espflash` and `cargo-espflash`. > -> The `espflash` and `cargo-espflash` commands shown below, assume that version `2.0` or -> greater is installed. +> The `espflash` and `cargo-espflash` commands shown below, assume that version `2.0` or greater. [esp-rs/espflash]: https://github.com/esp-rs/espflash From fbf2fe67cd49957b94fbdc4de37fa4972ea7ceee Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Thu, 24 Nov 2022 11:42:07 +0100 Subject: [PATCH 6/8] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Add=20paragraph=20on?= =?UTF-8?q?=20using=20espflash=20as=20a=20cargo=20runenr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tooling/espflash.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tooling/espflash.md b/src/tooling/espflash.md index 3aca7170..878e0252 100644 --- a/src/tooling/espflash.md +++ b/src/tooling/espflash.md @@ -41,6 +41,14 @@ espflash flash build/blinky --monitor ``` See [Usage section of espflash README] for more details and other commands. +`espflash` can be used as a Cargo runner by adding the following to your project's `.cargo/config.toml` file: +```toml +[target.'cfg(any(target_arch = "riscv32", target_arch = "xtensa"))'] +runner = "espflash flash --monitor" +``` +With this configuration you can flash and monitor you application using `cargo run`. + + [Installation section of espflash README]: https://github.com/esp-rs/espflash/tree/main/espflash#installation [esp-idf]: https://github.com/espressif/esp-idf [espflash readme]: https://github.com/esp-rs/espflash/blob/master/espflash/README.md From 598abe974aa09df8e507866f58966a217b033494 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Thu, 24 Nov 2022 11:42:20 +0100 Subject: [PATCH 7/8] =?UTF-8?q?docs:=20=F0=9F=93=9D=20Update=20detail=20on?= =?UTF-8?q?=20espup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/installation/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/installation/installation.md b/src/installation/installation.md index 92bfcc02..1ca6dc3a 100644 --- a/src/installation/installation.md +++ b/src/installation/installation.md @@ -84,7 +84,7 @@ Because there is no `Xtensa` support in the mainline Rust compiler you must use [esp-rs/espup] is a tool for installing and maintaining the required ecosystem to develop applications in Rust for Espressif SoC's (both `Xtensa` and `RISC-V` targets). -`espup` takes care of installing the proper Rust compiler (our fork in case of `Xtensa` targets, and the `nightly` toolchain with the necessary target for `RISC-V` targets), `LLVM` toolchain, `GCC` toolchains, and many other things. For more details, [see Usage section of the `espup` Readme]. +`espup` takes care of installing rustup, the proper Rust compiler (our fork in case of `Xtensa` targets, and the `nightly` toolchain with the necessary target for `RISC-V` targets), `LLVM` toolchain, `GCC` toolchains, and many other things. For more details, [see Usage section of the `espup` Readme]. In order to install `espup`: ```sh From c8365e80b63113a6b1ce60f94f05173c6fda66f8 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Mon, 19 Dec 2022 09:40:49 +0100 Subject: [PATCH 8/8] =?UTF-8?q?feat:=20=E2=9C=A8=20Add=20"sugest=20edit"?= =?UTF-8?q?=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- book.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/book.toml b/book.toml index ef2d8261..776f5c1f 100644 --- a/book.toml +++ b/book.toml @@ -1,15 +1,16 @@ [book] -title = "The Rust on ESP Book" -description = "A comprehensive guide on using the Rust programming language with Espressif SoCs and modules" +title = "The Rust on ESP Book" +description = "A comprehensive guide on using the Rust programming language with Espressif SoCs and modules" multilingual = false -language = "en" +language = "en" [rust] edition = "2018" [output.html] git-repository-url = "https://github.com/esp-rs/book" -additional-js = ["assets/mermaid.min.js", "assets/mermaid-init.js"] +additional-js = ["assets/mermaid.min.js", "assets/mermaid-init.js"] +edit-url-template = "https://github.com/esp-rs/book/edit/main/{path}" [preprocessor.mermaid] command = "mdbook-mermaid"