Manually flash the nRF9160 DK

Dear Nordic Support Team,

we are planning to use the nRF9160 DK outside of our development department. E. g. we would like to provide the board, along with a certain user application (now called nrf-application), to employees of our service department. I am developing a GUI application (now called GUI-interface) which will be the interface between the human users and the nrf-application. I would like this GUI-interface to be able to update the nrf-applications on the nRF9160 DK if necessary.

I am aware of the following methods to flash the nRF9160 on the nRF9160 DK: SES, Nordic's MS Visual Studio Code extension, Nordic's Programmer application, and there seems to be a way to do it via the command line using west like here. However, I am seem to miss the big picture on how to manually flash the nRF9160 on the nRF9160 DK. By manually I mean "as manually as possible", since I guess that there might be certain requirements which cannot be circumvented like maybe the drivers for the Segger debug probe.

Can you please tell me (or point at the documentation) how to enable a custom software to flash an user application and/or modem firmware to the nRF9160 DK via its USB interface?

Thank you allot for your effort!
Sebastian

Parents
  • Hello Sebastian, 

    Sebastian Stein said:
    This boils down to the following question: How do I enable a desktop app, written by me, to flash a user application or modem firmware to the nRF9160 SiP via the USB interface of the nRF9160 DK board?

    Ok, now I understand! Thanks for elaborating :-)

    I have not been into this particular matter myself, but what you probably should do to achieve this is making usage of nrfjprog executable. It has a DLL which provides an API that you should be able to use for your GUI. You could have a look at nRF pynrfjprog, which provides a simple Python interface for the nrfjprog DLL. 

    I hope this will help you.

    Cheers,

    Markus 

Reply
  • Hello Sebastian, 

    Sebastian Stein said:
    This boils down to the following question: How do I enable a desktop app, written by me, to flash a user application or modem firmware to the nRF9160 SiP via the USB interface of the nRF9160 DK board?

    Ok, now I understand! Thanks for elaborating :-)

    I have not been into this particular matter myself, but what you probably should do to achieve this is making usage of nrfjprog executable. It has a DLL which provides an API that you should be able to use for your GUI. You could have a look at nRF pynrfjprog, which provides a simple Python interface for the nrfjprog DLL. 

    I hope this will help you.

    Cheers,

    Markus 

Children
  • Hi Markus,

    thank you for your hint. Again, it looks promising.

    I stumbled across the DFU target library in the in nRF Connect SDK and it looks like exactly what I was looking for. Unfortunately there is no sample which shows the library in action. However, I had a look into the source code of the FOTA download library which uses the DFU target library to perform modem and application firmware updates.

    Long story short: I think I will try to stream a firmware image over the UART connected to the USB interface of the nRF9160 DK and use the DFU target library to perform the update.

    Cheers,
    Sebastian

    ------------------- EDIT -------------------

    As it turns out, the approach with DFU target library has certain flash limitations and cannot be used for a new nRF9160 DK without an appropriate user application which includes the MCBoot boot loader and the DFU target library. I think I will have to facilitate both approaches (nrfjprog and DFU target) for different scenarios.

    In any case, thank you allot for your help, Markus!

Related