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

Thread: teensy_loader_cli with multiple Teensys connected

  1. #1

    teensy_loader_cli with multiple Teensys connected

    My system will have multiple Teensy 4.1 boards connected over USB at the same time, on a PC running Ubuntu. I need to deploy a (python) script to update the code running on all the Teensys.

    What I have working (now) is a method to update one of them, when no other Teensy's are connected. I started with one, I haven't yet tried scenario where there are multiple.

    The problem i see is that teensy_loader_cli doesn't support setting a target for connection. As I understand from researching this topic, teensy_loader_cli will scan the USB devices and update the first one it finds.

    While researching this solution, I thought of the idea if I could send a command to the Teensy to reboot into the bootloader, and then run teensy_loader_cli, it would find the device that I just put into the bootloader. But I could not find a software method to put the Teensy into bootloader. I already have method to send the Teensy commands. What I did implement is to set SCB_AIRCR = 0x05FA0004; but this seems to cause a reset, and not jump to bootloader. I found the page on how to set Teensy 1.0 and 2.0 into bootloader, but not teensy 4.1. I am not sure if setting one of the attached Teensy's into bootloader would make it the target of teensy_loader_cli (while the other Teensy's would be running an application, and they all have a serial port opened to the PC).

    Looking for general guidance, from which I could probably resolve the details.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,708
    Not seeing that T_4.x has a jump to bootloader - least not found or used here.

    Try this tool by @koromix: pjrc.com/threads/27825-Teensy-Qt
    > for a normal T_4.x (not encrypted) it should work well.

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,708
    Correction call: _reboot_Teensyduino_();

    That Teensy will enter bootloader and then active Teensy Loader will upload to that Teensy as it changes to RED LED lit.
    Last edited by defragster; 12-07-2022 at 04:20 AM.

  4. #4
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,473
    Years ago, I had the same situation (programming multiple Teensies connected to PC with same code), so I modified a teensy_loader_cli to enumerate first all Teensies on PC, and then downloaded the code to each of them. You can differentiate the different Teensies by their Comport.

  5. #5
    Quote Originally Posted by defragster View Post
    Correction call: _reboot_Teensyduino_();

    That Teensy will enter bootloader and then active Teensy Loader will upload to that Teensy as it changes to RED LED lit.
    This worked for me. Thank you!

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,708
    Great news.

Posting Permissions

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