MCCI Trusted Bootloader
Simple trusted bootloader and tools for small embedded systems
mcci_bootloader_board_stm32h7b3i_dk_request.h
Go to the documentation of this file.
1/*
2
3Module: mcci_bootloader_board_stm32h7b3i_dk_request.h
4
5Function:
6 Layout of Bootloader update request image on STM32H7B3I_DK.
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 ChaeHee Won, MCCI Corporation June 2021
19
20*/
21
22#ifndef _mcci_bootloader_board_stm32h7b3i_dk_request_h_
23#define _mcci_bootloader_board_stm32h7b3i_dk_request_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 STM32H7B3I_DK update request image.
35///
37McciBootloaderBoard_Stm32h7b3iDk_Request_t;
38
39///
40/// \brief base address of the update request region in flash.
41///
42/// \details Defined by the linker script. Declared as uint8_t[] so
43/// the symbol's address is the flash address (linker-defined symbols
44/// are addresses, not variables).
45///
46extern volatile const uint8_t gk_McciBootloaderBoard_Stm32h7b3iDk_UpdateRequestBase[];
47
49 {
50 uint32_t MagicBegin;
51 uint32_t fUpdateRequest; ///< the update request.
52 uint32_t Reserved;
53 uint32_t MagicEnd;
54 };
55
56// we don't want to use any external headers other than stdint.h, so
57// provide a compile assert macro
58#define MCCI_BOOTLOADER_REQUEST_STATIC_ASSERT(e) \
59 void MCCI_BOOTLOADER_REQUEST_STATIC_ASSERT__(int MCCI_BOOTLOADER_REQUEST_STATIC_ASSERT_x[(e) ? 1: -1])
60
61// make sure the structure is the right size
63 sizeof(McciBootloaderBoard_Stm32h7b3iDk_Request_t) == 16
64 );
65
66/// \brief mark the beginning of a bootloader REQUEST section
67#define MCCI_BOOTLOADER_STM32H7B3I_DK_REQUEST_MAGIC_BEGIN (('T' << 24) | ('O' << 16) | ('O' << 8) | 'B')
68
69/// \brief mark the end of a bootloader REQUEST section
70#define MCCI_BOOTLOADER_STM32H7B3I_DK_REQUEST_MAGIC_END (('t' << 24) | ('o' << 16) | ('p' << 8) | 'b')
71
72/// \brief the distinguished "update request" value
73#define MCCI_BOOTLOADER_STM32H7B3I_DK_REQUEST_UPDATE_REQUEST UINT32_C(0xFFFFFFFF)
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* _mcci_bootloader_board_stm32h7b3i_dk_request_h_ */
#define MCCI_BOOTLOADER_REQUEST_STATIC_ASSERT(e)
volatile const uint8_t gk_McciBootloaderBoard_Stm32h7b3iDk_UpdateRequestBase[]
base address of the update request region in flash.
symbolic type for STM32H7B3I_DK update request image.