Application Update via SD

I've done a quick search of the forum and Teensy_Teensyduino page and did not find any mention of updating application firmware in the field via USB MSC or SD card.

By chance has there been any work to use either MSC or SD for in field updating using TeensyDuino encrypted output files? Although completely possible to distribute the Teensy loader application and an encrypted file, it would be easier to ask the end user to either drop a file on the "USB stick" or place the file on an SD card and let the system boot.

uTasker provides these features but it requires a significant investment in time to both generate source files compatible with it and to alter and re-compile the uTasker app to boot in the preferred sequence. I'm working on that but may not be up to the task (yet :).
 

However, that doesn't handle encrypted files so far as I know. You would probably have to add support for that. Otherwise, I use it to allow firmware updates from sdcard and over the air via a connected ESP32.

FlasherX does work with locked Teensy (encrypted firmware). Search for forum messages by @Dogbone06.
 
Once I realized that the code is coping what is on the SD card to the top of unused onboard flash then copying the data from the top of the onboard flash to the bottom or external program portion of the onboard flash it made perfect sense that it does not matter if the update file is a .hex or .ehex file (assuming an unlocked Teensy). Just put the code in the right place and the processor on boot has no idea if FlasherX or the onboard bootloader IC put the code there. Very Nice!!

The only thing I had to do was remove things like testing for a string inside the file. If encrypted, you'd never see the string.
 
Once I realized that the code is coping what is on the SD card to the top of unused onboard flash then copying the data from the top of the onboard flash to the bottom or external program portion of the onboard flash it made perfect sense that it does not matter if the update file is a .hex or .ehex file (assuming an unlocked Teensy). Just put the code in the right place and the processor on boot has no idea if FlasherX or the onboard bootloader IC put the code there. Very Nice!!

The only thing I had to do was remove things like testing for a string inside the file. If encrypted, you'd never see the string.

Yes, that's right, except that the HEX (or EHEX) file is being parsed. The contents of each Intel Hex record are extracted and written to unused flash memory. When that process is complete, the lower flash is erased, new code is copied from upper flash to lower flash, upper flash is erased, and finally the processor is rebooted. Good catch on the string issue.
 
Back
Top