TI BLE5-Stack API Documentation  1.01.14.00
Modules | Files | Macros | Variables
OAD Image Header

Structure definition for image header and segments, these are prepended to the over the air images. More...

Modules

 OAD Image Header offsets
 
 OAD image lengths
 
 OAD image types
 
 OAD segment op codes
 
 OAD wireless technology fields
 

Files

file  oad_image_header.h
 Structure definition for image header and segments, these are prepended to the over the air images.
 

Macros

#define BIM_VER   0x3
 
#define COPY_DONE   0xFC
 
#define CRC_INVALID   0xFC
 
#define CRC_VALID   0xFE
 
#define DEFAULT_CRC   0xFFFFFFFF
 
#define DEFAULT_STATE   0xFF
 
#define EFL_MATADATA_HDR_LEN   OAD_IMG_HDR_LEN + 8
 
#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'}
 

Variables

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.
 
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
 This field is RFU.
 
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...
 
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.
 
 TYPEDEF_STRUCT_PACKED
 User-defined Image Identification bytes. More...
 
uint16_t wirelessTech
 Wireless technology type.
 

Detailed Description

Structure definition for image header and segments, these are prepended to the over the air images.

============================================================================

Header Include

The OAD Image header file should be included in an OAD enabled application as follows:

Overview

The OAD image header is a combined structure that is intended to be prepdended to a binary image before sending over the air. This file defines the structures that are used to build up an image header. Additionally, this header file can be used by the application to read fields within an image header.

General Behavior

For code examples, see the use cases below.

Creating a header structure

Placing/Using a header structure

Macro Definition Documentation

§ BIM_VER

#define BIM_VER   0x3

Version of BIM this image is intended to work with

Warning
This is not intended to be changed

§ COPY_DONE

#define COPY_DONE   0xFC

FlagimgCpStat indicating the image is already copied

§ CRC_INVALID

#define CRC_INVALID   0xFC

Flag for crcStat indicating the CRC of the image is invalid

§ CRC_VALID

#define CRC_VALID   0xFE

Flag for crcStat indicating the CRC of the image is valid

§ DEFAULT_CRC

#define DEFAULT_CRC   0xFFFFFFFF

An invalid address as shown by unprogrammed flash.

§ DEFAULT_STATE

#define DEFAULT_STATE   0xFF

Default state of unprogrammed flash in an image header field

§ EFL_MATADATA_HDR_LEN

#define EFL_MATADATA_HDR_LEN   OAD_IMG_HDR_LEN + 8

Length of image external flash image header

§ INVALID_ADDR

#define INVALID_ADDR   0xFFFFFFFF

An invalid address as shown by unprogrammed flash

§ INVALID_LEN

#define INVALID_LEN   INVALID_ADDR

An invalid length as shown by unprogrammed flash.

§ META_VER

#define META_VER   0x1

Version of metadata that defined this image header

Warning
This is not intended to be changed

§ NEED_COPY

#define NEED_COPY   0xFE

FlagimgCpStat indicating the image should be copied

§ OAD_EXTFL_ID_VAL

#define OAD_EXTFL_ID_VAL   {'O', 'A', 'D', ' ', 'N', 'V', 'M', '1'}

Magic number used by entries in the image header table at the beginning of external flash. Note this is different from OAD_IMG_ID_VAL so that the application can determine the difference between an entry in the header table and the start of an OAD image

Note
This is only used by off-chip OAD

Variable Documentation

§ rfu

uint8_t rfu

Reserved bytes.

Reserved byte.

§ TYPEDEF_STRUCT_PACKED

TYPEDEF_STRUCT_PACKED
Initial value:
{
uint8_t imgID[8]

User-defined Image Identification bytes.

Required core image header.

Segment type - for boundary segment.

Segment type - for Contiguous image payload.

OAD Core image header structure definition

Note
This header is required to be part of all OAD images

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.

Note
This segment is optional and not required if app and stack are linked together as one image.

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

© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale