From bf2a5951f18c3059176cd30026a9d90fca393c7a Mon Sep 17 00:00:00 2001 From: Mirabellensaft Date: Thu, 9 Jul 2020 12:16:32 +0200 Subject: [PATCH] rename folder, add comments --- beginner-workshop/src/SUMMARY.md | 18 -------- .../book.toml | 0 embedded-workshop-book/src/SUMMARY.md | 44 +++++++++++++++++++ .../src/building-programm.md | 3 ++ .../src/chapter_1.md | 0 .../src/dongle.md | 0 .../src/flashing-programm.md | 0 .../src/from-scatch.md | 0 .../src/hardware.md | 2 + .../src/intro.md | 6 +++ .../src/panicking.md | 0 .../src/parts-embedded-programm.md | 8 +++- .../src/radio-in.md | 0 .../src/radio-out.md | 0 .../src/radio-puzzle.md | 0 .../src/references-ressources.md | 0 .../src/running-from-vsc.md | 2 +- .../src/time.md | 4 +- .../src/using-hal.md | 1 + .../src/viewing-logs.md | 0 20 files changed, 67 insertions(+), 21 deletions(-) delete mode 100644 beginner-workshop/src/SUMMARY.md rename {beginner-workshop => embedded-workshop-book}/book.toml (100%) create mode 100644 embedded-workshop-book/src/SUMMARY.md rename {beginner-workshop => embedded-workshop-book}/src/building-programm.md (97%) rename {beginner-workshop => embedded-workshop-book}/src/chapter_1.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/dongle.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/flashing-programm.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/from-scatch.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/hardware.md (90%) rename {beginner-workshop => embedded-workshop-book}/src/intro.md (57%) rename {beginner-workshop => embedded-workshop-book}/src/panicking.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/parts-embedded-programm.md (86%) rename {beginner-workshop => embedded-workshop-book}/src/radio-in.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/radio-out.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/radio-puzzle.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/references-ressources.md (100%) rename {beginner-workshop => embedded-workshop-book}/src/running-from-vsc.md (88%) rename {beginner-workshop => embedded-workshop-book}/src/time.md (90%) rename {beginner-workshop => embedded-workshop-book}/src/using-hal.md (93%) rename {beginner-workshop => embedded-workshop-book}/src/viewing-logs.md (100%) diff --git a/beginner-workshop/src/SUMMARY.md b/beginner-workshop/src/SUMMARY.md deleted file mode 100644 index 97804f0..0000000 --- a/beginner-workshop/src/SUMMARY.md +++ /dev/null @@ -1,18 +0,0 @@ -# Summary - -- [Intro](./intro.md) -- [Hardware](./hardware.md) -- [Parts of an Embedded Program](./parts-embedded-programm.md) -- [Building an Embedded Program](./building-programm.md) -- [Flashing the Program](./flashing-programm.md) -- [Viewing Logs](./viewing-logs.md) -- [Runnging the Program from VS Code](./running-from-vsc.md) -- [Panicking](./panicking.md) -- [Using a Hardware Abstraction Layer](./using-hal.md) -- [Timers and Time](./time.md) -- [nRF52840 Dongle](./dongle.md) -- [Radio Out](./radio-out.md) -- [Radio In ](./radio-in.md) -- [Radio Puzzle](./radio-puzzle.md) -- [Starting a Project from Scatch](./from-scatch.md) -- [References and Ressources](./references-ressources.md) \ No newline at end of file diff --git a/beginner-workshop/book.toml b/embedded-workshop-book/book.toml similarity index 100% rename from beginner-workshop/book.toml rename to embedded-workshop-book/book.toml diff --git a/embedded-workshop-book/src/SUMMARY.md b/embedded-workshop-book/src/SUMMARY.md new file mode 100644 index 0000000..7626b78 --- /dev/null +++ b/embedded-workshop-book/src/SUMMARY.md @@ -0,0 +1,44 @@ +# Summary + +- [Intro](./intro.md) +- [Hardware](./hardware.md) +- [Beginner Workbook](./beginner-workbook.md) + - [Parts of an Embedded Program](./parts-embedded-programm.md) + - [Building an Embedded Program](./building-programm.md) + - [Flashing the Program](./flashing-programm.md) + - [Viewing Logs](./viewing-logs.md) + - [Runnging the Program from VS Code](./running-from-vsc.md) + - [Panicking](./panicking.md) + - [Using a Hardware Abstraction Layer](./using-hal.md) + - [Timers and Time](./time.md) + - [nRF52840 Dongle](./dongle.md) + - [Radio Out](./radio-out.md) + - [Radio In ](./radio-in.md) + - [Radio Puzzle](./radio-puzzle.md) + - [Starting a Project from Scatch](./from-scatch.md) +- [Advanced Workbook](./advanced-workbook.md) + - [Code Organization](./code-organisation.md) + - [Listing USB Devices](./listing-usb-devices.md) + - [Hello, world!](./hello-world.md) + - [Checking the API documentation](./api-documentation.md) + - [RTIC hello](./rtic-hello.md) + - [Dealing with Registers](./dealing-with-registers.md) + - [Event Handling](./event-handling.md) + - [Task State](./task-state.md) + - [USB Enumeration](./usb-enumeration.md) + - [Dealing with USB Events](./usb-events.md) + - [USB Endpoints](./usb-endpoints.md) + - [Control Transfers](./control-transfers.md) + - [SETUP Stage](./setup-stage.md) + - [Device Descriptor](./device-descriptor.md) + - [DATA Stage](./data-stage.md) + - [DMA](./dma.md) + - [More Standard Requests](./more-standart-requests.md) + - [Error Handling](./error-handling.md) + - [Device State](./device-state.md) + - [SET_ADDRESS](./set-address.md) + - [GET_DESCRIPTOR Configuration](./get-descriptor-config.md) + - [Interface](./interface.md) + - [Configuration Descriptor](./configuration-descriptor.md) + - [Interface Descriptor](./interface-descriptor.md) +- [References and Ressources](./references-ressources.md) \ No newline at end of file diff --git a/beginner-workshop/src/building-programm.md b/embedded-workshop-book/src/building-programm.md similarity index 97% rename from beginner-workshop/src/building-programm.md rename to embedded-workshop-book/src/building-programm.md index d12be9a..c1542ff 100644 --- a/beginner-workshop/src/building-programm.md +++ b/embedded-workshop-book/src/building-programm.md @@ -1,5 +1,8 @@ # Building an Embedded Program +[❗️Intro ] + +[❗️Do you want the people to use this command?] The following command cross compiles the program to the ARM Cortex-M4 architecture. The `--target` arguments instructs Cargo to cross compile the program. diff --git a/beginner-workshop/src/chapter_1.md b/embedded-workshop-book/src/chapter_1.md similarity index 100% rename from beginner-workshop/src/chapter_1.md rename to embedded-workshop-book/src/chapter_1.md diff --git a/beginner-workshop/src/dongle.md b/embedded-workshop-book/src/dongle.md similarity index 100% rename from beginner-workshop/src/dongle.md rename to embedded-workshop-book/src/dongle.md diff --git a/beginner-workshop/src/flashing-programm.md b/embedded-workshop-book/src/flashing-programm.md similarity index 100% rename from beginner-workshop/src/flashing-programm.md rename to embedded-workshop-book/src/flashing-programm.md diff --git a/beginner-workshop/src/from-scatch.md b/embedded-workshop-book/src/from-scatch.md similarity index 100% rename from beginner-workshop/src/from-scatch.md rename to embedded-workshop-book/src/from-scatch.md diff --git a/beginner-workshop/src/hardware.md b/embedded-workshop-book/src/hardware.md similarity index 90% rename from beginner-workshop/src/hardware.md rename to embedded-workshop-book/src/hardware.md index 88540db..0e99036 100644 --- a/beginner-workshop/src/hardware.md +++ b/embedded-workshop-book/src/hardware.md @@ -4,6 +4,8 @@ In this workshop we'll use both the nRF52840 Development Kit (DK) and the nRF528 For the span of this workshop keep the nRF52840 DK connected to your PC using a micro-USB cable. Connect the USB cable to the J2 port on the nRF52840 DK. Instructions to identify the USB ports on the nRF52840 board can be found in the top level README file. +[❗️link or crosspost J2 instructions, for less clicking] + ## The nRF52840 Some details about the nRF52840 microcontroller that are relevant to this workshop. diff --git a/beginner-workshop/src/intro.md b/embedded-workshop-book/src/intro.md similarity index 57% rename from beginner-workshop/src/intro.md rename to embedded-workshop-book/src/intro.md index 8c9e4b4..e65c5f5 100644 --- a/beginner-workshop/src/intro.md +++ b/embedded-workshop-book/src/intro.md @@ -4,3 +4,9 @@ ### in development ❗️ To do + + +### in Production + + +## About the Course \ No newline at end of file diff --git a/beginner-workshop/src/panicking.md b/embedded-workshop-book/src/panicking.md similarity index 100% rename from beginner-workshop/src/panicking.md rename to embedded-workshop-book/src/panicking.md diff --git a/beginner-workshop/src/parts-embedded-programm.md b/embedded-workshop-book/src/parts-embedded-programm.md similarity index 86% rename from beginner-workshop/src/parts-embedded-programm.md rename to embedded-workshop-book/src/parts-embedded-programm.md index 662f127..6468997 100644 --- a/beginner-workshop/src/parts-embedded-programm.md +++ b/embedded-workshop-book/src/parts-embedded-programm.md @@ -1,5 +1,6 @@ # Parts of an Embedded Program +[❗️Intro ] Open the `beginner/apps` folder in VS Code. ``` console @@ -10,11 +11,16 @@ $ code beginner/apps Then open the `src/bin/hello.rs` file. If you find it more convenient to open the repository at the root then please also add the `beginner/apps` folder to the VS Code workspace: right click the left side panel, select "Add folder to workspace" and add the `beginner/apps` folder. +[❗️No optional way of doing things here] Note the differences between this embedded program and a desktop program: - The `#![no_std]` attribute indicates that the program will not make use of the standard library, `std` crate. Instead it will use the `core` library, a subset of the standard library that does not on a underlying operating system (OS). +[❗️Have a non embedded program up to compare] + + The `#![no_std]` attribute indicates that the program will not make use of the standard library, `std` crate. Instead it will use the `core` library, a subset of the standard library that does depend not on a underlying operating system (OS). The `#![no_main]` attribute indicates that the program will use a custom entry point instead of the default `fn main() { .. }` one. The `#[entry]` attribute declares the custom entry point of the program. The entry point must be a divergent function; note that the return type is the never type `!`. The function is not allowed to return; therefore the program is not allowed to terminate. + + diff --git a/beginner-workshop/src/radio-in.md b/embedded-workshop-book/src/radio-in.md similarity index 100% rename from beginner-workshop/src/radio-in.md rename to embedded-workshop-book/src/radio-in.md diff --git a/beginner-workshop/src/radio-out.md b/embedded-workshop-book/src/radio-out.md similarity index 100% rename from beginner-workshop/src/radio-out.md rename to embedded-workshop-book/src/radio-out.md diff --git a/beginner-workshop/src/radio-puzzle.md b/embedded-workshop-book/src/radio-puzzle.md similarity index 100% rename from beginner-workshop/src/radio-puzzle.md rename to embedded-workshop-book/src/radio-puzzle.md diff --git a/beginner-workshop/src/references-ressources.md b/embedded-workshop-book/src/references-ressources.md similarity index 100% rename from beginner-workshop/src/references-ressources.md rename to embedded-workshop-book/src/references-ressources.md diff --git a/beginner-workshop/src/running-from-vsc.md b/embedded-workshop-book/src/running-from-vsc.md similarity index 88% rename from beginner-workshop/src/running-from-vsc.md rename to embedded-workshop-book/src/running-from-vsc.md index 12c26dc..a14292a 100644 --- a/beginner-workshop/src/running-from-vsc.md +++ b/embedded-workshop-book/src/running-from-vsc.md @@ -26,4 +26,4 @@ stack backtrace: `cargo run` will compile the application and then invoke the `dk-run` tool with its argument set to the path of the output ELF file. -Unlike `cargo-embed`, `dk-run` will terminate when the program reaches a breakpoint (`asm::bkpt`) that halts the device. Before exiting `dk-run` will print a stack backtrace of the program starting from the breakpoint. This can be used to write small test programs that are meant to perform some work and then terminate. \ No newline at end of file +Unlike `cargo-embed`, `dk-run` will terminate when the program reaches a breakpoint (`asm::bkpt`) that halts the device. Before exiting, `dk-run` will print a stack backtrace of the program starting from the breakpoint. This can be used to write small test programs that are meant to perform some work and then terminate. \ No newline at end of file diff --git a/beginner-workshop/src/time.md b/embedded-workshop-book/src/time.md similarity index 90% rename from beginner-workshop/src/time.md rename to embedded-workshop-book/src/time.md index dbb016a..7ef1a54 100644 --- a/beginner-workshop/src/time.md +++ b/embedded-workshop-book/src/time.md @@ -10,4 +10,6 @@ This program will blink (turn on and off) one of the LEDs on the board. The time The other time related API exposed by the `dk` HAL is the `dk::uptime` function. This function returns the time that has elapsed since the call to the `dk::init` function. This function is used in the program to log the time of each LED toggle operation. -Next, we'll look into the radio API exposed by the `dk` HAL. But before that we'll need to set up the nRF52840 Dongle. \ No newline at end of file +Next, we'll look into the radio API exposed by the `dk` HAL. But before that we'll need to set up the nRF52840 Dongle. + +[❗️assignment to chnge something] \ No newline at end of file diff --git a/beginner-workshop/src/using-hal.md b/embedded-workshop-book/src/using-hal.md similarity index 93% rename from beginner-workshop/src/using-hal.md rename to embedded-workshop-book/src/using-hal.md index cb2c80a..a2b4118 100644 --- a/beginner-workshop/src/using-hal.md +++ b/embedded-workshop-book/src/using-hal.md @@ -1,5 +1,6 @@ # Using a Hardware Abstraction Layer +[❗️Idea: explain HAL, run program, open doc with an assignment to change led pattern] In this section we'll start using the hardware features of the nRF52840 and the board. Open the `src/bin/led.rs` file. diff --git a/beginner-workshop/src/viewing-logs.md b/embedded-workshop-book/src/viewing-logs.md similarity index 100% rename from beginner-workshop/src/viewing-logs.md rename to embedded-workshop-book/src/viewing-logs.md