-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adafruit Trinket M0 won't persist port #82
Comments
UPDATE with workaround: The following seems to work around the problem, but it still seems like something isn't right in order for this to matter...
|
hi @rkincaid |
Thanks for the followup. I would note however that this does not seem to occur with the non-pro IDE or with PlatformIO. I ended up moving to PlatformIO/Microsoft Code. |
That's correct. Here's the VID/PID definition for the Trinket M0:
and here for the pIRkey:
So either one will match the automatic board detection. I don't own a Trinket M0, but I was able to reproduce the issue with the "Native USB" port of my Zero by just adding another board definition to the Arduino SAMD Boards boards.txt with the same VID/PID definition but different board ID and name.
That's exactly it. The board resets at the start of the upload and the bootloader runs, which has a different VID/PID, then the upload finishes and the application runs, which makes the standard VID/PID appear on the system. This triggers the Pro IDE/Arduino CLI's automatic board detection to happen and it seems to pick one of the two boards at random to associate with the port. You can actually reproduce the issue simply by pressing the reset button on the board, no upload needed.
That's because it doesn't have the automatic board detection feature. It just uses whichever board you manually selected from the Tools > Board menu.
I think that's the best provisional workaround for anyone encountering this issue. |
thank you, @per1234 |
System
MacBook (Retina, 12-inch, 2017)
MacOS 10.15.7 (Catalina), 12
Pro IDE Version 0.1.2 (0.1.2)
Adafruit Trinket M0
I can get the IDE to properly compile my sketch AND transfer correctly to the Trinket, but after transfer it loses the port setting and requires I manually redefine the port setting again in the "select other board & port" dropdown. Additionally, it appears to recognize the Trinket incorrectly as an "Adafruit pIRKey" as this entry is always associated with the correct USB port and I never added it. If I manually specify the Trinket and USB port, it works once, but then the Trinket loses the port and the pIRKey definition remains. Also, it never persists my Trinket setting (regardless of port) once I close the IDE. The behavior seems to be that it insists on seeing the board as a pIRKey, but that's just a guess on my part.
I'm not sure if this has anything to do with it, but I've noticed on my Mac that once the sketch is installed and the board resets, the USB connection temporarily disconnects and reconnects. And I get the red X in the board combobox at the top of the screen. Perhaps this temporary disconnect is confusing the board settings?
QUESTION: Is there any way to remove boards from the board/port dropdown once they have been associated?
Also, FWIW, the standard IDE does just fine with the same sketch and persists settings correctly and recovers from the temporary board disconnect.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Trinket and port settings should persist like the standard IDE
The text was updated successfully, but these errors were encountered: