Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
712 changes: 357 additions & 355 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ hex = { version = "0.4.3", default-features = false, features = ["std"] }
log = { version = "0.4", default-features = false }
num-derive = { version = "0.4", default-features = false }
num-traits = { version = "0.2.15", default-features = false }
nusb = { git = "https://github.com/oxidecomputer/nusb.git", branch = "add_illumos" }
packed_struct = { version = "0.10.1", default-features = false, features = ["std"] }
parse_int = { version = "0.9.0", default-features = false }
pem-rfc7468 = { version = "0.7.0", features = ["std"] }
Expand Down
3 changes: 3 additions & 0 deletions lpc55_isp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ anyhow.workspace = true
byteorder.workspace = true
clap.workspace = true
crc-any.workspace = true
env_logger.workspace = true
hex.workspace = true
log.workspace = true
lpc55_areas.workspace = true
num-derive.workspace = true
num-traits.workspace = true
nusb.workspace = true
packed_struct.workspace = true
parse_int.workspace = true
serialport.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions lpc55_isp/src/bin/cfpa-update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use anyhow::Result;
use clap::Parser;
use lpc55_areas::*;
use lpc55_isp::cmd::{do_isp_read_memory, do_isp_write_memory};
use lpc55_isp::isp::do_ping;
use lpc55_isp::isp::Isp;
use packed_struct::prelude::*;
use serialport::{DataBits, FlowControl, Parity, StopBits};
use std::io::Write;
Expand Down Expand Up @@ -39,10 +39,10 @@ fn main() -> Result<()> {
.stop_bits(StopBits::One)
.open()?;

do_ping(port.as_mut())?;
port.do_ping()?;

// 0x9de00 is the fixed address of the CFPA region
let m = do_isp_read_memory(&mut *port, 0x9de00, 512)?;
let m = do_isp_read_memory(&mut port, 0x9de00, 512)?;

let mut cfpa: [u8; 512] = [0; 512];

Expand Down Expand Up @@ -74,7 +74,7 @@ fn main() -> Result<()> {
} else {
println!("Writing updated CFPA region back to the device");

do_isp_write_memory(&mut *port, 0x9de00, &updated)?;
do_isp_write_memory(&mut port, 0x9de00, &updated)?;
println!("done!");
}

Expand Down
Loading
Loading