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.

Basic questions about Linux development with CCS

Hi

I am very familiar with using CCS v5 for C66x development but am new to Linux application development for ARM A8.  I have some basic questions:

1) Is it possible to build Linux applications using CCS v5 running on Windows?

2) If yes, are there any restrictions when running CCS on Windows compared with on Linux?

3) How does debugging a Linux application with CCS work?  Does one just use a suitable target configuration file?  Is it necessary to run a debug agent on the target?

Any suitable documentation links would be appreciated.

Best regards

David

  • David,

    For application building you should use CCS for Linux.  You can find information on debugging and using CCS at the following links:

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

    http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Hands_on_with_the_SDK

    http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_uboot_linux_debug_with_ccsv5

    Chase

  • Hi Chase

    Thanks very much for your reply.  The links you provided are very helpful - especially the second one.

    You wrote:

    > For application building you should use CCS for Linux.

    I would like to be clear in my understanding of this. Is it not possible to build and debug Linux applications using CCS on Windows, or is it just not recommended?

    BR

    David

  • David Aldrich said:

    I would like to be clear in my understanding of this. Is it not possible to build and debug Linux applications using CCS on Windows, or is it just not recommended?

    I'm told that this is possible, but I've never been able to get CCS to work with Linux.  The classic way to build apps for embedded Linux (which I believe is how most people do this) is to use a makefile.  You need to provide paths to the include files and libraries in from both your toolchain and the EZSDK.  Here is an example, largely lifted from Linux Workshop 05:

    # *****************************************************************
    #
    # LAB05ABC Makefile (Starter makefile)
    #
    # X86 makefile for lab05abc. Contains rules for:
    #
    # - .x (x86 executable target)
    # - .o (x86 object file)
    # - .PHONY (all, clean and test)
    #
    #
    # Uses the following variables (built-in and user-defined):
    #
    # CC = C compiler (gcc)
    # CFLAGS = compiler options (e.g. -g)
    # LINKER_FLAGS = specify libraries to link in
    # $@ = target
    # $^ = all dependencies
    # $< = first dependency only (not used in this solution)
    #
    # Generic "rule" terminology:
    #
    # target:dependency
    # [TAB] <CMD1>
    # [TAB] <CMD2>
    #
    # GCC options used in this makefile:
    #
    # -c = "compile only"
    # -o = "output filename"
    # -g = "debug mode"
    #
    # Note1: if you use a filename other than "makefile", use the
    #   -f option to enable make to use it:
    #   e.g.  make -f my_make_file.mak
    #
    # Note2: .PHONY tells gMake that the rule's target is not
    #        actually a file (to be created or searched for).
    #
    # Note3: When gMake runs without any rules specified on the
    #        command line, it will make (by default) the FIRST
    #        rule found in the makefile. Hence, it is common
    #        to have a rule named "all" listed first (as below).
    #
    # ***************************************************************

    # -----------------------
    # ------ includes -------
    # -----------------------
    EZSDK := <your install path>/ti-ezsdk_dm816x-evm_5_04_00_11
    include $(EZSDK)/Rules.make


    # --------------------------------
    # ------ user-defined vars -------
    # --------------------------------

    CC := $(CS_GCC)
    CFLAGS := -g -O3 -mfpu=neon -I$(CS_INSTALL_PATH)/libc/usr/include -I$(LLIB_INSTALL_DIR)/include
    LINKER_FLAGS := -lpthread -L$(LLIB_INSTALL_DIR)/lib

    # -----------------------
    # ------ make all -------
    # -----------------------

    # The "all" rule commonly specifies all executable targets to
    # be built. Note, the user has full control over what the "all"
    # rule builds. In this solution, we only have one target.
    # However, in the final DaVinci makefile, you'll see more
    # targets listed.

    .PHONY : all

     

    # -----------------------------------
    # ------ executable rule (.x) -------
    # -----------------------------------

    <your app> : <your c files>
     $(CC) $(CFLAGS) $(LINKER_FLAGS) $^ -o $@ $(CS_INSTALL_PATH)/libc/usr/lib/libstdc++.a
     @echo; echo $@ successfully created; echo

    # ---------------------------------------------------
    # ------ intermeditate object files rule (.o) -------
    # ---------------------------------------------------

    %.o : %.c
     $(CC) $(CFLAGS) -c $< -o $@

     

    # ----------------------
    # ----- clean all ------
    # ----------------------

    # The "clean" rule should remove all files created by
    # the makefile (e.g. the executables and intermediate
    # files).

    .PHONY : clean
    clean :
     rm -f track

     


    # END OF FILE

    To debug, use gdb:

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

    If you want to debug a multi-threaded app you will need to upgrade to the CodeSourcery 2010 Toolchain:

    http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/lite/?cmpid=7108&lite=arm&target_os=GNU%2FLinux&target_arch=ARM&returnURL=https%253A%252F%252Fsourcery.mentor.com%252FGNUToolchain%252Frelease1600%253Flite%253Darm%2526cmpid%253D7108

    Lee

     

  • David Aldrich said:

    Hi Chase

    Thanks very much for your reply.  The links you provided are very helpful - especially the second one.

    You wrote:

    > For application building you should use CCS for Linux.

    I would like to be clear in my understanding of this. Is it not possible to build and debug Linux applications using CCS on Windows, or is it just not recommended?

    BR

    David

    David,

    We do now have a Windows version of our toolchain for the ARM processor available (the one that matches the built Linux system.)

    This is why we say to run this under Linux.

    Chase

  • Hi Chase

    Chase said:

    We do now have a Windows version of our toolchain for the ARM processor available (the one that matches the built Linux system.)

    Did you omit 'not' from this sentence? i.e. "We do not now have a Windows version ..."

    Otherwise, I don't understand your point.

    BR

    David

  • Yes.  I meant NOT, not now.  Sorry about that.

  • Ok, now I understand, thanks ;-)

    David

  • Hi David,

    I've been through an exercise where I have built a linux application using the ARM toolchain in windows. But I've not seen it done with CCS or the gcc toolchain.

    Also with ARM tools you can only build application, you can not build the kernel.  

  • Hi Jeff

    Jeff L said:

    I've been through an exercise where I have built a linux application using the ARM toolchain in windows. But I've not seen it done with CCS or the gcc toolchain.

    Also with ARM tools you can only build application, you can not build the kernel.  

     
    Thanks for your comments.
     
    David