You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,13 @@ Briefly, the bootloader has a maximum size set by `target.restrict_size` when bu
13
13
14
14
### Application Header Info
15
15
16
-
When deciding what to boot/update, the mcuboot bootloader looks at an installed application's header info (type-length-value formatted data that is prepended to the application binary before the application's start address). It uses this header info to validate there is a bootable image installed in the "slot" and optionally to verify the image's digital signature before booting.
16
+
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 there is a bootable image installed in the "slot". There are also type-length-value (TLV) encoded pieces of information following the application binary called the "application trailer". These TLV encoded values include things like a digital signature and SHA hash, among other things. See mcuboot documentation for more information.
17
17
18
-
By default, this header is configured to be 1kB in size. This is probably way more than needed in most cases and can be adjusted using the configuration parameter `mcuboot.header_size`. This value should be aligned on 4-byte boundaries.
18
+
By default, this header is configured to be 4kB in size. ~~This is probably way more than needed in most cases and can be adjusted using the configuration parameter `mcuboot.header_size`. This value should be aligned on 4-byte boundaries.~~**NOTE:** 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!
19
19
20
-
This header prepended to the application hex during the signing process (explained later).
20
+
This header prepended to the application hex during the signing process (explained later). The trailer is also appended to the application hex during signing.
21
21
22
-
Please note: the bootloader size should be restricted to ensure it does not collide with the application header info. For example, if the application start address is set to `0x20000` and the header size is `0x400`, the bootloader size should be restricted to at most `0x20000 - 0x400 = 0x1FC00`.
22
+
~~Please note: the bootloader size should be restricted to ensure it does not collide with the application header info. For example, if the application start address is set to `0x20000` and the header size is `0x400`, the bootloader size should be restricted to at most `0x20000 - 0x400 = 0x1FC00`.~~**NOTE:** Currently, the bootloader size should be restricted to match the application start address. This could cause issues if the bootloader fills this space exactly (and overwrites the application header area). Potential solution: Add `MBED_CONF_MCUBOOT_HEADER_SIZE` to `POST_APPLICATION_ADDR` to get the actual start address of the application...
23
23
24
24
### Primary Application
25
25
@@ -59,8 +59,6 @@ Additionally, the application start location and maximum allowed size should be
59
59
}
60
60
```
61
61
62
-
63
-
64
62
The example project contains an application that repeatedly blinks an LED on supported [Mbed boards](https://os.mbed.com/platforms/).
65
63
66
64
You can build the project with all supported [Mbed OS build tools](https://os.mbed.com/docs/mbed-os/latest/tools/index.html). However, this example project specifically refers to the command-line interface tool [Arm Mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).
0 commit comments