Hello,
I have a working application on nrf52832, running sdk version 15.0 and SD132 version 6.0.0. Now I would like to add dfu functionality. I followed the instructions at https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fble_sdk_app_dfu_bootloader.html.
Regarding this I have some questions and hoping someone can clarify these
- I followed the instructions and compiled the standard bootloader project under nRF5_SDK_15.0.0/examples/dfu/secure_bootloader. The final hex file produced was of size 64Kb. My understanding was that as per the memory map, we have 24kb bootloader space in the region 0x0007 8000 to 0x0007 E000. Why is this hex bigger in size?
ls -liah dfu/bootloader/pca10040_ble/armgcc/_build total 552K 13869703 drwxrwxr-x 3 ankit ankit 4.0K Oct 10 19:57 . 13869746 drwx------ 3 ankit ankit 4.0K Oct 10 19:57 .. 13869747 drwxrwxr-x 2 ankit ankit 4.0K Oct 10 19:57 secure_dfu_bootloader 13794307 -rwxrwxr-x 1 ankit ankit 256M Oct 10 19:57 secure_dfu_bootloader.bin 13794294 -rw-rw-r-- 1 ankit ankit 66K Oct 10 19:57 secure_dfu_bootloader.hex 13794295 -rw-rw-r-- 1 ankit ankit 3.2K Oct 10 19:57 secure_dfu_bootloader.in 13794297 -rw-rw-r-- 1 ankit ankit 89K Oct 10 19:57 secure_dfu_bootloader.map 13794298 -rwxrwxr-x 1 ankit ankit 434K Oct 10 19:57 secure_dfu_bootloader.out
- To generate the bootloader settings hex file, I need to specify application-version, bootloader-version & bl-settings-version. For what and how are these values used by the bootloader? Under my dfu process, I plan to only ever update the application fw. Never the SD or the bootloader itself.
- Within the bootloader itself, I want to be able to activate the dfu mode from software. To do this, I set the NRF_BL_DFU_ENTER_METHOD_BUTTONLESS define in sdk_config.h file under the bootloader project. Now to enter dfu mode I need to Enter DFU mode when the Boolean enter_buttonless_dfu in DFU settings is true. How do I do this?
- My understanding is that whenever the system boots up, the bootloader comes up and boots the application immediately, if present. If this is true, what is the define NRF_BL_DFU_INACTIVITY_TIMEOUT_MS for? Or is it that on boot bootloader comes up and waits for NRF_BL_DFU_INACTIVITY_TIMEOUT_MS before loading a valid application if present?
Thank you for the help.