Skip to content

adoble/pico-rtic-template

Repository files navigation

Project template for pico running rtic

ci checks

This template is intended as a starting point for developing rp-pico based application using the cortex-m-rtic crate. It is based on this rp2040 template and this rtic example.

It does the following:

  • Blinks the rp-pico on-board led (GPIO 25) using a timer
  • Processes a interrupt when GPIO 17 is pulled low (e.g with a push button)

It includes all of the knurling-rs tooling as showcased in https://github.com/knurling-rs/app-template (defmt, defmt-rtt, panic-probe, flip-link) to make development as easy as possible.

Downloading

probe-run is configured as the default runner, so you can start the program with

cargo run --release

Requirements

Installation of development dependencies

rustup target install thumbv6m-none-eabi
cargo install flip-link
# Suggested default 'runner'
cargo install probe-run
# If you want to use elf2uf2-rs instead of probe-run, instead do...
cargo install elf2uf2-rs --locked

Running

For a debug build

cargo run

For a release build

cargo run --release

If you do not specify a DEFMT_LOG level, it will be set to debug. That means println!(""), info!("") and debug!("") statements will be printed. If you wish to override this, you can change it in .cargo/config.toml

[env]
DEFMT_LOG = "off"

You can also set this inline (on Linux/MacOS)

DEFMT_LOG=trace cargo run

or set the environment variable so that it applies to every cargo run call that follows:

Linux/MacOS/unix

export DEFMT_LOG=trace

Setting the DEFMT_LOG level for the current session
for bash

export DEFMT_LOG=trace

Windows

Windows users can only override DEFMT_LOG through config.toml or by setting the environment variable as a separate step before calling cargo run

  • cmd
set DEFMT_LOG=trace
  • powershell
$Env:DEFMT_LOG = trace
cargo run

About

Project template for pico running rtic

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages