MCCI Trusted Bootloader
Simple trusted bootloader and tools for small embedded systems
mcci_bootloader_platform.h File Reference

Go to the source code of this file.

Data Structures

struct  McciBootloaderPlatform_AnnunciatorInterface_t
 annunciator interface structure More...
 
struct  McciBootloaderPlatform_Interface_t
 interface structure to platform functions More...
 
struct  McciBootloaderPlatform_SpiInterface_t
 SPI interface structure. More...
 
struct  McciBootloaderPlatform_StorageInterface_t
 interface for storage More...
 

Macros

#define _mcci_bootloader_platform_h_   /* prevent multiple includes */
 

Functions

static void McciBootloaderPlatform_annunciatorIndicateState (McciBootloaderState_t state)
 
static void McciBootloaderPlatform_annunciatorInit (void)
 
const McciBootloader_AppInfo_t * McciBootloaderPlatform_checkImageValid (const void *pHeader, size_t nHeader, uintptr_t targetAddress, size_t targetSize)
 
static void McciBootloaderPlatform_delayMs (uint32_t ms)
 
void McciBootloaderPlatform_entry (void)
 
void MCCI_BOOTLOADER_NORETURN_PFX McciBootloaderPlatform_fail (McciBootloaderError_t errorCode) MCCI_BOOTLOADER_NORETURN_SFX
 
const McciBootloader_AppInfo_t * McciBootloaderPlatform_getAppInfo (const void *pHeader, size_t nHeader)
 
static McciBootloaderStorageAddress_t McciBootloaderPlatform_getFallbackStorageAddress (void)
 
static McciBootloaderStorageAddress_t McciBootloaderPlatform_getPrimaryStorageAddress (void)
 
const McciBootloader_SignatureBlock_t * McciBootloaderPlatform_getSignatureBlock (const McciBootloader_AppInfo_t *)
 
static bool McciBootloaderPlatform_getUpdateFlag (void)
 
static void McciBootloaderPlatform_prepareForLaunch (void)
 
static void McciBootloaderPlatform_setUpdateFlag (bool fUpdate)
 
static void McciBootloaderPlatform_spiInit (void)
 
static void McciBootloaderPlatform_spiTransfer (uint8_t *pRx, const uint8_t *pTx, size_t nBytes, bool fContinue)
 
MCCI_BOOTLOADER_NORETURN_PFX void McciBootloaderPlatform_startApp (const void *pAppBase) MCCI_BOOTLOADER_NORETURN_SFX
 
static void McciBootloaderPlatform_storageInit (void)
 
static bool McciBootloaderPlatform_storageRead (McciBootloaderStorageAddress_t hAddress, uint8_t *pBuffer, size_t nBuffer)
 
static bool McciBootloaderPlatform_systemFlashErase (volatile const void *targetAddress, size_t targetSize)
 
static bool McciBootloaderPlatform_systemFlashWrite (volatile const void *pDestination, const void *pSource, size_t nBytes)
 
static void McciBootloaderPlatform_systemInit (void)
 

Variables

const McciBootloaderPlatform_Interface_t gk_McciBootloaderPlatformInterface
 

Macro Definition Documentation

◆ _mcci_bootloader_platform_h_

#define _mcci_bootloader_platform_h_   /* prevent multiple includes */

Definition at line 23 of file mcci_bootloader_platform.h.

Function Documentation

◆ McciBootloaderPlatform_annunciatorIndicateState()

static void McciBootloaderPlatform_annunciatorIndicateState ( McciBootloaderState_t  state)
inlinestatic

Definition at line 195 of file mcci_bootloader_platform.h.

References gk_McciBootloaderPlatformInterface.

Referenced by McciBootloader_main().

◆ McciBootloaderPlatform_annunciatorInit()

static void McciBootloaderPlatform_annunciatorInit ( void  )
inlinestatic

Definition at line 189 of file mcci_bootloader_platform.h.

References gk_McciBootloaderPlatformInterface.

Referenced by McciBootloader_main().

◆ McciBootloaderPlatform_checkImageValid()

