Microchip® Advanced Software Framework

app_info.h File Reference

Application info table structure and parameters.

Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries.

#include "boot_version.h"

Data Structures

struct  _FotaImageHeader
 
struct  app_info_t
 
struct  app_table_tag
 
struct  BootInfo_t
 
struct  ExistingImageInfo_t
 

Macros

#define IS_SKIP_ADDRESS_WITHIN_BUFFER(address, len, skipAddress)   ((skipAddress >= address) && (skipAddress < (address+len)))
 
#define SKIP_ADDRESS_LENGTH   (4U)
 
#define TYPE_EXTERNAL   0x01
 
#define TYPE_INTERNAL   0x00
 
#define TYPE_SECURED   0x01
 

Typedefs

typedef struct app_table_tag app_table_t
 
typedef struct _FotaImageHeader FotaImageHeader_t
 

Functions

void app_infoAction (void)
 
void clear_updateaction (uint8_t app_index)
 
bool img_hdr_validate (void)
 
void Loadsecdatafromextmem (uint32_t dst_addr, uint32_t src_addr, uint32_t size)
 
uint8_t MemcalcCrc (uint8_t crc, uint8_t *pcBlock, uint8_t length)
 Read EEPROM index 39 to 46, and populate skip offsets. More...
 
void memcopy (uint8_t dst_mem, uint32_t dst_addr, uint8_t src_mem, uint32_t src_addr, uint8_t img_type, uint32_t img_size, uint8_t app_index)
 
bool readapp_infotable (void)
 
void update_action (void)
 
void update_boot_info (void)
 
void writeapp_infotable (void)
 

Variables

bool isCrcMatched
 

#define IS_SKIP_ADDRESS_WITHIN_BUFFER (   address,
  len,
  skipAddress 
)    ((skipAddress >= address) && (skipAddress < (address+len)))
#define SKIP_ADDRESS_LENGTH   (4U)
#define TYPE_EXTERNAL   0x01

Referenced by memcopy().

#define TYPE_INTERNAL   0x00

Referenced by clear_updateaction(), and memcopy().

#define TYPE_SECURED   0x01

typedef struct app_table_tag app_table_t

void app_infoAction ( void  )

References isCrcMatched, readapp_infotable(), and update_action().

Referenced by Boot_main().

bool img_hdr_validate ( void  )
void Loadsecdatafromextmem ( uint32_t  dst_addr,
uint32_t  src_addr,
uint32_t  size 
)
uint8_t MemcalcCrc ( uint8_t  crc,
uint8_t *  pcBlock,
uint8_t  length 
)

Read EEPROM index 39 to 46, and populate skip offsets.

Reads data from external flash and loads to internal flash. Counts crc given memory block. CRC-8. Polynom 0x31 x^8 + x^5 + x^4 + 1.

Parameters
[in]crc- first crc state
[in]pcBlock- pointer to the memory for crc counting
[in]length- memory size
Returns
current area crc

Referenced by img_hdr_validate(), readapp_infotable(), update_boot_info(), and writeapp_infotable().

void memcopy ( uint8_t  dst_mem,
uint32_t  dst_addr,
uint8_t  src_mem,
uint32_t  src_addr,
uint8_t  img_type,
uint32_t  img_size,
uint8_t  app_index 
)
bool readapp_infotable ( void  )