Closed MakerMatrix closed 3 years ago
After looking deeper, I recognize this has to do with the parsing of the board .json file by arduino.py. AFAICT this is not working quite right with 32u416m. The Arduino IDE identifies this MCU as:
VID: 2341 PID: 8036
And that matches what the 32u416m.json file has for hwid. So, it seems like it ought to work but USB_VID and USB_PID never get defined.
My platformio.ini:
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:32u416m]
platform = atmelavr
board = 32u416m
framework = arduino
lib_deps =
adafruit/Adafruit ILI9341@^1.5.6
olkal/HX711_ADC@^1.2.7
adafruit/Adafruit BusIO@^1.7.2
Wire
upload_port = COM5
If I change env to "leonardo" and board to "leonardo", the software builds, no problem.
Hi @MakerMatrix ! You need to specify the usb_product
field similar to the Leonardo board, e.g.:
[env:32u416m]
platform = atmelavr
board = 32u416m
framework = arduino
lib_deps =
adafruit/Adafruit ILI9341@^1.5.6
olkal/HX711_ADC@^1.2.7
adafruit/Adafruit BusIO@^1.7.2
Wire
upload_port = COM5
board_build.usb_product = "32u416m"
I am trying to build a fairly simple code (which works fine in the ArduinoIDE) on an Atmega32u416m MCU. But when I try to build it, there are "not declared in this scope" errors coming from the Framework itself, specifically USBCore. Screen scrape below.