Created
November 29, 2023 12:45
-
-
Save 9names/ddf06728797950928bcb855c20c9c439 to your computer and use it in GitHub Desktop.
Testing probe-rs attach with LPC55S69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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