From 80cf893d7e15e57c87fc00bb277e6f88f9c0ac99 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Tue, 19 Jan 2021 16:04:39 +0100 Subject: [PATCH 1/6] link to workshop repo --- embedded-workshop-book/src/installation.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/embedded-workshop-book/src/installation.md b/embedded-workshop-book/src/installation.md index b1d036e..e8dae1c 100644 --- a/embedded-workshop-book/src/installation.md +++ b/embedded-workshop-book/src/installation.md @@ -155,7 +155,15 @@ Installed package `probe-run v0.1.8` (..) ### Workshop tools -The workshop git repository contains custom crates that help you with flashing and debugging the workshops. Depending on the workshop you're attending, you need to install all or some of them. +The [workshop git repository](https://github.com/ferrous-systems/embedded-trainings-2020) contains custom crates that help you with flashing and debugging the workshops. Depending on the workshop you're attending, you need to install all or some of them. + +In any case, clone and change into the repository first: + +```console +$ git clone https://github.com/ferrous-systems/embedded-trainings-2020.git +$ cd embedded-trainings-2020 +``` + #### Beginner workshop From 7e7901b1e7c63fbae59c83f6bb3e82b5d168fb36 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Tue, 19 Jan 2021 16:05:46 +0100 Subject: [PATCH 2/6] Update Embed.toml viz --- embedded-workshop-book/src/viewing-logs.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/embedded-workshop-book/src/viewing-logs.md b/embedded-workshop-book/src/viewing-logs.md index d77d675..38c250c 100644 --- a/embedded-workshop-book/src/viewing-logs.md +++ b/embedded-workshop-book/src/viewing-logs.md @@ -6,8 +6,7 @@ Unlike `cargo flash`, `cargo-embed` has no `--chip` flag; instead the target chi ``` toml # Embed.toml -[general] -chip = "nRF52840_xxAA" +{{#include ../../beginner/apps/Embed.toml}} ``` ✅ Use the following command to view your logs. From d87272cb760714198d064fdccc4b366493747989 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Tue, 19 Jan 2021 16:29:44 +0100 Subject: [PATCH 3/6] rm links to oxidize --- README.md | 12 +++++++++--- .../src/troubleshoot-cargo-flash.md | 13 ++++++++++--- .../src/troubleshoot-dongle-flash.md | 6 +++++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6515eec..8190d48 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,17 @@ # `embedded-trainings-2020` -Material for the beginner and advanced workshops of Oxidize Global (15.07.2020). +This repository contains the material for the beginner and advanced Embedded Rust workshops held by [Ferrous Systems]. -Website for this workshop: [https://embedded-trainings.ferrous-systems.com][book] +You can find the rendered book containing all instructions at [embedded-trainings.ferrous-systems.com][book] + +If you'd like to attend one of our open classes or book a custom training, please visit our [trainings website]. + +*This workshop was initially held at [Oxidize Global 2020]* [book]: https://embedded-trainings.ferrous-systems.com +[Ferrous Systems]: https://ferrous-systems.com +[trainings website]: https://ferrous-systems.com/training/ +[Oxidize Global 2020]: https://oxidizeconf.com ## Required hardware @@ -13,7 +20,6 @@ Website for this workshop: [https://embedded-trainings.ferrous-systems.com][book - 2 micro-USB cables - 2 available USB-A ports on your laptop / PC (you can use a USB hub if you don't have enough ports) - ## License The Ferrous Systems Embedded Training Courses (this project) are distributed under the following licenses: diff --git a/embedded-workshop-book/src/troubleshoot-cargo-flash.md b/embedded-workshop-book/src/troubleshoot-cargo-flash.md index ca01290..1b2f44c 100644 --- a/embedded-workshop-book/src/troubleshoot-cargo-flash.md +++ b/embedded-workshop-book/src/troubleshoot-cargo-flash.md @@ -18,7 +18,10 @@ $ cargo flash --chip nRF52840_xxAA --bin hello Error failed to flash app: The execution of 'erase_sector' failed with code 1 ``` -flash write protection is enabled in the device. To disable it use the `nrf-recover` tool. Instructions can be found in the [setup page](https://oxidizeconf.com/oxidize-global-setup/) and in the top-level README of this repository. +flash write protection is enabled in the device. To disable it use the `nrf-recover` tool. Instructions can be found in the [`nrf-recover` section of the Installation Instructions]. + +[`nrf-recover` section of the Installation Instructions]: ./installation.md#nrf-recover + ## Linux permissions @@ -30,7 +33,9 @@ Caused by: USB error while opening USB device: Access denied (insufficient permissions) ``` -udev rules need to be changed to allow non-root access. Instructions can be found in the [setup page](https://oxidizeconf.com/oxidize-global-setup/) and in the top-level README of this repository. +udev rules need to be changed to allow non-root access. Instructions can be found in the [`Linux only: USB` section of the Installation Instructions]. + +[`Linux only: USB` section of the Installation Instructions]: ./installation.md#linux-only-usb ## Wrong Windows Driver @@ -42,4 +47,6 @@ Caused by: USB error while opening USB device: Entity not found ``` -You need to bind the BULK interface of the J-Link USB device to the WinUSB driver using the Zadig tool. Instructions can be found in the [setup page](https://oxidizeconf.com/oxidize-global-setup/) and in the top-level README of this repository. +You need to bind the BULK interface of the J-Link USB device to the WinUSB driver using the Zadig tool. Instructions can be found in the [`Windows only: Zadig JLink driver` section of the Installation Instructions]. + +[`Windows only: Zadig JLink driver` section of the Installation Instructions]: ./installation.md#windows-only-zadig-jlink-driver diff --git a/embedded-workshop-book/src/troubleshoot-dongle-flash.md b/embedded-workshop-book/src/troubleshoot-dongle-flash.md index a9f6127..0f624e6 100644 --- a/embedded-workshop-book/src/troubleshoot-dongle-flash.md +++ b/embedded-workshop-book/src/troubleshoot-dongle-flash.md @@ -6,4 +6,8 @@ packaging iHex using nrfutil ... Error: No such file or directory (os error 2) ``` -this indicates that `nrfutil`, the Python tool, is not installed or not available in your PATH. Instructions on how to install `nrfutil` can be found in the [setup page](https://oxidizeconf.com/oxidize-global-setup/) and in the top-level README of this repository. If you install `nrfutil` in a virtual environment you'll need to activate the environment; the `nrfutil` binary must be available in your PATH. +this indicates that `nrfutil`, the Python tool, is not installed or not available in your PATH. Instructions on how to install `nrfutil` can be found in the [`nrfutil` section of the Installation Instructions]. + +❗️ If you install `nrfutil` in a virtual environment you'll need to activate the environment; the `nrfutil` binary must be available in your PATH. + +[`nrfutil` section of the Installation Instructions]: ./installation.md#nrfutil \ No newline at end of file From b7933e8690a3a00259b52c35e153e076e421dfcd Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Tue, 19 Jan 2021 16:41:37 +0100 Subject: [PATCH 4/6] rm profile overrides --- advanced/firmware/Cargo.toml | 19 ------------------- beginner/apps/Cargo.toml | 19 ------------------- 2 files changed, 38 deletions(-) diff --git a/advanced/firmware/Cargo.toml b/advanced/firmware/Cargo.toml index ae85958..943d6ef 100644 --- a/advanced/firmware/Cargo.toml +++ b/advanced/firmware/Cargo.toml @@ -40,22 +40,3 @@ incremental = false lto = "fat" opt-level = 3 overflow-checks = false - -# faster builds from scratch -[profile.dev.build-override] -codegen-units = 8 -debug = false -debug-assertions = false -opt-level = 0 -overflow-checks = false - -[profile.release.build-override] -codegen-units = 8 -debug = false -debug-assertions = false -opt-level = 0 -overflow-checks = false - -# adds unwind info to external assembly -[patch.crates-io] -cortex-m = { git = "https://github.com/rust-embedded/cortex-m" } diff --git a/beginner/apps/Cargo.toml b/beginner/apps/Cargo.toml index 9501ca0..a9374c5 100644 --- a/beginner/apps/Cargo.toml +++ b/beginner/apps/Cargo.toml @@ -31,22 +31,3 @@ incremental = false lto = "fat" opt-level = 3 overflow-checks = false - -# faster builds from scratch -[profile.dev.build-override] -codegen-units = 8 -debug = false -debug-assertions = false -opt-level = 0 -overflow-checks = false - -[profile.release.build-override] -codegen-units = 8 -debug = false -debug-assertions = false -opt-level = 0 -overflow-checks = false - -# adds unwind info to external assembly -[patch.crates-io] -cortex-m = { git = "https://github.com/rust-embedded/cortex-m" } \ No newline at end of file From 1f383cad1aab47032efbe97a3c13a8cbdd6e92d7 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Tue, 19 Jan 2021 16:46:13 +0100 Subject: [PATCH 5/6] recommend better TOML --- embedded-workshop-book/src/installation.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/embedded-workshop-book/src/installation.md b/embedded-workshop-book/src/installation.md index e8dae1c..0d53101 100644 --- a/embedded-workshop-book/src/installation.md +++ b/embedded-workshop-book/src/installation.md @@ -109,6 +109,10 @@ Go to [https://rustup.rs](https://rustup.rs/) and follow the instructions. **Windows**: It's OK to ignore the message about `git` not being installed, if you get one! +### Better TOML + +**All**: For better handling of `Cargo.toml` files, we recommend you install [Better TOML](https://marketplace.visualstudio.com/items?itemName=bungcip.better-toml) if you're using VS Code. + ### Rust Cross compilation support **All**: Run this command in a terminal: From a2ba979a7b8758ecc2f6de6cc4336f0062383b70 Mon Sep 17 00:00:00 2001 From: Lotte Steenbrink Date: Tue, 19 Jan 2021 16:47:51 +0100 Subject: [PATCH 6/6] rename config s to config.toml --- advanced/firmware/.cargo/{config => config.toml} | 0 beginner/apps/.cargo/{config => config.toml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename advanced/firmware/.cargo/{config => config.toml} (100%) rename beginner/apps/.cargo/{config => config.toml} (100%) diff --git a/advanced/firmware/.cargo/config b/advanced/firmware/.cargo/config.toml similarity index 100% rename from advanced/firmware/.cargo/config rename to advanced/firmware/.cargo/config.toml diff --git a/beginner/apps/.cargo/config b/beginner/apps/.cargo/config.toml similarity index 100% rename from beginner/apps/.cargo/config rename to beginner/apps/.cargo/config.toml