Skip to content

Commit 180c908

Browse files
authored
Merge pull request #4 from mbed-ce/feature/enable-nucleo-h743zi
Get NUCLEO_H743ZI2 working with mcuboot
2 parents 5ee6794 + 8a00092 commit 180c908

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ The application header info section is at the beginning of the "primary memory s
3434

3535
When deciding what to boot/update, the mcuboot bootloader looks at an installed application's header info, which is a special struct prepended to the application binary. It uses this header info to validate that there is a bootable image installed in the "slot".
3636

37-
By default, this header is configured to be 4kB in size. This can be adjusted using the configuration parameter `mcuboot.header_size`.
38-
39-
**However,** due to the way the FlashIAP block device currently works while erasing, the header_size should be configured to be the size of an erase sector (4kB in the case of an nRF52840). Erasing using the FlashIAPBlockDevice only works if the given address is erase-sector aligned! On the other hand, there is a hard upper limit of `< 65536` enforced by imgtool script. This needs to be carefully taken into consideration when choosing a MCU. Because a erase-sector of size >=4KB <64KB may actually not be available between the end of bootloader and start of primary application. For example, STM32F767/9xGx series MCU with dual bank enabled cannot satisfy this constraint.
37+
By default, this header is configured to be 4kB in size. This can be adjusted using the configuration parameter `mcuboot.header_size`.
4038

4139
This header is prepended to the application binary during the signing process (explained later).
4240

mbed_app.json5

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,17 @@
124124

125125
// Since STM32H743 boards have no external block device, keep everything in the MCU flash.
126126
"app.secondary-slot-in-flash": true,
127-
"app.secondary-slot-flash-start-addr": "0x100000",
127+
"app.secondary-slot-flash-start-addr": "0x08100000",
128128

129129
// Slot size can be as big as 896k, since we need to reserve the first flash sector for the bootloader
130130
// and the last flash sector for scratch space
131-
"mcuboot.primary-slot-address": "0x20000",
131+
"mcuboot.primary-slot-address": "0x08020000",
132132
"mcuboot.max-img-sectors": "7", // 7 flash sectors per slot
133133
"mcuboot.slot-size": "0xE0000",
134+
"mcuboot.flash-block-size": 32, // Flash program size is 32
134135

135136
// STM32H7 flash sector size is 128k, so we need to make the scratch region at least that big
136-
"mcuboot.scratch-address": "0x1E0000",
137+
"mcuboot.scratch-address": "0x081E0000",
137138
"mcuboot.scratch-size": "0x20000"
138139

139140
},

0 commit comments

Comments
 (0)