Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrfutil / flashing firmware to Nordic chips #1795

Open
cederom opened this issue Jun 14, 2023 · 1 comment
Open

nrfutil / flashing firmware to Nordic chips #1795

cederom opened this issue Jun 14, 2023 · 1 comment

Comments

@cederom
Copy link

cederom commented Jun 14, 2023

This is an issue to note DFU firmware flash possibility to Nordic Chips (like nRF52) as noted in #1794 (comment) when @raiden00pl provided USB Console patch.

  • Our help page [1] states that flashing is not possible without a debug probe. This could be done over DFU with nrfutil [2] [3].. at least not that long ago.. when dongle is plugged to USB port RESET switches it to DFU mode :-)
  • Nordic abandoned development of the Open-Source utility nrfutil [3] that allowed DFU images generation at version 6. The repository if marked frozen and obsolete, utility does not work anymore on Python 3.8 and 3.9. Even worse they switched to a new utility nrfutil with the same name version 7 that is NOT Open-Source anymore (see comments in [4]) :-( Does this mean that Nordic is limiting Open-Source support for their MCUs?
  • Question is DFU image generation is still possible? It would be a great feature for NuttX to quickly flash this device with no debug probes and cables attached. Especially that we will have Console over USB with @raiden00pl patch :-)

[1] https://nuttx.apache.org/docs/latest/platforms/arm/nrf52/boards/nrf52840-dongle/index.html
[2] https://academy.nordicsemi.com/flash-instructions-for-nrf52840-dongle/
[3] https://github.com/NordicSemiconductor/pc-nrfutil
[4] https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-util-unified-command-line-utility

@raiden00pl
Copy link
Member

The toolset from Nordic is a mix of open source and some black-box closed-source libs.
Even worse, they have two families of SDKs, which makes things even more complicated and it's confusing to know what's part of what.

As far as I understand, nrfutil is a part of nRF5 SDK, but now the active toolset from Nordic is under nRF Connect SDK which has its own desktop tool (nRF Connect for Desktop).
nRF Connect SDK is based on Zephyr and MCUboot.

I'm using nrfutil version 6.1.0 for one of my projects to generate DFU over BLE packages, and it's working for me but only with Python 3.8.
I have never used DFU over USB from Nordic, so I can't say too much about it. Support for DFU over BLE was not so hard to integrate with NuttX,
but required integration with nRF5 SDK which wasn't appropriate for NuttX upstream.

The problem with Nordic DFU is that it's a firmware solution, not a built-in ROM, so it must be somehow programmed initially anyway.
Nordic states that nrf52840-dongle comes with a pre-programmed bootloader, but I have no idea which one (most likely based on nRF5 SDK).
Support for this functionality is probably just a matter of proper configuration of the linker script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants