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

nRF52840 undefined reference to `Serial' #22

Closed
tamberg opened this issue Sep 27, 2021 · 2 comments
Closed

nRF52840 undefined reference to `Serial' #22

tamberg opened this issue Sep 27, 2021 · 2 comments

Comments

@tamberg
Copy link
Owner

tamberg commented Sep 27, 2021

On MacOS with nRF52840 and Board Manager nRF52 v1.1.0 compiling

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.println("hello");
}

results in

/Users/tamberg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: sketch/sketch_sep27c.ino.cpp.o: in function `setup':
/Users/tamberg/Documents/Arduino/sketch_sep27c/sketch_sep27c.ino:10: undefined reference to `Serial'
/Users/tamberg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/tamberg/Documents/Arduino/sketch_sep27c/sketch_sep27c.ino:10: undefined reference to `Adafruit_USBD_CDC::begin(unsigned long)'
/Users/tamberg/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: sketch/sketch_sep27c.ino.cpp.o: in function `loop':
/Users/tamberg/Documents/Arduino/sketch_sep27c/sketch_sep27c.ino:22: undefined reference to `Serial'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Adafruit Feather nRF52840 Express.
@tamberg
Copy link
Owner Author

tamberg commented Sep 27, 2021

Add #include "Adafruit_TinyUSB.h"; to fix this issue (via S. Tiziano, A. Ambühl).

@tamberg
Copy link
Owner Author

tamberg commented Sep 27, 2021

Some background adafruit/Adafruit_nRF52_Arduino#653

@tamberg tamberg closed this as completed Oct 5, 2021
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

1 participant