Expose pc-ble-driver package headers in OpenWrt?


First, I'm very new to OpenWrt so I hope what I'm writing makes sense.

I have a device with a MT76x8 chip that communicates with a nRF52832 BLE module. Nordic provides a BLE driver called "pc-ble-driver". The vendor of this device has an OpenWrt package to build pc-ble-driver and two example executables (heart_rate_monitor and heart_rate_collector) that use the pc-ble-driver API onto the firmware image. So I include the package in make menuconfig, build the firmware and then burn the OpenWrt firmware onto the device.

Now, I have access to executing heart_rate_collector on the device which is tested and working. I would then like to access the pc-ble-driver library on the device when I write and compile my own C/C++ code on the device itself. I see "libpc_ble_driver_shared_sd_api_v5.so" in /usr/lib, but no corresponding header files in /usr/include.

According to the COPIED file located in /usr/include, I can see the include files were taken from the toolchain directory: "staging_dir/toolchain-mipsel_24kc_gcc-7.4.0_musl/include" and as expected there are no pc-ble-driver header files here. But I can also see that a "libpc-ble-driver-v5" folder containing the header files I want is present in the target directory "staging_dir/target-mipsel_24kc_musl/usr/include".

My best understanding is that pc-ble-driver is compiled on the host machine and the shared library (the .so file) is copied to the firmware image so it can used by the example executables mentioned above (heart_rate_*) on runtime?

My goal again is to compile my own C/C++ code that would have access to these libraries on the device itself. From some reading on this it seems that compiling could take a very long time on the device due to limited resources and the recommended way is to always cross-compile. Nevertheless, is this at all possible?

If its not, then what would be a recommended workflow for testing new code? Of course I don't want to have to burn an image to the device every time I want to test new code that uses pc-ble-driver.

I can provide the Makefiles I have for pc-ble-driver if needed.