1# SPDX-License-Identifier: Apache-2.0
2
3if(CONFIG_BUILD_WITH_TFM)
4  set(FLASH_BASE_ADDRESS_S 0x0C000000)
5
6  # Flash merged TF-M + Zephyr binary
7  set_property(TARGET runners_yaml_props_target PROPERTY hex_file tfm_merged.hex)
8
9  if (CONFIG_HAS_FLASH_LOAD_OFFSET)
10    MATH(EXPR TFM_HEX_BASE_ADDRESS_NS "${FLASH_BASE_ADDRESS_S}+${CONFIG_FLASH_LOAD_OFFSET}")
11  else()
12    set(TFM_HEX_BASE_ADDRESS_NS ${TFM_FLASH_BASE_ADDRESS_S})
13  endif()
14endif()
15
16# keep first
17board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
18
19set_ifndef(BOARD_DEBUG_RUNNER pyocd)
20set_ifndef(BOARD_FLASH_RUNNER pyocd)
21
22board_runner_args(pyocd "--target=stm32l552zetxq")
23
24# keep first
25include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
26include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
27include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
28