nRF Connect for Desktop v5.0.2, programmer v4.4.1, rust-panic on startup

I recently purchased an nrf52840 dongle.

In nRF Connect for Desktop (v5.0.2) and with or without the device attached, Programmer (v4.4.1) starts with a rust-panic error:

10:09:46.533	thread '<unnamed>' panicked at src\usb-lister-rs\src\windows.rs:1160:5: assertion `left == right` failed left: 14 right: 68 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
10:09:46.533	thread '<unnamed>' panicked at library\panic_unwind\src\seh.rs:290:8: Rust panics cannot be copied stack backtrace:
10:09:46.536	0: 0x7ffd4a7ddbfd - <unknown> 1: 0x7ffd4a7d3e29 - <unknown> 2: 0x7ffd4a7dc361 - <unknown> 3: 0x7ffd4a7dd9d6 - <unknown> 4: 0x7ffd4a7df3c8 - <unknown> 5: 0x7ffd4a7df076 - <unknown> 6: 0x7ffd4a7df8f8 - <unknown>
10:09:46.537	7: 0x7ffd4a7df779 - <unknown> 8: 0x7ffd4a7de2ef - <unknown> 9: 0x7ffd4a7df468 - <unknown> 10: 0x7ffd4a94a874 - nrfdl_wait_timed_async_task_complete 11: 0x7ffd4a7fae6c - <unknown>
10:09:46.542	12: 0x7ffdbfe422b1 - <unknown> 13:
10:09:46.542	0x7ffdbfe42008 - <unknown> 14: 0x7ffdbfe42529 - __ExceptionPtrCurrentException 15: 0x7ffd4a952e6f - nrfdl_wait_timed_async_task_complete
10:09:46.543	16: 0x7ffdbfed4160 - _CxxFrameHandler4 17
10:09:46.544	: 0x7ffdbfed2572 - <unknown>
10:09:46.548	18: 0x7ffde57f4a26 - RtlCaptureContext2 19: 0x7ffd4a90c6cf - <unknown>
10:09:46.548	20: 0x7ffd4a8ea1c3 - <unknown> 21: 0x7ffd4a90d382 - <unknown> 22: 0x7ffd4a910953 - <unknown> 23: 0x7ffd4a8eaad4 - <unknown> 24: 0x7ffd4a8e9588 - <unknown> 25: 0x7ffdbfe52ab9 - Concurrency::details::_Schedule_chore
10:09:46.548	26: 0x7ffde57b289a - RtlHashUnicodeString 27: 0x7ffde5785e66 - RtlClearThreadWorkOnBehalfTicket
10:09:46.550	28: 0x7ffde435257d - BaseThreadInitThunk 29: 0x7ffde57aaf28 - RtlUserThreadStart
10:09:46.551	thread '<unnamed>' panicked at library\panic_unwind\src\seh.rs:290:8: Rust panics cannot be copied stack backtrace: 0: 0x7ffd4a7ddbfd - <unknown> 1: 0x7ffd4a7d3e29 - <unknown> 2: 0x7ffd4a7dc361 - <unknown> 3: 0x7ffd4a7dd9d6 - <unknown> 4: 0x7ffd4a7df3c8 - <unknown> 5: 0x7ffd4a7df076 - <unknown> 6: 0x7ffd4a7df8f8 - <unknown> 7: 0x7ffd4a7df779 -
10:09:46.551	<unknown> 8: 0x7ffd4a7de2ef - <unknown> 9: 0x7ffd4a7df468 - <unknown> 10: 0x7ffd4a94a874 - nrfdl_wait_timed_async_task_complete 11: 0x7ffd4a7fae6c - <unknown> 12: 0x7ffdbfe422b1 - <unknown> 13: 0x7ffdbfe92add - std::basic_ostream<unsigned short,std::char_traits<unsigned short> >::write 14:
10:09:46.551	0x7ffdbfed4160 - _CxxFrameHandler4 15: 0x7ffdbfed2572 - <unknown> 16: 0x7ffde57f4a26 - RtlCaptureContext2 17: 0x7ffdbfe42008 - <unknown> 18: 0x7ffdbfe42529 - __ExceptionPtrCurrentException 19: 0x7ffd4a952e6f - nrfdl_wait_timed_async_task_complete 20: 0x7ffdbfed4160 - _CxxFrameHandler4 21: 0x7ffdbfed2572 - <unknown> 22: 0x7ffde57f4a26 - RtlCaptureContext2 23: 0x7ffd4a90c6cf - <unknown>
10:09:46.551	24: 0x7ffd4a8ea1c3 - <unknown> 25: 0x7ffd4a90d382 - <unknown> 26: 0x7ffd4a910953 - <unknown> 27: 0x7ffd4a8eaad4 - <unknown> 28: 0x7ffd4a8e9588 - <unknown> 29: 0x7ffdbfe52ab9 - Concurrency::details::_Schedule_chore 30: 0x7ffde57b289a - RtlHashUnicodeString 31: 0x
10:09:46.551	7ffde5785e66 - RtlClearThreadWorkOnBehalfTicket 32: 0x7ffde435257d - BaseThreadInitThunk 33: 0x7ffde57aaf28 - RtlUserThreadStart fatal runtime error: Rust panics must be rethrown
10:09:46.701	Error: Subprocess C:\Users\by_co\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.5.0\bin\nrfutil-device.exe failed with unexpected exit code Some(-1073740791)
10:09:46.706	Using nrfutil-device version: 2.5.0
10:09:46.706	Using nrf-device-lib version: 0.17.26

