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

Boards without SERIAL_PORT_USBVIRTUAL #32

Open
maxholgasson opened this issue Nov 14, 2020 · 1 comment
Open

Boards without SERIAL_PORT_USBVIRTUAL #32

maxholgasson opened this issue Nov 14, 2020 · 1 comment
Assignees

Comments

@maxholgasson
Copy link

maxholgasson commented Nov 14, 2020

When using a SAMD21 on a custom pcb without a USB connector and commented out (//#define SERIAL_PORT_USBVIRTUAL SerialUSB) in variant.h there appears an error.

Would it be possible to add a check whether it's defined in variant.h or not?

Error message:
ArduinoLowPower-master/src/samd/ArduinoLowPower.cpp:41:6: error: 'SERIAL_PORT_USBVIRTUAL' was not declared in this scope if (SERIAL_PORT_USBVIRTUAL) {

@facchinm
Copy link
Contributor

Hi @maxholgasson ,
the right approach to remove USB from a SAMD board is adding this line to its boards.txt entry:
<board>.build.usb_flags=
It removes all USB initialization code too.
Then, the bug you reported is real, so if you could send a PR I'd be glad to merge it (to preserve attribution)

@facchinm facchinm self-assigned this Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants