Bootload Info#
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).
Modules#
Functions#
Get list of firmware update images to attempt to bootload.
Set list of firmware update images to attempt to bootload.
Append a storage slot to the list of storage slots to try bootloading from.
Macros#
Magic word indicating BootloadInfo_t struct.
Version number for the BootloadInfo_t struct.
Maximum number of items in the BootloadInfo_t::bootloadList.
Function Documentation#
storage_getBootloadList#
int32_t storage_getBootloadList (int32_t slotIds, size_t length)
Get list of firmware update images to attempt to bootload.
[out] | slotIds | Pointer to array of integers to fill with slot IDs, or -1 if list position does not contain a valid slot ID |
[in] | length | Number of slot IDs to get |
Returns
Error code: BOOTLOADER_OK if list of slots was successfully filled else error code in BOOTLOADER_ERROR_STORAGE_BASE range
89
of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h
storage_setBootloadList#
int32_t storage_setBootloadList (int32_t slotIds, size_t length)
Set list of firmware update images to attempt to bootload.
[in] | slotIds | Pointer to array of slot IDs to set |
[in] | length | Number of slot IDs to set |
Returns
Error code: BOOTLOADER_OK if list of slots was successfully filled
99
of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h
storage_appendBootloadList#
int32_t storage_appendBootloadList (int32_t slotId)
Append a storage slot to the list of storage slots to try bootloading from.
[in] | slotId | ID of the slot |
Returns
Error code: BOOTLOADER_OK if slot was successfully appended
109
of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h
Macro Definition Documentation#
BTL_STORAGE_BOOTLOADINFO_MAGIC#
#define BTL_STORAGE_BOOTLOADINFO_MAGICValue:
0xE18F5239UL
Magic word indicating BootloadInfo_t struct.
51
of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h
BTL_STORAGE_BOOTLOADINFO_VERSION#
#define BTL_STORAGE_BOOTLOADINFO_VERSIONValue:
0x00000001UL
Version number for the BootloadInfo_t struct.
54
of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h
BTL_STORAGE_BOOTLOAD_LIST_MAX_LENGTH#
#define BTL_STORAGE_BOOTLOAD_LIST_MAX_LENGTHValue:
16UL
Maximum number of items in the BootloadInfo_t::bootloadList.
57
of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h