teensy_loader_cli executable for windows?

PhilK

Member
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!
 
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.
 
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},
[COLOR="#FF0000"]	{"TEENSY41",  8126464,  1024},[/COLOR]
#endif
	{NULL, 0, 0},
};
 
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.
 
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.
 
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.
 
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.
 
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,
 
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-tSnrXEjOte0xtQ9-XpZSLgJ7QP03TrL/view?usp=sharing
 
do you know if there's a way to specify the com port? what happens if I have multiple teensys plugged in at once?
 
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.
 
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:
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.
 
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
 

Attachments

  • Teensy_loader_cli.zip
    11.1 KB · Views: 73
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.
 
Back
Top