blob: 75ec5003e70596d83f097c61e800c6f81aa6aea9 [file] [log] [blame]
Marti Bolivarf91bca52018-04-12 12:40:46 -04001/*
2 * Copyright (c) 2018 Open Source Foundries Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef __MCUBOOT_CONFIG_H__
8#define __MCUBOOT_CONFIG_H__
9
10/*
11 * Template configuration file for MCUboot.
12 *
13 * When porting MCUboot to a new target, copy it somewhere that your
14 * include path can find it as mcuboot_config/mcuboot_config.h, and
15 * make adjustments to suit your platform.
16 *
17 * For examples, see:
18 *
19 * boot/zephyr/include/mcuboot_config/mcuboot_config.h
20 * boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h
21 */
22
23/*
24 * Signature types
25 *
26 * You must choose exactly one signature type.
27 */
28
29/* Uncomment for RSA signature support */
30/* #define MCUBOOT_SIGN_RSA */
31
32/* Uncomment for ECDSA signatures using curve P-256. */
33/* #define MCUBOOT_SIGN_EC256 */
34
35
36/*
37 * Upgrade mode
38 *
39 * The default is to support A/B image swapping with rollback. A
40 * simpler code path, which only supports overwriting the
41 * existing image with the update image, is also available.
42 */
43
44/* Uncomment to enable the overwrite-only code path. */
45/* #define MCUBOOT_OVERWRITE_ONLY */
46
47#ifdef MCUBOOT_OVERWRITE_ONLY
48/* Uncomment to only erase and overwrite those slot 0 sectors needed
49 * to install the new image, rather than the entire image slot. */
50/* #define MCUBOOT_OVERWRITE_ONLY_FAST */
51#endif
52
53/*
54 * Cryptographic settings
55 *
56 * You must choose between mbedTLS and Tinycrypt as source of
57 * cryptographic primitives. Other cryptographic settings are also
58 * available.
59 */
60
61/* Uncomment to use ARM's mbedTLS cryptographic primitives */
62/* #define MCUBOOT_USE_MBED_TLS */
63/* Uncomment to use Tinycrypt's. */
64/* #define MCUBOOT_USE_TINYCRYPT */
65
66/*
67 * Always check the signature of the image in slot 0 before booting,
68 * even if no upgrade was performed. This is recommended if the boot
69 * time penalty is acceptable.
70 */
71#define MCUBOOT_VALIDATE_SLOT0
72
73/*
74 * Flash abstraction
75 */
76
77/* Uncomment if your flash map API supports flash_area_get_sectors().
78 * See the flash APIs for more details. */
79/* #define MCUBOOT_USE_FLASH_AREA_GET_SECTORS */
80
Marti Bolivarf9bfddd2018-04-24 14:28:33 -040081/* Default maximum number of flash sectors per image slot; change
82 * as desirable. */
83#define MCUBOOT_MAX_IMG_SECTORS 128
84
Marti Bolivarf91bca52018-04-12 12:40:46 -040085#endif /* __MCUBOOT_CONFIG_H__ */