Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 1 | ### Port of MCUBoot library to be used with Cypress targets |
| 2 | |
| 3 | **Solution Description** |
| 4 | |
| 5 | Given solution demonstrates operation of MCUBoot on Cypress' PSoC6 device. |
| 6 | |
| 7 | There are four applications implemented: |
| 8 | * MCUBootApp - PSoC6 MCUBoot-based bootloading application; |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 9 | * BlinkyApp - simple PSoC6 blinking LED application which is a target of BOOT/UPGRADE; |
| 10 | |
| 11 | The 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 | |
| 18 | The flash map is defined through sysflash.h and cy_flash_map.c. |
| 19 | |
| 20 | MCUBootApp 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 | |
| 24 | There is a set assets required: |
| 25 | |
| 26 | * MCUBooot Library (root repository) |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 27 | * PSoC6 Peripheral Drivers Library (PDL) |
| 28 | * mbedTLS Cryptographic Library |
| 29 | |
| 30 | Those are represented as submodules. |
| 31 | |
| 32 | To retrieve source code with subsequent submodules pull: |
| 33 | |
Christian Daudt | e1960a9 | 2020-03-04 14:20:33 -0800 | [diff] [blame] | 34 | git clone --recursive https://github.com/JuulLabs-OSS/mcuboot.git |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 35 | |
| 36 | Submodules can also be updated and initialized separately: |
| 37 | |
Christian Daudt | e1960a9 | 2020-03-04 14:20:33 -0800 | [diff] [blame] | 38 | cd mcuboot |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 39 | git submodule update --init --recursive |
| 40 | |
| 41 | |
| 42 | |
| 43 | **Building Solution** |
| 44 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 45 | Root directory for build is **boot/cypress.** |
| 46 | |
Roman Okhrimenko | aa7c021 | 2020-03-24 23:33:00 +0200 | [diff] [blame^] | 47 | This folder contains make files infrastructure for building both MCUBoot Bootloader and sample BlinkyApp application used for Bootloader demo functionality. |
| 48 | |
| 49 | Instructions on how to build and upload MCUBootApp bootloader application and sample user applocation are located in `Readme.md` files in corresponding folders. |
| 50 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 51 | **Currently supported platforms:** |
| 52 | |
| 53 | * PSOC_062_2M - for MCUBoot, BlinkyApp; |
| 54 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 55 | **Build environment troubleshooting:** |
| 56 | |
| 57 | Following CLI / IDE are supported for project build: |
| 58 | |
| 59 | * Cygwin on Windows systems |
Christian Daudt | e1960a9 | 2020-03-04 14:20:33 -0800 | [diff] [blame] | 60 | * unix style shells on *nix systems |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 61 | * 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 | |
| 69 | This will inherit system's PATH so should find `python3.7` installed in regular way as well as imgtool and its dependencies. |
| 70 | |