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.

Compiling Contiki in CCS

Other Parts Discussed in Thread: CC2650

Hi,

There is a similar post in MSP430 section, but no solution.

Does anyone know how to compile Contiki undr CCS5?

I put the source code of Contiki into my workspace and then File>New>Project>C/C++>Makefile Project with Existing Code > Next >Import Existing Code and selected TI Build Tools > Finish

Then I set the properties C/C++ Build I have:

Build command : make TARGET= cc2538dk

Build directory: ${workspace_loc:/contiki-master/examples/cc2538dk}

After that I have an error "Program "\bin\gmake" not found in PATH"

What make utility to use and how to specify it's PATHnaJ

  • Hi,

    I would like you to check this thread:

    http://e2e.ti.com/support/low_power_rf/f/156/t/287471.aspx

    Regards,

    Gautam

  • Hi Gautam,

    Thanks for that link, it's very helpfull.

    The main reason for me trying to port Contiki into CCS is to have the option for debugging, so I will

    still try.

    Now I realize, that I need to acquire more knowledge about both Contiki build systems and CCS.

    Do you know if I use an external compiler would I be able to do the debugging in CCS.

    As well I am not able to find the documentation describing CCS compilers and make. Any idea where it is?

    Another option I have it to manipulate the Contiki sources, so they can be build by a default CCS tools.

    Jan

  • Do you know if I use an external compiler would I be able to do the debugging in CCS.

    Jan,  I've personally not worked on Contiki. So won't be able to comment further.

    As well I am not able to find the documentation describing CCS compilers and make. Any idea where it is?

    Any particular description you're seeking for, about compilers and make ?

    Regards,

    Gautam

  • jan2809 said:
    Do you know if I use an external compiler would I be able to do the debugging in CCS.

    It depends. If the output from the compiler for the file format and generated debug symbols are a standard format (like ELF/DWARF), then it is likely support by the debugger. If it proprietary format like output from IAR, then it is not. GCC output is well supported by the CCS debugger and later versions of CCS even ship with ARM and MSP GCC compilers (or available via update)

    jan2809 said:
    As well I am not able to find the documentation describing CCS compilers and make. Any idea where it is?

    User's guides for TI compiler/assembler/linker can be found here:

    http://processors.wiki.ti.com/index.php/Before_asking_for_CGT_support#Compiler_User_Guides

    CCS uses gmake under the hood to build CCS projects. For more details on how the CCS build environment works, see:

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

    Thanks

    ki

  • Hi Ki-Soo Lee,

    I am principally interested in debugging a Contiki-based application (compiled to ELF in GCC using custom Makefiles) using CCS. The target in question is a CC2650 Cortex-m3 based SoC. I have both USB DevPacks as well as the SmartRF06 Eval boards.

    Could you speak more to how I would go about debugging the (GCC) compiler output inside CCS? I'd really like to avoid having to migrate the entire Contiki build system into CCS because the makefile system is pretty extensive.
  • Hi Mark,
    The CCS debugger supports debugging of GCC ELF images. You can simply start a project-less debug session and load your GCC ELF executable to debug/run it:

    processors.wiki.ti.com/.../Debug_Handbook_for_CCS

    Thanks
    ki
  • Hi Ki,

    That is exactly what I (eventually) did yesterday! It works great.

    Thanks for your time,

    Mark
  • Hi Mark,

    Could you please elaborate for me how you were able to debug contiki poject in CCS6?

    I'm trying to do the same with cc26xx-web-demo project in Contiki 3 - when I try to load

    (tried both as program and symbols) cc26xx-web-demo.elf (also tried loading hex file) -

    that part goes well, but then when it comes to actual execution CCS6 complains about 

    not being able locate symbols (for debugging purpose).

    I tried to follow TI manual on project-less debugging(Thanks to Ki)and the presentation 

    CCSv6-TipsAndTricks.ppt but I can't seem to get CCS6 to look in right location for the 

    source files. Which, as you know, in case Contiki it is split between actual project, and 

    platform folder - i.e. contiki-main.c is in platform/srf06-cc26xx and cc26xx-web-demo 

    project files (including makefile) are under /example/cc26xx/

    Best,

    Avi

  • Hi Avi,

    By default, Contiki does not compile with debugging symbols included.  With gcc-arm-none-eabi, you need to instruct the compiler and linker to use debug mode.  Just add this line to the Makefile of the example you're trying to compile, recompile, and re-load the program in CCS:

    CFLAGS += -g

    Here's how I usually check to see if the symbols were included in the .elf: Go to View > Modules in CCS.  This should show your currently loaded program.  If the Files, Functions, etc. sub-sections are populated (they have little expand/minimize arrows), then the symbols are in the .elf file.

  • Thanks Mark, that worked great (just as you said:)
  • Are you running CCS under Windoze? I am very interested in this process as I am developing nodes for a sub-GHz/6LoWPAN network based on TI microcontrollers and transceivers. TI seems to be very Windoze oriented and my primary development machine runs 8.1, whereas Contiki is quite blatantly Linux-biased. Any pointers would be appreciated.
  • Hi Clark,

    Clark Leach said:
    Are you running CCS under Windoze?

    A1. Contiki is an operating system by itself. If you mean if I develop Contiki under Windows then the answer is yes, mostly.

    Clark Leach said:
    TI seems to be very Windoze oriented

    A2. Do not necessary agree, there are Linux and iOS versions of many tools.

    Clark Leach said:
    Contiki is quite blatantly Linux-biased

    A3 same as A1

    Clark Leach said:
    Any pointers would be appreciated

    A4 check this discussion, can be of some help 

    Jan

  • I don't see how any of that is helpful.
  • Hi Mark,

    When I am debugging Contiki with CCS, the program stops before "while(1){......}", no matter how many times I press the "step over" or some other buttons. 

    When I move "while(1){......}" to somewhere else, it happened again. Do you have some ideas of it? Thanks.

    /yanqiu

  • Can you post steps to build contiki os or any example in contiki os in CCS