aboutsummaryrefslogtreecommitdiff
path: root/bl2/ext/mcuboot/include/mcuboot_config/mcuboot_config.h.in
blob: 82973163e56f385acc7ecb7ddca32b3c5e91d2b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 * Copyright (c) 2018 Open Source Foundries Limited
 * Copyright (c) 2019-2020 Arm Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/*
 * Original code taken from mcuboot project at:
 * https://github.com/mcu-tools/mcuboot
 * Git SHA of the original version: ac55554059147fff718015be9f4bd3108123f50a
 */

#ifndef __MCUBOOT_CONFIG_H__
#define __MCUBOOT_CONFIG_H__

#ifdef __cplusplus
extern "C" {
#endif

/*
 * This file is also included by the simulator, but we don't want to
 * define anything here in simulator builds.
 *
 * Instead of using mcuboot_config.h, the simulator adds MCUBOOT_xxx
 * configuration flags to the compiler command lines based on the
 * values of environment variables. However, the file still must
 * exist, or bootutil won't build.
 */
#ifndef __BOOTSIM__

#define MCUBOOT_VALIDATE_PRIMARY_SLOT
#define MCUBOOT_USE_FLASH_AREA_GET_SECTORS
#define MCUBOOT_TARGET_CONFIG "flash_layout.h"

#cmakedefine MCUBOOT_HW_ROLLBACK_PROT
#cmakedefine MCUBOOT_MEASURED_BOOT

/*
 * Maximum size of the measured boot record.
 *
 * Its size can be calculated based on the following aspects:
 *     - There are 5 allowed software component claims,
 *     - SHA256 is used as the measurement method for the other claims.
 * Considering these aspects, the only claim which size can vary is the type
 * of the software component with a maximum length of 12 bytes, which means
 * the boot record size can be up to 100 bytes.
 */
#define MAX_BOOT_RECORD_SZ  (100u)

#cmakedefine MCUBOOT_ENC_IMAGES
#cmakedefine MCUBOOT_ENCRYPT_RSA

/*
 * Cryptographic settings
 */
#define MCUBOOT_USE_MBED_TLS

/*
 * Logging
 */
#define MCUBOOT_HAVE_LOGGING    1
#define MCUBOOT_LOG_LEVEL       @LOG_LEVEL_ID@

#endif /* !__BOOTSIM__ */

/*
 * Watchdog feeding
 */
#define MCUBOOT_WATCHDOG_FEED()     \
    do {                            \
        /* Do nothing. */           \
    } while (0)

#ifdef __cplusplus
}
#endif

#endif /* __MCUBOOT_CONFIG_H__ */