This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Developing a custom bootloader

Hello Nordic team,

I am faced with the problem of developing a custom bootloader which actively pulls FW from an external mass-storage. AFAIK, the SDK only supports OTA or UART where the nRF device is slave to a host device which pushes the FW.

What would you recommend as a best way to tackle the problem? Do I need to dissect the SDK to see how the different functions need to be implemented? Could the nrfx driver set be of any help here? Ideally you could point me to a sample implementation.

Thanks and with best regards,

Norbert

Parents Reply
  • Hi,

    Just to give some final feedback and maybe clues to other people intending to do something similar. I got my bootloader apparently working, even though I do not have an application yet which is fit to run.

    The document Bootloader_External_Flash_Modifications.pdf (/cfs-file/__key/communityserver-discussions-components-files/4/Bootloader_5F00_External_5F00_Flash_5F00_Modifications.pdf) is pure gold. A couple of points to watch out for:

    • Choose a suitable format for the file containing the firmware you want to install. You need to have access to the init record while the bootloader is running. I modified the pc_nrfutil script to be able to write a stream of instructions to a file. This way, the bootloader has everything it needs, even to do the block CRC verification on-the-fly.
    • You might want to install SD and APP at the same time if there is ever an incompatibility between the ones already installed and the new FW package. To handle multiple updates, I commented out the call to nrf_dfu_settings_write_and_backup() in nrf_dfu_req_handler.c and let that part execute after all updates have been performed.

Children
Related