Hi,
1. Is bootloader file and firmware file, different for projects build on nCS..?
Or a single executable build file consists both bootloader & firmware..?
2. Can you suggest a sample program to build a bootloader project..?
Thanks,
Hi,
1. Is bootloader file and firmware file, different for projects build on nCS..?
Or a single executable build file consists both bootloader & firmware..?
2. Can you suggest a sample program to build a bootloader project..?
Thanks,
Hello,
In NCS, the bootloader is enabled through configurations, mostly.
I suggest that you check out the documentation of FOTA upgrades:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/ug_nrf52.html#fota-upgrades
And there is also a written guide on how to add DFU to your project, that I can recommend:
https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu
If you struggle with the implementation, I suggest that you follow the guide first, and add DFU to the smp_svr sample from NCS, so that you know that everything around (uploading via nRF Connect for iOS/Android/mcumgr) is working as it should, before you start looking into potential issues in your custom application.
BR,
Edvin
Hello Edvin,
And there is also a written guide on how to add DFU to your project,
Towards DFU, i see that we make the following configuration to the project:
# Ensure an MCUboot-compatible binary is generated. CONFIG_BOOTLOADER_MCUBOOT=y
So,
1. By enabling MCUBOOT what happens..?
2. Where is the bootloader image file in the device memory..?
3. Is the boot loader image file different than firmware image file or bootloader code is integrated into the firmware image file..?
Thanks,
Thank you Edvin,
Then there is no bootloader. The application will be located at 0x00.
It is clearer now.
Now if I want to generate a private key and add it into the MCUBOOT, what process do I follow..?
Please suggest.
Thanks
Please see this link on how to generate new key pairs.
There is also a Kconfig definition
CONFIG_BOOT_SIGNATURE_KEY_FILE (described as "config BOOT_SIGNATURE_KEY_FILE" in NCS\nrf\modules\mcuboot\Kconfig) where you can set the absolute path of the key file that you have generated.
Best regards,
Edvin
Hello Edvin,
CONFIG_BOOT_SIGNATURE_KEY_FILE
Thank you for the suggestion, it helps.
Further, I understand the usual way mcuboot works with SLOT-0, SLOT-1 & SCRATCH memory locations towards swapping of images for firmware update.
I want to customize a few things here,
1. I want to map SLOT-1 & SCRATCH memory locations to external serial flash locations.
2. I want to provide mcuboot SPI interface APIs to interact with external flash.
So, for the above 2 requirements, kindly suggest how and where I can tweak & build the mcuboot source code.
If any sample is available wherein mcuboot source code is modified, it would be great.
Thanks,
Ubaid
Ubaid_M said:1. I want to map SLOT-1 & SCRATCH memory locations to external serial flash locations.
2. I want to provide mcuboot SPI interface APIs to interact with external flash.
What chip are you using? I believe it is possible to offload this to an external QSPI flash chip by using CONFIG_NORDIC_QSPI_NOR=y. Without knowing the details, perhaps you can look into what this does, and try to implement something similar using SPI.
The MCUBOOT bootloader project is located in ncs <vX.Y.Z>\bootloader\mcuboot.
BR,
Edvin
Hello Edvin,
The MCUBOOT bootloader project is located in ncs <vX.Y.Z>\bootloader\mcuboot.
1. So i can tweak in the and make changes to mcuboot source code from here right..?
Another query i had was with copying of mcuboot,
So in this case you can see that the bootloader is located at address 0x0
2. WHO does this copying of mcuboot onto device memory location 0x00..?
Thanking you,
Ubaid
Hello Edvin,
The MCUBOOT bootloader project is located in ncs <vX.Y.Z>\bootloader\mcuboot.
1. So i can tweak in the and make changes to mcuboot source code from here right..?
Another query i had was with copying of mcuboot,
So in this case you can see that the bootloader is located at address 0x0
2. WHO does this copying of mcuboot onto device memory location 0x00..?
Thanking you,
Ubaid