-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Calculate checksums for flash operations #862
Comments
Do you mean a checksum of the memory on the device? And compare that to a file on your computer? |
I was thinking of a binary file, on my use case I was having problems with a binary compiled on my computer and one downloaded, the source code was the same, but the binaries did not match, I was using a newer tool chain, so the new binary was corrupt on st-link tool when you load a binary, ti calculates a checksum, so I used that to figure out when I had the correct toolchain |
Ah okay. These tools don't do that for you as it stands. On Windows I can recommend HxD hex editor to checksum a binary file (or simply compare two binary files quickly). Are you on Windows? |
@vitormhenrique: Unfortunately I can't read the content of the image you linked as the resolution is too low for that. Can you paste a larger screenshot or a relevant detail of it? |
no idea why that image was so small.... |
I see - so we are actually looking for a feature request here. |
If no special algorithm limitations are given, I think it’s quite easy to integrate some checksum algorithm(md5, sha256, etc) into the file loading process. Maybe I can give it a try when I am free. |
stlink utility (the one in the capture) defines the checksum in its documentation (UM0892) as a simple arithmetic sum, truncated to 32bit ... (sigh)
While this is quite crude and not reaaally reliable, this is cheap to implement and maintaining "compatibility" with st-utility would be nice. |
@grevaillot Thanks for your information, I will add support for this on my PR. |
Should we have some documentation for this in our tutorial? |
The algorithm used by ST’s windows program may need a documentation at least for developers I think. |
Ok, can you add a section with a few lines to our tutorial then (at the end of the reviewed part)? That would be nice. Don't bother too much about formatting there though, as I am still working on this document anyway... |
I am still wondering, if the two methods should be merged all together. |
Hello,
Is there a way to get the checksum from a binary? like the st-link tool has on windows? I wanna compare two binaries generated on my computer and a standard one.
The text was updated successfully, but these errors were encountered: