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

Thread: command line loader utility (no button press)

  1. #1
    Junior Member
    Join Date
    Jun 2017
    Location
    Phoenix
    Posts
    3

    command line loader utility (no button press)

    Hello all!

    Is it possible to use the command line loader utility without needing to press the program button to start an update?

    I have a teensy 3.2 buried in a machine and it's a real pain to get to it whenever I need to update the code. The only external connection I have to the board is the USB cable.

    Thanks!

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,543
    What are you using to program the Teensy with?

    One obvious solution is to use Arduino IDE...

    Another option is to use the Teensy loader CLI stuff: https://www.pjrc.com/teensy/loader_cli.html You will need to get the Teensy to reboot. Could probably use one of the tools installed with Teensy.

    You could use the TyTools: https://github.com/Koromix/tytools

  3. #3
    Junior Member
    Join Date
    Jun 2017
    Location
    Phoenix
    Posts
    3
    Eventually the Teensy will be connected to a headless Beaglebone Black.

    The Teensy loader CLI stuff is what I'm trying to get working. I have compiled it on the Beaglebone and it will program the Teensy board. But, like i said, I need to press the program button in order for it to work.

    Even using the Arduino IDE on my Linux host usually requires pressing the program button to start the upload. Sometimes it will start automatically but most of the time it does not.

    What I would like to be able to do is:
    1) compile the code on my host system
    2) ssh to the Beaglebone
    3) copy the new hex file over
    4) use the CLI tool to upload the new hex file to the Teensy (without neededing to press the button)
    5) have the Teensy reboot automatically to start the new code

    So far I have not been able to get this to work.

    At first glance the Ty Tools do not seem to be anything that would help with my setup.

    Any other ideas?

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,543
    Ty Tools allows you to do things like:
    Code:
    tycmd reset -b
    To act like you pressed the button on the Teensy

    and
    Code:
    tycmd upload <filename.hex>
    To upload a hex file to the Teensy...

    Note: I often have TyCommand setup to be used by the Arduino IDE...

    But your millage may differ. Have not used a beagle bone black for quite a few years now. So not show how hard it would be to make work...

  5. #5
    Member
    Join Date
    Jun 2018
    Location
    Northeast USA
    Posts
    25
    Probably a little late for this, but.....
    first get your MCU from the list produced by: teensy_loader_cli --list-mcus
    then use the -s switch
    Usage: teensy_loader_cli --mcu=<MCU> [-w] [-h] [-n] [-b] [-v] <file.hex>
    -w : Wait for device to appear
    -r : Use hard reboot if device not online
    -s : Use soft reboot if device not online (Teensy3.x only)
    -n : No reboot after programming
    -b : Boot only, do not program
    -v : Verbose output

    Like so: teensy_loader_cli --mcu=mk20dx256 -v -w -s LIDAR.hex

Posting Permissions

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