Searched everywhere and connot figure out how to get pio to work with BBC microbit v2 and Adafruit libraries for the board.
Specifically the BLEPeripheral library cannot find ble_gatts.h which seems to be with board support for a different platform. The only info I can find is seems very specific to microbit v1 and depending on “softdevice” being set to 110 in Arduino IDE and installation of a few specific libraries that seem to be related to v1.
Anyone know the recipe for getting this to work with platform io?
No, the Adafruit core does not support the BBC Microbit V2, there is no variant for it. (variants folder).
Support for the BBC microbit is provided by the sandeep/arduino-nRF5 core, see here.
Hence you cannot compile libraries intended for the Adafruit core for the BBC microbit, the cores are architectured differently. This is the recommended library.
Thanks for the link but that is exactly where I am getting my information. Take a look farther down the page and there’s a section on “BLEPeripheral library” which is where the problem lies.
The author answers this specific question ages ago but only for Arduino IDE which does not seem to work/ignored in the Platform IO configuration no matter what “softdevice_ver” value I use in there and the only place that header file exists is in an SDK for the family of chips used on the V1 as far as I can see.
Do you have BLEPeripheral library compiling properly for the microbit v2 on platform io? If so I’d live to know what dependencies you are using. Here’s mine:
The other stuff is directly from the Adafruit tutorial on the BBC microbit. The issue seems be coming from the BLEPeripheral library which is part of the bbcmicro support you linked to. In Arduino IDE setting the soft device somehow jiggers the include paths or something 110 seems to include a set of libs for v1. v2 seems to use a different soft device version and I am assuming those change the dependencies to that BLEPeripheral doesn’t even try to include the problem file but I am not familiar at all with those chips.
completely unstuck the debugging effort on my end and then it was clear what else I was missing.
I think that flag might be different depending on bbcmicro v1 and v2 based on my research of the two chips used. Also I guess there is some automagic that’s not clear when setting the soft device version in the Arduino IDE but the confusing part is that other board libs that use those chips seem to depend on “softdevice_ver” in discussions I’ve run across.