Teensyduino 1.58 Released

Hello,
here is the screenshot of the "preference" in Arduino 2.2: see attachment. PreferenceScreenShot.jpg
 
and in the board selection, there seem to be an error to fetch the file "Arduino_BuiltIn:1.0.0."
"Error: 13 INTERNAL: Can't download library: Get "https://downloads.arduino.cc/libraries/github.com/arduino-libraries/Arduino_BuiltIn-1.0.0.zip?query=install-builtin": Forbidden"Board selection.jpg
 
I thus downloaded "manually" that zip file, using a browser.
from the "readme" in that zip file, I went to
https://arduino.github.io/arduino-cli/0.32/library-specification/#library-metadata
I am not shure to understand what to do "manually"
What should I do with this zip file ?

I run into this if I use the sledghammer approach to delete the data in the roaming user Arduin... (Would have to look up the path again, in the first message of my thread for released ide/cli 2...)

What I do is ignore it, and usually simply close out the browser and restart it again... I doubt you use many of the Arduino built in libraries.

If you then have not already done so, you should open up the boards, scroll down or search for teensy and install it.
Screenshot.png
 
I run into this if I use the sledghammer approach to delete the data in the roaming user Arduin... (Would have to look up the path again, in the first message of my thread for released ide/cli 2...)
What I do is ignore it, and usually simply close out the browser and restart it again... I doubt you use many of the Arduino built in libraries.
If you then have not already done so, you should open up the boards, scroll down or search for teensy and install it.
View attachment 31089

I did not delete data in the roaming user Arduin
I tried to un-install Arduino IDE 2; then reinstall.
Same problem encountered: no teensy boards availlable in the "board" section. (even after restarting the IDE)
error messages:

Platform arduino:avr@1.8.6 already installed
Downloading Stepper@1.1.3
Stepper@1.1.3
Failed to install library: Arduino_BuiltIn:1.0.0.
Error: 13 INTERNAL: Can't download library: Get "https://downloads.arduino.cc/libraries/github.com/arduino-libraries/Stepper-1.1.3.zip?query=depends": Forbidden

*
Could not install Arduino_BuiltIn library: Error: 13 INTERNAL: Can't download library: Get "https://downloads.arduino.cc/libraries/github.com/arduino-libraries/Ethernet-2.0.2.zip?query=depends": Forbidden

Error downloading index 'https://downloads.arduino.cc/libraries/library_index.tar.bz2': Get "https://downloads.arduino.cc/libraries/library_index.tar.bz2": Forbidden Get "https://downloads.arduino.cc/packages/package_index.tar.bz2": Forbidden: https://downloads.arduino.cc/packages/package_index.tar.bz2 Get "https://downloads.arduino.cc/libraries/library_index.tar.bz2": Forbidden: https://downloads.arduino.cc/libraries/library_index.tar.bz2

So how to circumvent the "Forbidden" status ? at what level might it be "forbidden" ?
 
@FX78 - I would suggest that you also post on the Arduino forum: https://forum.arduino.cc/c/software/ide-2-x/93

Forbidden, Sounds like the system is not allowing you to write some files to some location on your disk.
Probably where your Arduino15 directory is located. Mine on my Windows 11 machine is at: C:\Users\kurte\AppData\Local\Arduino15
Obviously substitute your username for kurte...

Maybe Virus protection software, it not allowing this?

But again, if you post this on the Arduino forum, the main person up there (ptillisch) or PerT who is sometimes on this forum, will probably have you go through some steps to post additional information, which helps localize the issue. You can find an example of this in the recent post: https://forum.arduino.cc/t/ide2-fails-to-start/1125482/2
 
@FX78 - I would suggest that you also post on the Arduino forum: https://forum.arduino.cc/c/software/ide-2-x/93

Hello,
I will follow your advice of alternate forum posting.

notes:
All the tests I did (described previously)were done as "administrator" on my laptop.
I checked the location for the install directory of the Arduino 2; it is located at C:\Program Files\Arduino IDE
I found also an empty 'Arduino IDE' directory in C:\Users\Administrateur\AppData\Local\Programs\
I just tried deleted that empty directory, but no change resulted in the behaviour of Arduino IDE upon launching it

