Skip to content

Commit 579b30c

Browse files
committed
cypress: Update docs with new platforms support info
Signed-off-by: Roman Okhrimenko <roman.okhrimenko@infineon.com>
1 parent cc55731 commit 579b30c

File tree

4 files changed

+29
-16
lines changed

4 files changed

+29
-16
lines changed

boot/cypress/BlinkyApp/Readme.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Functionality:
1515
Currently supported platforms
1616

1717
* PSOC_062_2M
18+
* PSOC_062_1M
19+
* PSOC_062_512K
1820

1921
### Hardware limitations
2022

@@ -31,7 +33,7 @@ These values are set by specifing following macros: `-DUSER_APP_SIZE`, `-DUSER_A
3133
Pre-build action calls GCC preprocessor which intantiates defines for particular values in `BlinkyApp_template.ld`.
3234

3335
Default values set for currently supported targets:
34-
* PSOC_062_2M in `BlinkyApp.mk` to `-DUSER_APP_START=0x10018000`
36+
* `BlinkyApp.mk` to `-DUSER_APP_START=0x10018000`
3537

3638
**Important**: make sure RAM areas of CM4-based BlinkyApp and CM0p-based MCUBootApp bootloader do not overlap.
3739
Memory (stack) corruption of CM0p application can cause failure if SystemCall-served operations invoked from CM4.
@@ -40,7 +42,7 @@ Memory (stack) corruption of CM0p application can cause failure if SystemCall-se
4042

4143
Root directory for build is **boot/cypress.**
4244

43-
The following command will build regular HEX file of a BlinkyApp for BOOT slot:
45+
The following command will build regular HEX file of a BlinkyApp for BOOT slot. Substitute `PLATFORM=` to a paltform name you use in all following commands.
4446

4547
make app APP_NAME=BlinkyApp PLATFORM=PSOC_062_2M IMG_TYPE=BOOT
4648

@@ -135,6 +137,7 @@ Files to use for programming are:
135137
- `MAKEINFO` - 0 (default) - less build info, 1 - verbose output of compilation.
136138
- `HEADER_OFFSET` - 0 (default) - no offset of output hex file, 0x%VALUE% - offset for output hex file. Value 0x10000 is slot size MCUBoot Bootloader in this example.
137139
- `IMG_TYPE` - `BOOT` (default) - build image for BOOT slot of MCUBoot Bootloader, `UPGRADE` - build image for UPGRADE slot of MCUBoot Bootloader.
140+
- `ENC_IMG` - 0 (default) - build regular upgrade image, `1` - build encrypted upgrade image (MCUBootApp should also be built with this flash set 1)
138141

139142
**NOTE**: In case of `UPGRADE` image `HEADER_OFFSET` should be set to MCUBoot Bootloader slot size.
140143

boot/cypress/MCUBootApp/ExternalMemory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Once valid upgrade image was accepted the image in external memory will be erase
6262

6363
**How to enable external memory support:**
6464

65-
1. Seek for `CY_BOOT_USE_EXTERNAL_FLASH` in sources and define it in any: MCUBootApp.mk or any suitable header file.
65+
1. Pass `USE_EXTERNAL_FLASH=1` flag to `make` command when building MCUBootApp.
6666
2. Navigate to `cy_flash_map.c` and check if secondary slot start address and size meet the application's needs.
6767
3. Define which slave select is used for external memory on a board by setting `smif_id` value in `main.c`.
6868
4. Build MCUBootApp as described in `Readme.md`.

boot/cypress/MCUBootApp/README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ There are two applications implemented:
88
* MCUBootApp - PSoC6 MCUBoot-based bootloading application;
99
* BlinkyApp - simple PSoC6 blinking LED application which is a target of BOOT/UPGRADE;
1010

11-
The demonstration device is CY8CPROTO-062-4343W board which is PSoC6 device with 2M of Flash available.
11+
Cypress boards, that can be used with this evaluation example:
12+
- CY8CPROTO-062-4343W - PSoC 6 2M on board
13+
- CY8CKIT-062-WIFI-BT - PSoC 6 1M on board
14+
- CY8CPROTO-062S3-4343W - PSoC 6 512K on board
1215
The default flash map implemented is the following:
1316

1417
Single-image mode.
@@ -118,7 +121,7 @@ Since this application is created to demonstrate MCUBoot library features and no
118121

119122
1. `SCB5` used to configure serial port for debug prints. This is the most commonly used Serial Communication Block number among available Cypress PSoC 6 kits. If you try to use custom hardware with this application - change definition of `CYBSP_UART_HW` in `main.c` of MCUBootApp to SCB* that correspond to your design.
120123

121-
2. `CY_SMIF_SLAVE_SELECT_0` is used as definition SMIF driver API. This configuration is used on evaluation kit for this example CY8CPROTO-062-4343W. If you try to use custom hardware with this application - change value of `smif_id` in `main.c` of MCUBootApp to value that corresponds to your design.
124+
2. `CY_SMIF_SLAVE_SELECT_0` is used as definition SMIF driver API. This configuration is used on evaluation kit for this example CY8CPROTO-062-4343W, CY8PROTO-062S3-4343W, CY8CKIT-062-4343W. If you try to use custom hardware with this application - change value of `smif_id` in `main.c` of MCUBootApp to value that corresponds to your design.
122125

123126

124127
### Downloading Solution's Assets
@@ -146,17 +149,24 @@ This folder contains make files infrastructure for building MCUBoot Bootloader.
146149

147150
make app APP_NAME=MCUBootApp PLATFORM=PSOC_062_2M BUILDCFG=Release MCUBOOT_IMAGE_NUMBER=2
148151

152+
* To Build MCUBootApp with external memory support - pass `USE_EXTERNAL_FLASH=1` flag to `make` command in examples above. In this case UPGRADE image will be located in external memory. Refer to ExternalMemory.md for additional details.
153+
149154
Root directory for build is **boot/cypress.**
150155

151156
**Encrypted Image Support**
152157

153-
To protect user image from unwanted read Upgrade Image Encryption can be applied. The ECDH/HKDF with EC256 scheme is used in a given solution as well as mbedTLS as a crypto provider.
158+
To protect user image from unwanted read - Upgrade Image Encryption can be applied. The ECDH/HKDF with EC256 scheme is used in a given solution as well as mbedTLS as a crypto provider.
159+
160+
To enable image encryption support use `ENC_IMG=1` build flag (BlinkyApp should also be built with this flash set 1).
154161

155-
To enable image encryption support `MCUBOOT_ENC_IMAGES` and `MCUBOOT_ENCRYPT_EC256` have to be defined (can be done by uncommenting in `mcuboot_config.h`).
156-
User is also responsible on providing corresponding binary key data in `enc_priv_key[]` (file `\MCUBootApp\keys.c`). The public part will be used by imgtool when signing and encrypting upgrade image. Signing image with encryption is described in `\BlinkyApp\readme.md`.
162+
User is also responsible for providing corresponding binary key data in `enc_priv_key[]` (file `\MCUBootApp\keys.c`). The public part will be used by imgtool when signing and encrypting upgrade image. Signing image with encryption is described in `\BlinkyApp\Readme.md`.
157163

158164
After MCUBootApp is built with these settings unencrypted and encrypted images will be accepted in secondary (upgrade) slot.
159165

166+
Example command:
167+
168+
make app APP_NAME=MCUBootApp PLATFORM=PSOC_062_2M BUILDCFG=Debug MCUBOOT_IMAGE_NUMBER=1 ENC_IMG=1
169+
160170
**Programming solution**
161171

162172
There are couple ways of programming hex of MCUBootApp and BlinkyApp. Following instructions assume one of Cypress development kits, for example `CY8CPROTO_062_4343W`.
@@ -186,6 +196,8 @@ Connect a board to your computer. Switch Kitprog3 to DAP-BULK mode by pressing `
186196
**Currently supported platforms:**
187197

