From a17982e16611fdad913348794bc0ebe04b706a43 Mon Sep 17 00:00:00 2001 From: hvxl Date: Wed, 3 Jan 2024 16:29:57 +0100 Subject: [PATCH] The upgrade code won't read a hex firmware file created on Windows --- otmonitor.vfs/upgrade.tcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/otmonitor.vfs/upgrade.tcl b/otmonitor.vfs/upgrade.tcl index 1537c6f..6abaeec 100644 --- a/otmonitor.vfs/upgrade.tcl +++ b/otmonitor.vfs/upgrade.tcl @@ -22,6 +22,8 @@ proc upgrade::readfw {file} { } elseif {[regexp {^:[[:xdigit:]]{10}} $data]} { binary scan $data su magic set format hex + # A hex firmware file generated on Windows has crlf line endings + fconfigure $f -translation auto # A hex firmware file is around 32k max append data [read $f 65536] } elseif {$magic == 0x8b1f} {