nRF52840 connection to load MCUBoot+Zephyr

I am having problems in the JLink connection for nRF52840(RAK4631) to load MCUBoot+Zephyr application.  In the RAK4631 RAKWireless bootloader, it is loaded using nrfutil by usb serial connection, for example "nrfutil.exe dfu serial -pkg rak4631_factory_bootloader.zip -p COM5", then I don´t have to have a JLink for every flash operation.

I have a nRF52840DK what there we have a JLink-OB, but for production environment it will be expensive for thousands devices, each one with his own JLink-OB.  Is it possible to load a merged.hex without by USB instead of JLink?

Regards,

Claudio

  • Hi,

    I have a nRF52840DK what there we have a JLink-OB, but for production environment it will be expensive for thousands devices, each one with his own JLink-OB.

    You do not need a JLink-OB in the end product, but you need J-Link or other SWD programmers on the production line. Then you flash the device with what you need directly. The only thing you need to do on your hardware for supporting this is routing out the SWD lines so that you can hook up to it on the production line.

  • Could I do it using the "nrfutil.exe dfu serial -pkg rak4631_factory_bootloader.zip -p COM5" ?  I mean work with serial port to flash a merge file (MCUBoot+Zephyr).

  • I do not know what rak4631_factory_bootloader contains or the details of what the RAK4631 contains. But as you use nrfutil like this it includes the nRF5 SDK serial bootlaoder that may have modifications of some sort? It will not be possible in any way to remove the MBR with a DFU operation. It may be possible to remove the bootloader in an unsafe operation. You can read more about it here.

    But I am curious about the context. Is this a product in your production line? Why do you not program it via a SWD programmer then? If not, you will have to maintain a combinatino of legacy nRF5 SDK comonents and nRF Connet SDK components, and I wonder what the benefits of this approach is?

  • Let me explain better.  I will replace rak4631_factory_bootloade by merge file merged.hex(MCUBoot+Zephyr).  

  • Let me clarify, I already tried to flash RAK4631(nRF52840) by VSCode/nRF Connect/Jlink, and nRF Connect for Desktop  v5.0.2 Programmer,  as you can see in the images below. 

    In the screenshot below you can see as "connected devices":

    1. The nRF52840-DK, it is working fine
    2. The RAK4631 isn´t being reconized as a nRF52840.  

    Well, below I attached the connection schema that I am using to connect the RAK4631 with the JLink, but I think that I have a problem between JLink and RAK4631, but I don´t know what.

    Maybe I will need to rewrite the MBR, but I don´t know how.

    In the Zephyr documentation  for my supported board RAK4631, I found:

    1. Connect the RAK4631 board to your host computer using the USB debug port. Then build and flash the Hello World application.

      # From the root of the zephyr repository
      west build -b rak4631/nrf52840 samples/hello_world
      west flash
      

      You should see “Hello World! rak4631_nrf52840” in your terminal.

    Could you help me?

    Claudio

Related