GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - forGGe/rust-min: Minimal Rust template suitable for bootstraping MCU and such, inspired by "The Embedonomicon"

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.cargo
.cargo
 
 
src
src
 
 
.gitignore
.gitignore
 
 
Cargo.toml
Cargo.toml
 
 
README.md
README.md
 
 
link.x
link.x
 
 

Repository files navigation

Minimal Embedded Rust Template

This template is nothing but a delight for a seasoned C programmer:

  • only ~100 bytes of code to blink an LED
  • everything is unsafe
  • basic core dependencies
  • function that sets registers with no checks, like good old C does
  • no pesky HAL to hide important register details
  • can support only one MCU at a time and this is great

Preparation

# Proper toolchain and target support
$ rustup update
$ rustup target add thumbv7m-none-eabi

# Nice tools
$ cargo install cargo-binutils
$ rustup component add llvm-tools

Build

$ cargo build

Analyze

$ cargo nm

# ...

$ cargo size
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
   text	   data	    bss	    dec	    hex	filename
   4341	      0	      0	   4341	   10f5	rust_min

Flash

$ cargo flash --chip STM32F303RBTx --connect-under-reset --speed 100

Build Release

$ cargo build

Analyze Release

$ cargo nm --release
    Finished release [optimized] target(s) in 0.00s
08000004 R RESET_VECTOR
08000008 T Reset

$ cargo size --release
    Finished release [optimized] target(s) in 0.00s
   text	   data	    bss	    dec	    hex	filename
     92	      0	      0	     92	     5c	rust_min

Flash Release

$ cargo flash --release --chip STM32F303RBTx --connect-under-reset --speed 100

About

Minimal Rust template suitable for bootstraping MCU and such, inspired by "The Embedonomicon"

Resources

Readme
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.