diff options
| author | hathach <[email protected]> | 2024-08-18 17:15:07 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-08-18 17:15:07 +0700 |
| commit | e345380723051ac3342a724660e877d7b2dad2fb (patch) | |
| tree | e6e4e5a860db8249a1960c79ccf191b09cc288ae /test | |
| parent | 76eb2f506642968b2b0079326483905e79d20d2f (diff) | |
add flash_openocd_adi() for use with max32
add feather max32666 to the hil pool
Diffstat (limited to 'test')
| -rw-r--r-- | test/hil/hil_test.py | 12 | ||||
| -rw-r--r-- | test/hil/rpi.json | 7 |
2 files changed, 18 insertions, 1 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index 1d5f98e5c..e5900c616 100644 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -173,10 +173,20 @@ echo "Ready for Remote Connections" with open(f_wch, 'w') as file: file.write(cfg_content) - ret = run_cmd(f'openocd_wch -c "adapter serial {board["flasher_sn"]}" -f {f_wch} -c "program {firmware}.elf reset exit"') + ret = run_cmd(f'openocd_wch -c "adapter serial {board["flasher_sn"]}" -f {f_wch} ' + f'-c "program {firmware}.elf reset exit"') return ret +def flash_openocd_adi(board, firmware): + openocd_adi_script_path = f'{os.getenv("HOME")}/app/openocd_adi/tcl' + if not os.path.exists(openocd_adi_script_path): + openocd_adi_script_path = '/home/pi/openocd_adi/tcl' + + ret = run_cmd(f'openocd_adi -c "adapter serial {board["flasher_sn"]}" -s {openocd_adi_script_path} ' + f'{board["flasher_args"]} -c "program {firmware}.elf reset exit"') + return ret + def flash_wlink_rs(board, firmware): # wlink use index for probe selection and lacking usb serial support ret = run_cmd(f'wlink flash {firmware}.elf') diff --git a/test/hil/rpi.json b/test/hil/rpi.json index b7d36c543..a10fa76bd 100644 --- a/test/hil/rpi.json +++ b/test/hil/rpi.json @@ -15,6 +15,13 @@ "flasher_args": "-f interface/cmsis-dap.cfg -f target/atsame5x.cfg -c \"adapter speed 5000\"" }, { + "name": "max32666fthr", + "uid": "0C81464124010B20FF0A08CC2C", + "flasher": "openocd_adi", + "flasher_sn": "040917023bffc88100000000000000000000000097969906", + "flasher_args": "-f interface/cmsis-dap.cfg -f target/max32665.cfg" + }, + { "name": "lpcxpresso11u37", "uid": "17121919", "flasher": "jlink", |
