Modules#

BootloadInfo_t

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).

Functions#

int32_t
storage_getBootloadList(int32_t slotIds[], size_t length)

Get list of firmware update images to attempt to bootload.

int32_t
storage_setBootloadList(int32_t slotIds[], size_t length)

Set list of firmware update images to attempt to bootload.

int32_t

Append a storage slot to the list of storage slots to try bootloading from.

Macros#

#define

Magic word indicating BootloadInfo_t struct.

#define

Version number for the BootloadInfo_t struct.

#define

Function Documentation#

storage_getBootloadList#

int32_t storage_getBootloadList (int32_t slotIds, size_t length)

Get list of firmware update images to attempt to bootload.

Parameters
[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


Definition at line 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.

Parameters
[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


Definition at line 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.

Parameters
[in]slotId

ID of the slot

Returns

  • Error code: BOOTLOADER_OK if slot was successfully appended


Definition at line 109 of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h

Macro Definition Documentation#

BTL_STORAGE_BOOTLOADINFO_MAGIC#

#define BTL_STORAGE_BOOTLOADINFO_MAGIC
Value:
0xE18F5239UL

Magic word indicating BootloadInfo_t struct.


Definition at line 51 of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h

BTL_STORAGE_BOOTLOADINFO_VERSION#

#define BTL_STORAGE_BOOTLOADINFO_VERSION
Value:
0x00000001UL

Version number for the BootloadInfo_t struct.


Definition at line 54 of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h

BTL_STORAGE_BOOTLOAD_LIST_MAX_LENGTH#

#define BTL_STORAGE_BOOTLOAD_LIST_MAX_LENGTH
Value:
16UL

Maximum number of items in the BootloadInfo_t::bootloadList.


Definition at line 57 of file platform/bootloader/storage/bootloadinfo/btl_storage_bootloadinfo.h