Created
May 1, 2015 18:47
-
-
Save peisenhower/70b23be1bada54f1c1b1 to your computer and use it in GitHub Desktop.
Generate a hex file of sequential bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from intelhex import IntelHex | |
import struct | |
h = IntelHex() | |
for x in range(16535): | |
h.puts(x, struct.pack("B", x & 0xFF)) | |
h.tofile("sequence.hex", "hex") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment