MCCI Trusted Bootloader
Simple trusted bootloader and tools for small embedded systems
mcci_bootloader_board_catena_abz_eeprom.h
Go to the documentation of this file.
1/*
2
3Module: mcci_bootloader_board_catena_abz_eeprom.h
4
5Function:
6 Layout of Bootloader EEPROM for Catenas based on STM32L0.
7
8Copyright and License:
9 This file copyright (C) 2021 by
10
11 MCCI Corporation
12 3520 Krums Corners Road
13 Ithaca, NY 14850
14
15 See accompanying LICENSE file for copyright and license information.
16
17Author:
18 Terry Moore, MCCI Corporation March 2021
19
20*/
21
22#ifndef _mcci_bootloader_board_catena_abz_eeprom_h_
23#define _mcci_bootloader_board_catena_abz_eeprom_h_ /* prevent multiple includes */
24
25#pragma once
26
27#include <stdint.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33///
34/// \brief symbolic type for Catena EEPROM image.
35///
37McciBootloaderBoard_CatenaAbz_Eeprom_t;
38
39///
40/// \brief layout of Catena EEPROM image
41///
42/// We place an image of this at the end of the data EEPROM second for
43/// the SoC.
44///
46 {
47 uint32_t fUpdateRequest; ///< the update request.
48 };
49
50// we don't want to use any external headers other than stdint.h, so
51// provide a compile assert macro
52#define MCCI_BOOTLOADER_EEPROM_STATIC_ASSERT(e) \
53 void MCCI_BOOTLOADER_EEPROM_STATIC_ASSERT__(int MCCI_BOOTLOADER_EEPROM_STATIC_ASSERT_x[(e) ? 1: -1])
54
55// make sure the structure is the right size
57 sizeof(McciBootloaderBoard_CatenaAbz_Eeprom_t) == 4
58 );
59
60/// \brief mark the beginning of a bootloader EEPROM section
61#define MCCI_BOOTLOADER_CATENA_ABZ_EEPROM_MAGIC_BEGIN (('T' << 24) | ('O' << 16) | ('O' << 8) | 'B')
62
63/// \brief mark the end of a bootloader EEPROM section
64#define MCCI_BOOTLOADER_CATENA_ABZ_EEPROM_MAGIC_END (('t' << 24) | ('o' << 16) | ('p' << 8) | 'b')
65
66/// \brief the distinguished "update request" value
67#define MCCI_BOOTLOADER_CATENA_ABZ_EEPROM_UPDATE_REQUEST UINT32_C(0xFFFFFFFF)
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* _mcci_bootloader_board_catena_abz_eeprom_h_ */
#define MCCI_BOOTLOADER_EEPROM_STATIC_ASSERT(e)