• TI thinks resolved

Compiler/CCSTUDIO-C2000: How to create a makefile and run from command line

Part Number: CCSTUDIO-C2000

Tool/software: TI C/C++ Compiler

Hi, 

     I want to create a makefile to compile the files with TI compiler for F28069 device. And also i want to execute the same from command line.

     Please share relevant documentation or method to achieve this.

Regards

Baskaran

Note: If this post answers your question, please click the Verify Answer button below. Thank you!

  • Baskaran Chidambaram
    Please share relevant documentation or method to achieve this.

    I'm not aware of any collateral from TI on this topic.

    Your question is actually outside the scope of this forum.  But I think I can shed some useful light.  Please know that, while I am familiar with make, I am not an expert.

    I suggest you separate your task into two parts.  First, learn how to use make on a hosted system like your laptop.  This means you can take advantage of the many tutorials, videos, etc already available for make.  Build simple programs.  Get to the point where you are building programs that have multiple source files.  Second, apply that general knowledge of make to the specific instance of the C28x compiler tools.

    If you start with a make file for a hosted program, these are the primary changes to build an C28x executable instead.

    • The compiler shell name changes from something like gcc or cc to cl2000
    • The compiler and linker options change to those documented in the C28x compiler manual and the linker chapter of the C28x assembly tools manual
    • The linker invocation needs to refer to a linker command file

    An example that might be useful can found in the article How to Submit a Compiler Test Case.  The second build example uses a make file with the C6000 compiler cl6x.  You would use cl2000 instead.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.

  • In reply to George Mock:

    George,
    Thanks for the details. for executing the make should i use gmake only or there are other options. if so can you give some pointers.

    Regards
    Baskaran

    Note: If this post answers your question, please click the Verify Answer button below. Thank you!

  • In reply to Baskaran Chidambaram:

    I don't have any specific recommendations.

    Since you have CCS installed, I can tell you that gmake is available in a directory similar to ...

    C:\ti\ccsv7\utils\bin

    If you are on a Linux system, then gmake (or make?) is among the standard utilities.  If you are on Windows, then I suggest you do an internet search on the term make on Windows.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click This Resolved My Issue on the best reply to your question
    The CCS Youtube Channel
     has short how-to videos
    The 
    Compiler Wiki answers most common questions
    Track an issue with SDOWP. Enter your bug id in the Search box.