# Secure Bootloader Sample Reference Data Structures Type Documentation

## BL_AppConfiguration_t

Location: bl_configuration.h:98

Define a structure which can map onto the configuration area.

Data Fields

Type | Name | Description
--- | --- | ---
uint32_t | key1 | Secure mode first key.
uint32_t | key2 | Secure mode second key (optional)
uint32_t | content | Secure mode content certificate.
uint32_t | programStart | Program start address.
uint32_t | memoryConfiguration | Memory configuration to enable.
uint32_t | retentionConfiguration | Memory Retention configuration.
uint32_t | crc | CCITT CRC of previous fields.

## BL_ImageOperation_t

Location: bl_image.h:102

Buffer used for loading data in chunks, allow 2 blocks.

Data Fields

Type | Name | Description
--- | --- | ---
uint32_t | offset | Offset of the data from the base of the application being downloaded.
size_t | length | Length of the data.
uint32_t | crc | CRC32 calculated over the data.
uint8_t | buffer[BL_CODE_SECTOR_SIZE] | Buffer to hold the data.

## BL_ImageSplitRange_t

Location: bl_image.h:111

define an address range which can wrap-around a reserved block

Data Fields

Type | Name | Description
--- | --- | ---
uint8_t * | address | Address of the data.
size_t | length | Length of the data.
uint8_t * | split | Address of the split in the data.
size_t | remaining | Length of the data in the split section.

## BL_StatusResponse_t

Location: bl_loader.h:168

to maintain backwards compatibility, we use a two byte status for most messages.

The status and type enums above will be coerced to this format when sending responses.

Data Fields

Type | Name | Description
--- | --- | ---
uint8_t | type | Type of message status.
uint8_t | status | Status for this message.

## BL_BootAppVersion_t

Location: bl_versions.h:112

Define the application version as id and version details.

Data Fields

Type | Name | Description
--- | --- | ---
BL_BootAppId_t | id | App ID string.
uint16_t | num | <major[15:12]>. .

## BL_HelloResponse_t

Location: bl_versions.h:119

Define the contents of a Hello response.

Data Fields

Type | Name | Description
--- | --- | ---
BL_BootAppVersion_t | boot_version | Version info of boot loader.
BL_BootAppVersion_t | app_version | Version info of loaded application.
uint16_t | block_size | Loading block size to use.