Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 1 | ### Port of MCUBoot library for evaluation with Cypress PSoC 6 chips |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 2 | |
Roman Okhrimenko | 6ea44be | 2020-09-24 17:20:15 +0300 | [diff] [blame] | 3 | ### Disclaimer |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 4 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 5 | Given solution is included in `MCUboot` repository with purpose to demonstrate basic consepts and features of MCUboot library on Infineon Technologies devices. |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 6 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 7 | ### Supported platforms |
Roman Okhrimenko | 6ea44be | 2020-09-24 17:20:15 +0300 | [diff] [blame] | 8 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 9 | | Family | Platforms | |
| 10 | ---------- | -------------------| |
| 11 | | PSOC6 | PSOC6 1M, 2M, 512K | |
| 12 | | CYWxx829 | CYW20829, CYW89829 | |
| 13 | | XMC7x00 | XMC7200, XMC7100 | |
Roman Okhrimenko | 6ea44be | 2020-09-24 17:20:15 +0300 | [diff] [blame] | 14 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 15 | ### Solution description |
Roman Okhrimenko | 6ea44be | 2020-09-24 17:20:15 +0300 | [diff] [blame] | 16 | |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 17 | There are two applications implemented: |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 18 | * MCUBootApp - MCUboot-based bootloader implementation; |
| 19 | * BlinkyApp - simple blinking LED application which is a target of BOOT/UPGRADE; |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 20 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 21 | Detailed description on each application is provided in dedicated files: |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 22 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 23 | Bootloader - [MCUBootApp.md](./MCUBootApp/MCUBootApp.md) |
| 24 | Test Application - [BlinkyApp.md](./BlinkyApp/BlinkyApp.md) |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 25 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 26 | Separate documentation is available for External Memory usage in mcuboot [ExternalMemory.md](./MCUBootApp/ExternalMemory.md) |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 27 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 28 | ### Downloading solution |
Roman Okhrimenko | 13f79ed | 2021-03-11 19:05:41 +0200 | [diff] [blame] | 29 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 30 | Since libraries required by mcuboot Infineon implementation are implemented as submodules following commands needs to be executed. |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 31 | |
| 32 | To retrieve source code with subsequent submodules pull: |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 33 | |
Fabio Utzig | de1d72d | 2020-11-10 12:35:04 -0300 | [diff] [blame] | 34 | git clone --recursive https://github.com/mcu-tools/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 | |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 41 | |
| 42 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 43 | ### Building solution |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 44 | |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 45 | Root directory for build is **boot/cypress.** |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 46 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 47 | This folder contains make files infrastructure for building both MCUbootApp and sample BlinkyApp application used for Bootloader demo functionality. |
Roman Okhrimenko | aa7c021 | 2020-03-24 23:33:00 +0200 | [diff] [blame] | 48 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 49 | **GCC_ARM** is only supported toolchain. |
Roman Okhrimenko | 13f79ed | 2021-03-11 19:05:41 +0200 | [diff] [blame] | 50 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 51 | It is recommended to use [ModusToolbox™ Software Environment](https://www.cypress.com/products/modustoolbox) which includes GCC Toolchain. |
Roman Okhrimenko | 13f79ed | 2021-03-11 19:05:41 +0200 | [diff] [blame] | 52 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 53 | The default installation folder is expected by the makefile build system. |
Roman Okhrimenko | 13f79ed | 2021-03-11 19:05:41 +0200 | [diff] [blame] | 54 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 55 | To use another installation folder, version of **ModusToolbox™ IDE** or another GCC Compiler, specify the path to a toolchain using the **TOOLCHAIN_PATH** parameter. |
Roman Okhrimenko | 13f79ed | 2021-03-11 19:05:41 +0200 | [diff] [blame] | 56 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 57 | Below is an example on how to set toolchain path to the latest include with **ModusToolbox™ IDE**: |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame] | 58 | |
Roman Okhrimenko | 883cb5b | 2024-03-28 17:22:33 +0200 | [diff] [blame] | 59 | make clean app APP_NAME=MCUBootApp PLATFORM=PSOC_062_2M BUILDCFG=Debug FLASH_MAP=platforms/memory/PSOC6/flashmap/psoc6_swap_single.json TOOLCHAIN_PATH=c:/Users/${USERNAME}/ModusToolbox/tools_3.2/gcc |
| 60 | |
| 61 | **Python3** needs to be installed in system since build process required execution of prebuild and postbuild scripts in python. |
Dovhal Artem (CSUKR CSS ICW SW FW 1) | f7a3d1b | 2022-04-01 15:07:37 +0000 | [diff] [blame] | 62 | |
Roman Okhrimenko | 977b375 | 2022-03-31 14:40:48 +0300 | [diff] [blame] | 63 | ### Build environment troubleshooting |
Roman Okhrimenko | 13f79ed | 2021-03-11 19:05:41 +0200 | [diff] [blame] | 64 | |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 65 | Following CLI / IDE are supported for project build: |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 66 | |
| 67 | * Cygwin on Windows systems |
Christian Daudt | e1960a9 | 2020-03-04 14:20:33 -0800 | [diff] [blame] | 68 | * unix style shells on *nix systems |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 69 | * Eclipse / ModusToolbox ("makefile project from existing source") |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 70 | |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 71 | *Make* - make sure it is added to system's `PATH` variable and correct path is first in the list; |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 72 | |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 73 | *Python/Python3* - make sure you have correct path referenced in `PATH`; |
Roman Okhrimenko | 89ecdac | 2020-02-28 17:05:55 +0200 | [diff] [blame] | 74 | |
Roman Okhrimenko | dc0ca08 | 2023-06-21 20:49:51 +0300 | [diff] [blame] | 75 | *Msys2* - to use systems PATH navigate to msys2 folder, open `msys2_shell.cmd`, uncomment set `MSYS2_PATH_TYPE=inherit`, restart MSYS2 shell. |
| 76 | |
| 77 | This will inherit system's PATH so should find `python3.7` installed in regular way as well as imgtool and its dependencies. |
| 78 | |