Skip to content

Commit f1c95cc

Browse files
committed
boards: cyw20829: add custom flashloader with 64k of erase block size
Add custom flashloader (for openocd) with 64k of erase block size. Default one has 512, which cause MCUbootloader overwrite during flash primary application. Signed-off-by: Sreeram Tatapudi <[email protected]>
1 parent 6887b58 commit f1c95cc

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

boards/infineon/cyw920829m2evk_02/board.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
board_runner_args(openocd "--target-handle=TARGET.cm33")
5+
6+
# MCUboot requires a flashloader with 64k erase size, please use 'west blobs fetch hal_infineon' to download it.
7+
if(CONFIG_BOOTLOADER_MCUBOOT)
8+
set(flashloader_blobs_path ${ZEPHYR_HAL_INFINEON_MODULE_DIR}/zephyr/blobs/flashloader/TARGET_CYW920829M2EVK-02)
9+
10+
if(NOT EXISTS ${flashloader_blobs_path}/CYW208xx_SMIF_64K.FLM)
11+
message(WARNING "MCUboot requires a flashloader with 64k erase size, please use 'west blobs fetch hal_infineon' to download it")
12+
else()
13+
board_runner_args(openocd "--openocd-search=${flashloader_blobs_path}")
14+
board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_CYW208xx_SMIF_64K.cfg")
15+
endif()
16+
endif()
17+
518
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
619
board_runner_args(jlink "--device=CYW20829_tm")
720
include (${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/infineon/cyw920829m2evk_02/support/openocd.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Copyright (c) 2018 Linaro Limited.
33
#
44
# SPDX-License-Identifier: Apache-2.0
5-
65
source [find interface/kitprog3.cfg]
76

87
transport select swd
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright (c) 2018 Linaro Limited.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
set QSPI_FLASHLOADER "CYW208xx_SMIF_64K.FLM"
6+
7+
source [find openocd.cfg]

0 commit comments

Comments
 (0)