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

Thread: Uploading hex files via teensy_loader_cli without pressing the reset button

  1. #1

    Uploading hex files via teensy_loader_cli without pressing the reset button

    I want to upload hex files to a Teensy 3.6 with the command line tool teensy_loader_cli. Everytime I upload something I have to press the reset button on the board.
    Is there a way to upload hex files without pressing the reset button?

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    1,418
    Quote Originally Posted by donkeyOfDeath View Post
    I want to upload hex files to a Teensy 3.6 with the command line tool teensy_loader_cli. Everytime I upload something I have to press the reset button on the board.
    Is there a way to upload hex files without pressing the reset button?
    Download without pressing the program button ('reset' button does not exist) requires the program to be compiled with USB (e.g. USB-Serial).
    I frequently use the teensy_loader_cli and under normal circumstances I hardly need to press the program button.
    However, sometimes the PC is TOO SLOW (busy with other USB devices, e.g. disks) and teensy_loader_cli has difficulties to establish connection.

  3. #3
    Senior Member KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    2,964
    What command line options have you tried?

  4. #4
    To upload hex-files I use a Pi to which a temperature senor is connected via USB. Could this be part of the problem? I nearly always have to press the button to upload.

  5. #5
    I did not try -n und -r but for -r I would need another Teensy which I don't have. What happens if I pass the option -n?

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,386
    Run teensy_reboot first. You can find a copy in Arduino's hardware/tools folder.

    There is *never* a perfect guarantee of a reboot into bootloader mode without the button press. If your code disables interrupts or stays in a low power mode or shuts off the USB hardware, teensy_reboot will not be able to communicate with your code to request the reboot.

    Every Teensy is made with a pushbutton dedicated only to entering programming mode, because these scenarios are possible. The only way to recover if your program prevents USB communication is a physical button press... or pulling the Program pin low, which is all the button really does.

  7. #7
    Quote Originally Posted by PaulStoffregen View Post
    Run teensy_reboot first. You can find a copy in Arduino's hardware/tools folder.

    There is *never* a perfect guarantee of a reboot into bootloader mode without the button press. If your code disables interrupts or stays in a low power mode or shuts off the USB hardware, teensy_reboot will not be able to communicate with your code to request the reboot.

    Every Teensy is made with a pushbutton dedicated only to entering programming mode, because these scenarios are possible. The only way to recover if your program prevents USB communication is a physical button press... or pulling the Program pin low, which is all the button really does.
    As I mentioned I am uploading the sketches from a Pi. It shouldn't be a problem to pull the Program pin low via the GPIO pins of the Pi or am I mistaken?

  8. #8
    Quote Originally Posted by PaulStoffregen View Post
    Run teensy_reboot first. You can find a copy in Arduino's hardware/tools folder.

    There is *never* a perfect guarantee of a reboot into bootloader mode without the button press. If your code disables interrupts or stays in a low power mode or shuts off the USB hardware, teensy_reboot will not be able to communicate with your code to request the reboot.

    Every Teensy is made with a pushbutton dedicated only to entering programming mode, because these scenarios are possible. The only way to recover if your program prevents USB communication is a physical button press... or pulling the Program pin low, which is all the button really does.
    What is the best way to get the "teensy_rebbot" programm on my Pi. I am using Rasbian jessie Lite. I already tried a few things and nothinig seemed to work.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,386
    Quote Originally Posted by donkeyOfDeath View Post
    What is the best way to get the "teensy_rebbot" programm on my Pi.
    Run the Teensyduino installer, which involves having a copy of Arduino (downloaded from Arduino.cc) for the installer to modify.

    Then just look in Arduino's hardware/tools folder. Easy peasy!

Posting Permissions

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