Getting Tiny 2040 Working with VS Code and Pico-Go

Hi,

I’m a new Tiny 2040 user. Great little machine! I got everything working OK on the RPI, using Thonny. Ultimately, I wanted to do my development work on my Mac, using VS Code and Pico-Go. Unfortunately, I have not been able to get the Tiny to connect with VS Code or Thonny. When I try to setup the Pico-Go configuration in VS Code, I get an error that it cannot find the code to run. But the code is installed. Also, there is an issue finding the USB port. It’s different from what I have been seeing online.

Has anyone on this forum tried to do this?

Thanks in advance for your time!

-Rodney Singleton

The VS Code / Pico-Go environment was, for a while, rather nice to work in. Unfortunately, a recent VS Code update has broken PicoGo, and the project maintainer has called for help as he’s currently unable to contribute much time. So as far as I’m aware, right now this route is broken unless you’re willing to run an older version of VS Code, or are in a position to contribute fixes for the issues.

Pico-Go’s last update was in August 2021.

Personally, I’m still using VS Code, but doing the dance with Thonny to actually run code. You can at least run Thonny on your Mac to ease this.

Thank you JJ! Much appreciated.

You have confirmed my worst fear: something broke in VS/Pico-Go! This is really too bad, because the VS Code IDE environment is very cool and way more productive than Thonny. Is there a way to escalate this issue?

And when you say contribute to fixing the issue, I know Pico-Go is open source, but is VS Code open source as well?

It (sort of) is (GitHub - microsoft/vscode: Visual Studio Code) but I suspect it’s something to be fixed in Pico-Go rather than VS Code.

Thanks Pete! Very good to know.

It’s almost as if the USB port assignments have changed. In early YouTube content, where connecting the Pico VIA VS Code and Pico-Go is successful, the USB resource that connects is /dev/tty.usbmodem0000000000001.

Now when I get it to connect on my M1 Mac laptop, it’s 2e8a:0005 at /dev/cu.usbmodem2101. This behavior is similar on my Intel Mac MINI, however, the port spec is different.

Thanks again for reaching out!

USB port names are often highly variable and seem to depend on so many factors - what else you have plugged in, what you have ever plugged in, the colour of your curtains, the ambient humidity…

Good point!

When I tried this experiment on my Intel Mac MINI and executed ls /dev/usb in -zsh terminal, I got /dev/cu.usbmodem14201 and /dev/tty.usbmodem14201 for the ports. If I remove the the Tiny I get “no matches found: /dev/usb,” which makes sense.

Running the same test on a RPI Pico yields the same result. But I can’t connect Thonny with the Pico at all. Can’t get the Pico to run at all on the Intell Mac MINI with Thonny or VS Code.

I’m only able to get the Tiny2040 to work with Thonny on my Intel Mac MINI.

Thanks again for the feedback!

I’ve seen some very weird issues with Picos on my Mac (M1 MacBook Pro) which appear to be linked to the USB adaptor. One cheap USB-C hub I have is a complete non-starter, while another is mostly fine. Also, there are issues with longer micropython code taking too long to write to the board when you run them, leading to inconsistent and meaningless python errors; uploading the code first then running it from the board’s internal store is much more reliable.

As for the VSCode/Pico-Go issues: yeah, those are Pico-Go problems. There are some signs of movement in the repo: another user has forked it and implemented some Node/Electron version bumps to bring it up-to-speed with current VSCode. However, nothing’s yet released or usable that I can see.

JJ, thanks for the feedback!

I didn’t think to try other connection schemes, was thinking direct connect would be the simpler. But I’m going to try other setups, as perhaps there is some insight to be had. Thanks!

Also, good to hear there is movement, albeit slight, on the Pico-Go front. VS Code and Pico-Go is the ideal development environment for me. Really hoping it gets sorted out.

Thanks again!

@rodneysing Looks like the forked version of Pico-Go is, er, go: GitHub - NixM0nk3y/Pico-Go at develop. The build instructions are in development.md. Ironically, I don’t have a Pico to hand at my work desk to test with, I’ll have to wait until I’m working from home later in the week.

JJ,

Thanks for the heads-up. Will give it a try…

-Rodney