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/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/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/config b/beginner/apps/.cargo/config.toml similarity index 100% rename from beginner/apps/.cargo/config rename to beginner/apps/.cargo/config.toml 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 diff --git a/embedded-workshop-book/src/installation.md b/embedded-workshop-book/src/installation.md index b1d036e..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: @@ -155,7 +159,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 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 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.