Testing with T4.1 and T3.2 and it seems good. Can you revert to a version of your code where you know for sure it worked?
I grabbed a version I had compiled and that worked fine. That version can update even to the newest version when I place said file on the sdcard. I traced my git commits to the exact commit where it stops working. Oddly enough, the code changed between a version that always works and the next commit that never works is... well, nothing special at all. It has nothing to do with firmware flashing or flash memory at all. The only thing I can seem to correlate between these versions is that it got slightly larger as versions went on and at a certain size perhaps it started to act funny.
Here's a strange thing that happens as soon as I get to the commit where the problems start to happen:
1. I flash the sketch and it reboots.
2. I then power off and insert the sdcard
3. I reboot. It stops responding while saying it is waiting for hex lines (which it is getting from the sdcard)
4. Since it is stopped I power cycle it.
5. This time it loads the entire image then says "abort - new code missing string fw_teensyMM" but I can confirm the image does contain that string
6. Even more oddly, hereafter, every time I reboot this line "buffer = 7264K FLASH (600E4000 - 607FC000)" will show the buffer area shrinking by the exact size of my firmware image. It seems it is loading the firmware image to the flash buffer, figuring out that the ID doesn't match (though it does!) and then stopping but the buffer was still filled and does not get erased. So, every reboot the flash gets more and more filled but the move never happens.
Now, that behavior is repeatable with my program every time. If I try a given version of my code it either always works or never works. The code didn't change in ways that make any sense. I even tried commenting out anything that changed between the good and bad version of my code that I thought might even have the slightest chance of interfering. Now I'm left just with misc code that expands the size a little but doesn't do anything fancy or noteworthy at all.
With the newest version of my program the available buffer only drops by 4k each reboot. But, it might be a similar problem. This newest version of my code also automatically reboots itself so the fault is somewhat different.
I'm about to give up on it for now I think. I've sunk a lot of hours into trying to find the problem only to find that it sure used to work but magically doesn't anymore and for no good reason at all. I guess I'd just be curious if these sort of oddities happen to anyone else. I'm sure eventually I'll find the cause but I can upload the sketch the normal way perfectly fine so it's not worth the time any longer to keep digging. The good news is that the code found in my GEVCU7 repo still should work perfectly fine for anyone else who wants to do firmware updates from the SDcard. I didn't change anything for months and my older versions of the code can update perfectly fine from sd. So, odds are decent that it normally works and I've just hit some obscure corner case somehow.