Embedded Systems 1/Setup

The first step to learning how to program in a new language or on a new platform is "Hello, World!". In the case of embedded systems, the traditional string printing is replaced with sending the string over USB from the SoC to your computer and/or blinking an LED.

In this lab, all of the code has been written for you, and all you have to do is load it onto your SoC. However, while it may sound simple, this is arguably as difficult a task as coding the embedded system itself. Part of this is because there are so many different platforms, programming languages, targets, and programs involved, which makes troubleshooting by searching the internet more difficult than for coding. That being said, if you're programming on Linux in Rust for the STM32, everything should go pretty smoothly.

= Procedure =
 * 1) Install Rust, openocd, and gdb
 * 2) Create a new crate using the git template:   Note: For the purposes of this lab, 'crate' is synonymous with 'Rust project'. A crate name is generally  kebab-cased.
 * 3) Open a new terminal and run openocd from the git repo directory
 * 4) Run   in your terminal

Hopefully, everything ran fine and you now have a terminal window that says "Hello, World!" and a board with a blinking LED.

= Activity =

Now that you can upload code to your board, try modifying the code. The "Hello" example is outlined by the file. Try changing the string so that it says something else, or write a small program that lets you count down from 10.

= See also =
 * https://rust-embedded.github.io/book/intro/install.html
 * https://rust-embedded.github.io/book/start/hardware.html