]> patrickod personal git archive - tincan.git/commitdiff
specify usb,unproven as default features to stop CLI arg repetition feather-lora-chat
authorPatrick O'Doherty <p@trickod.com>
Tue, 13 Jul 2021 07:17:42 +0000 (00:17 -0700)
committerPatrick O'Doherty <p@trickod.com>
Tue, 13 Jul 2021 07:17:42 +0000 (00:17 -0700)
add VSCode settings to point rust-analyzer at the appropriate target & get
analysis results.

rs-lorachat/.vscode/settings.json [new file with mode: 0644]
rs-lorachat/Cargo.toml

diff --git a/rs-lorachat/.vscode/settings.json b/rs-lorachat/.vscode/settings.json
new file mode 100644 (file)
index 0000000..0a5b8c6
--- /dev/null
@@ -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"
+    ]
+}
index 904d7e8ed9eb7a53fbda28d113375b783b0ce0e4..849d90105db32c0f74581661844bda8e9b2d3d65 100644 (file)
@@ -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"]