I also have on my laptop an older install (still operational) of Arduino IDE 1.8.13, at
C:\Program Files (x86)\Arduino
 
I see you posted over there, Hopefully he will be able to spot what is going on and give you a proper fix.
Is there a reason you are running as administrator? Not sure if that is the issue.

In the past, like earlier on in their beta release cycle, if I ran into an issue, like this I ended up using a sledgehammer approach for a fix, which I would not necessarily suggest here.
That is to try to get it to install to a totally clean setup. That is something like:

a) uninstall/reinstall the IDE. hopefully that is sufficient. (Sounds like you already did this approach)..

b) uninstall ide, wipe out everything from %temp% - or at least everything that appears to be Arduino related. (anything with the word arduino in the name and *.clangd ...
reinstall probably won't fix this one...

c) uninstall... Plus remove the current Arduino15 directory, for me that is at: C:\Users\kurte\AppData\Local\Arduino15 Note, this will screw up your Arduino 1.x installs, For things like what is installed through the boards manager... (So I would not necessarily delete it, but temporarily rename it to something else as a test. and reinstall...

d) like c) except also get rid of the old sketch folder (again probably just rename it)... This helped me during the beta, as I had/have some board types installed through sketch folder
<sketch folder>/hardware and at least at one point there was a version of ESP32 install that caused issues. Also potentially issues with libraries and the like.

So again hopefully PerT (ptillisch) will see what is going on and give you a better solution.
 
The other week a user had an IDE 2 issue where IDE install was for 'ALL USERS' - there were some issues that went away just doing 'this user' install and running it from that account.

May not relate - but when a note was made - and install changed that user problem went away.
 
The other week a user had an IDE 2 issue where IDE install was for 'ALL USERS' - there were some issues that went away just doing 'this user' install and running it from that account.

May not relate - but when a note was made - and install changed that user problem went away.

I had indeed done the install "for all users".
I just uninstalled, then re-installed "just for me";
But I bump into the same problem.
 
I see you posted over there, Hopefully he will be able to spot what is going on and give you a proper fix.
Is there a reason you are running as administrator? Not sure if that is the issue.

In the past, like earlier on in their beta release cycle, if I ran into an issue, like this I ended up using a sledgehammer approach for a fix, which I would not necessarily suggest here.
That is to try to get it to install to a totally clean setup. That is something like:

a) uninstall/reinstall the IDE. hopefully that is sufficient. (Sounds like you already did this approach)..

b) uninstall ide, wipe out everything from %temp% - or at least everything that appears to be Arduino related. (anything with the word arduino in the name and *.clangd ...
reinstall probably won't fix this one...

c) uninstall... Plus remove the current Arduino15 directory, for me that is at: C:\Users\kurte\AppData\Local\Arduino15 Note, this will screw up your Arduino 1.x installs, For things like what is installed through the boards manager... (So I would not necessarily delete it, but temporarily rename it to something else as a test. and reinstall...

d) like c) except also get rid of the old sketch folder (again probably just rename it)... This helped me during the beta, as I had/have some board types installed through sketch folder
<sketch folder>/hardware and at least at one point there was a version of ESP32 install that caused issues. Also potentially issues with libraries and the like.

So again hopefully PerT (ptillisch) will see what is going on and give you a better solution.

Yes, I re-posted at https://forum.arduino.cc/t/arduino2-1-0-teensyduino-1-58-problem/1127091/3
Following the instructions of ptillisch, I then pasted the PowerShell debugging printout upon starting Arduino IDE.

So I am now waiting for his feedback
 
Is there a reason you are running as administrator? Not sure if that is the issue.

Actually, that was a rookie mistake I did when I started using that new laptop: running everything as admin.
But now I am kind of stuck into this silly/dangerous configuration; moreover the userdata of the account is now filling a major chunk of the hard drive.
I did not find any tutorial on how to duplicate and then downgrade the copied account towards a "standard user" account , while preserving all install / user data for the "standard account". (and and leave the "admin account" for admin purpose only)
 
