Closed GianCann closed 3 years ago
Sure.
To get a specific byte or bytes of the firmware:
import firmware
firmware.flash_read(BYTE_NUMBER)
To dump the whole firmware I wrote a short program in C++ that performs the above sequence over and over again and saved the output. It would also possible to use python for this which at some point I'll get around to doing and add to this repo.
Ok, but BYTE_NUMBER is not defined. Which is the corrispondent value? 32? or 0?
It's the first byte you want to read. So to get the first byte of the firmware (and the next 31 bytes), you'd call.
firmware.flash_read(0)
Then to get the next 32 bytes you'd do.
firmware.flash_read(32)
Continuing in 32 byte chunks until the function returns false.
byte = 0
while True:
if (firmware.flash_read(byte) == false):
break;
byte += 32
I've added new instructions to the readme that explain how to use the DFU mode to dump the firmware, which is probably easier than this method.
Hi @gpdaniels , Can you explain to me how to dump the Spike Prime Hub firmware?