# SPDX-License-Identifier: Apache-2.0

# Run before flashing:
# pyocd pack --update
# pyocd pack --install stm32g0

# keil.stm32g0xx_dfp.1.3.0.pack introduced stm32g0b series, but the target does
# not work with pyocd currently.
board_runner_args(pyocd "--target=stm32g071rbtx")
#board_runner_args(pyocd "--target=stm32g0b1cetx")

board_runner_args(pyocd "--flash-opt=-O reset_type=hw")
board_runner_args(pyocd "--flash-opt=-O connect_mode=under-reset")
board_runner_args(jlink "--device=STM32G0B1CE" "--speed=4000" "--reset-after-load")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset=hw")

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
