TI BLE5-Stack API Documentation
2.01.00.00
|
Structure definition for image header and segments, these are prepended to the over the air images.
Go to the source code of this file.
Data Structures | |
struct | eccSignature_t |
Macros | |
#define | BIM_VER 0x3 |
#define | BIM_VER_OFFSET offsetof(imgHdr_t, fixedHdr.bimVer) |
#define | BOUNDARY_SEG_LEN 0x18 |
Length of the boundary segment. | |
#define | BOUNDARY_SEG_OFFSET offsetof(imgHdr_t, fixedHdr.segTypeBd) |
#define | COPY_DONE 0xFC |
#define | CRC_INVALID 0xFC |
#define | CRC_OFFSET offsetof(imgHdr_t, fixedHdr.crc32) |
#define | CRC_STAT_OFFSET offsetof(imgHdr_t, fixedHdr.crcStat) |
#define | CRC_VALID 0xFE |
#define | DEFAULT_CRC 0xFFFFFFFF |
#define | DEFAULT_STATE 0xFF |
#define | ECDSA_KEY_LEN 32 |
Length of the ECDSA security key. | |
#define | ECDSA_SHA_TEMPWORKZONE_LEN ECDSA_KEY_LEN*6 |
space for six buffers finalHash, reverseHash, pubkeyX, pubKeyY, sign1, sign2 | |
#define | EFL_MATADATA_HDR_LEN OAD_IMG_HDR_LEN + 8 |
#define | HDR_LEN_WITH_SECURITY_INFO offsetof(imgHdr_t, secInfoSeg.segTypeSecure) + sizeof(securityInfoSeg_t) |
#define | IMG_BOUNDARY_SEG_ID 0x00 |
#define | IMG_COPY_STAT_OFFSET IMG_INFO_OFFSET |
#define | IMG_COPY_STAT_OFFSET IMG_INFO_OFFSET /* Image copy status */ |
#define | IMG_DATA_OFFSET BIM_VER_OFFSET |
#define | IMG_INFO_OFFSET offsetof(imgHdr_t, fixedHdr.imgCpStat) |
#define | IMG_NONCOUNT_SEG_ID 0x02 |
#define | IMG_PAYLOAD_SEG_ID 0x01 |
#define | IMG_SECURITY_SEG_ID 0x03 |
#define | IMG_START_ADDR_OFFSET offsetof(imgHdr_t, imgPayload.startAddr) |
#define | IMG_TYPE_OFFSET offsetof(imgHdr_t, fixedHdr.imgType) |
#define | IMG_VALIDATION_OFFSET offsetof(imgHdr_t, fixedHdr.imgVld) |
#define | INVALID_ADDR 0xFFFFFFFF |
#define | INVALID_LEN INVALID_ADDR |
#define | META_VER 0x1 |
#define | NEED_COPY 0xFE |
#define | OAD_EXTFL_ID_VAL {'O', 'A', 'D', ' ', 'N', 'V', 'M', '1'} |
#define | OAD_IMG_FULL_HDR_LEN sizeof(imgHdr_t) |
The length of the OAD Header + Segments. | |
#define | OAD_IMG_HDR_LEN sizeof(imgFixedHdr_t) |
#define | OAD_IMG_ID_LEN 8 |
OAD image identification bytes length. More... | |
#define | OAD_IMG_ID_LEN 8 |
OAD image identification bytes length. More... | |
#define | OAD_IMG_TYPE_APP 1 |
#define | OAD_IMG_TYPE_APP_STACK 3 |
#define | OAD_IMG_TYPE_APPSTACKLIB 7 |
#define | OAD_IMG_TYPE_BIM 6 |
#define | OAD_IMG_TYPE_FACTORY 5 |
#define | OAD_IMG_TYPE_NP 4 |
#define | OAD_IMG_TYPE_PERSISTENT_APP 0 |
#define | OAD_IMG_TYPE_RSVD_BEGIN 64 |
#define | OAD_IMG_TYPE_RSVD_END 255 |
#define | OAD_IMG_TYPE_STACK 2 |
#define | OAD_SW_VER_LEN 4 |
OAD software version length in bytes. More... | |
#define | OAD_SW_VER_LEN 4 |
OAD software version length in bytes. More... | |
#define | OAD_WIRELESS_TECH_BLE 0xFFFE |
#define | OAD_WIRELESS_TECH_EASYLINK 0xFFBF |
#define | OAD_WIRELESS_TECH_RF4CE 0xFFEF |
#define | OAD_WIRELESS_TECH_THREAD 0xFFDF |
#define | OAD_WIRELESS_TECH_TIMAC_2_4G 0xFFFB |
#define | OAD_WIRELESS_TECH_TIMAC_SUBG 0xFFFD |
#define | OAD_WIRELESS_TECH_ZIGBEE 0xFFF7 |
#define | SEC_VERIF_STAT_OFFSET offsetof(imgHdr_t, secInfoSeg.verifStat) |
#define | SECURITY_SEG_LEN 0x55 |
Length of the security segment. | |
#define | SECURITY_VER 0x1 |
#define | SEG_HDR_LEN 12 |
#define | SEG_LEN_OFFSET 4 |
#define | SEG_LEN_OFFSET 4 /* Offset from seg header to seg len */ |
#define | SEG_SIGERINFO_OFFSET offsetof(imgHdr_t, secInfoSeg.secSignerInfo) |
#define | SEG_SIGNR_OFFSET offsetof(imgHdr_t, secInfoSeg.eccSign.sign_r) |
#define | SEG_SIGNS_OFFSET offsetof(imgHdr_t, secInfoSeg.eccSign.sign_s) |
#define | SIG_OFFSET offsetof(imgHdr_t, secInfoSeg.eccSign.sign_r) |
Offset from the start of security seg to sig. | |
#define | SIGN_FN_PTR 0x57fa0 |
Pointer to BIM Function. | |
#define | VERIFY_FAIL 0xFC |
#define | VERIFY_PASS 0xFE |
Typedefs | |
typedef uint8_t(* | bimSignFnPtr_t) (uint8_t, uint32_t, uint32_t, uint8_t *, uint8_t *, ecdsaSigVerifyBuf_t *) |
OAD Image Pointer to BIM Function. More... | |
Variables | |
uint32_t | _sign_fnPtr |
Variable for Pointer to BIM Function. | |
uint8_t | bimVer |
BIM version. | |
boundarySeg_t | |
uint32_t | boundarySegLen |
Boundary segment length. | |
uint32_t | crc32 |
Image's 32-bit CRC value. | |
uint8_t | crcStat |
CRC status. | |
eccSignature_t | eccSign |
Security signature */. | |
ecdsaSigVerifyBuf_t | |
uint16_t | hdrLen |
Total length of the image header. | |
uint8_t | imgCpStat |
Image copy status. | |
uint32_t | imgEndAddr |
Address of the last byte of a contiguous image. | |
imgFixedHdr_t | |
imgHdr_t | |
uint8_t | imgNo |
Image number of 'image type'. | |
imgPayloadSeg_t | imgPayload |
Required contiguous image segment. | |
imgPayloadSeg_t | |
uint32_t | imgSegLen |
Payload segment length. | |
uint8_t | imgType |
Image Type. | |
uint32_t | imgVld |
Image validation bytes, used by BIM. | |
uint32_t | len |
Image length in bytes. | |
uint8_t | metaVer |
Metadata version. | |
uint32_t | prgEntry |
Program entry address. | |
uint32_t | ram0EndAddr |
RAM entry end address. | |
uint32_t | ram0StartAddr |
RAM entry start address. | |
uint16_t | rfu |
Reserved bytes. More... | |
uint32_t | secSegLen |
Payload segment length. | |
uint8_t | secSignerInfo [8] |
Security signer info */. | |
uint32_t | secTimestamp |
Security timestamp */. | |
securityInfoSeg_t | |
uint8_t | secVer |
Security version */. | |
uint8_t * | SHADataBuf |
this buff is used for reading data for calculating SHA2 hash, length depends on available RAM of calling application */ | |
uint8_t | SHADataBufLen |
length of allocate SHA data buffer | |
uint8_t * | SHAWorkzone |
SHA workzone buffer should be of size(SHA256_memory_t) bytes. | |
uint8_t | softVer [4] |
Software version of the image. | |
uint32_t | stackEntryAddr |
Stack start address. | |
uint32_t | stackStartAddr |
Start address of stack image on internal flash. | |
uint32_t | startAddr |
Start address of image on internal flash. | |
uint16_t | techType |
Wireless protocol type BLE/TI-MAC/ZIGBEE etc. | |
uint8_t * | tempWorkzone |
Should be size 6*ECDSA_KEY_LEN bytes. | |
TYPEDEF_STRUCT_PACKED | |
User-defined Image Identification bytes. More... | |
uint8_t | verifStat |
Verification status. | |
uint16_t | wirelessTech |
Wireless technology type. | |
#define BIM_VER 0x3 |
Version of BIM this image is intended to work with
#define COPY_DONE 0xFC |
FlagimgCpStat indicating the image is already copied
#define CRC_INVALID 0xFC |
Flag for crcStat indicating the CRC of the image is invalid
#define CRC_VALID 0xFE |
Flag for crcStat indicating the CRC of the image is valid
#define DEFAULT_CRC 0xFFFFFFFF |
An invalid address as shown by unprogrammed flash.
#define DEFAULT_STATE 0xFF |
Default state of unprogrammed flash in an image header field
#define EFL_MATADATA_HDR_LEN OAD_IMG_HDR_LEN + 8 |
Length of image external flash image header
#define INVALID_ADDR 0xFFFFFFFF |
An invalid address as shown by unprogrammed flash
#define INVALID_LEN INVALID_ADDR |
An invalid length as shown by unprogrammed flash.
#define META_VER 0x1 |
Version of metadata that defined this image header
#define NEED_COPY 0xFE |
FlagimgCpStat indicating the image should be copied
#define SECURITY_VER 0x1 |
Version of metadata that defined this image header
#define VERIFY_FAIL 0xFC |
Flagimg verification status indicating the failed sign verification
#define VERIFY_PASS 0xFE |
Flagimg verification status indicating the successful sign verification
typedef uint8_t(* bimSignFnPtr_t) (uint8_t, uint32_t, uint32_t, uint8_t *, uint8_t *, ecdsaSigVerifyBuf_t *) |
OAD Image Pointer to BIM Function.
Function typdef for bim_payloadVerify() fxn defined in bim_main.c
uint8_t rfu |
Reserved bytes.
Reserved byte.
TYPEDEF_STRUCT_PACKED |
User-defined Image Identification bytes.
Should be of length ECCROMCC26XX_NIST_P256_WORKZONE_SIGN_VERIFY_LEN_IN_BYTES*sizeof(uint32_t) bytes.
Required core image header.
Segment type - for Secuirty info payload.
Segment type - for boundary segment.
Segment type - for Contiguous image payload.
OAD Core image header structure definition
OAD continuous image payload segment
This segment is used to describe a contiguous region of an image The code data in this blob will be flashed to sequential addresses
OAD boundary segment
This segment is used to describe the RAM and Flash boundaries in a split image system.
OAD Image Header
This structure represents the complete header to be prepended to an OAD image
It is an amalgamation of the structures defined above, and must contain a core header