Open scottfeldman opened 1 year ago
It gets weird even if you have 2 different boards connected: for example one with native USB (e.g. XIAO (edit: maybe it was an Arduino Zero clone) on /dev/ttyACM0), and one with a serial-USB converter (e.g. Arduino Nano on /dev/ttyUSB0). The tinygo flash
seems to be able to figure it out, but tinygo monitor
gets confused when it sees 2 active serial ports.
I make a side comment about this at the end of the "Multiple Microcontroller" subsection in the tutorial that I wrote (this is merged, but not deployed yet): https://deploy-preview-329--tinygo.netlify.app/docs/tutorials/serialmonitor/#multiple-microcontrollers
If you try to provide the -ports
flag, I recall that this info is used by tinygo flash
, but not by the tinygo monitor
subcommand invoked by the -monitor
flag.
I guess if this problem was important enough for me, I'd dive in and try to figure out the code to fix this. But in practice, it's been far easier to just disconnect all the other microcontrollers except for the one that I'm interested in. My USB hubs have an on/off switch on each port.
I think the main problem in this issue has been addressed by #3640 so marking to close on next release.
Had to revert, it was not working as expected.
I have two identical raspberry pi picos, /dev/ttypACM0 and /dev/ttyACM1.
When I flash using both -monitor and -port together, the right port is flashed but monitor connects to the wrong port:
If I get real crazy and add a third pico, nothing works:
I'm on dev branch of tinygo: