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 | |
Bohdan Kovalchuk | a333a45 | 2020-07-09 16:55:58 +0300 | [diff] [blame] | 20 | It is also possible to place secondary (upgrade) slots in external memory module so resulting image size can be doubled. |
| 21 | For more details about External Memory usage, please refer to separate guiding document `MCUBootApp/ExternalMemory.md`. |
| 22 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 23 | 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. |
| 24 | |
| 25 | **Downloading Solution's Assets** |
| 26 | |
| 27 | There is a set assets required: |
| 28 | |
| 29 | * MCUBooot Library (root repository) |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 30 | * PSoC6 Peripheral Drivers Library (PDL) |
| 31 | * mbedTLS Cryptographic Library |
| 32 | |
| 33 | Those are represented as submodules. |
| 34 | |
| 35 | To retrieve source code with subsequent submodules pull: |
| 36 | |
Christian Daudt | e1960a9 | 2020-03-04 14:20:33 -0800 | [diff] [blame] | 37 | git clone --recursive https://github.com/JuulLabs-OSS/mcuboot.git |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 38 | |
| 39 | Submodules can also be updated and initialized separately: |
| 40 | |
Christian Daudt | e1960a9 | 2020-03-04 14:20:33 -0800 | [diff] [blame] | 41 | cd mcuboot |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 42 | git submodule update --init --recursive |
| 43 | |
| 44 | |
| 45 | |
| 46 | **Building Solution** |
| 47 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 48 | Root directory for build is **boot/cypress.** |
| 49 | |
Roman Okhrimenko | aa7c021 | 2020-03-24 23:33:00 +0200 | [diff] [blame] | 50 | This folder contains make files infrastructure for building both MCUBoot Bootloader and sample BlinkyApp application used for Bootloader demo functionality. |
| 51 | |
| 52 | Instructions on how to build and upload MCUBootApp bootloader application and sample user applocation are located in `Readme.md` files in corresponding folders. |
| 53 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 54 | **Currently supported platforms:** |
| 55 | |
| 56 | * PSOC_062_2M - for MCUBoot, BlinkyApp; |
| 57 | |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 58 | **Build environment troubleshooting:** |
| 59 | |
| 60 | Following CLI / IDE are supported for project build: |
| 61 | |
| 62 | * Cygwin on Windows systems |
Christian Daudt | e1960a9 | 2020-03-04 14:20:33 -0800 | [diff] [blame] | 63 | * unix style shells on *nix systems |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 64 | * 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 | |
| 72 | This will inherit system's PATH so should find `python3.7` installed in regular way as well as imgtool and its dependencies. |
| 73 | |