The error I receive is this “platformio\lib\Bluefruit52Lib\src\services/BLEHidGeneric.h:73:34: error: ISO C++ forbids declaration of ‘ATTR_PACKED_STRUCT’ with no type [-fpermissive]
typedef ATTR_PACKED_STRUCT(struct)” and this error" hid_keyboard_report_t’ has not been declared". The program does compile just fine using Arduino IDE. Any help or direction would greatlt be appreciated.
From the path in your error message I also realize that you have installed the Adafruit Bluefruit nRF52 Libraries locally in your PlatformIO installation (in platformio\lib\Bluefruit52Lib).
Remove the entire directory. It’s not needed and likely outdated. If it’s declared in platformio.ini also remove it there and make sure it’s not in .pio/libdeps within your project folder either.
Then build again. It will automatically be identified and taken from platformio/packages/framework-arduinoadafruitnrf52/libraries/Bluefruit52Lib.
Success!! Thank you, I did have Nordic nRF52 version 3.7.0. I did remove the Adafruit Bluefruit nRF52 Libraries locally in my PlatformIO installation, so that probably was the issue. I have other libraries installed locally, are they needed or can I remove them also?
I am just a beginner with PlatformIO, but really do like the platform.
Thanks again for your help
The preferred way is to not install libraries (in PlatformIO’s lib directory) but instead declare them in platformio.ini (using libdeps). A copy will then be downloaded to .pio/libdeps within the project folder. That way different projects can have different versions of the same library, you can share your code with other people and it will immediately build, and all dependencies are clearly visible in platformio.ini.
A few days ago, I’ve removed all libraries from PlatformIO’s lib directory, and I do not plan to put anything there ever again.
Note that the Adafruit Bluefruit nRF52 Libraries (Bluefruit52Lib) are special as they belong to the Arduino core for Adafruit nRF52 based boards. So they don’t even need to be declare in platformio.ini.