Skip to content

Commit 82b290e

Browse files
erwangonashif
authored andcommitted
scripts/pylib/twister: Add sn option to stm32cubeprogrgammer runner
In order to enable use of stm32cubeprogrammer runner with twister, add "sn" tool specific option which allows to provide target serial number and hence select the target to flash when multiple ones are connected to the host. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
1 parent 3312198 commit 82b290e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/pylib/twister/twisterlib.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,8 @@ def handle(self):
780780
command_extra_args.append("cmsis_dap_serial %s" % (board_id))
781781
elif runner == "jlink":
782782
command.append("--tool-opt=-SelectEmuBySN %s" % (board_id))
783+
elif runner == "stm32cubeprogrammer":
784+
command.append("--tool-opt=sn=%s" % (board_id))
783785

784786
if command_extra_args != []:
785787
command.append('--')

0 commit comments

Comments
 (0)