Skip to content

ESP32-C2 and Arduino platform 5.5.1 multiple definition #1073

@EmileSpecialProducts

Description

@EmileSpecialProducts

When Compiling my project for the ESP32-C2 and Arduino platform 5.5.1
then I get the errors:

multiple definition of `scan_stack_enableAdvFlowCtrlVsCmd';
multiple definition of `adv_stack_enableClearLegacyAdvVsCmd';
multiple definition of `chanSel_stack_enableSetCsaVsCmd'; 
multiple definition of `hci_stack_enableSetVsEvtMaskVsCmd';
multiple definition of `winWiden_stack_enableSetConstPeerScaVsCmd'; 
multiple definition of `adv_stack_enableScanReqRxdVsEvent';

I have resolved this by adding this in the file NimBLE-Arduino/nimble/esp_port/esp-hci/src/na_hci_driver.c at Line 68
I do not know if the ESP_IDF_VERSION_VAL(5, 5, 1) is the Correct version.

// Prevent linking errors when using arduino + bluedroid with esp32c2
#if defined (CONFIG_IDF_TARGET_ESP32C2)
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 5, 1)
void adv_stack_enableClearLegacyAdvVsCmd(bool en){}
void scan_stack_enableAdvFlowCtrlVsCmd(bool en){}
void advFilter_stack_enableDupExcListVsCmd(bool en){}
void arr_stack_enableMultiConnVsCmd(bool en){}
void pcl_stack_enableSetRssiThreshVsCmd(bool en){}
void chanSel_stack_enableSetCsaVsCmd(bool en){}
void log_stack_enableLogsRelatedVsCmd(bool en){}
void hci_stack_enableSetVsEvtMaskVsCmd(bool en){}
void winWiden_stack_enableSetConstPeerScaVsCmd(bool en){}
#if CONFIG_IDF_TARGET_ESP32C61_ECO3
void conn_stack_enableSetPrefTxRxCntVsCmd(bool en){}
#endif // CONFIG_IDF_TARGET_ESP32C61_ECO3

void adv_stack_enableScanReqRxdVsEvent(bool en){}
void conn_stack_enableChanMapUpdCompVsEvent(bool en){}
void sleep_stack_enableWakeupVsEvent(bool en){}
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions