This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP4305529 Bluetopia Stack extern Error(e46)



Hi,

Using an IAR IDE and In the process of implementing a mechanism to send data to Bluetooth client, I am trying to make a free memory pointer external so that I can pass the data when  the BTPSAPI SPP_Event_Callback(...) is executed in the StoneStreet One Bluetopia stack.

I added this code below . I am getting and error of :

Error(e46) Undefined external "extern_memory_pntr_str_1"

Let me know if anyone ran into this issue.

Thanks,

Armen.


here is the code....

typedef struct {
int data_array[400];
int field2;
} extern_memory_pntr_str_t;

extern extern_memory_pntr_str_t *extern_memory_pntr_str_1;

if ((extern_memory_pntr_str_1 = (extern_memory_pntr_str_t *)BTPS_AllocateMemory(sizeof(extern_memory_pntr_str_t)))!= NULL){

for (jok=0; jok<400; jok++){

extern_memory_pntr_str_1->data_array[jok] = jok;
}
}

  • Hi ,

    I am trying to get the the software configuration of Bluetopia through CCS version 5 . I am new to Bluetopia stack so can anyone provide me the steps to build the apps demo of Bluetopia stack through CCS .

    i am following this link but enable to build my project/files .

    http://processors.wiki.ti.com/index.php/CC256x_MSP430_Bluetopia_Basic_Demo_APPS

    Thanks & Regards,

    Ruchin

  • Armen,

    You are declaring the variable extern in this file. You need to declare it first in a file, and then you would declare it extern in the other files that you want to use it in.

    Are you just trying to declare a global variable to be used within the same C file? If so, you don't need the "extern" variable type set. You only need the extern if you are trying to use the variable in another file.

    Such as:

    In main.c you declare a variable as:

    int variableinmain;

    Then in otherfile.c, you declare it as:

    extern int variableinmain;

    Hope this clears things up a bit.

     

    -Jason 

**Attention** This is a public forum