Bootload InfoComponents > Storage
Indicates which firmware update image should be bootloaded next.
This component provides the bootloader with support for storing multiple images and attempting to bootload a prioritized list. The Bootload Information struct is placed at a known location in storage, and points to a list of images to attempt to bootload.
While the Bootload Information list of images to attempt to bootload has a compile-time configurable size, the bootloader is capable of handling lists of images with different sizes, e.g., if a bootloader upgrade changes the slot layout or if a storage device that was initialized on a different device is used.
If only one storage slot is available, the functions available in this API will do nothing and return applicable error codes (BOOTLOADER_OK for storage_getBootloadList and storage_setBootloadList, and BOOTLOADER_ERROR_BOOTLOAD_LIST_FULL for storage_appendBootloadList).
|Magic word indicating BootloadInfo_t struct. |
|Version number for the BootloadInfo_t struct. |
|Maximum number of items in the BootloadInfo_t::bootloadList. |
|int32_t||storage_getBootloadList (int32_t slotIds, size_t length)|
|int32_t||storage_setBootloadList (int32_t slotIds, size_t length)|
|int32_t||storage_appendBootloadList (int32_t slotId)|
Get list of firmware update images to attempt to bootload.
Pointer to array of integers to fill with slot IDs, or -1 if list position does not contain a valid slot ID [in]
Number of slot IDs to get
- Error code: BOOTLOADER_OK if list of slots was successfully filled else error code in BOOTLOADER_ERROR_STORAGE_BASE range
Set list of firmware update images to attempt to bootload.
Pointer to array of slot IDs to set [in]
Number of slot IDs to set
- Error code: BOOTLOADER_OK if list of slots was successfully filled
Append a storage slot to the list of storage slots to try bootloading from.
ID of the slot
- Error code: BOOTLOADER_OK if slot was successfully appended