From 42aedd4f89a19f887b736e4869eb09b38aa4350f Mon Sep 17 00:00:00 2001 From: Patrick O'Doherty Date: Tue, 13 Jul 2021 00:17:42 -0700 Subject: [PATCH] specify usb,unproven as default features to stop CLI arg repetition add VSCode settings to point rust-analyzer at the appropriate target & get analysis results. --- rs-lorachat/.vscode/settings.json | 10 ++++++++++ rs-lorachat/Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 rs-lorachat/.vscode/settings.json diff --git a/rs-lorachat/.vscode/settings.json b/rs-lorachat/.vscode/settings.json new file mode 100644 index 0000000..0a5b8c6 --- /dev/null +++ b/rs-lorachat/.vscode/settings.json @@ -0,0 +1,10 @@ +{ + // override the default setting (`cargo check --all-targets`) which produces the following error + // "can't find crate for `test`" when the default compilation target is a no_std target + // with these changes RA will call `cargo check --bins` on save + "rust-analyzer.checkOnSave.allTargets": false, + "rust-analyzer.checkOnSave.extraArgs": [ + "--target", + "thumbv6m-none-eabi" + ] +} diff --git a/rs-lorachat/Cargo.toml b/rs-lorachat/Cargo.toml index 904d7e8..849d901 100644 --- a/rs-lorachat/Cargo.toml +++ b/rs-lorachat/Cargo.toml @@ -19,7 +19,7 @@ cortex-m-semihosting = "0.3" heapless = "0.5" [features] -default = ["rt", "atsamd-hal/samd21g", "panic_halt"] +default = ["rt", "atsamd-hal/samd21g", "panic_halt", "usb", "unproven"] rt = ["cortex-m-rt", "atsamd-hal/samd21g-rt"] panic_halt = ["panic-halt"] usb = ["atsamd-hal/usb", "usb-device", "usbd-serial"] -- 2.42.0