forked from AGlass0fMilk/mbed-mcuboot-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mbed_app.json5
128 lines (115 loc) · 4.98 KB
/
mbed_app.json5
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"config": {
"serial-bootloader-enable": {
"help": "Build bootloader with serial update support",
"value": 0
},
"secondary-slot-in-flash": {
"help": "If enabled, store the secondary slot in the application flash immediately after the primary slot.",
"value": false
}
},
"macros": [
"MBEDTLS_CIPHER_MODE_CTR"
],
"target_overrides": {
"*": {
"platform.stdio-baud-rate": 115200,
"target.c_lib": "small",
"mcuboot.log-enable": true,
"mcuboot.log-level": "MCUBOOT_LOG_LEVEL_DEBUG",
"mbed-trace.enable": true,
"mbed-trace.max-level": "TRACE_LEVEL_DEBUG",
"mbed-trace.fea-ipv6": false,
// Uncomment to enable encryption of the image
// "mcuboot.encrypt-rsa": true
},
// "NRF52840_DK": {
// "target.features_remove": ["CRYPTOCELL310"],
// "target.macros_remove": ["MBEDTLS_CONFIG_HW_SUPPORT"],
// "mcuboot.primary-slot-address": "0x20000",
// "mcuboot.slot-size": "0xC0000",
// "mcuboot.scratch-address": "0xE0000",
// "mcuboot.scratch-size": "0x20000",
// "mcuboot.max-img-sectors": "0x180",
// "mcuboot.read-granularity": 4,
// "qspif.QSPI_MIN_PROG_SIZE": 4
// },
// "EP_AGORA": {
// "target.features_remove": ["CRYPTOCELL310"],
// "target.macros_remove": ["MBEDTLS_CONFIG_HW_SUPPORT"],
// "mcuboot.primary-slot-address": "0x20000",
// "mcuboot.slot-size": "0xC0000",
// "mcuboot.scratch-address": "0xE0000",
// "mcuboot.scratch-size": "0x20000",
// "mcuboot.max-img-sectors": "0x180",
// "mcuboot.read-granularity": 4,
// "qspif.QSPI_MIN_PROG_SIZE": 4
// },
// "DISCO_L475VG_IOT01A": {
// "mcuboot.primary-slot-address": "0x8020000",
// "mcuboot.slot-size": "0xC0000",
// "mcuboot.scratch-address": "0x80E0000",
// "mcuboot.scratch-size": "0x20000",
// "mcuboot.max-img-sectors": "0x180",
// "mcuboot.read-granularity": 1,
// "qspif.QSPI_MIN_PROG_SIZE": 1
// },
"DISCO_F746NG": {
"target.restrict_size": "0x18000",
"mcuboot.primary-slot-address": "0x8018000",
"mcuboot.slot-size": "0xA8000",
"mcuboot.scratch-address": "0x80C0000",
"mcuboot.scratch-size": "0x40000",
"mcuboot.max-img-sectors": "0x180",
"mcuboot.read-granularity": 1,
"qspif.QSPI_MIN_PROG_SIZE": 1
},
"K64F": {
// Configure bootloader to live in the first sector of flash
"target.memory_bank_config": {
"IROM1": {
"size": 0x20000
}
},
// On K64F we store the secondary slot in external memory, not internal.
// So, the primary slot can take up most of flash.
"mcuboot.primary-slot-address": "0x20000",
"mcuboot.slot-size": "0xC0000",
// Store the scratch space at the end of flash
"mcuboot.scratch-address": "0xE0000",
"mcuboot.scratch-size": "0x20000",
"mcuboot.read-granularity": 512, // External SD card used as block device, this is its read size.
"mcuboot.max-img-sectors": "1536" // External SD card has smaller sector size, so divide slot size by read granularity
},
"MCU_STM32H743xI": {
// Configure bootloader to live in the first sector of flash
"target.memory_bank_config": {
"IROM1": {
"size": 0x20000
}
},
// Since STM32H743 boards have no external block device, keep everything in the MCU flash.
"app.secondary-slot-in-flash": true,
// Slot size can be as big as 896k, since we need to reserve the first flash sector for the bootloader
// and the last flash sector for scratch space
"mcuboot.primary-slot-address": "0x20000",
"mcuboot.max-img-sectors": "7", // 7 flash sectors per slot
"mcuboot.slot-size": "0xE0000",
// STM32H7 flash sector size is 128k, so we need to make the scratch region at least that big
"mcuboot.scratch-address": "0x1E0000",
"mcuboot.scratch-size": "0x20000"
},
// Config by @zhiyong-ft for NUCLEO_F767ZI.
// Assumes that an external SPI flash is connected
"NUCLEO_F767ZI": {
"target.components_add": ["SPIF"],
"mcuboot.primary-slot-address": "0x8010000",
"mcuboot.slot-size": "0xB0000",
"mcuboot.scratch-address": "0x80C0000",
"mcuboot.scratch-size": "0x40000",
"mcuboot.max-img-sectors": "0x180",
"mcuboot.read-granularity": 1
}
}
}