diff options
Diffstat (limited to 'tmk_core/tool/mbed/mbed-sdk/workspace_tools/dev/intel_hex_utils.py')
-rw-r--r-- | tmk_core/tool/mbed/mbed-sdk/workspace_tools/dev/intel_hex_utils.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/dev/intel_hex_utils.py b/tmk_core/tool/mbed/mbed-sdk/workspace_tools/dev/intel_hex_utils.py deleted file mode 100644 index c60e9c4e7..000000000 --- a/tmk_core/tool/mbed/mbed-sdk/workspace_tools/dev/intel_hex_utils.py +++ /dev/null @@ -1,31 +0,0 @@ -from intelhex import IntelHex -from cStringIO import StringIO - - -def sections(h): - start, last_address = None, None - for a in h.addresses(): - if last_address is None: - start, last_address = a, a - continue - - if a > last_address + 1: - yield (start, last_address) - start = a - - last_address = a - - if start: - yield (start, last_address) - - -def print_sections(h): - for s in sections(h): - print "[0x%08X - 0x%08X]" % s - - -def decode(record): - h = IntelHex() - f = StringIO(record) - h.loadhex(f) - h.dump() |