nvalid FQBN: not an FQBN: teensy:avr:teensyMM:usb=serial:usb=serial,speed=600,opt=o2std,keys=en-us
Compilation error: Invalid FQBN: not an FQBN: teensy:avr:teensyMM:usb=serial:usb=serial,speed=600,opt=o2std,keys=en-us
This bug is related to a nice new feature added to Arduino CLI at the request of Paul Stoffregen:
github.com/arduino/arduino-cli
Provide a way to identify board options via pluggable discovery
opened Feb 14, 2022
closed Oct 18, 2022
cmaglie cmaglie
type: enhancement conclusion: resolved topic: code
As per @PaulStoffregen [comment](https://github.com/arduino/tooling-rfcs/pull/2#issuecomment-1029452622):
> How would you feel about extending Board Identification to allow JSON properties to match the menu options, so arduino-cli could know more of the FQBN?
>
> VENDOR:ARCHITECTURE:BOARD_ID[:MENU_ID=OPTION_ID[,MENU2_ID=OPTION_ID ...]]
>
> As I understand Board Identification, today arduino-cli can at best report the "VENDOR:ARCHITECTURE:BOARD_ID" portion of FQBN, because the spec only defines board.txt entries for matching the main part of FQBN.
>
> If the Board Identification part of spec were extended slightly to specify boards.txt entries such as
>
> {boardname}.menu.{menuname}.{menuoption}.upload_port.{identifier}=Value
> {boardname}.menu.{menuname}.{menuoption}.upload_port.#.{identifier}=Value
>
> then a discovery tools capable of detecting which menu options where used could report properties to match those lines. Future arduino-cli could use this property matching to give a more complete FQBN for the detected hardware. Then in an even farther future, the IDE could utilize the more specific FQBN to initialize those menu options when a user clicks the port+board from the toolbar's drop-down list.
I think it could be implemented exactly as described above.
The CLI is able to identify the board definition associated with a port based on properties returned by the pluggable discovery tool. Previously, it could only determine the base board identity (e.g., teensy:avr:teensyMM), and not the custom configuration of the board you make via the additional Tools menu items in the IDE such as Tools > USB Type. It is now possible for these custom board options to be identified as well.
Unfortunately, even though the feature is working correctly in Arduino CLI, we missed that the Arduino IDE code was making an assumption that the FQBN provided by Arduino CLI would always have the simple teensy:avr:teensyMM form.
As you discovered, the workaround is to always select the board from the Tools > Board menu in the Arduino IDE. When you do that, you are setting the board selection manually instead of using the FQBN automatically determined from the port data returned by the discovery tool.
Note: You can still compile, just simply select the appropriate Teensy in the Tools menu as well as the port...
The issue far as I can tell limited to clicking on the drop down list.
Downloading packages
teensy:teensy-tools@1.57.0
teensy:teensy-compile@5.4.1
[B][COLOR="#006400"]teensy:teensy-discovery@1.57.1[/COLOR][/B]
teensy:teensy-monitor@1.57.0
teensy:avr@1.57.0
Installing teensy:teensy-tools@1.57.0
teensy:teensy-tools@1.57.0 installed
Installing teensy:teensy-compile@5.4.1
teensy:teensy-compile@5.4.1 installed
[B][COLOR="#006400"]Installing teensy:teensy-discovery@1.57.1[/COLOR][/B]
teensy:teensy-discovery@1.57.1 installed
Installing teensy:teensy-monitor@1.57.0
teensy:teensy-monitor@1.57.0 installed
Installing platform teensy:avr@1.57.0
Configuring platform.
Platform teensy:avr@1.57.0 installed
I do not know how to tell Arduino 2.0.1 to refresh package_teensy_index.json.
I'm also not sure if it will offer an automatic update, or if you have to uninstall and reinstall the Teensy package from Boards Manager.
not clear if Arduino 2.0.1 will stop the old discovery and start the new one
Tool teensy:teensy-tools@1.57.0 already installed
[B]Tool teensy:teensy-discovery@1.57.0 already installed[/B]
Tool teensy:teensy-monitor@1.57.0 already installed
Downloading packages
teensy:teensy-compile@5.4.1
teensy:avr@1.57.0
Installing teensy:teensy-compile@5.4.1
teensy:teensy-compile@5.4.1 installed
Replacing platform teensy:avr@1.58.0-beta2 with teensy:avr@1.57.0
Uninstalling teensy:avr@1.58.0-beta2
Platform teensy:avr@1.58.0-beta2 uninstalled
Uninstalling teensy:teensy-tools@1.58.0-beta2, tool is no more required
Tool teensy:teensy-tools@1.58.0-beta2 uninstalled
Uninstalling teensy:teensy-compile@11.3.1-beta1, tool is no more required
Tool teensy:teensy-compile@11.3.1-beta1 uninstalled
[B]Uninstalling teensy:teensy-discovery@1.57.0, tool is no more required[/B]
Uninstalling teensy:teensy-monitor@1.57.0, tool is no more required
Configuring platform.
Platform teensy:avr@1.57.0 installed
Tool teensy:teensy-discovery@1.57.0 already installed
Tool teensy:teensy-monitor@1.57.0 already installed
Downloading packages
teensy:teensy-tools@1.58.0-beta2
teensy:teensy-compile@11.3.1-beta1
teensy:avr@1.58.0-beta2
Installing teensy:teensy-tools@1.58.0-beta2
teensy:teensy-tools@1.58.0-beta2 installed
Installing teensy:teensy-compile@11.3.1-beta1
teensy:teensy-compile@11.3.1-beta1 installed
Replacing platform teensy:avr@1.57.0 with teensy:avr@1.58.0-beta2
Uninstalling teensy:avr@1.57.0
Platform teensy:avr@1.57.0 uninstalled
Uninstalling teensy:teensy-tools@1.57.0, tool is no more required
Tool teensy:teensy-tools@1.57.0 uninstalled
Uninstalling teensy:teensy-compile@5.4.1, tool is no more required
Tool teensy:teensy-compile@5.4.1 uninstalled
Uninstalling teensy:teensy-discovery@1.57.0, tool is no more required
Uninstalling teensy:teensy-monitor@1.57.0, tool is no more required
Configuring platform.
Platform teensy:avr@1.58.0-beta2 installed
The IDE only offers an automatic update if the installed Teensy platform version is older than the latest version available from the package index. This means you must make a new platform release in order to distribute a new release of a pluggable discovery or monitor tool via the Boards Manager update mechanism.
It will start the new one. It doesn't stop the old one, but it doesn't listen to it either, so the leftover process doesn't affect port discovery.
Seems to have stuck with the "Tool teensy:teensy-discovery@1.57.0 already installed" - yet Uninstalled?
Same going back to TD 1.58b2:
I guess there is probably a different package index for beta testing.
Seems to have stuck with the "Tool teensy:teensy-discovery@1.57.0 already installed" - yet Uninstalled?
Same going back to TD 1.58b2:
Use File > Preferences to edit the addition boards manager URLs. Use https://www.pjrc.com/teensy/package_teensy_index.json (without "td_156").
I added 1.58-beta2 as version 0.58.2. Still only has support for Windows and Linux x86-64. Hopefully by using 0.58.2 it won't get offered as a default choice for anyone.
I'm probably going to delete the old "td_156" package index eventually. Keep 2 of them updates is beyond my maintenance threshold.
even new installs of 1.57.0 should use the new discover
why, I have no idea... but that's what the spec seems to say
Leaving the old one running is probably ok for Teensy. But maybe not such a great design? Especially on Windows, access to many types of system resources is done with exclusive locking access, where keeping the old process running could prevent the new process from gaining access to the Windows system resources it needs to discover connected hardware.
Yes, this package index has the beta versions.
https://www.pjrc.com/teensy/td_156/package_teensy_index.json
I'm considering adding the betas to the main index with version numbers like 0.58.1, 0.58.2, etc. That way everyone can easily access them and hopefully we won't see IDE 2.0.x pushing users to install those versions.
Always interesting tradeoffs... I updated to use the new package with the 0.58.2 and now every time I startup the IDE it tells me that there are outdated boards, would I like to update, and there is the scary part with the option of automatic!
So now two things that I need to double check each time, like updated libraries. As it wants to update my copy of SDFat, which is a junction link to github code base with Teensy version.
(Note there is a wishlist Arduino ide bug on this part.
Will check to see if there is an issue already, for something lik: the ability to say ignore this board update...
the install showed at the botton of the screen and is cut off - almost missed it.
It looks like this bug:
https://github.com/arduino/arduino-ide/issues/1591
I suspected that it would also occur with Boards Manager, but didn't manage to reproduce it there, so I only mentioned Library Manager in the bug report. But both use the same GUI code, so the fix for the Library Manager bug will fix the Boards Manager bug regardless.
The workaround is to increase the width of the side panel a little bit.
After testing, I believe you fixed it!I believe I have a fix for this problem on Windows
Ok, I believe I have a fix for this problem on Windows. If anyone is still watching this thread, please give this teensy-monitor.exe a try. Does it fully solve the problem on your machine?
On my Windows install, the location was C:\Users\{username}\AppData\Local\Arduino15\packages\teensy\tools\teensy-monitor\1.57.0.