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.

CCS/LAUNCHXL-CC1310: CC1310

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310, AES-128

Tool/software: Code Composer Studio

Hi,

I wand to compile contiki-ng in CCS v8.3.0 ,  GCC compiler. Here is "hello-world" example compile failure.

Any help and direction is appreciated ?

**** Build of configuration Debug for project My_Contiki ****

"C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 hello-world -O

CC C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/./ccfg-conf.c
CC C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf/ieee-addr.c
CC hello-world.c
CC C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/startup_cc13xx_cc26xx_gcc.c
LD build/simplelink/launchpad/cc1310//hello-world.elf
OBJCOPY build/simplelink/launchpad/cc1310//hello-world.elf --> build/simplelink/launchpad/cc1310//hello-world.i16hex
OBJCOPY build/simplelink/launchpad/cc1310//hello-world.elf --> build/simplelink/launchpad/cc1310//hello-world.bin
SREC_CAT build/simplelink/launchpad/cc1310//hello-world.i16hex --> build/simplelink/launchpad/cc1310//hello-world.hex
../../arch/cpu/arm/Makefile.arm:67: recipe for target 'build/simplelink/launchpad/cc1310//hello-world.hex' failed
process_begin: CreateProcess(NULL, srec_cat build/simplelink/launchpad/cc1310//hello-world.i16hex -intel -o build/simplelink/launchpad/cc1310//hello-world.hex -intel, ...) failed.
gmake: *** [build/simplelink/launchpad/cc1310//hello-world.hex] Error 2
rm hello-world.o build/simplelink/launchpad/cc1310//hello-world.i16hex build/simplelink/launchpad/cc1310//obj/startup_cc13xx_cc26xx_gcc.o
gmake: Target 'hello-world' not remade because of errors.

**** Build Finished ****

  • Thanks Chen,

    I did follow 100%  the same example instructions but I still have the issue. The following is compile err.

    **** Build of configuration Debug for project cc26xx_demo ****

    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 cc26xx_demo.elf -O

    gmake: *** No rule to make target 'cc26xx_demo.elf'.

    **** Build Finished ****

  • "gmake: *** No rule to make target 'cc26xx_demo.elf'." usually caused by missing step. Can you post what you do step by step so I can check what you missed?
  • I did in step 4 also option: replace native environment with specified but also it is problemDocument1.pdf

  • Try remove "$(CONTIKI_PROJECT)hello-world.elf" in your step 5 and use "TARGET=cc26x0-cc13x0" insterad of "TARGET=simplelink" in your step 6.

  • I find you also need to press "workspace..." button to select the location of hello-world example for "Build directory" in your step 5 instead of using "${CONTIKI_ROOT}/examples/hello-world"
  • I did point to example dir. in step 5 but now I have a bit different response but problem is the same.

    **** Build of configuration Debug for project myContiki ****

    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 hello-world.elf -O

    which: no rlwrap in (/bin:/usr/bin:/c/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major-win32/bin:/c/ti/ccsv8/ccs_base/common/bin:/c/ti/ccsv8/ccs_base/common/uscif:/c/ti/ccsv8/eclipse/jre/bin/client:/c/ti/ccsv8/eclipse/jre/bin:/c/ti/ccsv8/eclipse/jre/lib/i386:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/Program Files (x86)/Vector vFlash 3.1/Bin:/c/Program Files (x86)/Vector vFlash 3.5/Bin:/c/Program Files (x86)/RSA SecurID Token Common:/c/Program Files/RSA SecurID Token Common:/c/ProgramData/Oracle/Java/javapath:/c/Program Files (x86)/AMD APP/bin/x86_64:/c/Program Files (x86)/AMD APP/bin/x86:/c/Program Files (x86)/Intel/iCLS Client:/c/Program Files/Intel/iCLS Client:/tmp/system32:/tmp:/tmp/System32/Wbem:/tmp/System32/WindowsPowerShell/v1.0:/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Intel/WiFi/bin:/c/Program Files/Common Files/Intel/WirelessCommon:/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/c/Program Files (x86)/Shoreline Communications/ShoreWare Client:/c/Program Files (x86)/Microchip/xc8/v1.35/bin:/c/Program Files (x86)/Cypress/PSoC Creator/3.3/PSoC Creator/import/gnu/arm/4.9.3/bin:/c/Program Files (x86)/Microchip/xc16/v1.25/bin:/c/Program Files/TortoiseHg:/c/Program Files (x86)/Microchip/xc8/v1.37/bin:/tmp/system32/config/systemprofile/.dnx/bin:/c/Program Files/Microsoft DNX/Dnvm:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files (x86)/Common Files/Seagate/SnapAPI:/c/Program Files (x86)/WebEx/Productivity Tools:/c/Program Files (x86)/Microchip/xc8/v1.45/bin::/c/ti/ccsv8/eclipse)
    gmake: *** No rule to make target 'hello-world.elf'.

    **** Build Finished ****
  • No idea why you see this. Do you have idea about this issue?
  • This is exactly guide I was using but was unable to set-up and  build any contiki-ng example.

    Have no idea what problem is???

  • I just tested the steps again and experienced no problems. I would suggest to go over the steps one more time.

    Make sure you don't use backslashes and follow the steps closely.
  • Doc1.pdfI did follow closely and looks it does compile but filed on make:

    **** Build of configuration Debug for project MyContiki ****

    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 hello-world -O

     MKDIR     build/simplelink/launchpad/cc1310//obj

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/./ccfg-conf.c

     CC        hello-world.c

     CC        ../../arch/platform/simplelink/cc13xx-cc26xx/batmon-sensor.c

     CC        ../../arch/platform/simplelink/cc13xx-cc26xx/platform.c

     CC        ../../arch/platform/simplelink/cc13xx-cc26xx/launchpad/cc1310/CC1310_LAUNCHXL_fxns.c

     CC        ../../arch/platform/simplelink/cc13xx-cc26xx/launchpad/cc1310/CC1310_LAUNCHXL.c

     CC        ../../arch/platform/simplelink/cc13xx-cc26xx/launchpad/button-sensor-arch.c

     CC        ../../arch/platform/simplelink/cc13xx-cc26xx/launchpad/leds-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/rtimer-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/clock-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/watchdog-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/dbg-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/uart0-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/slip-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/gpio-hal-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/int-master-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/random.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/trng-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/spi-arch.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf/data-queue.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf/sched.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf/ieee-addr.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf/ble-addr.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf/ble-beacond.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf-settings/cc13x0/prop-settings.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf/prop-mode.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/rf-settings/cc13x0/prop-tx-power.c

     CC        ../../os/sys/timer.c

     CC        ../../os/sys/stack-check.c

     CC        ../../os/contiki-main.c

     CC        ../../os/sys/node-id.c

     CC        ../../os/sys/rtimer.c

     CC        ../../os/sys/process.c

     CC        ../../os/sys/compower.c

     CC        ../../os/sys/ctimer.c

     CC        ../../os/sys/mutex.c

     CC        ../../os/sys/log.c

     CC        ../../os/sys/etimer.c

     CC        ../../os/sys/stimer.c

     CC        ../../os/sys/energest.c

     CC        ../../os/sys/autostart.c

     CC        ../../os/dev/nullradio.c

     CC        ../../os/dev/gpio-hal.c

     CC        ../../os/dev/slip.c

     CC        ../../os/dev/leds.c

     CC        ../../os/dev/spi.c

     CC        ../../os/dev/serial-line.c

     CC        ../../os/dev/button-hal.c

     CC        ../../os/lib/ringbuf.c

     CC        ../../os/lib/assert.c

     CC        ../../os/lib/heapmem.c

     CC        ../../os/lib/memb.c

     CC        ../../os/lib/trickle-timer.c

     CC        ../../os/lib/aes-128.c

     CC        ../../os/lib/circular-list.c

     CC        ../../os/lib/list.c

     CC        ../../os/lib/ringbufindex.c

     CC        ../../os/lib/sensors.c

     CC        ../../os/lib/dbl-list.c

     CC        ../../os/lib/ccm-star.c

     CC        ../../os/lib/ifft.c

     CC        ../../os/lib/crc16.c

     CC        ../../os/lib/dbl-circ-list.c

     CC        ../../os/net/link-stats.c

     CC        ../../os/net/net-debug.c

     CC        ../../os/net/linkaddr.c

     CC        ../../os/net/netstack.c

     CC        ../../os/net/packetbuf.c

     CC        ../../os/net/nbr-table.c

     CC        ../../os/net/queuebuf.c

     CC        ../../os/net/mac/mac.c

     CC        ../../os/net/mac/mac-sequence.c

     CC        ../../os/net/mac/framer/frame802154.c

     CC        ../../os/net/mac/framer/nullframer.c

     CC        ../../os/net/mac/framer/framer-802154.c

     CC        ../../os/lib/newlib/syscalls.c

     CC        ../../os/net/mac/framer/frame802154e-ie.c

     CC        ../../os/lib/dbg-io/putchar.c

     CC        ../../os/lib/dbg-io/puts.c

     CC        ../../os/lib/dbg-io/snprintf.c

     CC        ../../os/lib/dbg-io/sprintf.c

     CC        ../../os/lib/dbg-io/printf.c

     CC        ../../os/lib/dbg-io/strformat.c

     CC        ../../os/net/mac/csma/ccm-star-packetbuf.c

     CC        ../../os/net/mac/csma/csma-output.c

     CC        ../../os/net/mac/csma/csma.c

     CC        ../../os/net/mac/csma/anti-replay.c

     CC        ../../os/net/mac/csma/csma-security.c

     CC        ../../os/net/ipv6/uiplib.c

     CC        ../../os/net/ipv6/sicslowpan.c

     CC        ../../os/net/ipv6/uip-ds6-route.c

     CC        ../../os/net/ipv6/simple-udp.c

     CC        ../../os/net/ipv6/udp-socket.c

     CC        ../../os/net/ipv6/uip-nd6.c

     CC        ../../os/net/ipv6/uip-nameserver.c

     CC        ../../os/net/ipv6/resolv.c

     CC        ../../os/net/ipv6/tcpip.c

     CC        ../../os/net/ipv6/uip6.c

     CC        ../../os/net/ipv6/psock.c

     CC        ../../os/net/ipv6/uip-ds6-nbr.c

     CC        ../../os/net/ipv6/uip-udp-packet.c

     CC        ../../os/net/ipv6/ip64-addr.c

     CC        ../../os/net/ipv6/uip-packetqueue.c

     CC        ../../os/net/ipv6/tcp-socket.c

     CC        ../../os/net/ipv6/uip-ds6.c

     CC        ../../os/net/ipv6/uip-sr.c

     CC        ../../os/net/ipv6/uip-icmp6.c

     CC        ../../os/net/ipv6/uipbuf.c

     CC        ../../os/net/routing/rpl-lite/rpl-dag-root.c

     CC        ../../os/net/routing/rpl-lite/rpl-icmp6.c

     CC        ../../os/net/routing/rpl-lite/rpl-mrhof.c

     CC        ../../os/net/routing/rpl-lite/rpl-nbr-policy.c

     CC        ../../os/net/routing/rpl-lite/rpl.c

     CC        ../../os/net/routing/rpl-lite/rpl-ext-header.c

     CC        ../../os/net/routing/rpl-lite/rpl-timers.c

     CC        ../../os/net/routing/rpl-lite/rpl-neighbor.c

     CC        ../../os/net/routing/rpl-lite/rpl-of0.c

     CC        ../../os/net/routing/rpl-lite/rpl-dag.c

     CC        C:/git/contiki-ng/arch/cpu/simplelink-cc13xx-cc26xx/dev/startup_cc13xx_cc26xx_gcc.c

     LD        build/simplelink/launchpad/cc1310//hello-world.elf

     OBJCOPY   build/simplelink/launchpad/cc1310//hello-world.elf --> build/simplelink/launchpad/cc1310//hello-world.bin

     OBJCOPY   build/simplelink/launchpad/cc1310//hello-world.elf --> build/simplelink/launchpad/cc1310//hello-world.i16hex

     SREC_CAT  build/simplelink/launchpad/cc1310//hello-world.i16hex --> build/simplelink/launchpad/cc1310//hello-world.hex

    ../../arch/cpu/arm/Makefile.arm:67: recipe for target 'build/simplelink/launchpad/cc1310//hello-world.hex' failed

    process_begin: CreateProcess(NULL, srec_cat build/simplelink/launchpad/cc1310//hello-world.i16hex -intel -o build/simplelink/launchpad/cc1310//hello-world.hex -intel, ...) failed.

    gmake: *** [build/simplelink/launchpad/cc1310//hello-world.hex] Error 2

    rm hello-world.o build/simplelink/launchpad/cc1310//hello-world.i16hex build/simplelink/launchpad/cc1310//obj/startup_cc13xx_cc26xx_gcc.o

    gmake: Target 'hello-world' not remade because of errors.

    **** Build Finished ****

  • I see the same issue but it doesn't matter. You can see elf already generate under contiki-ng\examples\hello-world\build\cc26x0-cc13x0\launchpad\cc1310 so you can start to do download and debug using CCS.

  • Thanks Chen,

     I have realized it actually generates .bin  .elf  & .map files. By some reason it does not generate intel hex file.  Does this mean this is still bug what need to be fixed?

    I assume I can use programmer to flash  program by using  .elf file?    This is really strange issue. If I put in my last settings  "hello-world.elf" it does not generate any file.

  • Yes, you can use use programmer to flash program by using .elf or .bin file. I suppose no hex generating is CCS setting trouble but I don't know how to fix it yet. do you know how to fix this?
  • It's stopping on the hex file generation step, which uses srecord (srec_cat as seen in the log). Do you have srecord installed? And if yes, is it present in your PATH variable?
  • No, I don't have srecord installed on my Windows. Anyway, can we disable generating hex file from CCS if we don't have srecord installed?
  • Yes, by defining the elf target specifically: $(TARGET).elf
  • Found under section 5 in the linked guide:

  • If we add "hello-world.elf" in "Build (Incremental build)", it would cause the following error.


    **** Build of configuration Debug for project hello-world ****

    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 8 hello-world.elf -O

    gmake: *** No rule to make target 'hello-world.elf'.

    **** Build Finished ****
  • It seems like the Contiki-NG build system has changed how the different targets are specified since the guide was written. You cannot write $(CONTIKI_PROJECT).elf to invoke the target anymore. The following target is now called $(OUT_ELF), however, you cannot call this directly as it is a generic target matching on %.elf.

    What you can do is the following, in order to only hit the $(OUT_ELF) target:

    CONTIKI_PROJECT = hello-world
    
    .SECONDEXPANSION:
    all: $$(BUILD_DIR_BOARD)/$(CONTIKI_PROJECT).elf
    
    TARGET = simplelink
    BOARD = launchpad/cc1310
    
    CONTIKI = ../..
    include $(CONTIKI)/Makefile.include
    

    Then, in CCS, call the "all" target.

    Note that I have to use SECONDEXPANSION on the $(BUILD_DIR_BOARD) variable, as this is defined later in the build system. This is purely a Contiki-NG build system issue, and has nothing to do with SimpleLink platform.

  • Thanks , I agree this is Contiki-NG build system issue. Anyway, I tried to install srecord on my Windows and it can generate hex without problem now.
  • Thanks guys,

    One more question Chen.  The SRECORD? Is this Mororola hex format?  How I can install this SRECORD and where to find?

  • You can download srecord from srecord.sourceforge.net/windows.html and you can just put srecord related files under git binary folder. I think hex file is intel-hex format.
  • Thanks Chen,
    This works. I can compile and generate hex file without problem. I think need to be updated instruction ppt file not to put file extension .elf at slide 12.