knurling-rs / probe-run

Run embedded programs just like native ones
Apache License 2.0
646 stars 75 forks source link

Probe Not Found - Did all the troubleshooting steps #348

Closed iot-resister closed 1 year ago

iot-resister commented 2 years ago

I have an nRF52840 DK. Its the first time using it so it could be a bad board. I'm trying to follow the testing hals blog. I used the same cable for cargo espflash commands and it works fine. Here are my permissions

$ lsusb | grep SEGGER
Bus 001 Device 104: ID 1366:1051 SEGGER J-L
$ ls -l /dev/bus/usb/001/104
crw-rw----+ 1 root root 189, 103 Aug 20 16:00 /dev/bus/usb/001/104
$ cat /etc/udev/rules.d/50-oxidize-global.rules
# nRF52840 Dongle in bootloader mode
ATTRS{idVendor}=="1915", ATTRS{idProduct}=="521f", TAG+="uaccess"

# nRF52840 Dongle applications
ATTRS{idVendor}=="2020", TAG+="uaccess"

# nRF52840 Development Kit
ATTRS{idVendor}=="1366", ENV{ID_MM_DEVICE_IGNORE}="1", TAG+="uaccess"

I also tried chown cause I needed to do that for esp32. I'm on arch linux btw and using probe-run v0.3.4 (0.2.5 gives the same error)

$ sudo chown $USER /dev/bus/usb/001/104

Here's is my code: https://github.com/iot-resister/probe-debug

I'm simply trying to run cargo test from the self-tests directory.

Thanks for the awesome libraries/materials!

iot-resister commented 2 years ago

I forgot to add the output of list probes:

$ probe-run --list-probes
the following probes were found:
[0]: J-Link (J-Link) (VID: 1366, PID: 1051, Serial: <redacted>, JLink)
iot-resister commented 2 years ago

I'm getting a replacement from mouser. See if that does the trick.

Urhengulas commented 2 years ago

Hi @iot-resister,

What error message do you get?

iot-resister commented 2 years ago

@Urhengulas thanks for responding.

➜ self-tests git:(main) cargo test --verbose
...
     Running `probe-run --chip nRF52840_xxAA --probe '1366:1015' /home/fddsf/play-nrf/target/thumbv7em-none-eabihf/debug/deps/gpio_input_floating-4e58c2baac985cf1`
Error: no probe was found.

Common reasons for this are faulty cables or missing permissions.
For detailed instructions, visit: https://github.com/knurling-rs/probe-run/tree/2f138c3#troubleshooting
error: test failed, to rerun pass '--test gpio-input-floating'
Urhengulas commented 1 year ago

Let's see if you new probe does the trick.

iot-resister commented 1 year ago

Same issue with brand new board. I'm new to rust and this board. Maybe there are some steps I need to take to initialize the board? Pre-reqs to make it ready for probe-run? Maybe a jumper or toggle a physical switch? Maybe install a dependency? I wish I could get more info or logs of what happens when I run cargo test

iot-resister commented 1 year ago

I went through the following guide: https://session20q4.ferrous-systems.com/defmt_setup.html

Same error :(

I deviated twice from the guide.

1) I upgraded the hal version

[dependencies]
cortex-m = "0.7.3"
cortex-m-rt = "0.7.0"
defmt = "0.3.0"
defmt-rtt = "0.3.0"
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
nrf52840-hal = "0.15.1"

2) I removed --defmt and added the probe option

runner = "probe-run --chip nRF52840_xxAA --probe 1366:1015"

Maybe I'm buying the wrong board? This is the board I'm buying: https://www.mouser.com/ProductDetail/Nordic-Semiconductor/nRF52840-DK?qs=F5EMLAvA7IA76ZLjlwrwMw%3D%3D

Same error on mac.

iot-resister commented 1 year ago

Unlocking it via nrf-recover did the trick. if you use the the on/off switch it will reset the lock. simply unplugging will not.

Urhengulas commented 1 year ago

I do have the same board, but never hat this problem 🤔 Glad that you could solve it!