• TI Thinks Resolved

CCS/CC2640R2F: GAP_RegisterConnEventCb undefined symbol Linker problem

Prodigy 90 points

Replies: 3

Views: 52

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hello,

We have a product based on the Simple_Broadcaster example from Ti-REX.
We would like to add a pairing functionnality to this product. To do so, i have inspired myself from the Simple_Peripheral example : and that's where my problem is.

To add the connexion functionnality, i have just added the following line to the Simple_Broadcast code ( at line 372 exactly ) and a definition for the function SimplePeripheral_connEvtCB

 GAP_RegisterConnEventCb(SimplePeripheral_connEvtCB, GAP_CB_REGISTER, LINKDB_CONNHANDLE_ALL);

When building, i get the following linker error :

undefined first referenced symbol in file --------- ---------------- GAP_RegisterConnEventCb <whole-program>

I don't understand how i can get this error while the original code uses : GAP_SetParamValue which is defined in the same file ("icall_ble_api.h") as the  GAP_RegisterConnEventCb function

You can easily reproduce this problem on the CCS  Cloud with the originale Simple_Broadcaster project and by adding the faulty line ( plus a function definition for SimplePeripheral_connEvtCB)

Any help is greately appreciated

  • Hi Hugo,
    Why don't you simply use simple peripheral as basis instead? It already include all broadcaster functionality as default.

    Regards, Joakim

     

  • In reply to J Lindh:

    Hello, Other than the fact that I would like to understand rather than just make it work : We are really constrained in terme of memory and we don’t need the whole peripheral example, just the connexion part. I assume it would take more work to restart from the simple peripheral than just add the connexion functionality.
  • In reply to Hugo ESQUIBET:

    Hi Hugo,

    Unfortunately, I think it is more work to add connection (which includes swapping the BLE Stack libraries and configuration, some defines, and also swapping the GAPRole (broadcaster.c --> peripheral.c) and adding bond manager) than it is to strip away the things you don't need from the peripheral example.

    We also don't have a migration guide from broadcaster -> peripheral for this reason. If you really want to, you should compare the simple_peripheral and simple_broadcaster complete projects and find the differences.

    The error you are seeing is the linker, which is not seeing the expected function in the included libraries. For reference on configuration, please see the Software Developer's Guide, the chapter "BLE-Stack", sections GAPRole Task and Stack Configurations.

    Best regards,
    Aslak

    --
    PS. Thank you for clicking  Verify Answer below if this answered your question!