diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 0000000..896e81b --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,27 @@ +[env] +CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true + +[config] +default_to_workspace = false + +# ----------------------- +# Host Testing +# ----------------------- + +[tasks.test-host] +dependencies = [ + "test-messages", +] + +# ----------------------- +# Embedded Testing +# ----------------------- + +[tasks.test-device] +dependencies = [ + "test-common-arm", +] + +[tasks.test-common-arm] +command = "cargo" +args = ["test", "-p", "common-arm-test", "${@}"] diff --git a/README.md b/README.md index 2bc8026..d62db7d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ uORocketry's rocket instrumentation system. - Install Rust using downloader or script https://www.rust-lang.org/tools/install - `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` +- `cargo install probe-rs --version 0.23.0` +- `cargo install cargo-make` - `git clone https://github.com/uorocketry/argus.git` - `cargo b` diff --git a/crates/common-arm-test/Cargo.toml b/crates/common-arm-test/Cargo.toml new file mode 100644 index 0000000..40674af --- /dev/null +++ b/crates/common-arm-test/Cargo.toml @@ -0,0 +1,35 @@ +[package] +name = "common-arm-test" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +common-arm = { path = "../common-arm" } +cortex-m = { workspace = true } +cortex-m-rt = "0.7.3" +defmt = "0.3.4" +defmt-rtt = "0.4.0" +defmt-test = "0.3.0" +panic-probe = { version = "0.3.1", features = ["print-defmt" ] } + +# A [[test]] section is needed for each file in "tests" +[[test]] +name = "sd" +harness = false + +[features] +# set logging levels here +default = [ + # in tests, enable all logs + "defmt-trace", +] + +# do NOT modify these features +defmt-default = [] +defmt-trace = [] +defmt-debug = [] +defmt-info = [] +defmt-warn = [] +defmt-error = []