![]() |
MCCI Trusted Bootloader
Simple trusted bootloader and tools for small embedded systems
|
#include "mcci_bootloader_types.h"#include "mcci_bootloader_platform.h"#include "mcci_bootloader_stm32l0.h"#include "mcci_bootloader_board_catena_1sj_eeprom.h"Go to the source code of this file.
Macros | |
| #define | _mcci_bootloader_board_catena_1sj_h_ /* prevent multiple includes */ |
| #define | MCCI_BOOTLOADER_BOARD_CATENA_1SJ_STORAGE_FALLBACK_BASE (UINT32_C(65536)) |
| we put the fallback image at 64k to 232k, in case anyone needs special things in page zero. | |
| #define | MCCI_BOOTLOADER_BOARD_CATENA_1SJ_STORAGE_IMAGE_SIZE (UINT32_C(168) * 1024) |
| the maximum image size is 168k bytes (192k - 20k for the bootloader and 4k for the mfg page). | |
| #define | MCCI_BOOTLOADER_BOARD_CATENA_1SJ_STORAGE_UPDATE_BASE (UINT32_C(256) * 1024) |
| base address of the update image | |
Functions | |
| void | McciBootloaderBoard_Catena1sj_annunciatorHandleSysTick (void) |
| void | McciBootloaderBoard_Catena1sj_clearLed (void) |
| McciBootloaderBoard_Catena1sj_Eeprom_t * | McciBootloaderBoard_Catena1sj_getEepromPointer (void) |
| void | McciBootloaderBoard_Catena1sj_handleSysTick (void) |
| void | McciBootloaderBoard_Catena1sj_setLed (void) |
| #define _mcci_bootloader_board_catena_1sj_h_ /* prevent multiple includes */ |
Definition at line 24 of file mcci_bootloader_board_catena_1sj.h.
| #define MCCI_BOOTLOADER_BOARD_CATENA_1SJ_STORAGE_FALLBACK_BASE (UINT32_C(65536)) |
we put the fallback image at 64k to 232k, in case anyone needs special things in page zero.
This also lets you set the WP bit, clear the TP bit, and set BP bits to 0x03; this will protect the first 256k against accidental change.
Definition at line 61 of file mcci_bootloader_board_catena_1sj.h.
| #define MCCI_BOOTLOADER_BOARD_CATENA_1SJ_STORAGE_IMAGE_SIZE (UINT32_C(168) * 1024) |
the maximum image size is 168k bytes (192k - 20k for the bootloader and 4k for the mfg page).
Definition at line 54 of file mcci_bootloader_board_catena_1sj.h.
| #define MCCI_BOOTLOADER_BOARD_CATENA_1SJ_STORAGE_UPDATE_BASE (UINT32_C(256) * 1024) |
base address of the update image
The update block begins at a multiple of 64k to allow use of 64k erase if desired. We put it at 256k so we can easily write-protect the fallback image if needed.
Definition at line 71 of file mcci_bootloader_board_catena_1sj.h.
| void McciBootloaderBoard_Catena1sj_annunciatorHandleSysTick | ( | void | ) |
Definition at line 129 of file mccibootloaderboard_catena1sj_annunciator.c.
References McciBootloader_LED_handleSysTick(), McciBootloaderBoard_Catena1sj_clearLed(), and McciBootloaderBoard_Catena1sj_setLed().
Referenced by McciBootloaderBoard_Catena1sj_fail(), and McciBootloaderBoard_Catena1sj_handleSysTick().
| void McciBootloaderBoard_Catena1sj_clearLed | ( | void | ) |
Definition at line 139 of file mccibootloaderboard_catena1sj_systeminit.c.
References MCCI_STM32L0_GPIO_BRR, MCCI_STM32L0_REG_GPIOB, and McciArm_putReg().
Referenced by McciBootloaderBoard_Catena1sj_annunciatorHandleSysTick().
| McciBootloaderBoard_Catena1sj_Eeprom_t * McciBootloaderBoard_Catena1sj_getEepromPointer | ( | void | ) |
base address of the bootloader EEPROM region (linker-defined).
This is hidden in this function because linker-defined symbols are not really type-safe; so we use an accessor.
Definition at line 48 of file mccibootloaderboard_catena1sj_eeprom.c.
Referenced by McciBootloaderBoard_Catena1sj_getUpdate(), McciBootloaderBoard_Catena1sj_setUpdate(), and McciBootloaderBoard_Catena1sj_SvcHandler().
| void McciBootloaderBoard_Catena1sj_handleSysTick | ( | void | ) |
Definition at line 163 of file mccibootloaderboard_catena1sj_systeminit.c.
References McciBootloaderBoard_Catena1sj_annunciatorHandleSysTick().
| void McciBootloaderBoard_Catena1sj_setLed | ( | void | ) |
Definition at line 130 of file mccibootloaderboard_catena1sj_systeminit.c.
References MCCI_STM32L0_GPIO_BSRR, MCCI_STM32L0_REG_GPIOB, and McciArm_putReg().
Referenced by McciBootloaderBoard_Catena1sj_annunciatorHandleSysTick().
| McciBootloaderPlatform_FailFn_t MCCI_BOOTLOADER_NORETURN_PFX McciBootloaderBoard_Catena1sj_fail MCCI_BOOTLOADER_NORETURN_SFX |
Definition at line 88 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_AnnunciatorIndicateStateFn_t McciBootloaderBoard_Catena1sj_annunciatorIndicateState |
Definition at line 121 of file mcci_bootloader_board_catena_1sj.h.
Referenced by McciBootloaderBoard_Catena1sj_fail().
| McciBootloaderPlatform_AnnunciatorInitFn_t McciBootloaderBoard_Catena1sj_annunciatorInit | ( | void | ) |
Definition at line 118 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_DelayMsFn_t McciBootloaderBoard_Catena1sj_delayMs |
Definition at line 91 of file mcci_bootloader_board_catena_1sj.h.
Referenced by delayTick().
| McciBootloaderPlatform_GetFallbackStorageAddressFn_t McciBootloaderBoard_Catena1sj_getFallbackStorageAddress | ( | void | ) |
Definition at line 109 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_GetMillisecondsFn_t McciBootloaderBoard_Catena1sj_getMilliseconds | ( | void | ) |
Definition at line 94 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_GetPrimaryStorageAddressFn_t McciBootloaderBoard_Catena1sj_getPrimaryStorageAddress | ( | void | ) |
Definition at line 106 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_GetUpdateFlagFn_t McciBootloaderBoard_Catena1sj_getUpdate | ( | void | ) |
Definition at line 97 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_PrepareForLaunchFn_t McciBootloaderBoard_Catena1sj_prepareForLaunch | ( | void | ) |
Definition at line 84 of file mcci_bootloader_board_catena_1sj.h.
Referenced by McciBootloaderBoard_Catena5230_prepareForLaunch().
| McciBootloaderPlatform_SetUpdateFlagFn_t McciBootloaderBoard_Catena1sj_setUpdate |
Definition at line 100 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_SpiInitFn_t McciBootloaderBoard_Catena1sj_spiInit | ( | void | ) |
Definition at line 112 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_SpiTransferFn_t McciBootloaderBoard_Catena1sj_spiTransfer |
Definition at line 115 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_StorageReadFn_t McciBootloaderBoard_Catena1sj_storageRead |
Definition at line 103 of file mcci_bootloader_board_catena_1sj.h.
| McciBootloaderPlatform_SystemInitFn_t McciBootloaderBoard_Catena1sj_systemInit |
Definition at line 81 of file mcci_bootloader_board_catena_1sj.h.
Referenced by McciBootloaderBoard_Catena5230_systemInit().