radlinskii / rustberry-pi-pico

Collection of firmware binaries for Raspberry Pi Pico written in Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rustberry Pi Pico

This repo contains various programs I implemented in my new favourite programming language: Rust
and run on my new favourite toy runtime environment: Raspberry Pi Pico.

Description

The ultimate goal for this repo is to implement a keyboard firmware in Rust and run it on Raspberry Pi Pico,
but as I need to learn working with embedded rust first, I decided to put any projects I run on my Pico as a separate example crate in src/examples/{example-name}/example.rs. Those programs will probably include experimenting with different features of the Pico.

Getting Started

Prerequisites

First of all, you need a Raspberry Pi Pico board, along with soldering tools and whatever additional hardware you would like to work with the Pico board.

You need to have Rust installed on your machine. Once you do, you need to add correct build target to your Rust environment:

rustup target add thumbv6m-none-eabi

Then, you will need a tool that converts Rust compilation output into a binary executable by the Pico board:

cargo install elf2uf2-rs

Installation

Clone this repo with:

git clone https://github.com/radlinskii/rustberry-pi-pico.git

Then to try to compile one of the programs from src/examples directory, e.g.:

cargo build --release --example blink-on-board-led

If it compiles you are good to go.

Usage

To install chosen firmware to your Pico first you need to connect the board to your computer with USB cable while pressing the BOOTSEL button on the board.
This will put your Raspberry Pi Pico into USB mass storage device mode so will be ready to receive new firmware.

Next you can install new firmware on your board. To do that simply run one of the programs from src/examples folder with cargo run, e.g.:

cargo run --release --example --blink-on-board-led

That's it, in case of the example above you should see that the LED that is preinstalled on your board starts blinking.

License

This project is licensed under the MIT License - see the license file for details.

Acknowledgments

Programs I create, at least at the very beginning, will be inspired by examples directory from the awesome rp-hal-boards repo.

About

Collection of firmware binaries for Raspberry Pi Pico written in Rust.

License:MIT License


Languages

Language:Rust 100.0%