Skip to content
Merged
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
436 changes: 401 additions & 35 deletions Cargo.lock

Large diffs are not rendered by default.

80 changes: 62 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,91 @@ authors = ["Bryan Cantrill <bryan@oxide.computer>"]
edition = "2018"
license = "MPL-2.0"

[workspace]
members = [
"humility-core",
"humility-cmd",
"humility-arch-cortex",
"cmd/apptable",
"cmd/diagnose",
"cmd/dump",
"cmd/etm",
"cmd/gpio",
"cmd/hiffy",
"cmd/i2c",
"cmd/itm",
"cmd/jefe",
"cmd/manifest",
"cmd/map",
"cmd/pmbus",
"cmd/probe",
"cmd/qspi",
"cmd/readmem",
"cmd/readvar",
"cmd/renbb",
"cmd/rencm",
"cmd/ringbuf",
"cmd/spd",
"cmd/spi",
"cmd/stackmargin",
"cmd/stmsecure",
"cmd/tasks",
"cmd/test",
"cmd/trace",
]

[profile.release]
debug = true

[dependencies]
pmbus = { path = "./pmbus" }
hif = { path = "./hif" }
spd = { path = "./spd" }
idt8a3xxxx = { path = "./idt8a3xxxx" }
humility_load_derive = {path = "./load_derive"}
humility = { path = "./humility-core", package = "humility-core" }
humility-cortex = { path = "./humility-arch-cortex" }
humility-cmd = { path = "./humility-cmd" }
cmd-apptable = { path = "./cmd/apptable", package = "humility-cmd-apptable" }
cmd-diagnose = { path = "./cmd/diagnose", package = "humility-cmd-diagnose" }
cmd-dump = { path = "./cmd/dump", package = "humility-cmd-dump" }
cmd-etm = { path = "./cmd/etm", package = "humility-cmd-etm" }
cmd-gpio = { path = "./cmd/gpio", package = "humility-cmd-gpio" }
cmd-hiffy = { path = "./cmd/hiffy", package = "humility-cmd-hiffy" }
cmd-i2c = { path = "./cmd/i2c", package = "humility-cmd-i2c" }
cmd-itm = { path = "./cmd/itm", package = "humility-cmd-itm" }
cmd-jefe = { path = "./cmd/jefe", package = "humility-cmd-jefe" }
cmd-manifest = { path = "./cmd/manifest", package = "humility-cmd-manifest" }
cmd-map = { path = "./cmd/map", package = "humility-cmd-map" }
cmd-pmbus = { path = "./cmd/pmbus", package = "humility-cmd-pmbus" }
cmd-probe = { path = "./cmd/probe", package = "humility-cmd-probe" }
cmd-qspi = { path = "./cmd/qspi", package = "humility-cmd-qspi" }
cmd-readmem = { path = "./cmd/readmem", package = "humility-cmd-readmem" }
cmd-readvar = { path = "./cmd/readvar", package = "humility-cmd-readvar" }
cmd-renbb = { path = "./cmd/renbb", package = "humility-cmd-renbb" }
cmd-rencm = { path = "./cmd/rencm", package = "humility-cmd-rencm" }
cmd-ringbuf = { path = "./cmd/ringbuf", package = "humility-cmd-ringbuf" }
cmd-spd = { path = "./cmd/spd", package = "humility-cmd-spd" }
cmd-spi = { path = "./cmd/spi", package = "humility-cmd-spi" }
cmd-stackmargin = { path = "./cmd/stackmargin", package = "humility-cmd-stackmargin" }
cmd-stmsecure = { path = "./cmd/stmsecure", package = "humility-cmd-stmsecure" }
cmd-tasks = { path = "./cmd/tasks", package = "humility-cmd-tasks" }
cmd-test = { path = "./cmd/test", package = "humility-cmd-test" }
cmd-trace = { path = "./cmd/trace", package = "humility-cmd-trace" }

gimli = "0.20.0"
fallible-iterator = "0.2.0"

#
# We depend on the oxide-stable branch of Oxide's fork of probe-rs to assure
# that we can float necessary patches on probe-rs.
#
probe-rs = { git = "https://github.com/oxidecomputer/probe-rs.git", branch = "oxide-stable" }