188198
* PSOC_062_2M
199+
* PSOC_062_1M
200+
* PSOC_062_512K
189201

190202
**Build environment troubleshooting:**
191203

@@ -205,9 +217,5 @@ Also IDE may be used:
205217

206218
*Msys2* - to use systems PATH navigate to msys2 folder, open `msys2_shell.cmd`, uncomment set `MSYS2_PATH_TYPE=inherit`, restart MSYS2 shell.
207219

208-
*Cygwin* - add following to build command `CURDIR=pwd | cygpath --mixed -f -` so that build command looks like that:
209-
210-
make app APP_NAME=MCUBootApp PLATFORM=PSOC_062_2M CURDIR=`pwd | cygpath --mixed -f -`
211-
212220
This will iherit system's PATH so should find `python3.7` installed in regular way as well as imgtool and its dependencies.
213221

boot/cypress/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ The default flash map for MCUBootApp implemented is next:
2626

2727
The flash map is defined through sysflash.h and cy_flash_map.c.
2828

29-
It is also possible to place secondary (upgrade) slots in external memory module so resulting image size can be doubled.
29+
It is also possible to place secondary (upgrade) slots in external memory module. In this case primary slot can be doubled in size.
3030
For more details about External Memory usage, please refer to separate guiding document `MCUBootApp/ExternalMemory.md`.
3131

32-
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.
32+
MCUBootApp checks image integrity with SHA256, image authenticity with EC256 digital signature verification and uses either completely software implementation of cryptographic functions or accelerated by hardware - both based on mbedTLS Library.
3333

3434
### Downloading Solution's Assets
3535

@@ -60,9 +60,11 @@ This folder contains make files infrastructure for building both MCUBoot Bootloa
6060

6161
Instructions on how to build and upload MCUBootApp bootloader application and sample user applocation are located in `Readme.md` files in corresponding folders.
6262

63-
Currently supported platforms:
63+
Supported platforms for `MCUBoot`, `BlinkyApp`:
6464

65-
* PSOC_062_2M - for MCUBoot, BlinkyApp;
65+
* PSOC_062_2M
66+
* PSOC_062_1M
67+
* PSOC_062_512K
6668

6769
### Build environment troubleshooting
6870

0 commit comments

Comments
 (0)