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

Problem to upgrade bootloader by application

Need to upgrade bootloader by application code. I have finished to program bootloader image to FLASH. Content is verified correct, comparing to SRC. However, the bootloader seems to be empty after rebooting the device. nRF Go Studio cannot see it as well. I assume that I miss to update MBR. How can I do that? Any simple programming guide for reference?

Thanks.

  • Hi Louis,

    Could you let me know a little bit more on which bootloader and which application are you testing with ? Which SDK ? Are you using our DFU bootloader or you wrote your own ?

    What do you mean "nRFGo Studio cannot see it" ?

    You don't have to update MBR.

    Please list the step you did to test updating the bootloader. I assume you can update the application with no problem.

  • First, my intention is to upgrade firmware: app + bootloader by DFU. Our platform is nRF52832, using SDK_12.3.0. We use DFU bootloader, developed by Nordic. We only upgrade APP by DFU. However, for next release, bootloader is modified. Therefore, we have to upgrade both APP and bootloader by DFU. It is single bank in our project. Best solution is by DFU, bootloader can be upgraded. But I guess not. So, I tried to do that by application. If DFU can do that in single bank, plz show me how to do that. As for my test procedure, I list pseudo code below:

    1. Enter main() of application.
    2. Check proprietary bootloader version. If not expected bootloader or empty, run below steps.
    3. Erase flash space of bootloader by nrf_nvmc_page_erase()
    4. write bootloader image to bootloader space by nrf_nvmc_write_words() // note: bootloader image is compiled as a array in a c file. Those are steps how I program bootloader image to flash (0x78000 ~ 0x8000)

    For nRF Go Studio, it shows SD, APP, and BOOTLOADER, if any of them exists. If I program all three blocks by GoStudio, it shows them all. When I program SD + APP by GoStudio, and program BL by APP, GoStuio only shows SD + APP. Just like no BL there.

  • Hi Louis,

    It's possible to update the bootloader you don't need to do that from your application. Please have a look here.

    I'm not 100% sure you can combine bootloader and application in one image, but it might be supported by our nRFConnect now. But please try to update bootloader first, for testing. If it works, you can then test bootloader + application update.

  • My bootloader is using dfu_single_bank. What can i do to update my bootloader? i'm thinking about updating bootloader from aplication like Louis, it is the only way?

  • I dont see any problem update the bootloader using dfu single bank. You just need to update the application after you have done with updating the bootloader. 

Related