This is on a w11 system.  j-link j-tag-load, rtt client, remote server, etc with v7.98b are installed. I'm not seeing python errors, but for what it's worth, v3.11 is installed. Any ideas what I have missed installing or what paths need to be updated?

Thank you!

Parents
  • Hi

    Try running nrfutil install device=2.6.0 --force to force upgrade the nrfutil device version to 2.6.0 and see if that helps at all.

    Best regards,

    Simon

  • can the developers reproduce the error?  Any idea if it's actively being looked into yet?  Thanks!

  • Yes, it is actively being looked into. We know about it and is looking into fixing it by releasing new app versions running on this new CLI version. They've provided a workaround that will work as well here (in case force updating nrfutil didn't work):

    • Close nRF Connect for Desktop
    • Set these environment variables:
      export NRF_OVERRIDE_NRFUTIL_SETTINGS=true
      export NRF_OVERRIDE_VERSION_DEVICE=2.6.1
    • When updating to v2.6.1 of nRFUTIL device, you also need at least v7.94i of the J-Link drivers.
    • Start nRF Connect for Desktop from the terminal having these environment variable

    All apps will now use nrfutil device v2.6.1 and should work as expected.

    Best regards,

    Simon

  • - hey, baby steps, things are moving in the right direction!

    1) no rust-panic and desktop is detecting nrfutil-device version 2.6.1.  woohoo!

    2) The dongle is attached and in bootloader mode (1hz red led), but is not detected.  I tried programmer, quick-start, board-configurator, and bluetooth-low-energy all with no luck.

    3) desktop seems to have an issue with jlink_v8.10a installed and it is expecting jlink_v7.94i

    Question:  how to set the jlink version that desktop is expecting?

    Here is summary from the terminal session:

    // forced install:
    C:\Users\me\Downloads\nrf-dongle>nrfutil.exe install device=2.6.0 --force
    nrfutil-device already installed
    Uninstalled nrfutil-device
    [00:00:06] ###### 100% [Install packages] Install packages
    C:\Users\me\Downloads\nrf-dongle>
    
    // set the required environment variables:
    C:\Users\me\Downloads\nrf-dongle>set NRF_OVERRIDE_NRFUTIL_SETTINGS=true
    C:\Users\me\Downloads\nrf-dongle>set NRF_OVERRIDE_VERSION_DEVICE=2.6.1
    
    // move to the .exe location
    C:\Users\me\Downloads\nrf-dongle>cd "C:\Users\Gary\AppData\Local\Programs\nrfconnect\"
    C:\Users\me\AppData\Local\Programs\nrfconnect>"nRF Connect for Desktop.exe"
    
    //Programmer:
    16:29:12.112	Initialising nrfutil module: device
    16:29:13.993	Using nrfutil-device core version: 7.13.0
    16:29:14.806	Using nrfutil-device version: 2.6.1
    16:29:14.806	Using nrf-device-lib version: 0.17.33
    16:29:14.806	Using nrfjprog DLL version: 10.24.2
    16:29:14.806	Using JLink version: JLink_V8.10a
    16:29:14.807	Installed JLink version does not match the expected version (JLink_V7.94i)

    Here is the programmer output:

    16:35:32.558	Initialising nrfutil module: device
    16:35:34.526	Using nrfutil-device core version: 7.13.0
    16:35:35.344	Using nrfutil-device version: 2.6.1    <<<<==== woohoo!
    16:35:35.345	Using nrf-device-lib version: 0.17.33
    16:35:35.345	Using nrfjprog DLL version: 10.24.2
    16:35:35.345	Using JLink version: JLink_V8.10a
    16:35:35.345	Installed JLink version does not match the expected version (JLink_V7.94i)

    I setup for dual boot with linux on this box and installed Debian 12.  Debian 12 also does not see the device, it does not have a rust-panic, and it also complains about the jlink version mismatch.  I -think- this will be a good testing setup because same hardware approaching from different OS.  Note this is not a linux VM, it is a whole dual boot setup.

    Thank you for the help!  Now let's figure out why the device is not being detected.  I picked up parts and I think I can add a jtag header to this dongle if that would be helpful.

    Gary

