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

Flashing new bootloader settings along with an application.hex on top of an already existing bootloader

Hey guys,

The project I'm working on utilizes the secure DFU bootloader and buttonless DFU.

To get the application working I had to generate a bootloader-settings file. I merge this with the secure bootloader hex file and flashed it.

I am under the impression that every time the application code is updated, the bootloader-settings file has to be regenerated. This leads me to believe that every time I update the application, I have to remerge a new settings file with the bootloader. In this post at the bottom it shows that a bootloader and application file cannot be packaged together into one zip.

Does this mean every time I update the application I have to reflash a new merged bootloader and then a new application package?

Thanks.

Parents
  • Hi,

    From the blog post you linked to.

    The bootloader uses its bootloader setting to detect if a valid application is flashed on the chip or not. CRC check will be performed when booting. If we simply flash the application with the bootloader using the programmer, the bootloader won't be able to detect there is a valid app already flashed and it will enter DFU mode, your application won't start.

    Does this mean every time I update the application I have to reflash a new merged bootloader and then a new application package?

    No, if you skip the integrity check, you don't need to do this. See this post. Also note that SDK 15 added optional skipping of application CRC check. CRC check can be skipped on wakeup from System Off or on special value written to GPREGRET2 register (when bit 1 (0-indexed) is set in the GPREGRET2 register).

     

Reply
  • Hi,

    From the blog post you linked to.

    The bootloader uses its bootloader setting to detect if a valid application is flashed on the chip or not. CRC check will be performed when booting. If we simply flash the application with the bootloader using the programmer, the bootloader won't be able to detect there is a valid app already flashed and it will enter DFU mode, your application won't start.

    Does this mean every time I update the application I have to reflash a new merged bootloader and then a new application package?

    No, if you skip the integrity check, you don't need to do this. See this post. Also note that SDK 15 added optional skipping of application CRC check. CRC check can be skipped on wakeup from System Off or on special value written to GPREGRET2 register (when bit 1 (0-indexed) is set in the GPREGRET2 register).

     

Children
No Data
Related