NOUSB option for Teensy 2 OR a way to force Arduino IDE 2 to reload boards.txt

popbee

New member
I have a *Teensy 2* project that compiles under Arduino IDE 1.x & Teensyduino by manually adding a new entry for "NOUSB" in `boards.txt`.
I copied some of the USB stack files in the project so I can control exactly the USB descriptors and that also allows me to fix some of the USB stack bugs without touching files outside of the project (other than boards.txt).

Now I am trying to make it work under Arduino IDE 2.x. The first step was to try to modify boards.txt to add a NOUSB menu entry. But sadly, it seems it has no effect, this info seems to be "stored" elsewhere(?).

QUESTION: Is there a way to force the re-reading/processing of this file to alter the menu?

Someone in another post was able to do this by "upgrading the IDE" after installing the Teensy Board. I suppose when that happens AND you already have the board installed it will re-run the board "installation". I'm already at the latest version and couldn't do that so I tried uninstalling/reinstalling but it didn't work. I want to put this project on github with instructions on how to compile it. Right now, they have to install the old Arduino IDE.

Is there something I can do? The only thing I can think of now is to "copy/proxy" the whole Teensy board files in a random host to serve an "altered" version. Not only it's a lot of work, it's not very nice and probably not very legal either! Any other suggestion?

Paul: I always appreciated all the efforts you put into this community. You must be super busy as usual, so fixing good 'old "Teensy 2" issues is probably not a priority. If I can help in anyway?

Regards,
Bernard
 
At the top of the Boards.txt file is a reference to a workaround to make Arduino recognize changes to boards.txt.

Boards.txt workaround

the suggestion there is to delete the file "User Data" That file no longer exists in IDE 2.3.1. The solution is to delete the whole arduino-ide folder. It will take a while on your next opeing of the IDE, but it will be rebuilt and your changes to boards.txt will appear in the menus.
 
You must be super busy as usual, so fixing good 'old "Teensy 2" issues is probably not a priority. If I can help in anyway?

Indeed Teensy 2.0 is pretty much my lowest priority, since it's been discontinued.

If there is indeed a bug in the existing software, and if you can post detailed info including a test case which reproduces the problem, I will consider merging the fix in a future release.

However, absolutely no new features will be added. Any USB Type options not already in the menu would be considered new features.
 
Indeed Teensy 2.0 is pretty much my lowest priority, since it's been discontinued.
I understand. I'm feeling a little sad for the 5 volts peripherals lying around, but hey, such is life.

However, absolutely no new features will be added.
Make sense. I was more after your inner knowledge of the IDE 2.x and how to have it re-read "boards.txt" after a change. I'm convinced you had to dabble with this way more than you originally wanted. For the issue I fixed in the USB stack (related to the host going to sleep), I will consider doing the leg work to make a reproducible case and a proposed fix or PR if feasible for me. I see you have already a whole bunch of PRs to deal with (73 open PRs on the cores repo alone as of this writing). I'm not sure how you manage to do all of this frankly 🤯. Keep up the good work!

mborgerson gave great pointers, so I should be good. Thanks! 🙏

Bernard
 
I just quit and restart the whole IDE. Convenient, no. Simple, yes.
I'm happy this works for your case. I wished it was that simple for me.

For me, restarting the IDE does not update the menus. This is inline with the behavior described in the arduino-ide issue mentioned above. Fortunately, they found a workaround that also worked for me (wiping the whole user data folder & restarting) -- it's not ideal because you have to hunt this hidden folder and it resets some stuff. BUT at least it works. It's not ideal because if I want to publish my project on github, I also have to describe how to "patch" the Arduino installation for the build to work.
 
Back
Top