MCCI Trusted Bootloader
Simple trusted bootloader and tools for small embedded systems
mcci_bootloader_stm32h7_appimage.h
Go to the documentation of this file.
1/*
2
3Module: mcci_bootloader_stm32h7_appimage.h
4
5Function:
6 AppImage layout on STM32 H7. Defined by bootloader so not part
7 the CortexM7 header.
8
9Copyright and License:
10 This file copyright (C) 2021 by
11
12 MCCI Corporation
13 3520 Krums Corners Road
14 Ithaca, NY 14850
15
16 See accompanying LICENSE file for copyright and license information.
17
18Author:
19 ChaeHee Won, MCCI Corporation June 2021
20
21*/
22
23#ifndef _mcci_bootloader_stm32h7_appimage_h_
24#define _mcci_bootloader_stm32h7_appimage_h_ /* prevent multiple includes */
25
26#pragma once
27
28#include "mcci_arm_cm7.h"
29#include <stdint.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/****************************************************************************\
37|
38| Data Structures
39|
40\****************************************************************************/
41
42///
43/// \brief STM32 H7 interrupt vectors (low level view)
44///
45/// This structure represents the vectors page as an array of 240 32-bit vectors.
46/// It's used mostly for initialization and for building up larger structures.
47///
48typedef struct Mcci_Stm32H7VectorsContents_s
49 {
50 uint32_t vectors[240];
52
53///
54/// \brief STM32 H7 interrupt vector object
55///
56/// This union wraps the interrupt vector contents, both so we can always
57/// reference fields with consistent names (`AppEntry.stack` etc.), and to allow
58/// us to view the vectors as either an AppEntry description or a table of
59/// vectors.
60///
61typedef union Mcci_Stm32H7Vectors_u
62 {
63 Mcci_CortexAppEntryContents_t CortexAppEntry; //< View instance as a CortexM7 AppEntry.
64 Mcci_CortexAppEntry_t CortexAppEntryCast; //< Downcast to an AppEntry without explicit casting
65 Mcci_Stm32H7VectorsContents_t CortexVectors; //< View instance as vectors.
67
68/// \brief the Cortex M7 App header
69typedef struct McciBootloader_Stm32H7PageZeroContents_s
70 {
72 McciBootloader_AppInfo_t AppInfo;
74
75typedef union McciBootloader_Stm32H7PageZero_u
76 {
77 Mcci_CortexAppEntryContents_t CortexAppEntry; //< View instance as a CortexM7 AppEntry.
78 Mcci_CortexAppEntry_t CortexAppEntryCast; //< Downcast to an AppEntry without explicit casting
79 Mcci_Stm32H7VectorsContents_t CortexVectors; //< View instance as vectors.
80 Mcci_Stm32H7Vectors_t CortexVectorsCast; //< Downcast to a CortexVectors_t without explicit casting
81 McciBootloader_Stm32H7PageZeroContents_t PageZero; //< View instance as a PageZero.
82 uint8_t Bytes[1024]; //< padding to force size
83 } __attribute__((__aligned__(256)))
85
86
87/****************************************************************************\
88|
89| End of file
90|
91\****************************************************************************/
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* _mcci_bootloader_stm32h7_appimage_h_ */
application entry contents
STM32 H7 interrupt vectors (low level view)
application entry object
STM32 H7 interrupt vector object.
Mcci_CortexAppEntryContents_t CortexAppEntry
Mcci_Stm32H7VectorsContents_t CortexVectors
McciBootloader_Stm32H7PageZeroContents_t PageZero