0

Bluefruit nRF52 Library - standardfirmataBLE compiling error
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Bluefruit nRF52 Library - standardfirmataBLE compiling error

by dtusllitg on Sun Nov 15, 2020 10:24 am

Greetings,

I tried to compile the StandarFirmatBLE.ino in Arduino IDE 1.8.13 on Windows 10 and got the following error:

Code: Select all | TOGGLE FULL SIZE
In file included from C:\Users\dt\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\0.21.0\libraries\Bluefruit52Lib\examples\Peripheral\StandardFirmataBLE\StandardFirmataBLE.ino:31:
C:\Program Files (x86)\Arduino\libraries\Firmata/Firmata.h:131:17: error: friend declaration of 'void encodeByteStream(size_t, uint8_t*, size_t) const' specifies default arguments and isn't a definition [-fpermissive]
  131 |     friend void FirmataMarshaller::encodeByteStream (size_t bytec, uint8_t * bytev, size_t max_bytes = 0) const;
      |                 ^~~~~~~~~~~~~~~~~
exit status 1
Error compiling for board Adafruit Feather nRF52840 Express.


Has anybody found to same error or known how to solve the problem?

dtusllitg
 
Posts: 7
Joined: Thu Oct 29, 2020 12:04 pm

Re: Bluefruit nRF52 Library - standardfirmataBLE compiling e

by dtusllitg on Mon Nov 16, 2020 9:35 am

I've solved the problem following an advice found on https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/602. This was by replacing line 131 of C:\Program Files (x86)\Arduino\libraries\Firmata/Firmata.h with the following:

Code: Select all | TOGGLE FULL SIZE
friend void FirmataMarshaller::encodeByteStream (size_t bytec, uint8_t * bytev, size_t max_bytes) const;


and can now compile the StandardFirmataBLE.ino file.

Cheers!

dtusllitg
 
Posts: 7
Joined: Thu Oct 29, 2020 12:04 pm

Re: Bluefruit nRF52 Library - standardfirmataBLE compiling e

by plasnid on Sun Jul 25, 2021 1:54 am

Thank you so much. Your answer got me to a working state. Greatly appreciated :)

plasnid
 
Posts: 12
Joined: Fri Oct 16, 2020 11:36 pm

Please be positive and constructive with your questions and comments.