log = {version = "0.4.8", features = ["std"]}
bitfield = "0.13.2"
clap = "2.33.0"
csv = "1.1.3"
serde = "1.0.126"
parse_int = "0.4.0"
goblin = "0.2.1"
capstone = "0.8.0"
rustc-demangle = "0.1.21"
structopt = "0.3"
multimap = "0.8.1"
rusb = "0.5.5"
num-traits = "0.2"
num-derive = "0.3"
paste = "0.1"
jep106 = "0.2"
zip = "0.5"
toml = "0.5"
anyhow = { version = "1.0.44", features = ["backtrace"] }
scroll = "0.10"
indicatif = "0.15"
colored = "2.0.0"
postcard = "0.7.0"
itertools = "0.10.1"
indexmap = { version = "1.7", features = ["serde-1"] }
10 changes: 10 additions & 0 deletions cmd/apptable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "humility-cmd-apptable"
version = "0.1.0"
edition = "2021"

[dependencies]
humility = { path = "../../humility-core", package = "humility-core" }
humility-cmd = { path = "../../humility-cmd" }
structopt = "0.3"
anyhow = { version = "1.0.44", features = ["backtrace"] }
5 changes: 2 additions & 3 deletions src/cmd/apptable.rs → cmd/apptable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use crate::cmd::{Archive, Command};
use crate::hubris::{HubrisArchive, HubrisPrintFormat};
use crate::Args;
use anyhow::{bail, Result};
use humility::hubris::{HubrisArchive, HubrisPrintFormat};
use humility_cmd::{Archive, Args, Command};
use std::convert::TryInto;
use structopt::clap::App;
use structopt::StructOpt;
Expand Down
11 changes: 11 additions & 0 deletions cmd/diagnose/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "humility-cmd-diagnose"
version = "0.1.0"
edition = "2021"

[dependencies]
humility = { path = "../../humility-core", package = "humility-core" }
humility-cmd = { path = "../../humility-cmd" }
structopt = "0.3"
anyhow = { version = "1.0.44", features = ["backtrace"] }
parse_int = "0.4.0"
15 changes: 7 additions & 8 deletions src/cmd/diagnose.rs → cmd/diagnose/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
//! into things the _application_ may think are fishy -- only general behaviors
//! at the OS level, like faults.

use crate::cmd::jefe;
use crate::cmd::*;
use crate::core::Core;
use crate::doppel::{GenOrRestartCount, Task, TaskDesc, TaskState};
use crate::hubris::*;
use crate::reflect;
use crate::Args;
use anyhow::Result;
use anyhow::{bail, Result};
use humility::core::Core;
use humility::hubris::*;
use humility_cmd::doppel::{GenOrRestartCount, Task, TaskDesc, TaskState};
use humility_cmd::jefe;
use humility_cmd::reflect;
use humility_cmd::{Archive, Args, Attach, Command, Validate};
use std::num::NonZeroU32;
use std::time::Duration;
use structopt::clap::App;
Expand Down
11 changes: 11 additions & 0 deletions cmd/dump/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "humility-cmd-dump"
version = "0.1.0"
edition = "2021"

[dependencies]
humility = { path = "../../humility-core", package = "humility-core" }
humility-cmd = { path = "../../humility-cmd" }
structopt = "0.3"
anyhow = { version = "1.0.44", features = ["backtrace"] }
log = {version = "0.4.8", features = ["std"]}
9 changes: 6 additions & 3 deletions src/cmd/dump.rs → cmd/dump/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use crate::cmd::*;
use crate::hubris::*;
use crate::Args;
#[macro_use]
extern crate log;

use anyhow::Result;
use humility::core::Core;
use humility::hubris::*;
use humility_cmd::{Archive, Args, Attach, Command, Validate};
use structopt::clap::App;
use structopt::StructOpt;

Expand Down
14 changes: 14 additions & 0 deletions cmd/etm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "humility-cmd-etm"
version = "0.1.0"
edition = "2021"

