joedevivo / vscode-circuitpython

VSCode extension for Adafruit's CircuitPython

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Need to add a new board

wmerkens opened this issue · comments

Want to add the new Arduino Nano RP2040 Connect
Product ID: 0x239A
Vendor ID: 0x00CF

https://learn.adafruit.com/circuitpython-on-the-arduino-nano-rp2040-connect/overview

[312697.650611] usb 3-2.4.4: new full-speed USB device number 40 using xhci_hcd
[312697.825201] usb 3-2.4.4: New USB device found, idVendor=239a, idProduct=00cf, bcdDevice= 1.00
[312697.825204] usb 3-2.4.4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[312697.825205] usb 3-2.4.4: Product: Arduino Nano RP2040 Connect
[312697.825206] usb 3-2.4.4: Manufacturer: Arduino
[312697.825207] usb 3-2.4.4: SerialNumber: 0532240805B989C1
[312697.941270] cdc_acm 3-2.4.4:1.0: ttyACM0: USB ACM device
[312697.950221] usb-storage 3-2.4.4:1.2: USB Mass Storage device detected
[312697.950321] scsi host6: usb-storage 3-2.4.4:1.2
[312697.961564] input: Arduino Arduino Nano RP2040 Connect Keyboard as /devices/pci0000:00/0000:00:08.1/0000:0a:00.3/usb3/3-2/3-2.4/3-2.4.4/3-2.4.4:1.3/0003:239A:00CF.0019/input/input105
[312698.022830] input: Arduino Arduino Nano RP2040 Connect Mouse as /devices/pci0000:00/0000:00:08.1/0000:0a:00.3/usb3/3-2/3-2.4/3-2.4.4/3-2.4.4:1.3/0003:239A:00CF.0019/input/input106
[312698.022918] input: Arduino Arduino Nano RP2040 Connect Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:0a:00.3/usb3/3-2/3-2.4/3-2.4.4/3-2.4.4:1.3/0003:239A:00CF.0019/input/input107
[312698.022967] input: Arduino Arduino Nano RP2040 Connect as /devices/pci0000:00/0000:00:08.1/0000:0a:00.3/usb3/3-2/3-2.4/3-2.4.4/3-2.4.4:1.3/0003:239A:00CF.0019/input/input108
[312698.023041] hid-generic 0003:239A:00CF.0019: input,hidraw6: USB HID v1.11 Keyboard [Arduino Arduino Nano RP2040 Connect] on usb-0000:0a:00.3-2.4.4/input3
[312698.960540] scsi host6: scsi scan: INQUIRY result too short (5), using 36
[312698.960544] scsi 6:0:0:0: Direct-Access     Arduino  Arduino Nano RP2 1.0  PQ: 0 ANSI: 2
[312698.960746] sd 6:0:0:0: Attached scsi generic sg1 type 0
[312698.961248] sd 6:0:0:0: [sda] 2049 512-byte logical blocks: (1.05 MB/1.00 MiB)
[312698.961408] sd 6:0:0:0: [sda] Write Protect is off
[312698.961410] sd 6:0:0:0: [sda] Mode Sense: 03 00 00 00
[312698.961562] sd 6:0:0:0: [sda] No Caching mode page found
[312698.961565] sd 6:0:0:0: [sda] Assuming drive cache: write through
[312698.984563]  sda: sda1
[312698.985497] sd 6:0:0:0: [sda] Attached SCSI removable disk

I created the directories

.vscode/extensions/joedevivo.vscode-circuitpython-0.1.13/boards/0x239A/0x00CF/

And I placed the board.pyi file based on another Arduino and modified it.

from typing import Any
"""
board Arduino Arduino_Nano_RP2040_Connect
https://circuitpython.org/boards/arduino_nano_rp2040_connect
"""

now I am up to the pin list, is this generated manually or automatically?

Here is the pins

>>> import board
>>> dir(board)
['__class__', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'CS1', 'D0', 'D1', 'D10', 'D11', 'D12', 'D13', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7', 'D8', 'D9', 'ESP_BUSY', 'ESP_CS', 'ESP_GPIO0', 'ESP_RESET', 'I2C', 'INT1', 'LED', 'MICROPHONE_CLOCK', 'MICROPHONE_DATA', 'MISO', 'MISO1', 'MOSI', 'MOSI1', 'RX', 'SCK', 'SCK1', 'SCL', 'SDA', 'SPI', 'TX', 'UART']

All this content is generated automatically. As long as it's in upstream CircuitPython, it will be included in the release next time the stubs are built and the extension is released.

Thanks, I figured out the script for generating the boards and stubs directory and I fixed the issue.

Can this be closed please? :) Thanks!

Yeah, let's close it; bit old. :-)