diff options
| author | Ha Thach <[email protected]> | 2024-08-19 18:22:13 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-19 18:22:13 +0700 |
| commit | ca3925a4c5b8958ec6f49818e78ccf35aba59247 (patch) | |
| tree | 5ff87db052ccfb1a049a4363e48d70b180cee973 /test | |
| parent | b8d3c0c4a8e005bcfcc4ed04556e6da54f235ccc (diff) | |
| parent | 635bdc1fcea1d4d9972d4c9960a32250b0245186 (diff) | |
Merge pull request #2708 from BrentK-ADI/max32_port
Add port for Analog Devices MAX32 MCUs
Diffstat (limited to 'test')
| -rw-r--r-- | test/hil/hil_test.py | 17 | ||||
| -rw-r--r-- | test/hil/rpi.json | 21 |
2 files changed, 30 insertions, 8 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index 486f0d2eb..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') @@ -196,6 +206,11 @@ def flash_esptool(board, firmware): return ret +def flash_uniflash(board, firmware): + ret = run_cmd(f'dslite.sh {board["flasher_args"]} -f {firmware}.hex') + return ret + + # ------------------------------------------------------------- # Tests # ------------------------------------------------------------- diff --git a/test/hil/rpi.json b/test/hil/rpi.json index 688ea3822..e90e435d8 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": "042217023bffc88100000000000000000000000097969906", + "flasher_args": "-f interface/cmsis-dap.cfg -f target/max32665.cfg" + }, + { "name": "lpcxpresso11u37", "uid": "17121919", "flasher": "jlink", @@ -50,13 +57,6 @@ "flasher": "openocd", "flasher_sn": "066FFF495087534867063844", "flasher_args": "-f interface/stlink.cfg -f target/stm32g0x.cfg" - }, - { - "name": "nanoch32v203", - "uid": "CDAB277B0FBC03E339E339E3", - "flasher": "openocd_wch", - "flasher_sn": "EBCA8F0670AF", - "flasher_args": "" } ], "boards-skip": [ @@ -69,6 +69,13 @@ "comment": "not running reliably in bulk with other boards, probably power, flashing etc .." }, { + "name": "nanoch32v203", + "uid": "CDAB277B0FBC03E339E339E3", + "flasher": "openocd_wch", + "flasher_sn": "EBCA8F0670AF", + "flasher_args": "" + }, + { "name": "espressif_s3_devkitm", "uid": "84F703C084E4", "tests": [ |
