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

Thread: Restore bootloader after accidently downloading .elf file

  1. #1
    Junior Member
    Join Date
    Jan 2019
    Posts
    6

    Restore bootloader after accidently downloading .elf file

    As the title said, I accidentally downloaded the .elf file instead of .hex file when I was playing around with Makefile based Teensy projects and using the tytools https://github.com/Koromix/tytools

    Now my Teensy 3.1 can't be recognized by either the Teensyduino or the TyCommander tool. I suspect that maybe I have overwritten the HalfKey bootloader? If so, is there a way to restore this bootloade or this Teensy board has been doomed?

    I appreciate for your thoughts or suggestions!

  2. #2
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,224
    Just to make sure: You did press the programming button right? This should always bring the board to a known state.
    If this doesn't help the following procedure might help: Unplug the board, press the programming button and keep it pressed while you plug the board into another USB port (maybe even another PC).

  3. #3
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,914
    HalfKey bootloader cannot be overwritten! It is in a separate chip.

  4. #4
    Junior Member
    Join Date
    Jan 2019
    Posts
    6
    Yes, I tried all the methods you mentioned but unfortunately none of them works. The teensy is still not recognized.

  5. #5
    Junior Member
    Join Date
    Jan 2019
    Posts
    6
    In that case, do you have any insight on my problems?

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,935
    In many cases like this it helps to have additional information, like what type of PC (Windows, Linux, MAC) which version... Also T3.1 or my guess 3.2 unless it is an older teensy.
    Again in most cases rebooting your computer, plugging the teensy in with a known good USB cable, while holding the program button will work. In cases like this I make sure to not have TyCommander window open. I bring up Arduino and bring up simple program like blink, and use the verify command. Which should complete and launch Teensy app. I then press the program button on the teensy and usually the program progess should complete and the teeny will be in the blink state.

    Has anything been modified on it? Or anything plugged in to it?

    If above does not work, then I look at things like verbose information from the Teensy app. If running on Windows I bring up device manager and see if anything shows up when I plug it in and disappear when I unplug it.
    On Linux I do things like: lsusb command, and dmesg | tail type command to see if anything logged. Also if I still have issues I grab a different Teensy and see if it works. Helps to verify that things like my computer or USB cable or... are still working.

  7. #7
    Junior Member
    Join Date
    Jan 2019
    Posts
    6
    Thanks for all the suggestions, KurtE. I am on Ubuntu 18.04 with a Teensy 3.1. I have tried your suggestions on both Linux and Windows 10 but the teensy board still is not recognized. The problems is that it is not event shown under 'lsusb' or in device manager. dmesg | tail also logged no information(I tried with a working Teensy and can see the device connection etc.)

    I check the power on this Teensy board and they appear as expected. I am totally lost at this stage...

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,077
    That board must be very old, since Teensy 3.1 was discontinued about 6 years ago. Maybe time to just call it a loss and replace with a new board?

    And to answer your question, even if it's not very helpful, I'm also at a loss to explain what's gone wrong. But I'm afraid there just isn't much I can do to help in this case.

  9. #9
    Junior Member
    Join Date
    Jan 2019
    Posts
    6
    Indeed the board is old and to be fair we have plenty of new boards to replace. I guess it is mainly because of my curiosity and "natural desire" as an engineer to save a seemingly savable hardware

    Anyway I will move on now and use a new board now.

  10. #10
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,740
    Have not seen it for a very long time - probably still on Windows 7 ??? Before the T_3.6 was a thing ...

    Sometimes a Teensy probably 3.2 would get into an unreachable state - perhaps like this.

    Then doing a simple Blink as KurtE notes on a second Teensy (that can run the same sketch ... 3.2 or 3.1) seemed to remind Windows what a Teensy looked like and how to treat it - then putting the First 'lost' Teensy on as noted with button pressed would program blink on and all was well then.

    If a second T_3.1 or a T_3.2 is on hand - or when one is - perhaps that will get it going.

  11. #11
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,935
    One last thing/possibility...

    By chance did you cut the trace that connects VUSB to VIN... And forget to either add external power or to jumper those two pins...

    In either case, if you have a multimeter, I would check the voltage of VUSB, VIN, 3.3v to see if any power is running to the board...

    I have been there were I pulled out a previous chip and tried it and nothing works... only to find that was one of them I cut that trace.

Posting Permissions

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