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.

CC2650STK: Problems Using CC2650 Contiki and string functions

Part Number: CC2650STK
Other Parts Discussed in Thread: CC2650

Hello,

currently i have a problem with Contiki and CC2650 Sensortag, i make use of the functions memset and memcpy as part of the string library, these functions throw an error while linking

The Error is the following: In function `_sbrk_r': sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'

I have seen the use of these functions in other Contiki libraries and wonder if it is possible to use them or if i have to circumvent them

I am using instant contiki 3.0

Any help is appreciated, i hope you have the necessary details

Kind regards

  • I add the following red lines in cc26xx-web-demo.c to test memset/memcpy and it builds without problem.

    unsigned char tmp1[16];
    unsigned char tmp2[16];
    /*---------------------------------------------------------------------------*/
    PROCESS_THREAD(cc26xx_web_demo_process, ev, data)
    {
      PROCESS_BEGIN();

      printf("CC26XX Web Demo Process\n");

      memset(tmp1, 0x78, 16);
      memccpy(tmp2,tmp1,16);
      init_sensors();
    ...

  • Thanks for the reply,
    i have encountered further details on my problem memcpy and memset work on the web demo but not on hello world and throw the mentioned error, it appears to happen with all funcitons of the string library

    Edit: I found out that the linker is linking  sbrkr.o from arm-none-eabi/lib/armv7-m/libc.a when i call memcpy in hello world but not when i use it in the webdemo but i can't see any reason why

  • Just have a try with the same thing on hello-world.c and it also builds successfully.