Error in Compiling Example(s)

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Error in Compiling Example(s)

Post by MattPackwood »

Hi,

I am trying to use the Arduino Sketch in:
https://learn.adafruit.com/adafruit-cir ... controller

I am getting the following error:

Code: Select all

Arduino: 1.8.19 (Mac OS X), Board: "Adafruit Circuit Playground Bluefruit, S140 6.1.1, Level 0 (Release), Serial"

Multiple libraries were found for "Adafruit_TinyUSB.h"
In file included from /Users/mattpackwood/Documents/Arduino/libraries/Adafruit_TinyUSB_Library/src/Adafruit_TinyUSB.h:28,
                 from /Users/mattpackwood/Library/Arduino15/packages/adafruit/hardware/nrf52/1.3.0/libraries/Bluefruit52Lib/src/services/BLEHidGeneric.h:45,
 Used: /Users/mattpackwood/Documents/Arduino/libraries/Adafruit_TinyUSB_Library
 Not used: /Users/mattpackwood/Library/Arduino15/packages/adafruit/hardware/nrf52/1.3.0/libraries/Adafruit_TinyUSB_Arduino
                 from /Users/mattpackwood/Library/Arduino15/packages/adafruit/hardware/nrf52/1.3.0/libraries/Bluefruit52Lib/src/bluefruit.h:66,
                 from /Users/mattpackwood/Documents/Arduino/sketch_jan12a/sketch_jan12a.ino:14:
/Users/mattpackwood/Documents/Arduino/libraries/Adafruit_TinyUSB_Library/src/Adafruit_USBD_HID.h:28:10: fatal error: Adafruit_TinyUSB_Core.h: No such file or directory
   28 | #include "Adafruit_TinyUSB_Core.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Adafruit Circuit Playground Bluefruit.


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Error in Compiling Example(s)

Post by dastels »

The first thing to verify is that all board support packages and libraries are up to date.

Dave

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Error in Compiling Example(s)

Post by MattPackwood »

I installed them to try this, I have 1.3

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Error in Compiling Example(s)

Post by dastels »

OK. I see the line

Code: Select all

Multiple libraries were found for "Adafruit_TinyUSB.h"
My guess is that it's picking up an old copy. Search your system for that file that not in /Users/mattpackwood/Documents/Arduino/libraries/Adafruit_TinyUSB_Library/ and delete that copy of the library (not just that one header).

Dave

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Error in Compiling Example(s)

Post by dastels »

Alternatively delete all copies/versions of the library you find and reinstall it. Maybe start by uninstalling the one from the library manager in Arduino.

Dave

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Error in Compiling Example(s)

Post by MattPackwood »

I completely uninstalled Arduino (using Clean My Mac) and reinstalled (using Homebrew), updated the Adruino library, installed the Adafruit library... same error...

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Error in Compiling Example(s)

Post by dastels »

you got rid of all directories in your home dir having to do with Arduino, including any hidden ones (e.g. I have a .arduino15 laying around.

Dave

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Error in Compiling Example(s)

Post by MattPackwood »

I have tried that, no joy....

Is there a list of where / what I need to clean up (in case I missed something)

Matt

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Error in Compiling Example(s)

Post by dastels »

I have ~/Arduino and ~/.arduino15

Dave

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Error in Compiling Example(s)

Post by MattPackwood »

Hmm, I am on an iMac, I have neither...

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Error in Compiling Example(s)

Post by dastels »

MattPackwood wrote:Hmm, I am on an iMac, I have neither...
Weird. I don't see why it would be that different (I'm on Ubuntu).

Dave

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Error in Compiling Example(s)

Post by MattPackwood »

I followed the instructions in https://support.arduino.cc/hc/en-us/art ... rduino-IDE and cleaned up my install.

Then I follow the instructions in https://learn.adafruit.com/adafruit-cir ... port-setup
When I add the feed for the Adafruit Boards (adding

Code: Select all

https://www.adafruit.com/package_adafruit_index.json
to the additional boards, I get the error below when I open the board manager.
Attachments
Screen Shot 2022-01-26 at 7.31.15 PM.png
Screen Shot 2022-01-26 at 7.31.15 PM.png (133.04 KiB) Viewed 186 times

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Error in Compiling Example(s)

Post by dastels »

Have you tried over a period of time (hours). I've seen it be unreachable at times. It's the internet, after all.

Dave

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Error in Compiling Example(s)

Post by MattPackwood »


User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Error in Compiling Example(s)

Post by MattPackwood »

And got:

Code: Select all

Arduino: 1.8.19 (Mac OS X), Board: "Adafruit Circuit Playground Bluefruit, S140 6.1.1, Level 0 (Release), Serial"

Library Adafruit_BANNED has been declared precompiled:
Using precompiled library in /Users/mattpackwood/Library/Arduino15/packages/adafruit/hardware/nrf52/1.3.0/libraries/Adafruit_BANNED/src/cortex-m4/fpv4-sp-d16-hard
/Users/mattpackwood/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/BLE_UART.ino.cpp.o: in function `loop':
/Users/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:92: undefined reference to `readPacket(BLEUart*, unsigned short)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:177: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:178: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:179: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:180: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:185: undefined reference to `packetbuffer'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:185: undefined reference to `packetbuffer'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:185: undefined reference to `packetbuffer'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:185: undefined reference to `packetbuffer'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:185: undefined reference to `packetbuffer'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:127: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:128: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:129: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:141: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:142: undefined reference to `parsefloat(unsigned char*)'
/Users/mattpackwood/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/BLE_UART.ino.cpp.o:/Users/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:143: more undefined references to `parsefloat(unsigned char*)' follow
/Users/mattpackwood/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/BLE_UART.ino.cpp.o: in function `loop':
/Users/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:106: undefined reference to `packetbuffer'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:106: undefined reference to `packetbuffer'
/Users/mattpackwood/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/mattpackwood/Documents/Arduino/BLE_UART/BLE_UART.ino:106: undefined reference to `packetbuffer'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Adafruit Circuit Playground Bluefruit.


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”