Recently with help here, I was able to build a program that update's the 4.0 from can instead of USB. So far it is working extremely well with only 2 downsides that I'm aware of.

1. I can only use half the program space. (not a big deal to me)

2. If power was lost or a bad file was loaded there is no recovery as the teensy would be potted in my project, no USB or button available. (This is a big deal for me)
I could implement a magnetic switch of some kind to act as the button but I prefer not to.


My first thought was to build a small file and stick it in the Restore Program location. But I quickly found out this area is locked as read-only, and even a blank sketch for a 4.0 compiles at over 10k bytes.

My assumption is that the bootloader chip copies this restore program to the lower area so somehow making this area bigger is a no go.
Also, my understanding is this area has an irreversible fuse set to make it read-only.



Does anyone know where the first instruction is located at power up? Is there a pointer to tell it where to start?

I have a few ideas in my head but not sure how to make them work. Thanks for any help!