vscode-circuitpython: [BUG] Cannot read properties of undefined (reading 'vid')
Describe the bug
I have a RP2040-LCD-1.28 board with custom compiled CircuitPython installed. When trying to connect to the port, I get the error Cannot read properties of undefined (reading 'vid')
Desktop (please complete the following information):
- MacOs Ventura 13.0
- VsCode 1.73.1
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 18
I had the same issue with my Pico W but I’ve found a temporary workaround by manually adding it.
The following folder contains all the board-infos known by the extension
C:\Users\<username>\.vscode\extensions\joedevivo.vscode-circuitpython-0.1.19-win32-x64\boardsI copied the content of the Pico folder ( \0x239A\0x80F4) to the Pico W folder (\0x239A\0x8120). I updated the board.pyi file to reflect it being a Pico W instead of a Pico by updating board name.
Secondly, in the boards folder is a ‘metadata.json’ file to wich I’ve added the Pico W data (based on Pico)
Once this is done, I can select my COM port and it is detected as the Pico W and I’m able to make a serial connection.
This repo also contains files to generate these board info files and it gets it’s information from the circuitpython repository. The repository in question already contains the required information for the Pico W so I’m hoping that with a new release of this extension the new/updated boards information will just be included… In the meantime, you can add it manually.
I’m assuming these steps could also work for adding other boards. As long as you have the VID/PID info by which the USB device will identify itself, it should work.
To get the latest boards I forked the extension repo, and ran the scripts/build_stubs.sh which gave me an updated stubs and boards folder, copied over the extensions versions gives latest data. I’ve blocked those folders from gitignore and you can now just download a zip file of my fork, and copy the
stubsandboardsfolders across.I’m happy to update the fork whenever required, eventually with CI, but ping me if new board added to circuitpython and you want the latest boards/stubs. https://github.com/tyeth/vscode-circuitpython/
Either that or allow programmer to put it in some config file
Also having this problem, on an officially supported CircuitPython board https://circuitpython.org/board/lolin_s3_mini/
Is there a way to turn off VID/PID detection and just have it open the dang serial port?
I’m getting the same error, but my case is a bit different. I’m using a Raspbery Pi Pico W. The serial monitor will connect when I’m running Circuitpython 7.3.3. But when I upgrade to CircuitPython 8.0.0 Beta 6 I run into this same error.