[dependencies]
humility = { path = "../../humility-core", package = "humility-core" }
humility-cortex = { path = "../../humility-arch-cortex" }
humility-cmd = { path = "../../humility-cmd" }
structopt = "0.3"
anyhow = { version = "1.0.44", features = ["backtrace"] }
csv = "1.1.3"
parse_int = "0.4.0"
log = {version = "0.4.8", features = ["std"]}
21 changes: 12 additions & 9 deletions src/cmd/etm.rs → cmd/etm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use crate::attach_live;
use crate::cmd::{Archive, Command};
use crate::core::Core;
use crate::debug::*;
use crate::etm::*;
use crate::hubris::*;
use crate::scs::*;
use crate::tpiu::*;
use crate::Args;
use anyhow::{bail, Result};
use humility::core::Core;
use humility::hubris::*;
use humility_cmd::attach_live;
use humility_cmd::Args;
use humility_cmd::{Archive, Command};
use humility_cortex::debug::*;
use humility_cortex::etm::*;
use humility_cortex::scs::*;
use humility_cortex::tpiu::*;
use std::fs::File;
use std::time::Instant;
use structopt::clap::App;
use structopt::StructOpt;

#[macro_use]
extern crate log;

#[derive(StructOpt, Debug)]
#[structopt(
name = "etm",
Expand Down
12 changes: 12 additions & 0 deletions cmd/gpio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "humility-cmd-gpio"
version = "0.1.0"
edition = "2021"

[dependencies]
humility = { path = "../../humility-core", package = "humility-core" }
humility-cmd = { path = "../../humility-cmd" }
hif = { path = "../../hif" }
structopt = "0.3"
anyhow = { version = "1.0.44", features = ["backtrace"] }
parse_int = "0.4.0"
13 changes: 6 additions & 7 deletions src/cmd/gpio.rs → cmd/gpio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use crate::cmd::{Archive, Attach, Validate};
use crate::core::Core;
use crate::hiffy::*;
use crate::hubris::*;
use crate::Args;
use humility::core::Core;
use humility::hubris::*;
use humility_cmd::hiffy::*;
use humility_cmd::{Archive, Args, Attach, Command, Validate};
use std::str;
use std::thread;

Expand Down Expand Up @@ -270,9 +269,9 @@ fn gpio(
Ok(())
}

pub fn init<'a, 'b>() -> (crate::cmd::Command, App<'a, 'b>) {
pub fn init<'a, 'b>() -> (Command, App<'a, 'b>) {
(
crate::cmd::Command::Attached {
Command::Attached {
name: "gpio",
archive: Archive::Required,
attach: Attach::LiveOnly,
Expand Down
12 changes: 12 additions & 0 deletions cmd/hiffy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "humility-cmd-hiffy"
version = "0.1.0"
edition = "2021"

[dependencies]
humility = { path = "../../humility-core", package = "humility-core" }
humility-cmd = { path = "../../humility-cmd" }
hif = { path = "../../hif" }
structopt = "0.3"
anyhow = { version = "1.0.44", features = ["backtrace"] }
parse_int = "0.4.0"
11 changes: 5 additions & 6 deletions src/cmd/hiffy.rs → cmd/hiffy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use crate::cmd::*;
use crate::core::Core;
use crate::hiffy::*;
use crate::hubris::*;
use crate::Args;
use anyhow::Result;
use anyhow::{bail, Result};
use humility::core::Core;
use humility::hubris::*;
use humility_cmd::hiffy::*;
use humility_cmd::{Archive, Args, Attach, Command, Validate};
use structopt::clap::App;
use structopt::StructOpt;

Expand Down
14 changes: 14 additions & 0 deletions cmd/i2c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "humility-cmd-i2c"
version = "0.1.0"
edition = "2021"

[dependencies]
humility = { path = "../../humility-core", package = "humility-core" }
humility-cmd = { path = "../../humility-cmd" }
hif = { path = "../../hif" }
structopt = "0.3"
anyhow = { version = "1.0.44", features = ["backtrace"] }
parse_int = "0.4.0"
indicatif = "0.15"
log = {version = "0.4.8", features = ["std"]}
Loading