Reply
  • - hey, baby steps, things are moving in the right direction!

    1) no rust-panic and desktop is detecting nrfutil-device version 2.6.1.  woohoo!

    2) The dongle is attached and in bootloader mode (1hz red led), but is not detected.  I tried programmer, quick-start, board-configurator, and bluetooth-low-energy all with no luck.

    3) desktop seems to have an issue with jlink_v8.10a installed and it is expecting jlink_v7.94i

    Question:  how to set the jlink version that desktop is expecting?

    Here is summary from the terminal session:

    // forced install:
    C:\Users\me\Downloads\nrf-dongle>nrfutil.exe install device=2.6.0 --force
    nrfutil-device already installed
    Uninstalled nrfutil-device
    [00:00:06] ###### 100% [Install packages] Install packages
    C:\Users\me\Downloads\nrf-dongle>
    
    // set the required environment variables:
    C:\Users\me\Downloads\nrf-dongle>set NRF_OVERRIDE_NRFUTIL_SETTINGS=true
    C:\Users\me\Downloads\nrf-dongle>set NRF_OVERRIDE_VERSION_DEVICE=2.6.1
    
    // move to the .exe location
    C:\Users\me\Downloads\nrf-dongle>cd "C:\Users\Gary\AppData\Local\Programs\nrfconnect\"
    C:\Users\me\AppData\Local\Programs\nrfconnect>"nRF Connect for Desktop.exe"
    
    //Programmer:
    16:29:12.112	Initialising nrfutil module: device
    16:29:13.993	Using nrfutil-device core version: 7.13.0
    16:29:14.806	Using nrfutil-device version: 2.6.1
    16:29:14.806	Using nrf-device-lib version: 0.17.33
    16:29:14.806	Using nrfjprog DLL version: 10.24.2
    16:29:14.806	Using JLink version: JLink_V8.10a
    16:29:14.807	Installed JLink version does not match the expected version (JLink_V7.94i)

    Here is the programmer output:

    16:35:32.558	Initialising nrfutil module: device
    16:35:34.526	Using nrfutil-device core version: 7.13.0
    16:35:35.344	Using nrfutil-device version: 2.6.1    <<<<==== woohoo!
    16:35:35.345	Using nrf-device-lib version: 0.17.33
    16:35:35.345	Using nrfjprog DLL version: 10.24.2
    16:35:35.345	Using JLink version: JLink_V8.10a
    16:35:35.345	Installed JLink version does not match the expected version (JLink_V7.94i)

    I setup for dual boot with linux on this box and installed Debian 12.  Debian 12 also does not see the device, it does not have a rust-panic, and it also complains about the jlink version mismatch.  I -think- this will be a good testing setup because same hardware approaching from different OS.  Note this is not a linux VM, it is a whole dual boot setup.

    Thank you for the help!  Now let's figure out why the device is not being detected.  I picked up parts and I think I can add a jtag header to this dongle if that would be helpful.

    Gary

Children
  • - an important update!  I didn't check the Saturday mail until this afternoon (Sunday) and a my second nrf52840 dongle arrived.  It -is- (woohoo!) seen by Nordic programmers on both w11 and Debian. 

    So, I think the questions become:

    1) how to recover from a clobbered bootloader that is in bootloader-mode (1hz red led), but that the programmer does not recognize?

    2) how to tell nrf desktop to expect jlink v8 instead of v7?  Same message on both Linux and w11.

    Thank you!

Related