blob: f1fbcf367a1d626ce1fb711bc7442adfb467f992 [file] [log] [blame] [view]
Carles Cufiecc34bb2018-01-22 18:02:46 +01001# Running mynewt apps with MCUboot
2
3Due to small differences between Mynewt's bundled bootloader and MCUboot,
4when building an app that will be run with MCUboot as the bootloader and
5which at the same time requires to use `newtmgr` to manage images, MCUboot
6must be added as a new dependency for this app.
7
8First you need to add the repo to your `project.yml`:
9
10```
11 project.repositories:
12 - mcuboot
13
14 repository.mcuboot:
15 type: github
16 vers: 0-dev
17 user: runtimeco
18 repo: mcuboot
19```
20
21Then update your app's `pkg.yml` adding the extra dependency:
22
23```
24 pkg.deps:
25 - "@mcuboot/boot/bootutil"
26```
27
28Also remove any dependency on `boot/bootutil` (mynewt's bundled bootloader)
29which might exist.
30
31To configure MCUboot check all the options available in
32`boot/mynewt/mcuboot_config/syscfg.yml`.
33
34Also, MCUboot uses a different image header struct as well as slightly
35different TLV structure, so images created by `newt` have to be generated
36in this new format. That is done by passing the extra parameter `-2` as in:
37
38`newt create-image <target> <version> <pubkey> -2`