From 164a0a9e91854e756ad45c59be4334156d92cb18 Mon Sep 17 00:00:00 2001 From: Viktor Dragomiretskyy Date: Wed, 19 Jun 2019 19:14:47 +1200 Subject: [PATCH] Upload firmware works! --- partition-the-flash.py | 1 - prototype.py | 2 +- upload-fwext.py | 45 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 upload-fwext.py diff --git a/partition-the-flash.py b/partition-the-flash.py index 4a57130..e8e05de 100644 --- a/partition-the-flash.py +++ b/partition-the-flash.py @@ -20,7 +20,6 @@ flash_layout_hardcoded=[ unhex('05 05 0300 00000400 00800000'), # ??? unhex('06 06 0300 00800400 00800000'), # calibration data unhex('04 03 0500 00000500 00000300'), # template database -# unhex('08 08 0500 00000000 000000ff'), # <-- hack to make the whole flash contents readable ] enable_blob=unhex(''' diff --git a/prototype.py b/prototype.py index bf41869..abe6ffd 100644 --- a/prototype.py +++ b/prototype.py @@ -371,7 +371,7 @@ def dump_flash(): def read_hw_reg32(addr): rsp=tls.cmd(pack(' 0: + chunk, fwext = fwext[:0x1000], fwext[0x1000:] + db.write_flash(2, ptr, chunk) + ptr += len(chunk) + +rsp=tls.cmd(pack('