From: Patrick O'Doherty Date: Tue, 13 Jul 2021 07:17:42 +0000 (-0700) Subject: specify usb,unproven as default features to stop CLI arg repetition X-Git-Url: https://git.patrickod.com/tor-browser-?a=commitdiff_plain;h=42aedd4f89a19f887b736e4869eb09b38aa4350f;p=tincan.git 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. --- 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"]