Problem with compiling Circuit Playground Bluefruit

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.
Locked
User avatar
mrpibbtsa
 
Posts: 7
Joined: Thu May 27, 2021 12:12 pm

Problem with compiling Circuit Playground Bluefruit

Post by mrpibbtsa »

Hi there,

I have used Circuit Playground Express for some Python projects to some good success, and I am working on my first Arduino project on a Playground Bluefruit device.

I’m working through on of the example codes, controller, and am having issues.

I’m able to compile and run the included example demo for CPE on the Bluefruit, but when I try to compile any code that uses Adafruit_BLE.h, I get the following error:

Code: Select all

 In file included from c:\Users\georg\Documents\Arduino\libraries\Adafruit_BluefruitLE_nRF51/Adafruit_BLE.h:42,
                 from C:\Users\georg\AppData\Local\Temp\.arduinoIDE-unsaved202299-32532-18dmo6n.h24a\controller\packetParser.cpp:8:
c:\Users\georg\Documents\Arduino\libraries\Adafruit_BluefruitLE_nRF51/utility/common_header.h:74:20: error: redefinition of 'bool is_within(uint32_t, uint32_t, uint32_t)'
   74 | static inline bool is_within(uint32_t lower, uint32_t value, uint32_t upper)
      |                    ^~~~~~~~~
In file included from C:\Users\georg\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.3.0\cores\nRF5/rtos.h:45,
                 from C:\Users\georg\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.3.0\cores\nRF5/Arduino.h:48,
                 from C:\Users\georg\AppData\Local\Temp\.arduinoIDE-unsaved202299-32532-18dmo6n.h24a\controller\packetParser.cpp:2:
C:\Users\georg\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.3.0\cores\nRF5/common_func.h:317:20: note: 'bool is_within(uint32_t, uint32_t, uint32_t)' previously defined here
  317 | static inline bool is_within(uint32_t lower, uint32_t value, uint32_t upper)
      |                    ^~~~~~~~~
In file included from c:\Users\georg\Documents\Arduino\libraries\Adafruit_BluefruitLE_nRF51/Adafruit_BLE.h:43,
                 from C:\Users\georg\AppData\Local\Temp\.arduinoIDE-unsaved202299-32532-18dmo6n.h24a\controller\packetParser.cpp:8:
c:\Users\georg\Documents\Arduino\libraries\Adafruit_BluefruitLE_nRF51/utility/errors.h:112:53: error: 'ERROR_NONE' conflicts with a previous declaration
  112 |     ERROR_NONE                                    = 0x0000,   ///< Successful command
      |                                                     ^~~~~~
In file included from C:\Users\georg\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.3.0\cores\nRF5/Arduino.h:26,
                 from C:\Users\georg\AppData\Local\Temp\.arduinoIDE-unsaved202299-32532-18dmo6n.h24a\controller\packetParser.cpp:2:
C:\Users\georg\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.3.0\cores\nRF5/wiring_constants.h:75:3: note: previous declaration '<unnamed enum> ERROR_NONE'
   75 |   ERROR_NONE = 0
      |   ^~~~~~~~~~
In file included from c:\Users\georg\Documents\Arduino\libraries\Adafruit_BluefruitLE_nRF51/Adafruit_BLE.h:43,
                 from C:\Users\georg\AppData\Local\Temp\.arduinoIDE-unsaved202299-32532-18dmo6n.h24a\controller\packetParser.cpp:8:
c:\Users\georg\Documents\Arduino\libraries\Adafruit_BluefruitLE_nRF51/utility/errors.h:196:3: error: conflicting declaration 'typedef enum err_t err_t'
  196 | } err_t;
      |   ^~~~~
In file included from C:\Users\georg\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.3.0\cores\nRF5/Arduino.h:26,
                 from C:\Users\georg\AppData\Local\Temp\.arduinoIDE-unsaved202299-32532-18dmo6n.h24a\controller\packetParser.cpp:2:
C:\Users\georg\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.3.0\cores\nRF5/wiring_constants.h:71:18: note: previous declaration as 'typedef uint32_t err_t'
   71 | typedef uint32_t err_t;
      |                  ^~~~~

exit status 1

Compilation error: exit status 1
When I compile something that doesn’t have Adafruit_BLE.h, like the beacon example, it works fine.

I’m not very familiar with Arduino but I’ve been able to run several demos just fine on the CPE - struggling here with any of the BLE functions on the Bluefruit.

Thanks!
George

User avatar
adafruit_support_carter
 
Posts: 29163
Joined: Tue Nov 29, 2016 2:45 pm

Re: Problem with compiling Circuit Playground Bluefruit

Post by adafruit_support_carter »

Are you selecting the example sketch from the Examples menu of the nRF52 BSP?
https://learn.adafruit.com/adafruit-cir ... o-examples

User avatar
mrpibbtsa
 
Posts: 7
Joined: Thu May 27, 2021 12:12 pm

Re: Problem with compiling Circuit Playground Bluefruit

Post by mrpibbtsa »

adafruit_support_carter wrote: Mon Oct 10, 2022 11:56 am Are you selecting the example sketch from the Examples menu of the nRF52 BSP?
https://learn.adafruit.com/adafruit-cir ... o-examples
Thank you! Examples from this folder are working for me.

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

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