Closed martian closed 5 months ago
You are welcome to add an entry to the CHANGELOG.md as well
Interesting, a very nice PR. Clean code. I have only one issue, and that is we use fileutils.c to do all file operations. There is a long effort to unifiy/refactor all file operations into it.
Would you mind telling me what the use case for this? How and when will it be used?
Thanks. I will have a look at the file operations.
My initial use case was an investigation into what happened with my somewhat-faulty chinese pm3 easy 512KB, where write errors occur in the top half of flash. Except when I overwrite with FF first, it turns out.
I thought being able to dump flash, or read any memory or HW register might come in useful for others in debugging firmware related issues.
Reading memory works when the device is running either osimage or bootloader.
Simple interactive examples:
hw readmem -f flashdump
hw readmem -l 1024
CLI example:
./pm3 --dumpmem flashdump.bin
Reading from arbitrary memory ranges can be unlocked using the 'raw' option.