Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

rust-pac

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Rust Peripheral Access Crate (PAC) example

This example shows how using an stm32 PAC works and what is required. This example does the same things as rust-low-level and the goal is to understand the advantages that this higher level API provides.

Building

$ cargo build

Flashing and Running

Start openocd:

$ openocd -f board/stm32f0discovery.cfg

Start a telnet session:

$ telnet localhost 4444

Flash the program:

> reset halt
> flash write_image erase target/thumbv6m-none-eabi/debug/rust-pac
> reset run

Running should turn on the led:

Rust PAC LED example

Debug:

$ arm-none-eabi-gdb target/thumbv6m-none-eabi/debug/rust-pac