Re: [Zephyr-devel] Firmware over the air (FOTA) and FCB support in 1.11.0
On 03/20/2018 09:14 PM, ashish.shukla@... wrote:
Your question is a bit open-ended, and might be difficult to answer without some details regarding your paricular use-case (BLE update, IP-based update, Mesh, etc)
For instance, the LwM2M subsystem provides a mechanism for receiving a firmware update in the LwM2M client, but the implementation of where to store the incoming binary data is up to you. See https://github.com/zephyrproject-rtos/zephyr/blob/master/samples/net/lwm2m_client/src/lwm2m-client.c#L208 for a callback example that is triggered on each incoming block of data. Documentation for the sample itself doesn't discuss the firmware update mechanism, but it's here for reference: http://docs.zephyrproject.org/samples/net/lwm2m_client/README.html
Then, there is a robust DFU (Device Firmware Update) subsystem to help implement the image writing portion of a firmware update as well as integrate with mcuboot (an MCU bootloader) which would check an image for validity and then move it into the bootable application slot. See: https://github.com/zephyrproject-rtos/zephyr/tree/master/subsys/dfu for sources.
Regarding FCB: the initial implementation is done in v1.11, but the APIs are fairly complex and IMHO it's meant to be used as a base layer for other higher level implementations to manage persistent data such as device configuration, system logs and other uses. There are several pull requests in-progress which aim to add these higher level services. (The first PR will probably be re-written to use FCB as it's base layer):
Hopefully that helps get you started,