MCCI Trusted Bootloader
Simple trusted bootloader and tools for small embedded systems
mccibootloaderplatform_fail.c
Go to the documentation of this file.
1
/*
2
3
Module: mccibootloaderplatform_fail.c
4
5
Function:
6
McciBootloaderPlatform_fail()
7
8
Copyright 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
17
Author:
18
Terry Moore, MCCI Corporation March 2021
19
20
*/
21
22
#include "
mcci_bootloader.h
"
23
24
#include "
mcci_bootloader_platform.h
"
25
␌
26
/****************************************************************************\
27
|
28
| Manifest constants & typedefs.
29
|
30
\****************************************************************************/
31
32
33
34
/****************************************************************************\
35
|
36
| Read-only data.
37
|
38
\****************************************************************************/
39
40
41
42
/****************************************************************************\
43
|
44
| Variables.
45
|
46
\****************************************************************************/
47
48
/// \brief set to boot failure code.
49
McciBootloaderError_t
g_McciBootloader_failureCode
;
50
␌
51
/*
52
53
Name: McciBootloaderPlatform_fail()
54
55
Function:
56
57
58
Definition:
59
void McciBootloaderPlatform_fail(
60
McciBootloaderError_t error
61
);
62
63
Description:
64
Deal with a bootloader failure. Does not return.
65
66
Returns:
67
No explicit result.
68
69
Notes:
70
We save the error code, and then call the platform failure method.
71
72
*/
73
74
#define FUNCTION "McciBootloaderPlatform_fail"
75
76
void
77
McciBootloaderPlatform_fail
(
78
McciBootloaderError_t
error
79
)
80
{
81
g_McciBootloader_failureCode
= error;
82
83
(*
gk_McciBootloaderPlatformInterface
.pFail)(error);
84
85
MCCI_BOOTLOADER_NOT_REACHED
();
86
}
87
88
#undef FUNCTION
89
90
/**** end of mccibootloaderplatform_fail.c ****/
mcci_bootloader.h
mcci_bootloader_platform.h
MCCI_BOOTLOADER_NOT_REACHED
#define MCCI_BOOTLOADER_NOT_REACHED()
Definition
mcci_bootloader_types.h:66
McciBootloaderError_t
uint32_t McciBootloaderError_t
error codes for the bootloader
Definition
mcci_bootloader_types.h:81
gk_McciBootloaderPlatformInterface
const McciBootloaderPlatform_Interface_t gk_McciBootloaderPlatformInterface
Definition
mccibootloaderboard_catena46xx_platforminterface.c:41
g_McciBootloader_failureCode
McciBootloaderError_t g_McciBootloader_failureCode
set to boot failure code.
Definition
mccibootloaderplatform_fail.c:49
McciBootloaderPlatform_fail
void McciBootloaderPlatform_fail(McciBootloaderError_t error)
Definition
mccibootloaderplatform_fail.c:77
platform
src
mccibootloaderplatform_fail.c
Generated on Thu Feb 19 2026 18:47:32 for MCCI Trusted Bootloader by
1.9.8