1# SPDX-License-Identifier: Apache-2.0
2# Copyright (c) 2019 STMicroelectronics
3
4# keep first
5if(CONFIG_STM32_MEMMAP)
6board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
7board_runner_args(stm32cubeprogrammer "--extload=MT25TL01G_STM32H747I-DISCO.stldr")
8else()
9board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
10endif()
11
12if(CONFIG_BOARD_STM32H747I_DISCO_STM32H747XX_M7)
13  board_runner_args(jlink "--device=STM32H747ZI_M7")
14  board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_stm32h747i_disco_m7.cfg")
15  board_runner_args(openocd --target-handle=_CHIPNAME.cpu0)
16elseif(CONFIG_BOARD_STM32H747I_DISCO_STM32H747XX_M4)
17  board_runner_args(jlink "--device=STM32H747ZI_M4")
18  board_runner_args(openocd "--config=${BOARD_DIR}/support/openocd_stm32h747i_disco_m4.cfg")
19  board_runner_args(openocd --target-handle=_CHIPNAME.cpu1)
20endif()
21
22# keep first
23include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
24include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
25include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
26