aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/spi_flash/spi_flash.py
diff options
context:
space:
mode:
authorBevan Weiss <bevanweiss@users.noreply.github.com>2024-09-06 06:50:32 +1000
committerGitHub <noreply@github.com>2024-09-05 16:50:32 -0400
commit14a83103c32fe1590b5b0416f71d1445648c58ed (patch)
tree7dcddba16d8ecbf795459dd02b2a9099155b4b3f /scripts/spi_flash/spi_flash.py
parent08a1c9f12760ee6d89db2b82e76c7d93453212db (diff)
downloadkutter-14a83103c32fe1590b5b0416f71d1445648c58ed.tar.gz
kutter-14a83103c32fe1590b5b0416f71d1445648c58ed.tar.xz
kutter-14a83103c32fe1590b5b0416f71d1445648c58ed.zip
flashsd: Add support for chitu-v6 (#6671)
Add flashsd configuration for Tronxy x5sa and other printers based on Chitu v6 board. These boards should support sdio (this is what the schematic details), however I couldn't get this working from a quick try. Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'scripts/spi_flash/spi_flash.py')
-rw-r--r--scripts/spi_flash/spi_flash.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/spi_flash/spi_flash.py b/scripts/spi_flash/spi_flash.py
index a3231b69..cbe769e5 100644
--- a/scripts/spi_flash/spi_flash.py
+++ b/scripts/spi_flash/spi_flash.py
@@ -74,20 +74,19 @@ def translate_serial_to_tty(device):
return ttyname, ttyname
def check_need_convert(board_name, config):
- if board_name.lower().startswith('mks-robin-e3'):
- # we need to convert this file
- robin_util = os.path.join(
- fatfs_lib.KLIPPER_DIR, "scripts/update_mks_robin.py")
- klipper_bin = config['klipper_bin_path']
- robin_bin = os.path.join(
+ conv_script = config.get("conversion_script")
+ if conv_script is None:
+ return
+ conv_util = os.path.join(fatfs_lib.KLIPPER_DIR, conv_script)
+ klipper_bin = config['klipper_bin_path']
+ dest_bin = os.path.join(
os.path.dirname(klipper_bin),
os.path.basename(config['firmware_path']))
- cmd = "%s %s %s %s" % (sys.executable, robin_util, klipper_bin,
- robin_bin)
- output("Converting Klipper binary to MKS Robin format...")
- os.system(cmd)
- output_line("Done")
- config['klipper_bin_path'] = robin_bin
+ cmd = "%s %s %s %s" % (sys.executable, conv_util, klipper_bin, dest_bin)
+ output("Converting Klipper binary to custom format...")
+ os.system(cmd)
+ output_line("Done")
+ config['klipper_bin_path'] = dest_bin
###########################################################