Skip to content

Instantly share code, notes, and snippets.

@9names
Created November 29, 2023 12:45
Show Gist options
  • Save 9names/ddf06728797950928bcb855c20c9c439 to your computer and use it in GitHub Desktop.
Save 9names/ddf06728797950928bcb855c20c9c439 to your computer and use it in GitHub Desktop.
Testing probe-rs attach with LPC55S69
[package]
name = "attach_test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
probe-rs = { git = "https://github.com/9names/probe-rs", rev = "d9ab28d43c72790ac066b771e8391fa3bae043bc" }
use probe_rs::{CoreStatus, Permissions, Probe, Lister};
use std::{thread, time};
fn main() {
// Get a list of all available debug probes.
let lister = Lister::new();
let probes = lister.list_all();
// Use the first probe found.
let probe = probes[0].open(&lister).unwrap();
// Attach to a chip.
let mut session = probe
.attach("LPC55S69JBD64", Permissions::default())
.unwrap();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment