What your asking for is significantly over the top.
However I’ll bite (ish), save a copy of the last bin file, maybe even hash it and store the hash somewhere in flash outside the program space on the Cortex. Then modify Jame’s stm32flashCortex in such a way that it:
- Reads the stored hash, checks it against the OLD copy of the bin file you compiled and uploaded last time
- If it matches, do a diff on the new bin vs the old one
- Write the difference, should be faster
Question is, will all that work actually benefit you in the long run?