summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-07-25 22:38:23 +0700
committerhathach <[email protected]>2024-07-25 22:38:23 +0700
commitef4285c00c1561a106b99dd0572cef11f5448919 (patch)
tree34bd9fd1c2819459ae63546e7be4b8caa8b94b53 /test
parent02caf007723551f878ab3675c14681801f16354e (diff)
add flash stlink
Diffstat (limited to 'test')
-rw-r--r--test/hil/hil_test.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index 158841687..e2a2f01a0 100644
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -137,6 +137,11 @@ def flash_jlink(board, firmware):
return ret
+def flash_stlink(board, firmware):
+ #ret = run_cmd(f'st-flash --serial {board["flasher_sn"]} write {firmware}.bin 0x08000000')
+ ret = run_cmd(f'STM32_Programmer_CLI --connect port=swd sn={board["flasher_sn"]} --write {firmware}.elf --go')
+ return ret
+
def flash_openocd(board, firmware):
ret = run_cmd(f'openocd -c "adapter serial {board["flasher_sn"]}" {board["flasher_args"]} -c "program {firmware}.elf reset exit"')
return ret
@@ -338,8 +343,10 @@ def main():
# all possible tests: board_test is added last to disable board's usb
all_tests = [
'cdc_dual_ports',
- 'cdc_msc', 'cdc_msc_freertos',
- 'dfu', 'dfu_runtime',
+ 'cdc_msc',
+ 'cdc_msc_freertos',
+ 'dfu',
+ 'dfu_runtime',
'hid_boot_interface',
'board_test'
]