Flashing zephyr project over DFU

I made a DFU Bootloader for my nrf51822 that waits for two seconds before starting the application, so I have time to connect and flash.

That process was working with the nRF SDK, but I fail to flash a zephyr project.

I am using the nRF-connect-sdk to develop my project.

I would love to get these questions answered:

  • why do I have to change the flash base location in my application to make it work the the bootloader?
  • why do I have to change the flash size? the generated images seem to be identical regardless of the flash size

I have attached the linker script I use to generate .hex files that I can pack into a zip and flash using a modified version of the secure DFU bootloader.

uart_nrf51.ld

Regarding zephyr, I would really appreciate help with these questions:

  • Is it possible to flash my zephyr project via the secure DFU bootloader?
  • What .hex file from my project do I need to pack into the zip using nrftool?
  • What do I need to modify in my project (settings) to make it flashable via the bootloader? I would assume I need to change the flash base, so it doesn't override my bootloader...
  • Can I exclude the softdevice from the update package, since the softdevice is already present on the chip for the bootloader?

For some context, here is the source of an application I regularly flash using my DFU bootloader: 

  • Hi,

    There are several large differences between nRF5 SDK and nRF Connect SDK, both in BLE stack, DFU, boot process and flash layout. This means we do not have an upgrade path from nRF5 SDK based projects to nRF Connect SDK based projects.

    In order to put a zephyr based project onto a device with an nRF5 SDK based project, I am afraid you must connect to the SoC with a J-Link programmer.

    Regards,
    Terje

Related