SRUG 2024.06 Meetup
https://slides.com/u007d
On a Raspberry Pi Pico
Prerequisites:
1. https://www.rust-lang.org/tools/install
2. `rustup target add thumbv6m-none-eabi`
Mac: `brew install git` (see https://brew.sh/) or
https://github.com/git-guides/install-git
Ubuntu: `apt install git`
Windows: https://github.com/git-guides/install-git
The Raspberry Pi Pico has a different CPU then your computer.
Your computer has to compile your source code to machine language for a processor it can't run. This is called cross-compiling.
Your cross-compiled program then needs to be transferred to the Pi and run there.
To do this:
1. Unplug your RPi Pico USB cable (either end) if it is plugged in.
2. Hold down the white button on the RPi Pico.
3. Re-connect your RPi Pico with the white button held down.
(Your RPi Pico is now ready to receive your cross-compiled program.)
4. `cargo run`. (Your program is now running on your RPi Pico.)
5. Repeat the above procedure to send and run a new version of your code to your RPi Pico.