I'm clueless why it ends this way

OK, I'm seriously starting to despair and harbour a certain hatred towards Teensy 4.1.

I have a personal laptop and a work laptop.

I've installed this release many times under both types of Arduino IDE and also PlatformIO. It works fine a moment (as long as you keep the computer on) but in the end, even after uploading into teensy seems ok, I no longer get access to the USB ports (I use DUAL). Once that happens, I'm then forced to go through the long process of pressing the button (a visceral hatred for whoever came up with the idea for such a long time...) and waiting for the red LED I get after releasing to go out eons of seconds later. But even doing so, the issue is still there.

Because my personal laptop may be ageing, there is a probability its USB ports make life difficult. So I decided to install Arduino 2 and this release on my work laptop. It works fine almost a month but now I'm getting the same trouble.

I'm totally clueless about what happens.

Note that if I unplug T41, then plug it again, I get fast red led blinking during one or two seconds then no LED at all (and no available USB ports including the one you need for Arduino to upload).

It drives me completely mad.
 
Last edited:
Basically, I had to retrograde to 1.56 or 1.57 to get back the things running fine. When I try to get back 1.58.1 and when I don't have the compile error due to a missing "compile_helper" file, I lost the access to USB ports again. ***SIGH***


Windows 10, Arduino 2.1.1.

EDIT:
I get the issue with both 1.58.0 and 1.58.1.
 
Last edited:
Oh that is frustrating indeed. I really want to help, but I hope you can understand how impossible that is when I can't even see the problem, not to mention have enough info to reproduce it. I can't even tell if your laptops are MacOS, Windows or Linux.

If I can reproduce the problem on a Teensy here with one of my computers, I can usually get to the bottom of what's wrong.

On the long delay, indeed that is my doing. Since it completely destroys whatever program you loaded, the design tries to make it as unlikely as possible to be triggered by mistake. Maybe 5 or 10 seconds would have worked ok. But 15 was chosen, with a 4 second window, for the goal of safety. Once triggered, the erase process is indeed very slow. Unfortunately it can't be fast because the main process is put into JTAG boundary scan mode. That's how it's able to gain access to the flash memory even when everything has gone wrong. The boundary scan shift register is hundreds of bits and the entire thing has to be loaded just to change any pin. A *lot* of pin changes are needed. And the flash memory itself is pretty slow for erasing even without extremely inefficient I/O to access it. Normally you don't see this slowness so much because the bootloader only erases the first 512K plus any more your program actually used. But the restore process wipes all 8MB because it's meant to give a 100% sure way to recover from any unknown problem.

In the world of Arduino boards, some like Arduino Uno have a dedicated USB chip. This really limits the features (pretty much only serial) and speed you can achieve. Usually flow control isn't used between the USB chip and processor, so you can lose incoming data if it arrives too quickly. But the USB port is very stable, because no matter what your program does, the separate USB chip keeps running.

Boards like Teensy have native USB running directly on the main processor. You can make it do all sorts of different USB types, and the performance is excellent. The problem with this much control over USB is it can go very wrong if your program crashes or does things incorrectly in a way that affects the on-chip USB.

Sounds like something is indeed going very wrong, so badly that the USB stops working. It might even be a case where the USB did something that confuses your PC's USB drivers. But those problems are pretty rare in modern times, as they mostly happened with pre-10 versions of Windows. Even with all the code, these types of problems can be tough to diagnose. But if you're willing to share more info, I'd like to at least try to help.
 
when I don't have the compile error due to a missing "compile_helper" file

This type of error usually happens when Windows Defender or other overly zealous anti-virus software decides to delete or "quarantine" a file with was supposed to be installed. These false positives are unfortunately very common.

Maybe try searching for ways to exclude the {AppData}/Arduino15 folder? Or just temporarily disable it. I personally use Linux and have little experience with Windows, so I can't say exactly how to do this. But it is an extremely common problem which Google and other search can turn up lots of helpful articles.

