From 9ee4fc906981158ebaec36c0b01a0c5e71299f5c Mon Sep 17 00:00:00 2001 From: Sergey Shchelkanov Date: Thu, 13 Apr 2023 14:11:56 +0300 Subject: [PATCH] Update mik32_upload.py --- mik32_upload.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mik32_upload.py b/mik32_upload.py index ad422f8..8e5bc13 100644 --- a/mik32_upload.py +++ b/mik32_upload.py @@ -56,12 +56,12 @@ def upload_file(filename: str, boot_source: str = "eeprom") -> int: cmd = shlex.split("%s -s %s -f interface/ftdi/m-link.cfg -f target/mcu32.cfg" % (DEFAULT_OPENOCD_EXEC_FILE_PATH, DEFAULT_OPENOCD_SCRIPTS_PATH), posix=False) with subprocess.Popen(cmd, shell=True, stdout=subprocess.DEVNULL) as proc: if boot_source == "eeprom": - result = mik32_eeprom.write_words(bytes2words(get_content(filename))) + result = write_words(bytes2words(get_content(filename))) elif boot_source == "spifi": - mik32_spifi.spifi_write_file(get_content(filename)) + spifi_write_file(get_content(filename)) result = 0 # TODO elif boot_source == "ram": - mik32_ram.write_file(filename) + write_file(filename) result = 0 # TODO else: raise Exception("Unsupported boot source, use eeprom or spifi")