const McciBootloader_AppInfo_t * McciBootloaderPlatform_checkImageValid ( const void *  pHeader,
size_t  nHeader,
uintptr_t  targetAddress,
size_t  targetSize 
)

◆ McciBootloaderPlatform_delayMs()

static void McciBootloaderPlatform_delayMs ( uint32_t  ms)
inlinestatic

◆ McciBootloaderPlatform_entry()

◆ McciBootloaderPlatform_fail()

◆ McciBootloaderPlatform_getAppInfo()

const McciBootloader_AppInfo_t * McciBootloaderPlatform_getAppInfo ( const void *  pHeader,
size_t  nHeader 
)

◆ McciBootloaderPlatform_getFallbackStorageAddress()

static McciBootloaderStorageAddress_t McciBootloaderPlatform_getFallbackStorageAddress ( void  )
inlinestatic

Definition at line 164 of file mcci_bootloader_platform.h.

References gk_McciBootloaderPlatformInterface.

Referenced by McciBootloader_main().

◆ McciBootloaderPlatform_getPrimaryStorageAddress()

static McciBootloaderStorageAddress_t McciBootloaderPlatform_getPrimaryStorageAddress ( void  )
inlinestatic

Definition at line 158 of file mcci_bootloader_platform.h.

References gk_McciBootloaderPlatformInterface.

Referenced by McciBootloader_main().

◆ McciBootloaderPlatform_getSignatureBlock()

const McciBootloader_SignatureBlock_t * McciBootloaderPlatform_getSignatureBlock ( const McciBootloader_AppInfo_t *  pAppInfo)

Definition at line 78 of file mccibootloaderplatform_getsignatureblock.c.

Referenced by McciBootloader_main().

◆ McciBootloaderPlatform_getUpdateFlag()

static bool McciBootloaderPlatform_getUpdateFlag ( void  )
inlinestatic

Definition at line 86 of file mcci_bootloader_platform.h.

References gk_McciBootloaderPlatformInterface.

Referenced by McciBootloader_main().

◆ McciBootloaderPlatform_prepareForLaunch()

static void McciBootloaderPlatform_prepareForLaunch ( void  )
inlinestatic

◆ McciBootloaderPlatform_setUpdateFlag()

static void McciBootloaderPlatform_setUpdateFlag ( bool  fUpdate)
inlinestatic

Definition at line 92 of file mcci_bootloader_platform.h.

References gk_McciBootloaderPlatformInterface.

Referenced by McciBootloader_main().

◆ McciBootloaderPlatform_spiInit()

static void McciBootloaderPlatform_spiInit ( void  )
inlinestatic

◆ McciBootloaderPlatform_spiTransfer()

static void McciBootloaderPlatform_spiTransfer ( uint8_t *  pRx,
const uint8_t *  pTx,
size_t  nBytes,
bool  fContinue 
)
inlinestatic

◆ McciBootloaderPlatform_startApp()

◆ McciBootloaderPlatform_storageInit()

static void McciBootloaderPlatform_storageInit ( void  )
inlinestatic

Definition at line 138 of file mcci_bootloader_platform.h.

References gk_McciBootloaderPlatformInterface.

Referenced by McciBootloader_main().

◆ McciBootloaderPlatform_storageRead()

static bool McciBootloaderPlatform_storageRead ( McciBootloaderStorageAddress_t  hAddress,
uint8_t *  pBuffer,
size_t  nBuffer 
)
inlinestatic

◆ McciBootloaderPlatform_systemFlashErase()

static bool McciBootloaderPlatform_systemFlashErase ( volatile const void *  targetAddress,
size_t  targetSize 
)
inlinestatic

◆ McciBootloaderPlatform_systemFlashWrite()

static bool McciBootloaderPlatform_systemFlashWrite ( volatile const void *  pDestination,
const void *  pSource,
size_t  nBytes 
)
inlinestatic

◆ McciBootloaderPlatform_systemInit()

static void McciBootloaderPlatform_systemInit ( void  )
inlinestatic

Variable Documentation

◆ gk_McciBootloaderPlatformInterface