Once it's disabled or excluded, then reinstall Teensyduino (or just switch back and forth between versions, which reinstalls all the files).
 
Well for now I was just expressing my frustration and I'm well aware that long duration shouldn't be a problem because it shouldn't be a common occurrence.

"compile_helper": ok, I understand. I indeed removed then reinstalled to overcome it.

I was hoping stable 1.59 will be out because I want c++17 and a more recent compiler. I had to retrograde my c++ code to work with 1.57 but c'est la vie!

It looks like once I get the issue then whatever I used as a sketch (DoubleEcho for instance by using SerialUSB1 instead of Serial1), the issue stays the same (after you need to clear FW to get USB hid then upload). The situation goes better if I retrograde to 1.57 (but stll need to clear FW).

Of course, I can give you my original sketch (tZZ80.ZEXALL - emulation test of a virtual Z80) if you want to test (you only need a standalone T41, no special PCB).

I could also give you the HEX file.
 
Oh that is frustrating indeed. I really want to help, but I hope you can understand how impossible that is when I can't even see the problem, not to mention have enough info to reproduce it. I can't even tell if your laptops are MacOS, Windows or Linux.

It was already given before your post: "Windows 10, Arduino 2.1.1". Do you need more info? The one giving headache is Teensy 1.58.1. Mostly: Dual Serial, 816MHz, Small code.
 
It was already given before your post: "Windows 10, Arduino 2.1.1". Do you need more info? The one giving headache is Teensy 1.58.1. Mostly: Dual Serial, 816MHz, Small code.

I am pretty sure that Paul was responding to your earlier post. Your post that mentioned Windows 10 was only posted a couple of minutes after your post with that information.

I know I have posted about that error before. How I hit it before:
I was using the IDE 2. And then I see that a new release comes out and I decide to install it. It typically installs OK and it uninstalls the previous version.
But you have the Teensy app still running, as the window is hidden in the background. So, the uninstall cannot remove that file and your left with that version of the tools directory, with just Teensy.exe in it. Then if you try to reinstall a version that this happened to. When the Arduino install runs, it sees that version of the tools directory is there, and assumes everything is fine and does nothing. So, you try to compile, and all the tools are gone.

How I resolved this:
Go to where Arduino installs these tools, in my case this is at:C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\tools\teensy-tools
My guess is that most users probably are not "kurte" so probably need to change this ;)

Look at the subdirectories. in my case now there is only 0.59.3,
Screenshot.png

Delete all the directories you find that have just Teensy.exe in it.

Then, make sure Teensy.exe is not running and reinstall the version of Teensyduino you want. Either by selecting a different version to install and then reinstall the correct version. Or uninstall Teensy boards and reinstall.

Paul: - When the Teensy boards are being installed, do you have any control, either some Teensy specific install application or something in the scripts, that can run that detects that Teensy.exe is running and kill the process? I am trying to remember if there is an open Issue or not on the Arduino IDE or CLI that it should not silently fail to uninstall the directory and alert the user and hopefully have an ability to do a retry.

Also unclear if this is Windows specific or not.

Kurt
 
Ok, it makes sense. So I guess I must close the Teensy application first then I can Remove/Update/Install a package.

Now I'm back to my personal laptop (again, Windows 10, Arduino IDE 2.1.1) and if I retrograde to 1.57.2, tzz80-zexall runs fine on my T41 and I can see the zexall messages from USB serial. So for now, I continue with 1.57.2.

There seems to have a condition which triggers a USB malfunction with 1.58.x. Once the condition is triggered, I'm unable to upload a FW compiled in 1.58.1 revision whenever I tried to reinstall that revision. I was wondering whether using Teensy Tools 1.57.0 instead of 1.58.0 may lead to a different behavior but the result is no better.
 
Paul: - When the Teensy boards are being installed, do you have any control, either some Teensy specific install application or something in the scripts, that can run that detects that Teensy.exe is running and kill the process?

