blob: 60a5a50ff26613db5cc91ac27f64910a2e8b3dc1 [file] [log] [blame] [view]
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +03001### Port of MCUBoot library for evaluation with Cypress PSoC 6 chips
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +02002
Roman Okhrimenko6ea44be2020-09-24 17:20:15 +03003### Disclaimer
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +02004
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +02005Given solution is included in `MCUboot` repository with purpose to demonstrate basic consepts and features of MCUboot library on Infineon Technologies devices.
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +02006
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +02007### Supported platforms
Roman Okhrimenko6ea44be2020-09-24 17:20:15 +03008
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +02009| Family | Platforms |
10---------- | -------------------|
11| PSOC6 | PSOC6 1M, 2M, 512K |
12| CYWxx829 | CYW20829, CYW89829 |
13| XMC7x00 | XMC7200, XMC7100 |
Roman Okhrimenko6ea44be2020-09-24 17:20:15 +030014
Roman Okhrimenko977b3752022-03-31 14:40:48 +030015### Solution description
Roman Okhrimenko6ea44be2020-09-24 17:20:15 +030016
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030017There are two applications implemented:
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020018* MCUBootApp - MCUboot-based bootloader implementation;
19* BlinkyApp - simple blinking LED application which is a target of BOOT/UPGRADE;
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020020
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020021Detailed description on each application is provided in dedicated files:
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020022
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020023Bootloader - [MCUBootApp.md](./MCUBootApp/MCUBootApp.md)
24Test Application - [BlinkyApp.md](./BlinkyApp/BlinkyApp.md)
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020025
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020026Separate documentation is available for External Memory usage in mcuboot [ExternalMemory.md](./MCUBootApp/ExternalMemory.md)
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020027
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020028### Downloading solution
Roman Okhrimenko13f79ed2021-03-11 19:05:41 +020029
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020030Since libraries required by mcuboot Infineon implementation are implemented as submodules following commands needs to be executed.
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030031
32To retrieve source code with subsequent submodules pull:
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020033
Fabio Utzigde1d72d2020-11-10 12:35:04 -030034 git clone --recursive https://github.com/mcu-tools/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
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030041
42
Roman Okhrimenko977b3752022-03-31 14:40:48 +030043### Building solution
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020044
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030045Root directory for build is **boot/cypress.**
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020046
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020047This folder contains make files infrastructure for building both MCUbootApp and sample BlinkyApp application used for Bootloader demo functionality.
Roman Okhrimenkoaa7c0212020-03-24 23:33:00 +020048
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020049**GCC_ARM** is only supported toolchain.
Roman Okhrimenko13f79ed2021-03-11 19:05:41 +020050
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020051It is recommended to use [ModusToolbox Software Environment](https://www.cypress.com/products/modustoolbox) which includes GCC Toolchain.
Roman Okhrimenko13f79ed2021-03-11 19:05:41 +020052
Roman Okhrimenko977b3752022-03-31 14:40:48 +030053The default installation folder is expected by the makefile build system.
Roman Okhrimenko13f79ed2021-03-11 19:05:41 +020054
Roman Okhrimenko977b3752022-03-31 14:40:48 +030055To use another installation folder, version of **ModusToolbox IDE** or another GCC Compiler, specify the path to a toolchain using the **TOOLCHAIN_PATH** parameter.
Roman Okhrimenko13f79ed2021-03-11 19:05:41 +020056
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020057Below is an example on how to set toolchain path to the latest include with **ModusToolbox IDE**:
Dovhal Artem (CSUKR CSS ICW SW FW 1)f7a3d1b2022-04-01 15:07:37 +000058
Roman Okhrimenko883cb5b2024-03-28 17:22:33 +020059 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)f7a3d1b2022-04-01 15:07:37 +000062
Roman Okhrimenko977b3752022-03-31 14:40:48 +030063### Build environment troubleshooting
Roman Okhrimenko13f79ed2021-03-11 19:05:41 +020064
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030065Following CLI / IDE are supported for project build:
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020066
67* Cygwin on Windows systems
Christian Daudte1960a92020-03-04 14:20:33 -080068* unix style shells on *nix systems
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030069* Eclipse / ModusToolbox ("makefile project from existing source")
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020070
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030071*Make* - make sure it is added to system's `PATH` variable and correct path is first in the list;
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020072
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030073*Python/Python3* - make sure you have correct path referenced in `PATH`;
Roman Okhrimenko89ecdac2020-02-28 17:05:55 +020074
Roman Okhrimenkodc0ca082023-06-21 20:49:51 +030075*Msys2* - to use systems PATH navigate to msys2 folder, open `msys2_shell.cmd`, uncomment set `MSYS2_PATH_TYPE=inherit`, restart MSYS2 shell.
76
77This will inherit system's PATH so should find `python3.7` installed in regular way as well as imgtool and its dependencies.
78