Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile Arduino code to 32u416m board #27

Closed
Michael-Longley opened this issue Dec 14, 2020 · 4 comments
Closed

Cannot compile Arduino code to 32u416m board #27

Michael-Longley opened this issue Dec 14, 2020 · 4 comments
Assignees
Labels
Bug Something isn't working Controller Work done on the micro controller

Comments

@Michael-Longley
Copy link
Member

Michael-Longley commented Dec 14, 2020

When compiling our code for the Elite C / Pro Micro controllers we are getting the following errors.

.platformio\packages\framework-arduino-avr\cores\arduino\USBCore.cpp:73:29: error: 'USB_VID' was not declared in this scope
Compiling .pio\build\32u416m\FrameworkArduino\main.cpp.o
  D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1); 

.platformio\packages\framework-arduino-avr\cores\arduino\USBCore.cpp:73:37: error: 'USB_PID' was not declared in this scope
  D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,ISERIAL,1);

These errors can be seen by building the C++ code using PlatformIO in VSCode.

Research if this is a configuration issue, a known issue with the Arduino libraries or if we can circumvent / resolve it.

@mjschuetze102 mjschuetze102 added Bug Something isn't working Controller Work done on the micro controller labels Dec 14, 2020
@mjschuetze102
Copy link
Member

I don't feel like reading tonight, but https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758039 might have a solution.

@mjschuetze102 mjschuetze102 pinned this issue Dec 14, 2020
@mjschuetze102
Copy link
Member

Also, this may help: platformio/platformio-core#164

@Michael-Longley
Copy link
Member Author

The solution to this is to add #define USB_VID <Our VID> and #define USB_PID <Our PID> to C:/Users/<Your User>/.platformio/packages/framework-arduino-avr/cores/arduino/USBCore.h. We still need to pick a PID and a VID but that will be simple so I will open an issue to decide that and add the checks for it in ControllerConnection.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Controller Work done on the micro controller
Projects
None yet
Development

No branches or pull requests

2 participants