When i produced two bin(one and second) file with mdk tools fromelf.exe,the difference of the two bin files is the second bin file only more than a single one code in source project. so when i compare the two bin files in hexeditor,the two file has many differences. I want to find the difference between the two files,and update the difference into stmf10x flash,but the two bin file has many difference,is this way whether could solve the problem,please help me. thanks
Binary files tend to be quite different, and once they add/remove a byte the changes will likely shift/cascade.
If you are trying to delta two x different build versions, things may be significantly different, and you'll want to look at method used for compression, where the old images is used as a history window for the new one.
Perhaps requires some more sophisticated thinking and understanding..
Why is WxOxD a spam word FFS! Remove the x's
Thanks for replay.In this test case,i just only modified a little.For example: i change #define version v3.0.0 to #define version v3.1.0,there build two bin file was a little different. In another case,old code in someone function,i add a test() function,then i build out first bin file,and when i delete the test() function i build second bin file. The result is that the two bin file has many differences. And last,whether has method to resolve the many differences in second case? I am a newer in build.Looking forward to your reply.
2 distinct load regions...?
What, exactly, do you want to "resolve" ?
If you've made changes in the source file(s), then the binary is obviously going to be different!
Especially with an optimising compiler.
With binaries, changes are going to be accumulative and compounding. There isn't a simple one-to-one comparison. Where there are similar code sequences, they may be displaced, you'd have to search for such patterns to realign/resync the streams. Delta/patching methods are similar to compression techniques, you're looking for repeated sequences of symbols, in the case of Cortex-Mx/Thumb 16-bit words, and 32-bit for ARM