arduino / arduino/ArduinoCore-samd

-DCDC_DISABLED Error

Open
#637 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
502
Forks
740
PR merge metrics
No merged PRs in 30d

Description

With -DCD_DISABLED I get the error:

`USBCore.cpp:920: undefined reference to 'Serial_::handleEndpoint(int)'`

Line 920 refers to:
`SerialUSB.handleEndpoint(ep);`

I rectified with the following:

`#ifdef CDC_ENABLED`
`SerialUSB.handleEndpoint(ep);`
`#endif`

I noticed in the code, all other references to SerialUSB are wrapped with the CDC_ENABLED check, apart from this. I was compiling for the Nano 33 IoT.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in USBCore.cpp at line 920 and compare the SerialUSB references around it with their CDC_ENABLED guards. Build for the Nano 33 IoT with CDC disabled and confirm the undefined-reference error is resolved without affecting CDC-enabled builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.