Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 33

Thread: teensy_loader_cli executable for windows?

  1. #1

    teensy_loader_cli executable for windows?

    Does anyone happen to have a windows executable for teensy_loader_cli, the Teensy Loader Command Line Interface, that is recent enough to work with Teensy 4.1? I am quite unfamiliar with gcc compiling (which is why I like Teensyduino!)

    Many thanks!

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    174
    Better that this should be provided directly by PJRC. You don't want to run binary code from some random person online. Even if the person is nice (and I suspect most people here are) there is no way of knowing what's going on with another person's computer. All antivirus programs can be bypassed by sufficiently new exploits.

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,009
    not seeing a posted Windows binary - or as part of TD install.

    This doesn't have T_4.1 support :: pjrc.com/teensy/loader_cli.html

    And it isn't here either: github.com/PaulStoffregen/teensy_loader_cli

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,524
    I have not tried it yet, but it might be as simple as adding one line to the sources:
    Code:
    } MCUs[] = {
    	{"at90usb162",   15872,   128},
    	{"atmega32u4",   32256,   128},
    	{"at90usb646",   64512,   256},
    	{"at90usb1286", 130048,   256},
    #if defined(USE_LIBUSB) || defined(USE_APPLE_IOKIT) || defined(USE_WIN32)
    	{"mkl26z64",     63488,   512},
    	{"mk20dx128",   131072,  1024},
    	{"mk20dx256",   262144,  1024},
    	{"mk66fx1m0",  1048576,  1024},
    	{"mk64fx512",   524288,  1024},
    	{"imxrt1062",  2031616,  1024},
    
    	// Add duplicates that match friendly Teensy Names
    	// Match board names in boards.txt
    	{"TEENSY2",   32256,   128},
    	{"TEENSY2PP", 130048,   256},
    	{"TEENSYLC",     63488,   512},
    	{"TEENSY30",   131072,  1024},
    	{"TEENSY31",   262144,  1024},
    	{"TEENSY35",   524288,  1024},
    	{"TEENSY36",  1048576,  1024},
    	{"TEENSY40",  2031616,  1024},
    	{"TEENSY41",  8126464,  1024},
    #endif
    	{NULL, 0, 0},
    };

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,009
    Quote Originally Posted by KurtE View Post
    I have not tried it yet, but it might be as simple as adding one line to the sources:
    {"TEENSY41", 8126464, 1024},
    ...
    That's what I saw that showed it 'missing' - but the HTML page is lacking too.

    Also haven't seen the 'Pass PC time to Teensy during upload for RTC' exposed for T_4.x so koromix can put it into TyCommander.

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,524
    Yep - It only adds it in part way... Still don't have any of the information about time, but that is also true for T4...

    Would also be good to update the Readme file and website as well.

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,009
    Quote Originally Posted by KurtE View Post
    Yep - It only adds it in part way... Still don't have any of the information about time, but that is also true for T4...

    Would also be good to update the Readme file and website as well.
    Maybe flash uses block size over 1024 and programming fails?

    Indeed - already copied post #3 above about website to the web edit needed thread.

  8. #8
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,524
    I did a quick and dirty and added the entry and build on RPI and was able to program a T4.1 with a simple fast blink program.

    I also updated Readme file: https://github.com/PaulStoffregen/te...er_cli/pull/61

  9. #9
    Junior Member
    Join Date
    May 2019
    Posts
    3
    it would be very appreciated if pjrc offered this package compiled for windows. It is not a trivial task.

    I have tried to compile it using msys + mingw and I get errors because it cannot find the usb headers.

  10. #10
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Santa Fe, NM
    Posts
    764
    Quote Originally Posted by jtorre View Post
    it would be very appreciated if pjrc offered this package compiled for windows. It is not a trivial task.

    I have tried to compile it using msys + mingw and I get errors because it cannot find the usb headers.
    I have it here:
    https://gitlab.com/bolderflight/soft...ree/main/tools

    EDIT: Oops, that would be compiled for the 3.x, I haven't made the modifications for the Teensy 4.x yet.
    Last edited by brtaylor; 01-03-2021 at 08:38 PM.

  11. #11
    Junior Member dbuergin's Avatar
    Join Date
    Dec 2020
    Location
    Switzerland
    Posts
    8
    You can take my one, works at least for a simple blink example on T4.1: https://forum.pjrc.com/threads/65665...nsy_loader_cli
    But yes, compiling is quite a challange, you need to install VS2019, SDK and WDK on Windows 10, then you have all the headers and all the libs and you have to change a include in the main C-File.

  12. #12
    Junior Member
    Join Date
    Nov 2020
    Posts
    6
    Just a to bump to see if it would be possible to get an official download of this utility for Windows from PJRC? I did spend an hour or so trying to get it compiled with no luck.

    Thank you,

  13. #13
    Junior Member
    Join Date
    Dec 2020
    Posts
    16
    +1 from me, could really use Teensy 4.1 cli tool for windows soon

  14. #14
    Here is a zip of the exe resulting from building teensy_loader_cli. It's essentially a custom version where I merged in changes from other people to get it working with dual serial and a teensy micromod. It should work fine for all the other Teensy boards too.

    Of course, I'm not Paul and I'm not affiliated with PJRC so this is not official and you would have to trust that I really did just add a couple of tweaks for the Teensy MM and nothing malicious. I compiled it with MinGW on Windows. It works for me.

    https://drive.google.com/file/d/1-tS...ew?usp=sharing

  15. #15
    Junior Member
    Join Date
    Dec 2020
    Posts
    16
    oh awesome, thanks!

  16. #16
    Junior Member
    Join Date
    Dec 2020
    Posts
    16
    do you know if there's a way to specify the com port? what happens if I have multiple teensys plugged in at once?

  17. #17
    Junior Member
    Join Date
    Dec 2020
    Posts
    16
    I was able to get this to work but without being able to specify a com port, it seems to just pick the first Teensy it finds. I have four plugged in and was hoping to be able to program them all either in parallel or serially with just one click.

  18. #18
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,009
    Quote Originally Posted by daverlee View Post
    I was able to get this to work but without being able to specify a com port, it seems to just pick the first Teensy it finds. I have four plugged in and was hoping to be able to program them all either in parallel or serially with just one click.
    TYQT aka TyCommander has a GUI and CLI version. Both have the means to ID one of many connected Teensys.

    GUI can upload in parallel, not sure about the CLI version.

    Update from p#23 below:
    A FORUM search for TYQT shows this link: pjrc.com/threads/27825-Teensy-Qt

    First post shows the releases link ...
    Last edited by defragster; 04-07-2022 at 05:38 PM. Reason: add link

  19. #19
    Junior Member
    Join Date
    Dec 2020
    Posts
    16
    cool, but I'm getting burned out trying to figure out what all I need to install in order to compile source code. So if anyone has an executable of tyqt or tycommander, that would be awesome.

  20. #20
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,832
    cool, but I'm getting burned out trying to figure out what all I need to install in order to compile source code. So if anyone has an executable of tyqt or tycommander, that would be awesome.
    https://github.com/Koromix/tytools/releases

  21. #21
    Junior Member
    Join Date
    Dec 2020
    Posts
    16
    fan-freakin-tastic! I love this community

  22. #22
    Junior Member
    Join Date
    Dec 2020
    Posts
    16
    works! just what I needed.

  23. #23
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,009
    A FORUM search for TYQT shows this link: pjrc.com/threads/27825-Teensy-Qt

    First post shows the releases link ...

  24. #24
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,524
    For the heck of it, I thought I would see if I could make a version of the teensly_loader_cli that builds on windows using visual studio.

    For Linux it was easy to build even under windows using the WSL setup, but for Windows...

    I started off with some of the stuff I fumbled through earlier creating test program for RawHid 512...

    Not sure what I will do with it, like if I should try to somehow get this merged into the Teensy_loader_cli project or not.

    Note: I built with Visual Studio 2022, but this also included needing to install additional components, like probably called WDK....

    So not sure how much it will help anyone as I continue to play.

    But was able to get program a teensy 4.1
    Code:
    D:\GitHub\teensy_loader_cli\vs\Teensy_loader_cli\Debug>Teensy_loader_cli.exe -w -v -d --mcu=teensy41 blink_slow_Teensy41.hex
    Teensy Loader, Command Line, Version 2.2 VS
    60000000 - 60005800
    $$
    Read "blink_slow_Teensy41.hex": 22528 bytes, 0.3% usage
    Found HalfKay Bootloader
    Programming...................
    Booting
    Note: This version has a few hacks/extensions in it that I am using to see about supporting CircuitPython as well as maybe Micropython not
    wiping out filesystem.

    So for example in the above output the -d option dumps out the address ranges for what is in the hex file.
    I also have hack option, that tries to fill int he holes in ranges to see if that makes difference.

    Now back to playing
    Attached Files Attached Files

  25. #25
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,009
    Quote Originally Posted by KurtE View Post
    For the heck of it, I thought I would see if I could make a version of the teensly_loader_cli that builds on windows using visual studio.

    ...
    For the heck of it thought I'd see it work ... opps ... VS 2019 ... updating to 2022

    Seems last update was to VScode ... not VS.

Posting Permissions

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