From 5fe1cd7a0ee26397be7b2c80cdbd520fb6b8c54e Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 16 Jul 2020 14:00:18 +0200 Subject: [PATCH] extend cargo run troubleshooting section with the Linux variant of the error --- embedded-workshop-book/src/SUMMARY.md | 2 +- .../src/troubleshoot-cargo-run-error.md | 28 +++++++++++++++++++ .../troubleshoot-usb-error-access-denied.md | 3 -- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 embedded-workshop-book/src/troubleshoot-cargo-run-error.md delete mode 100644 embedded-workshop-book/src/troubleshoot-usb-error-access-denied.md diff --git a/embedded-workshop-book/src/SUMMARY.md b/embedded-workshop-book/src/SUMMARY.md index 281be28..f84058b 100644 --- a/embedded-workshop-book/src/SUMMARY.md +++ b/embedded-workshop-book/src/SUMMARY.md @@ -60,4 +60,4 @@ - [`cargo-build` fails to link](./troubleshoot-cargo-build.md) - [`dongle-flash` is not working](./troubleshoot-dongle-flash.md) - [Dongle USB functionality is not working](./troubleshoot-usb-dongle.md) - - [USB error: Access denied](./troubleshoot-usb-error-access-denied.md) + - [`cargo run` errors](./troubleshoot-cargo-run.md) diff --git a/embedded-workshop-book/src/troubleshoot-cargo-run-error.md b/embedded-workshop-book/src/troubleshoot-cargo-run-error.md new file mode 100644 index 0000000..ea0fe4b --- /dev/null +++ b/embedded-workshop-book/src/troubleshoot-cargo-run-error.md @@ -0,0 +1,28 @@ +# `cargo run` errors + +You may get one of these errors: + +- "Access denied (insufficient permissions)" (seen on macOS) +- "USB error while taking control over USB device: Resource busy" (seen on Linux) + +``` console +$ cargo run --bin usb-4 +Running `dk-run target/thumbv7em-none-eabi/debug/usb-4` +Error: An error specific to a probe type occured: USB error while taking control over USB device: Access denied (insufficient permissions) + +Caused by: + USB error while taking control over USB device: Access denied (insufficient permissions) +``` + +``` console +$ cargo run --bin usb-4 +Running `dk-run target/thumbv7em-none-eabi/debug/usb-4` +Error: An error specific to a probe type occured: USB error while taking control over USB device: Resource busy + +Caused by: + USB error while taking control over USB device: Resource busy +``` + +All of them have the same root issue: You have another instance of the `cargo run` process running. + +It is not possible to have two or more instances of `cargo run` running. Terminate the old instance before executing `cargo run`. If you are using VS Code click the garbage icon ("Kill Terminal") on the top right corner of the terminal output window (located on the bottom of the screen). diff --git a/embedded-workshop-book/src/troubleshoot-usb-error-access-denied.md b/embedded-workshop-book/src/troubleshoot-usb-error-access-denied.md deleted file mode 100644 index cbfb949..0000000 --- a/embedded-workshop-book/src/troubleshoot-usb-error-access-denied.md +++ /dev/null @@ -1,3 +0,0 @@ -## USB error while taking control over USB device: Access denied (insufficient permissions) - -If you get this Error when trying to run a different process, check if the old process is still running. If this is the case, end it. Try again. \ No newline at end of file