Default hex file on SD Card to boot at start up

rfresh737

Well-known member
Hi Paul,

For field upgrades, would it be feasible to have the Teensy 3.5/3.6 look for a default named hex file on the SD Card and if found, load that into the CPU and then continue to boot up with that sketch?

This would allow us to send out a new SD Card with an updated sketch to our customers for field upgrades.

Thanks...
 
Not a standard approach,
You need a sketch that you load by Teensyloader, and that switches control to second program (loaded fro SD card to dedicated flash)

I think FrankB wrote such program.

Also uTasker wrote such a secondary bootloader (maybe only serial, I'm not certain)

Note, if you do that you better remove program button.
If you press by mistake prog button for 15 seconds, all flash will be erased and you need Teensyloader.
 
Thanks for the reply but my question really is asking for something that customers who live far away can do to upgrade their product by inserting a new SD Card and then just turning on the Teensy board. Your reply is what we programmers do and our customers have no idea what you're talking about.

Particle boards have this solved nicely as you can login to your master control center and see all of your boards online everywhere in the world, and you can upgrade their firmware remotely under your control. It's really a nice feature but their boards are very small in horse power and IO pins. I'm NOT saying Teensy has to have that, I was only asking if there is ever going to be a way to update sketches in the field by non-programmers.

The Ardunio and Teensy communities are absolutely great but their weak point is that they all assume our work is in a lab or workshop that we have access to. To field a product is one thing...to update it is almost impossible if you're not a programmer.

The 3.5/3.6 built-in SD Card slot is a wonderful improvement but I guess the answer is still that we can't boot off of it, so field upgrades are still a weak point with the boards.
 
I'm NOT saying Teensy has to have that, I was only asking if there is ever going to be a way to update sketches in the field by non-programmers.

I only wanted to say, if you program it you can have it:

As you know,
- you have first to allow Teensy to be USB host (needs some capacitor to be OTG),
- get the USB-host program from (https://forum.pjrc.com/threads/2817...ST-PREVIEW-AVAILABLE/page4?highlight=usb+host)
- write the secondary bootloader that is run on power on and is resident on flash
- prepare a 'boot' disk (e.g. using the MBR of your disk to point to your program)
- remove the program button to avoid involuntary erasing of the flash

or check with uTasker https://forum.pjrc.com/threads/25367-USB-MSD-with-SD-card-(Teensy-3-1)?highlight=usb+host
and it should work as you suggested

Alternatively, you simply
-provide customer your hex file + teensy.exe
ask customer to
- connect teensy with USB to PC
- start teensy.exe
- find on teensy.exe your hexfile
- put teensy.exe to automatic mode
- press prog. button
programming is done
 
I only wanted to say, if you program it you can have it:

<snip>

Alternatively, you simply
-provide customer your hex file + teensy.exe
ask customer to
- connect teensy with USB to PC
- start teensy.exe
- find on teensy.exe your hexfile
- put teensy.exe to automatic mode
- press prog. button
programming is done

I think your alternative suggestion is the best one. I could write out a simple document with pictures on how to do that process.

Thanks...
 
I think your alternative suggestion is the best one. I could write out a simple document with pictures on how to do that process.

Thanks...

If you wanted it to make simpler again:

provide hex file, the commandline loader and a batch file that downloads the hexfile, even without program press.
you can use as commandline loader PJRC's teensy_comand_cli.exe file or Koromix's TY commandline loader.

this way the user has only to run the batch file
 
Yes, that's even better yet. I assume my batch file will have the .hex file as an argument to feed it in?

Where do I download the teensy_comand_cli.exe ?

Thanks...
 
Back
Top