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.

unable to generate contiki/examples/ping-ipv6/example-ping6.elf

Other Parts Discussed in Thread: CC2650

I am unable to generate .elf file for ping-ipv6 example for cc2650. I partially found solution here: yet I am unable to impliment it. I am open for suggestions.

thanks in advance.

  • Try to use "make TARGET=srf06-cc26xx BOARD=srf06/cc26xx" to make the project.
  • Hi Yikai Chen

    I tried with make TARGET=srf06-cc26xx BOARD=srf06/cc26xx. I'm getting same issue

    /contiki/examples/ping-ipv6$ make TARGET=srf06-cc26xx BOARD=srf06/cc26xx
    CC ../../cpu/cc26xx-cc13xx/./ieee-addr.c
    AR contiki-srf06-cc26xx.a
    CC ../../cpu/cc26xx-cc13xx/./fault-handlers.c
    CC ../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.c
    CC ../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/startup_gcc.c
    CC example-ping6.c
    LD example-ping6.elf
    /home/vik/work/toolchain/gcc-arm-none-eabi-5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
    sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
    /home/vik/work/toolchain/gcc-arm-none-eabi-5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-writer.o): In function `_write_r':
    writer.c:(.text._write_r+0x12): undefined reference to `_write'
    /home/vik/work/toolchain/gcc-arm-none-eabi-5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-closer.o): In function `_close_r':
    closer.c:(.text._close_r+0xc): undefined reference to `_close'
    /home/vik/work/toolchain/gcc-arm-none-eabi-5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-lseekr.o): In function `_lseek_r':
    lseekr.c:(.text._lseek_r+0x12): undefined reference to `_lseek'
    /home/vik/work/toolchain/gcc-arm-none-eabi-5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-readr.o): In function `_read_r':
    readr.c:(.text._read_r+0x12): undefined reference to `_read'
    /home/vik/work/toolchain/gcc-arm-none-eabi-5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-fstatr.o): In function `_fstat_r':
    fstatr.c:(.text._fstat_r+0x10): undefined reference to `_fstat'
    /home/vik/work/toolchain/gcc-arm-none-eabi-5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-isattyr.o): In function `_isatty_r':
    isattyr.c:(.text._isatty_r+0xc): undefined reference to `_isatty'
    collect2: error: ld returned 1 exit status
    make: *** [example-ping6.elf] Error 1
    rm obj_srf06-cc26xx/ccfg.o example-ping6.co obj_srf06-cc26xx/fault-handlers.o obj_srf06-cc26xx/startup_gcc.o
  • Hi Vik,

    Did you compile under a clean instant contiki?

    Or from a cloned source?

  • Do you modify any source code? I see the link issues are caused by file operation such as _write, _close, etc.
  • Hi Igor,
    I followed the instruction to setup contiki in my machine from here: processors.wiki.ti.com/.../Contiki_setting_up_sw
    yes I cloned recursive
  • No I didnt modify any code. Infact I recloned the contiki and tried fresh.
  • How exactly did you clone the source; git clone, or git clone --recursive?
    Another thing, the wiki says to use "gcc-arm-none-eabi-4_9-2014q4". You have a newer revision, try to downgrade.

    One more thing, why you need the .elf extension?

  • I tried with git clone --recursive.

    I now tried wit gcc-arm-none-eabi-4_9-2014q4 toolchain but no luck

    contiki/examples/ping-ipv6$ make TARGET=srf06-cc26xx BOARD=srf06/cc26xx
    CC ../../cpu/cc26xx-cc13xx/./ieee-addr.c
    AR contiki-srf06-cc26xx.a
    CC ../../cpu/cc26xx-cc13xx/./fault-handlers.c
    CC ../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.c
    CC ../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/startup_gcc.c
    CC example-ping6.c
    LD example-ping6.elf
    /home/vik/work/toolchain/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
    sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
    /home/vik/work/toolchain/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-writer.o): In function `_write_r':
    writer.c:(.text._write_r+0x10): undefined reference to `_write'

    .elf isnt very necessary. .bin .hex will also do... I need cc2650 contiki node to ping to a IPV6 local link address.
  • Just try it and see the same problem on my Contiki build environment. Need to dig further to know how to fix it.