blob: 1d876056da1a8667a8f0c22e17d34a9f8f491c8c [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
20MCUBootApp checks image integrity with SHA256, image authenticity with EC256 digital signature verification and uses completely SW implementation of cryptographic functions based on mbedTLS Library.
21
22**Downloading Solution's Assets**
23
24There is a set assets required:
25
26* MCUBooot Library (root repository)
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020027* PSoC6 Peripheral Drivers Library (PDL)
28* mbedTLS Cryptographic Library
29
30Those are represented as submodules.
31
32To retrieve source code with subsequent submodules pull:
33
Christian Daudte1960a92020-03-04 14:20:33 -080034 git clone --recursive https://github.com/JuulLabs-OSS/mcuboot.git
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020035
36Submodules can also be updated and initialized separately:
37
Christian Daudte1960a92020-03-04 14:20:33 -080038 cd mcuboot
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020039 git submodule update --init --recursive
40
41
42
43**Building Solution**
44
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020045Root directory for build is **boot/cypress.**
46
Roman Okhrimenkoaa7c0212020-03-24 23:33:00 +020047This folder contains make files infrastructure for building both MCUBoot Bootloader and sample BlinkyApp application used for Bootloader demo functionality.
48
49Instructions on how to build and upload MCUBootApp bootloader application and sample user applocation are located in `Readme.md` files in corresponding folders.
50
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020051**Currently supported platforms:**
52
53* PSOC_062_2M - for MCUBoot, BlinkyApp;
54
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020055**Build environment troubleshooting:**
56
57Following CLI / IDE are supported for project build:
58
59* Cygwin on Windows systems
Christian Daudte1960a92020-03-04 14:20:33 -080060* unix style shells on *nix systems
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020061* Eclipse / ModusToolbox ("makefile project from existing source")
62
63*Make* - make sure it is added to system's `PATH` variable and correct path is first in the list;
64
65*Python/Python3* - make sure you have correct path referenced in `PATH`;
66
67*Msys2* - to use systems PATH navigate to msys2 folder, open `msys2_shell.cmd`, uncomment set `MSYS2_PATH_TYPE=inherit`, restart MSYS2 shell.
68
69This will inherit system's PATH so should find `python3.7` installed in regular way as well as imgtool and its dependencies.
70