Image parser context definition.

Public Attributes#

uint8_t

Buffer contents.

uint8_t

Amount of bytes present in buffer.

uint8_t

Current reading offset into the buffer (circular)

uint8_t

Parser flags.

bool

Parser is currently inside an encrypted tag.

bool

Parser has received and verified signature.

uint8_t

Parser has received bootloader upgrade tag.

State of the GBL parser state machine.

void *

AES-CCM decryption (= AES-CTR) context.

void *

SHA256 hashing context.

size_t

Total length of the tag currently being parsed.

size_t

Current offset into tag being parsed.

size_t

Total length of current encrypted data block.

size_t

Offset into current encrypted data block.

uint32_t

Current address the image needs to be written to.

uint32_t

Current offset of metadata/bootloader being handled (starts at 0)

uint8_t

Withheld application data.

uint8_t

Withheld bootloader upgrade data during app parsing.

uint8_t

Withheld bootloader upgrade data during bootloader parsing.

uint32_t

Running CRC-32 over the incoming GBL file.

uint32_t

Context for custom tag.

uint8_t

Current tag order.

uint8_t

Reserved flags.

Public Attribute Documentation#

internalBuffer#

uint8_t ParserContext_t::internalBuffer[64]

Buffer contents.


Definition at line 211 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

bytesInInternalBuffer#

uint8_t ParserContext_t::bytesInInternalBuffer

Amount of bytes present in buffer.


Definition at line 213 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

internalBufferOffset#

uint8_t ParserContext_t::internalBufferOffset

Current reading offset into the buffer (circular)


Definition at line 215 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

flags#

uint8_t ParserContext_t::flags

Parser flags.


Definition at line 217 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

inEncryptedContainer#

bool ParserContext_t::inEncryptedContainer

Parser is currently inside an encrypted tag.


Definition at line 219 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

gotSignature#

bool ParserContext_t::gotSignature

Parser has received and verified signature.


Definition at line 221 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

receivedFlags#

uint8_t ParserContext_t::receivedFlags

Parser has received bootloader upgrade tag.


Definition at line 223 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

internalState#

GblParserState_t ParserContext_t::internalState

State of the GBL parser state machine.


Definition at line 225 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

aesContext#

void* ParserContext_t::aesContext

AES-CCM decryption (= AES-CTR) context.


Definition at line 227 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

shaContext#

void* ParserContext_t::shaContext

SHA256 hashing context.


Definition at line 229 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

lengthOfTag#

size_t ParserContext_t::lengthOfTag

Total length of the tag currently being parsed.


Definition at line 231 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

offsetInTag#

size_t ParserContext_t::offsetInTag

Current offset into tag being parsed.


Definition at line 233 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

lengthOfEncryptedTag#

size_t ParserContext_t::lengthOfEncryptedTag

Total length of current encrypted data block.


Definition at line 235 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

offsetInEncryptedTag#

size_t ParserContext_t::offsetInEncryptedTag

Offset into current encrypted data block.


Definition at line 237 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

programmingAddress#

uint32_t ParserContext_t::programmingAddress

Current address the image needs to be written to.


Definition at line 239 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

tagAddress#

uint32_t ParserContext_t::tagAddress

Current offset of metadata/bootloader being handled (starts at 0)


Definition at line 241 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

withheldApplicationVectors#

uint8_t ParserContext_t::withheldApplicationVectors[24]

Withheld application data.


Definition at line 243 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

withheldUpgradeVectors#

uint8_t ParserContext_t::withheldUpgradeVectors[4]

Withheld bootloader upgrade data during app parsing.


Definition at line 245 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

withheldBootloaderVectors#

uint8_t ParserContext_t::withheldBootloaderVectors[4]

Withheld bootloader upgrade data during bootloader parsing.


Definition at line 247 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

fileCrc#

uint32_t ParserContext_t::fileCrc

Running CRC-32 over the incoming GBL file.


Definition at line 249 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

customTagId#

uint32_t ParserContext_t::customTagId

Context for custom tag.


Definition at line 251 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

currentTagOrder#

uint8_t ParserContext_t::currentTagOrder

Current tag order.


Definition at line 269 of file platform/bootloader/parser/gbl/btl_gbl_parser.h

reservedFlags#

uint8_t ParserContext_t::reservedFlags[3]

Reserved flags.


Definition at line 271 of file platform/bootloader/parser/gbl/btl_gbl_parser.h