Including ambiq/em9304 BLE radio files in build

I got Example8_BLE_LED example working and now I’m trying do something similar with the exactle_fit BLE heartrate example (found in AmbiqSuite-Rel2.2.0/boards/apollo2_blue_evb/examples/exactle_fit) to build on a RedBoard Artemis. That example is made for Apollo2 so I’ve had to convert a few methods to ones that work with Apollo3 (not sure if they work yet but the complier stopped complaining).

I’m stuck right now trying to get the em9304 BLE radio files in my build.

The trouble starts with an “undefined reference to `HciDataReadyISR'”. That method is in /User/Library/Arduino15/packages/SparkFun/hardware/apollo3/1.0.9/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/ambiq/hci_drv_apollo.h which is included in the build but the accompanying class […]exactle/sw/hci/ambiq/em3904/hci_drv_em9304.c is not. The directory […]/ambiq/em3904 is not in the /User/LibraryArduino15/packages/SparkFun/hardware/apollo3/1.0.9/cores/arduino/am_sdk_ap3/third_party/exactle/sw/hci/ambiq. I tried just copying it there but then I run into another error “fatal error: am_devices_em9304.h: No such file or directory”. am_devices_em9304.h is in AmbiqSuite-Rel2.2.0/devices and if I copy that to /User/LibraryArduino15/packages/SparkFun/hardware/apollo3/1.0.9/cores/arduino/am_sdk_ap3/devices/ then I run into another error “[…]/devices/am_devices_em9304.c:50:10: fatal error: am_bsp.h: No such file or directory”. I have am_bsp.h in my example project directory (I think that should get picked up from somewhere else but it wasn’t so I put a copy there). I’m guessing part of the issue is that my build and file linking has gone wrong.

Any tips on how to include the em9304 BLE radio files and troubleshoot my build?