Mbed BLE on MAX32630FTHR

Hi,

I am very new to this platform and IDE. I would like to use the BLE UARTService on my MAX32630FTHR MCU and tried adding the BLE_API library onto Mbed Studio. However when I tried compiling I get all sorts of errors below. Am I missing any additional libraries or using an imcompatible version? I am using version mbed-os 5.14.2. Appreciate any help!

Andre

Errors:
[Error] BLE.cpp@52,18: out-of-line definition of ‘errorToString’ does not match any declaration in ‘BLE’

[Error] BLE.cpp@124,5: use of undeclared identifier ‘MBED_ASSERT’

[Error] BLE.cpp@187,5: use of undeclared identifier ‘event_signaled’

[Error] BLE.cpp@296,9: use of undeclared identifier ‘event_signaled’

[Error] BLE.cpp@301,5: use of undeclared identifier ‘event_signaled’

[Error] BLE.cpp@317,9: use of undeclared identifier ‘event_signaled’

[Error] BLE.cpp@328,9: use of undeclared identifier ‘event_signaled’

[Error] BLE.cpp@333,5: use of undeclared identifier ‘event_signaled’

[Error] BLE.cpp@351,5: member initializer ‘event_signaled’ does not name a non-static data member or base class

[Error] BLE.cpp@365,18: redefinition of ‘setAddress’

[Error] BLE.cpp@373,18: redefinition of ‘connect’

[Error] BLE.cpp@389,22: redefinition of ‘getGapState’

[Error] BLE.cpp@394,11: redefinition of ‘setAdvertisingType’

[Error] BLE.cpp@398,11: redefinition of ‘setAdvertisingInterval’

[Error] BLE.cpp@402,11: redefinition of ‘setAdvertisingTimeout’

[Error] BLE.cpp@406,11: redefinition of ‘setAdvertisingParams’

[Error] BLE.cpp@410,34: redefinition of ‘getAdvertisingParams’

[Error] BLE.cpp@414,18: redefinition of ‘accumulateAdvertisingPayload’

[Error] BLE.cpp@418,18: redefinition of ‘accumulateAdvertisingPayload’

[ERROR] .\mbed-os\features\FEATURE_BLE\source\BLE.cpp:52:18: error: out-of-line definition of ‘errorToString’ does not match any declaration in ‘BLE’

const char* BLE::errorToString(ble_error_t error)

^~~~~~~~~~~~~

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:124:5: error: use of undeclared identifier ‘MBED_ASSERT’

MBED_ASSERT(“No BLE instance implementation.”);

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:187:5: error: use of undeclared identifier ‘event_signaled’

event_signaled = false;

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:296:9: error: use of undeclared identifier ‘event_signaled’

if (event_signaled == false) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:301:5: error: use of undeclared identifier ‘event_signaled’

event_signaled = false;

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:317:9: error: use of undeclared identifier ‘event_signaled’

if (event_signaled && whenEventsToProcess) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:328:9: error: use of undeclared identifier ‘event_signaled’

if (event_signaled == true) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:333:5: error: use of undeclared identifier ‘event_signaled’

event_signaled = true;

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:351:5: error: member initializer ‘event_signaled’ does not name a non-static data member or base class

event_signaled(false)

^~~~~~~~~~~~~~~~~~~~~

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:365:18: error: redefinition of ‘setAddress’

ble_error_t BLE::setAddress(

^

./BLE_API\ble/BLE.h:294:17: note: previous definition is here

ble_error_t setAddress(BLEProtocol::AddressType_t type, const BLEProtocol::AddressBytes_t address) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:373:18: error: redefinition of ‘connect’

ble_error_t BLE::connect(

^

./BLE_API\ble/BLE.h:811:17: note: previous definition is here

ble_error_t connect(const BLEProtocol::AddressBytes_t peerAddr,

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:389:22: error: redefinition of ‘getGapState’

Gap::GapState_t BLE::getGapState(void) const {

^

./BLE_API\ble/BLE.h:861:21: note: previous definition is here

Gap::GapState_t getGapState(void) const {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:394:11: error: redefinition of ‘setAdvertisingType’

void BLE::setAdvertisingType(GapAdvertisingParams::AdvertisingType advType) {

^

./BLE_API\ble/BLE.h:319:10: note: previous definition is here

void setAdvertisingType(GapAdvertisingParams::AdvertisingType advType) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:398:11: error: redefinition of ‘setAdvertisingInterval’

void BLE::setAdvertisingInterval(uint16_t interval) {

^

./BLE_API\ble/BLE.h:349:10: note: previous definition is here

void setAdvertisingInterval(uint16_t interval) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:402:11: error: redefinition of ‘setAdvertisingTimeout’

void BLE::setAdvertisingTimeout(uint16_t timeout) {

^

./BLE_API\ble/BLE.h:399:10: note: previous definition is here

void setAdvertisingTimeout(uint16_t timeout) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:406:11: error: redefinition of ‘setAdvertisingParams’

void BLE::setAdvertisingParams(const GapAdvertisingParams &advParams) {

^

./BLE_API\ble/BLE.h:414:10: note: previous definition is here

void setAdvertisingParams(const GapAdvertisingParams &advParams) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:410:34: error: redefinition of ‘getAdvertisingParams’

const GapAdvertisingParams &BLE::getAdvertisingParams(void) const {

^

./BLE_API\ble/BLE.h:427:33: note: previous definition is here

const GapAdvertisingParams &getAdvertisingParams(void) const {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:414:18: error: redefinition of ‘accumulateAdvertisingPayload’

ble_error_t BLE::accumulateAdvertisingPayload(uint8_t flags) {

^

./BLE_API\ble/BLE.h:447:17: note: previous definition is here

ble_error_t accumulateAdvertisingPayload(uint8_t flags) {

^

.\mbed-os\features\FEATURE_BLE\source\BLE.cpp:418:18: error: redefinition of ‘accumulateAdvertisingPayload’

ble_error_t BLE::accumulateAdvertisingPayload(GapAdvertisingData::Appearance app) {

^

./BLE_API\ble/BLE.h:466:17: note: previous definition is here

ble_error_t accumulateAdvertisingPayload(GapAdvertisingData::Appearance app) {

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

Hi Andre,

Where do you get the BLE UARTService project? I would suggest you start from our official BLE example here, since there might be some compatibility issue in in informal sample.

Regards,
Desmond