From ed638a5f5a2608d8efc887e2485e0e755a2fcc3b Mon Sep 17 00:00:00 2001 From: Ralf Schlatterbeck Date: Sat, 19 Aug 2017 21:05:39 +0200 Subject: [PATCH] Add genbackupisr --- examples/osd/ota-update/genbackupisr.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/osd/ota-update/genbackupisr.py diff --git a/examples/osd/ota-update/genbackupisr.py b/examples/osd/ota-update/genbackupisr.py new file mode 100644 index 000000000..ef5096398 --- /dev/null +++ b/examples/osd/ota-update/genbackupisr.py @@ -0,0 +1,15 @@ +#!/usr/bin/python + +""" Generate backup ISR table from given .hex file + Output is written to out.hex +""" + +import sys +import intelhex + +ihex = intelhex.IntelHex (sys.argv [1]) +bin = ihex.tobinstr () [:0x200] + +hex2 = intelhex.IntelHex () +hex2.puts (0x1ed00, bin) +hex2.tofile ("out.hex", format="hex")