Error building the program using STM32duinoBLE on a custom STM32WB55CGU6 board

Hello,

I recently ordered custom boards with STM32WB55CGU6 from online suppliers. Now before receiving those boards I thought I could implement the program for them. I have been able to build the program with BME280 stuff, but now when adding BLE advertising the build fails. I am wondering if I’m using the correct library meant for this or if there could be some other issues I don’t understand. The error I get when adding BLE stuff to the code and trying to build is:

Linking .pio\build\savi\firmware.elf
lto-wrapper.exe: warning: using serial compilation of 2 LTRANS jobs
lto-wrapper.exe: note: see the '-flto' option documentation for more information
c:/users/jawsn/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\jawsn\AppData\Local\Temp\ccLH9XLe.ltrans0.ltrans.o: in function `main':     
<artificial>:(.text.startup+0x49c): undefined reference to `BLE'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\savi\firmware.elf] Error 1

Here you can find complete code:

It looks like you missed to define the BLE object.

The library itself only declares a reference to the BLE object in the BLELocalDevice.h but does not define it. See

The examples showing how to define the BLE object. See LedControl.ino:

1 Like

Thank you for the response! I was now able to get the code to build with those additions: GitHub - nikorainto/custom-board-STM32WB55CGU6 at fix-ble-and-add-watchdog

Still have to wait some days to be able to test the code on real device :smile: