embedded-trainings-2020/embedded-workshop-book/src/troubleshoot-cargo-flash.md

58 lines
2 KiB
Markdown
Raw Permalink Normal View History

2020-07-13 15:41:37 +00:00
# `cargo-flash` is not working
## Debug power request failed
``` console
$ cargo flash --chip nRF52840_xxAA --bin hello
ERROR probe_rs::architecture::arm::communication_interface > Debug power request failed
Error processing command: An error specific to the selected architecture occured
```
This is a spurious error that occurs only once on a new development kit. Running the command again should make the error go away. If you still get the error run `RUST_LOG=probe_rs=debug cargo flash --chip nRF52840_xxAA --bin hello ` once.
## 'erase_sector' failed with code 1
``` console
$ cargo flash --chip nRF52840_xxAA --bin hello
(..)
Error failed to flash app: The execution of 'erase_sector' failed with code 1
```
2021-01-20 13:06:25 +00:00
Ensure that you've installed version 0.10 or higher of `cargo-flash` and `cargo-embed`
2021-01-19 15:29:44 +00:00
2021-01-20 13:06:25 +00:00
``` console
$ cargo flash --version
0.10.2
2021-01-19 15:29:44 +00:00
2021-01-20 13:06:25 +00:00
$ cargo embed --version
0.10.2
````
2020-07-13 15:41:37 +00:00
## Linux permissions
``` console
$ cargo flash --chip nRF52840_xxAA --bin hello
Error: An error specific to a probe type occured: USB error while opening USB device: Access denied (insufficient permissions)
Caused by:
USB error while opening USB device: Access denied (insufficient permissions)
```
2021-01-19 15:29:44 +00:00
udev rules need to be changed to allow non-root access. Instructions can be found in the [`Linux only: USB` section of the Installation Instructions].
[`Linux only: USB` section of the Installation Instructions]: ./installation.md#linux-only-usb
2020-07-13 15:41:37 +00:00
## Wrong Windows Driver
``` console
$ cargo flash --chip nRF52840_xxAA --bin hello
Error: An error specific to a probe type occured: USB error while opening USB device: Entity not found
Caused by:
USB error while opening USB device: Entity not found
```
2021-01-19 15:29:44 +00:00
You need to bind the BULK interface of the J-Link USB device to the WinUSB driver using the Zadig tool. Instructions can be found in the [`Windows only: Zadig JLink driver` section of the Installation Instructions].
[`Windows only: Zadig JLink driver` section of the Installation Instructions]: ./installation.md#windows-only-zadig-jlink-driver