Disabling program mode when using more than one Teensy?

Hi. Apologies if this is a silly question!

Is it possible to set up a Teensy (in Arduino) to not be programmable until I press the program button?

So until I press it, it just runs it's code and is not programmable ... but if I press the button and upload the sketch again with different settings, it's back to normal programmable mode?

This isn't a blocker for me, but I think it would be helpful when working with more than one Teensy at once.

Thanks.
 
Would it be enough for you to deactivate the auto programming in the Teensyloader?

You have to choose the right port/Teensy in any case. This would prevent to accidently program the wrong device.
 
I remember accidentally causing the reverse of this - I could only program the lone Teensy by pushing the program button, even though USB was working fine

I did this by changing the PRODUCT_ID value in usb_desc.h to a low value like 0x0001

Marc
 
You could find the _reboot_Teensyduino_() function and delete its code.

Finding the correct file on your hard drive can be a challenge. Pay attention to the folder name, as separate code is used for Teensy 3.x vs Teensy 4.x, and you might have multiple copies if you have more than one Arduino IDE installed. I'd suggest to first add a syntax error, then click Verify in Arduino. Actually seeing the error confirms you edited the correct file.
 
TyCommander can be used as SerMon for multiple Teensys and selectively put them in bootloader (without changing any cores file).
Very handy with more than one online - each can have SerMon display in same or new window.
This works with a Verify build.
Also boards.local.txt can be edited and it will prompt for which Teensy - that edit is posted somewhere a time or two. That is only less than ideal when the same sketch name is alternatively sent to multiple units, it will track if name is unique to each.

found that boards.local.txt edit here: https://forum.pjrc.com/index.php?th...r-not-returning-from-upload.73886/post-333937
 
Back
Top