blob: 3783eee82286a22e9930e13c958aa02ac8a25e59 [file] [log] [blame] [view]
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +02001### Port of MCUBoot library to be used with Cypress targets
2
3**Solution Description**
4
5Given solution demonstrates operation of MCUBoot on Cypress' PSoC6 device.
6
7There are four applications implemented:
8* MCUBootApp - PSoC6 MCUBoot-based bootloading application;
9* CypressBootloader - PSoC6 MCUBoot-based Cypress' Secure Boot application;
10* SecureBlinkyApp - simple PSoC6 blinking LED application which is a target of BOOT/UPGRADE, running on CM0p and playing a role of SPE;
11* BlinkyApp - simple PSoC6 blinking LED application which is a target of BOOT/UPGRADE;
12
13The default flash map for MCUBootApp implemented is next:
14
15* [0x10000000, 0x10018000] - MCUBootApp (bootloader) area;
16* [0x10018000, 0x10028000] - primary slot for BlinkyApp;
17* [0x10028000, 0x10038000] - secondary slot for BlinkyApp;
18* [0x10038000, 0x10039000] - scratch area;
19
20The flash map is defined through sysflash.h and cy_flash_map.c.
21
22MCUBootApp checks image integrity with SHA256, image authenticity with EC256 digital signature verification and uses completely SW implementation of cryptographic functions based on mbedTLS Library.
23
24**Downloading Solution's Assets**
25
26There is a set assets required:
27
28* MCUBooot Library (root repository)
29* PSoC6 BSP Library
30* PSoC6 Peripheral Drivers Library (PDL)
31* mbedTLS Cryptographic Library
32
33Those are represented as submodules.
34
35To retrieve source code with subsequent submodules pull:
36
Christian Daudte1960a92020-03-04 14:20:33 -080037 git clone --recursive https://github.com/JuulLabs-OSS/mcuboot.git
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020038
39Submodules can also be updated and initialized separately:
40
Christian Daudte1960a92020-03-04 14:20:33 -080041 cd mcuboot
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020042 git submodule update --init --recursive
43
44
45
46**Building Solution**
47
48This folder contains make files infrastructure for building both MCUBoot Bootloader, CypressBootloader and sample SecureBlinkyApp and BlinkyApp applications used for Bootloader demo functionality.
49
50Instructions on how to build and upload Bootloader and sample image are located in `Readme.md` files in corresponding folders.
51
52Root directory for build is **boot/cypress.**
53
54**Currently supported platforms:**
55
56* PSOC_062_2M - for MCUBoot, BlinkyApp;
57
58* PSOC_064_2M, PSOC_064_1M, PSOC_064_512K - for CypressBootloader, SecureBlinkyApp;
59
60* PSOC_062_2M, PSOC_064_2M, PSOC_064_1M, PSOC_064_512K - for BlinkyApp;
61
62**Build environment troubleshooting:**
63
64Following CLI / IDE are supported for project build:
65
66* Cygwin on Windows systems
Christian Daudte1960a92020-03-04 14:20:33 -080067* unix style shells on *nix systems
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020068* Eclipse / ModusToolbox ("makefile project from existing source")
69
70*Make* - make sure it is added to system's `PATH` variable and correct path is first in the list;
71
72*Python/Python3* - make sure you have correct path referenced in `PATH`;
73
74*Msys2* - to use systems PATH navigate to msys2 folder, open `msys2_shell.cmd`, uncomment set `MSYS2_PATH_TYPE=inherit`, restart MSYS2 shell.
75
76This will inherit system's PATH so should find `python3.7` installed in regular way as well as imgtool and its dependencies.
77