Gecko Bootloader can load application from different sources. It can load from host controller via UART/SPI. It can load from a remote device via Bluetooth connection (OTA - over the air). It can load from internal flash (if the internal flash is big enough to accomodate both the application code and an upgrade image). It can load from external flash.
What it cannot do is uploading the application to the internal/external flash before loading them from there. This article helps you implement the missing step: uploading the image to the internal/external flash via a Bluetooth connection.
This article guides you through how to upload images to storage slots using the standard OTA DFU process. To learn how to bootload the uploaded images from the slots please read this article: https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/07/19/switching_betweenfi-GnNI
To make the OTA uploader compatible with the Silicon Labs Bluetooth OTA bootloader that loads the image directly to the application area, first we have to understand how the standard OTA DFU method works.
The standard OTA DFU sequence looks like this (provided that you use Bluetooth in-place OTA type Gecko Bootloader):
The OTA uploader uses a similar process:
The attached code implements image uploading to the slots using the standard OTA process. It is also extended with the possibility to select a slot to upload to, and to select a slot to boot from. You are free to modify this example according to your needs.
To create a project with multislot OTA DFU follow these steps:
(Note: setting gecko_bootloader=true in the .isc file will copy btl_interface.c and btl_interface_storage.c into your project again. Remove the instances you copied before to avoid duplicated definitions)