Skip to content

Commit

Permalink
[Telink] Add missed flsh overlay for mcuboot build (#29843)
Browse files Browse the repository at this point in the history
  • Loading branch information
s07641069 authored and pull[bot] committed Jan 19, 2024
1 parent 299f4f7 commit 5990696
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion config/telink/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ else()
unset(GLOBAL_DTC_OVERLAY_FILE)
endif()

if(EXISTS "${CHIP_ROOT}/src/platform/telink/${FLASH_SIZE}_flash.overlay")
set(FLASH_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${FLASH_SIZE}_flash.overlay")
message(STATUS "Flash memory size is set to: " ${FLASH_SIZE} "b")
else()
set(FLASH_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/2m_flash.overlay")
message(STATUS "Flash memory size is set to: 2mb")
endif()

if(EXISTS "${CHIP_ROOT}/config/telink/app/bootloader.conf")
set(GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE "${CHIP_ROOT}/config/telink/app/bootloader.conf")
else()
Expand All @@ -177,7 +185,7 @@ if (CONFIG_BOOTLOADER_MCUBOOT)
add_custom_target(build_mcuboot ALL
COMMAND
west build -b ${BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr
-- -DOVERLAY_CONFIG=${GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE}"
-- -DOVERLAY_CONFIG=${GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_DTC_OVERLAY_FILE};${FLASH_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE}"
COMMAND
cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin
)
Expand Down

0 comments on commit 5990696

Please sign in to comment.