1# Copyright (c) 2024 STMicroelectronics
2# SPDX-License-Identifier: Apache-2.0
3
4# By default stm32cubeprogrammer configured to use DFU upload method.
5# Comment below line and uncomment the second line to use SWD upoad method.
6board_runner_args(stm32cubeprogrammer "--port=usb1")
7# board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
8
9# Even if flash and start work, dfu-util return error 74. It can be ignored.
10board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
11
12board_runner_args(openocd "--tcl-port=6666")
13board_runner_args(openocd --cmd-pre-init "gdb_report_data_abort enable")
14board_runner_args(openocd "--no-halt")
15
16# keep first
17include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
18include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
19include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
20