Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Updating Teensy in an Embedded System

Hybrid View

  1. #1
    Junior Member
    Join Date
    May 2021
    Posts
    2

    Updating Teensy in an Embedded System

    Good morning,

    First off, I must say that designing a product based on the Teensy 3x and 4x boards has been wonderful. I'm coming from an ESP32 background, but this particular project benefits from Teensy's raw power and its DMAChannel abstraction. This application actually has a host system on board (raspberry pi zero) connected via traces to the serial pins on both ends. My question is mostly around field upgrades to the firmware. In ESP32 land, I'd also the boot/enable pins to be able to get the device into flash mode, then use a command line tool to blast the new image via serial. Is there not a similar process for Teensy? I recall there being key differences in the way the bootloader handles things. It'd be nice to be able to package updates on a single source (like a USB stick) and then the system could handle updates on both the pi and the Teensy. I'm thinking teensy_loader_cli with a hex file can/should be used in this case?

    Just confirming my approach with people more knowledgeable!

    Right now, I've designed things on Teensy 3.6, but will also be testing out Teensy LC with our current workload.

    Thanks!
    James

  2. #2
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    682
    The only official way to upload code is via the Teensy USB port. If you have the Teensy USB plugged into the Raspberry Pi, that seems like it would be the most straightforward approach, use the hex file and the teensy_loader_cli running on the Pi to issue the update. Otherwise, search the site for "over the air updates" for a lot of homebrewed options.

  3. #3
    Seconding brtaylor's comment. Since you have the R-Pi in the system, much better to use it, especially if you plan to go from Teensy 3.6 to Teensy LC.

  4. #4
    Junior Member
    Join Date
    May 2021
    Posts
    2
    Bummer.

    So I guess I'll either have to:
    1. Design some alternate OTA process that uses the upper half of flash and some bootstrap code with sanity checking, etc.
    2. Include a USB cable with the kit to have the user connect between the boards, or leave it connected from the factory.
    3. Migrate away from the stock Teensy 3/LC boards and either back to the ESP32 (port the code) or do my own spin based on the MKL02.

    Oh well, is what it is I guess. Perhaps this is one of the things that the MKL02/DIY teensy things were meant to address.

  5. #5
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    682
    For custom boards, the MKL02 needs to be purchased from PJRC. Same limitation of the USB based firmware upload. The nice thing is that if you spin your own Teensy board and use a Raspberry Pi compute module, then the USB trace between the Teensy and Raspberry Pi can be completely implemented on the PCB - no cable needed and you can end up with a very compact integration of the two.

  6. #6
    dropshot, if you're okay with the "upper half of flash" approach, see the link below for a solution for T3.x. The reason I wanted it was the same as yours, i.e. to be able to update an embedded system remotely.

    https://forum.pjrc.com/threads/43165...-amp-3-6/page3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •