4 years, 3 months ago.

mbed BLE - weak symbols not being replaced

Hi,

I'm using the mbed BLE API in my application for the nRF52832 platform. I have run into an issue where the program gets stuck in an error/mbed_die loop. I have tracked it down to the function call "createBLEInstance" being pulled in from the BLE.cpp file in features/FEATURE_BLE.

This symbol is weak and should be replaced by the declaration in features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xn.cpp

I am building the mbed-os (mbed 5) library statically using mbed CLI and then linking to this library in my program's makefile. It appears the mbed library gets linked before the BLE feature and so the weak symbol is not replaced... resulting in a runtime error.

How can I build the mbed library statically with mbed CLI to ensure all weak symbols get replaced by sub-libraries appropriately?

Be the first to answer this question.