Teensy 3.2 Flash over serial

Status
Not open for further replies.

lefedor

New member
Hello, can I flash bin firmware over serial - I need it for remote firmware update feature.
I've read forum and refs and seems like it's not possible cause 3.2 bootloader allows currently flashing firmware over true USB connection only.

Please update me on this issue if it's really possible and may be I've missed some method available.
I would like to know for sure.
 
It is technically possible, although you need to write the code yourself. What you need to do is:

1) Write your own bootloader code that speaks a bootloader protocol (such as HalfKay) over the serial port of your choice.
2) Build a version of this code that fits in SRAM only, and is linked to be relocated in SRAM, not flash.
3) Load the SRAM bootloader code.
4) Make sure all interrupt vectors are re-vectored to your SRAM version, not flash.
5) Jump to the SRAM bootloader code.
6) Let that code do the bootloading from wherever it's getting its data!
 
You can send the .hex via usb serial

Thanks for the link! Although, if you already have USB, chances are good that you can run the default Teensy programmer. It's more interesting when using UART serial, or perhaps something like I2C, to send the .hex. (I'm sure the link can be modified as appropriate for that use case.)
 
Part of the thread does describe sending the hex over usb serial via your program code not the boot loader, so can easily be adapted to send the .hex via any method you want :) One massive advantage is the minitan boot loader chip is not involved and not actually even needed on your custom board! I use it my self for DFU using my own firmware branded firmware updater not the default teensy one.
 
Status
Not open for further replies.
Back
Top