blob: 66f9597215f67401e7e23aa2a9086010c182ff1f [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;
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +02009* BlinkyApp - simple PSoC6 blinking LED application which is a target of BOOT/UPGRADE;
10
11The default flash map for MCUBootApp implemented is next:
12
13* [0x10000000, 0x10018000] - MCUBootApp (bootloader) area;
14* [0x10018000, 0x10028000] - primary slot for BlinkyApp;
15* [0x10028000, 0x10038000] - secondary slot for BlinkyApp;
16* [0x10038000, 0x10039000] - scratch area;
17
18The flash map is defined through sysflash.h and cy_flash_map.c.
19
Bohdan Kovalchuka333a452020-07-09 16:55:58 +030020It is also possible to place secondary (upgrade) slots in external memory module so resulting image size can be doubled.
21For more details about External Memory usage, please refer to separate guiding document `MCUBootApp/ExternalMemory.md`.
22
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020023MCUBootApp checks image integrity with SHA256, image authenticity with EC256 digital signature verification and uses completely SW implementation of cryptographic functions based on mbedTLS Library.
24
25**Downloading Solution's Assets**
26
27There is a set assets required:
28
29* MCUBooot Library (root repository)
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020030* 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
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020048Root directory for build is **boot/cypress.**
49
Roman Okhrimenkoaa7c0212020-03-24 23:33:00 +020050This folder contains make files infrastructure for building both MCUBoot Bootloader and sample BlinkyApp application used for Bootloader demo functionality.
51
52Instructions on how to build and upload MCUBootApp bootloader application and sample user applocation are located in `Readme.md` files in corresponding folders.
53
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020054**Currently supported platforms:**
55
56* PSOC_062_2M - for MCUBoot, BlinkyApp;
57
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020058**Build environment troubleshooting:**
59
60Following CLI / IDE are supported for project build:
61
62* Cygwin on Windows systems
Christian Daudte1960a92020-03-04 14:20:33 -080063* unix style shells on *nix systems
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020064* Eclipse / ModusToolbox ("makefile project from existing source")
65
66*Make* - make sure it is added to system's `PATH` variable and correct path is first in the list;
67
68*Python/Python3* - make sure you have correct path referenced in `PATH`;
69
70*Msys2* - to use systems PATH navigate to msys2 folder, open `msys2_shell.cmd`, uncomment set `MSYS2_PATH_TYPE=inherit`, restart MSYS2 shell.
71
72This will inherit system's PATH so should find `python3.7` installed in regular way as well as imgtool and its dependencies.
73