sample nCS code to evaluate DFU-OTA on nRF52833

Hi,

I am working on an application to transfer firmware file via BLE-GATT to nRF52833. 
Can you kindly suggest any sample code for me to evaluate.

Thanks,

Ubaid

Parents Reply Children
  • Hello,

    Ubaid_M said:
    Does it mean bootloader itself is replacing mcuboot code..?

    No, it does not.

    Ubaid_M said:
    what is the meaning of 
    "Finally, BOOTLOADER_MCUBOOT includes MCUboot as a child image"

    It means that if you add CONFIG_BOOTLOADER_MCUBOOT=y, the compiler will add and compile the mcuboot image to your project, so that it is flashed when you use west flash. However, it does not mean that if you make any changes to the mcuboot image, it will be uploaded during DFU. If you need to update the mcuboot, you will need yet another bootloader, the "immutable bootloader", which you can read about here.

    Note: the link to this is found here:

    Best regards,

    Edvin

  • Hello ,

    It means that if you add CONFIG_BOOTLOADER_MCUBOOT=y, the compiler will add and compile the mcuboot image to your project, so that it is flashed when you use west flash.

    I was able to find out more on this, In the build folder there are 2 build files
    1. One for application build file at location: "build\zephyr"
    2. One for child image (mcuboot file): "build\mcuboot\zephyr"

    Now if I want to flash on board the mcuboot build file found at the path : "build\mcuboot\zephyr",
    Please guide how do I flash it..?

    Thanks,

  • If you have enabled the bootloader in your project using the guide from my first reply, then it will be automatically flashed when you either flash using nRF Connect for Visual Studio Code, or "west flash -d build", or however you flash your application. It will be part of the build output. 

  • Hello ,

    ct using the guide

    With the project I build from your suggested guide:

    I got the following three build/output files at build paths:

    1. build/zephyr/zephyr.hex: only application

    2. build/mcuboot/zephyr/zephyr.hex: only mcuboot

    3. build/zephyr/merged.hex: mcuboot+application

    Out of these three, I am to understand If I flash the first build file, it will flash only application.
    The second build file is for mcuboot project build.
    The third build file has both mcuboot+application which can be flashed.

    I just need to know how to flash the second build file, that is at "build/mcuboot/zephyr/zephyr.hex"
    Please suggest..?!

    Thanks

  • So you want to know how to flash a .hex file?

    You can use nRF Command Line Tools directly. You have already installed it, since West (part of nRF Connect SDK) uses it. Use the command:

    nrfjprog --program build\mcuboot\zephyr\zephyr.hex --verify --sectorerase

    Best regards,

    Edvin

Related