Skip to content

Commit

Permalink
The upgrade code won't read a hex firmware file created on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hvxl committed Jan 3, 2024
1 parent 39e7c18 commit a17982e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions otmonitor.vfs/upgrade.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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} {
Expand Down

0 comments on commit a17982e

Please sign in to comment.