As far as I know, Arduino CLI / IDE doesn't provide any way to run a cleanup program or script.

I do recall during the IDE2 beta there was talk about a script to install INF "drivers". But I can't find any mention of it in Arduino's latest platform specification or package index specification.


I am trying to remember if there is an open Issue or not on the Arduino IDE or CLI that it should not silently fail to uninstall the directory and alert the user and hopefully have an ability to do a retry.

As recall you brought it up at least once, but it was quickly dismissed as off topic either because it was only a comment on some other issue, or it was on the IDE issue tracker when Arduino sees this as a CLI issue.

Would be ideal if Arduino would add a "cleanup before uninstall" recipe to platform.txt. Or maybe it belongs in the package index spec rather than platform.txt, perhaps because it would apply to uninstall of a particular "tool" rather than the "platform" or "package" (so many Arduino-defined nouns to remember specific meanings....)

Maybe before we try approaching the Arduino developers with proposal on their issue tracker we should try to get Per's opinion? His input could help save everyone's time and avoid taking up Arduino developer attention with a request that doesn't fit with their design philosophy. Pretty sure he's not actively watching this forum. Maybe better to first try discussing on Arduino's forum?
 
Ok, it makes sense. So I guess I must close the Teensy application first then I can Remove/Update/Install a package.

Now I'm back to my personal laptop (again, Windows 10, Arduino IDE 2.1.1) and if I retrograde to 1.57.2, tzz80-zexall runs fine on my T41 and I can see the zexall messages from USB serial. So for now, I continue with 1.57.2.

There seems to have a condition which triggers a USB malfunction with 1.58.x. Once the condition is triggered, I'm unable to upload a FW compiled in 1.58.1 revision whenever I tried to reinstall that revision. I was wondering whether using Teensy Tools 1.57.0 instead of 1.58.0 may lead to a different behavior but the result is no better.
If it were me, I would use the hard core sledgehammer approach.

Go into Arduino IDE: And uninstall Teensy boards.
Reboot machine to make sure nothing running.
Look in the Arduino15 directory I mentioned in my case: C:\Users\kurte\AppData\Local\Arduino15\packages
And if it existed, I would delete the Teensy directory.
Then I would look up Arduino IDE 2.1.1 or the like and go to board manager and install the Teensy version you want.

And hopefully everything works. If not, I would go to the next step of do like above and before reinstalling, I would delete some cache information.

I would probably remove stuff out of the temp directory:
stuff in the logical directory: %temp%\arduino

Then their bigger cache of data: C:\Users\kurte\AppData\Roaming\arduino-ide
Obviously change the user name... When you do delete this directory, Arduino will reload a bunch of stuff when it starts up.
 
There seems to have a condition which triggers a USB malfunction with 1.58.x. Once the condition is triggered, I'm unable to upload a FW compiled in 1.58.1 revision whenever I tried to reinstall that revision. I was wondering whether using Teensy Tools 1.57.0 instead of 1.58.0 may lead to a different behavior but the result is no better.

Could you share the 1.58.1 compiled code which (maybe) causes this problem? I'll try loading onto a Teensy 4.1 using my Windows 10 test machine.

Minimal would be just the .hex file.

Better would be both the .hex and .elf file. (might need to put them into .zip to attach to a message on this forum)

Best would be .hex and .elf and all the source code and list of the specific libraries / versions used.

Even with only the .hex file, I could give it a try here on a Teensy 4.1 and see if I can reproduce the problem.
 
As far as I know, Arduino CLI / IDE doesn't provide any way to run a cleanup program or script.

I do recall during the IDE2 beta there was talk about a script to install INF "drivers". But I can't find any mention of it in Arduino's latest platform specification or package index specification.

Here it is:

https://arduino.github.io/arduino-cli/latest/platform-specification/#post-install-script

Starting from Arduino IDE 2.0.4 / Arduino CLI 0.31.0 there is also now support for including post-install scripts in tool archives:

https://github.com/arduino/arduino-cli/pull/2075
 
Back
Top