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.

Using the Linux Code Generation Tools for C6000



 

Hello Everyone,

 I am planning to use the Linux Code Generation tools for C6000. Has anyone used them? I am planning to use them on EVM6472.

 I am also planning to use a Windows XP SP3 host with Virtual Box 3.2.4 with Ubuntu as the guest operating system. I am planning to use this a environment to generate code using TI's Linux code generation tools. Does anyone foresee any problems. Also found this wiki page about doing the same

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

Can anyone in TI please confirm this.

Also, does any one seems to know about any download utilities to download code from linux operating system??

Thanks to everyone in advance

Pranav Desai

 

 

  • Pranav Desai said:

     I am planning to use the Linux Code Generation tools for C6000. Has anyone used them? I am planning to use them on EVM6472.

     I am also planning to use a Windows XP SP3 host with Virtual Box 3.2.4 with Ubuntu as the guest operating system. I am planning to use this a environment to generate code using TI's Linux code generation tools. Does anyone foresee any problems.

    They CGT set does certainly work within Linux, and there are no immediate problems with doing builds like this, though you have to set up the builds in a more manual fashion than you would if you just did your builds with CCS in Windows. This is a particularly good option if you prefer to script your builds with Linux commands, it is not uncommon for larger builds for DSPs to be done in Linux.

    Pranav Desai said:
    Also, does any one seems to know about any download utilities to download code from linux operating system??

    Unfortunately there are not any utilities to download DSP code to hardware over a JTAG connection, at least not yet, as the emulation drivers are still largely tied to Windows. Today you would want to do the debugging from a Windows host using CCS, which provides a more complete debug environment for TI DSPs.

  •  

    Thank you very much for replying.

    Are there any tools available to convert the existing CCS project in to one or make files for linux?

    Or will I have to generate my own Make files.

    Thanks

    Pranav Desai

  • Pranav Desai said:
    Are there any tools available to convert the existing CCS project in to one or make files for linux?

    Not that I am aware of, building in CCS with .pjt files is heavily tied to Windows with various hard coded paths and backslashes, making it troublesome to do a simple conversion. If you can do the build within Windows but you want a Linux like environment you could use Cygwin and the command line code generation tools. On a Windows machine a utility called timake.exe is provided which processes .pjt files from the command line, making this process easier. In general if you want to do builds within Linux, you will have to generate your own make files.

    There is an example of the reverse of this process, taking a make built DSP executable and turning it into a CCS project here, which is based on the example here. In your case the process would be reversed, how complex it is will depend on what features you are using.

    As to your questions about boot loading, I will have to split them into another thread for someone more familiar with the C6472 boot process to answer.

     

  • Bernie-

    > Not that I am aware of, building in CCS with .pjt files is heavily tied to Windows
    > with various hard coded paths and backslashes, making it troublesome to do
    > a simple conversion.

    This is the official TI answer?  You guys are top 5 CPU code development experts in the world, CCS is an amazing platform developed over 14 years since you purchased Go DSP in 1996, and Linux has been a widely used development environment for 10+ years -- I don't see how some pathnames should stop you guys :-)   But seriously, does TI have plans for project migration or .pjt  file conversion utility?  For large projects, this would seem to be crucial for your customers.

    > If you can do the build within Windows but you want a Linux like environment you
    > could use Cygwin and the command line code generation tools.

    We're using VirtualBox and Ubuntu Linux on a WinXP host.  There is a TI wiki page for how to do this (see Pranav's post above).  Should we be using Cygwin instead?  Which do you recommend?

    > On a Windows machine a utility called timake.exe is provided which processes
    > .pjt files from the command line, making this process easier. In general if you
    > want to do builds within Linux, you will have to generate your own make files.

    CCS "Generated Makefile Builder" option produces a Makefile... a couple of questions about this:

    1) Could we use this as a Linux project starting point?

    2) Why is Cygwin referenced in the generated makefile?

    -Jeff

  • As stated earlier, CCSv3.3 (and previous versions) were tied to the Windows operating systems. On the other hand, with last years release of CCSv4, TI has migrated to the Eclipse IDE platform which should allow TI to release both Windows and Linux versions of CCS. As I understand it,TI is still in the process of porting a few more debug drivers to Linux, which is required to release a version of CCS that runs in Linux.

    Therefore, I think the long-term plan includes the tool options you are looking for, they just aren't quite there, yet.

    BTW, to partially answer another question you asked:  If you check out the current Windows version of CCSv4 you will notice there is a project migration wizard. I have successfully ported many lab project using this wizard. That said, I have found that very complicated projects require tweaking after running the wizard. You may want to download and experiment with this in the released version of CCS (on Windows, that is) and provide the development team feedback with the results you find.

    Just out of curiosity, why do you want to build your programs in the Linux environment? I ask this for two reasons:  (1) You never stated the reason why, and it could be helpful in better answering your questions; and (2) you have a Windows environment, so I'm not sure why you want to create a virtual Linux environment to do your builds.

    (On my own machine, I actually run several versions of CCS in different Windows virtual machines ... running under Windows. So, I get the value vm's can provide. I'm just not sure what exactly you're looking for.)

    Take Care,
    Scott

  • I think Scott has the CCS project support in Linux question covered.

    Jeff Brower said:

    We're using VirtualBox and Ubuntu Linux on a WinXP host.  There is a TI wiki page for how to do this (see Pranav's post above).  Should we be using Cygwin instead?  Which do you recommend?

    The VirtualBox route gives you a more comprehensive Linux experience, Cygwin gives you just a Linux like shell in Windows. Which is better depends on your particular needs, I use Linux machines directly and don't really use Cygwin, but I primarily work with ARM based processors which run Linux so for much of my development work Cygwin is inadequate.

    Jeff Brower said:

    CCS "Generated Makefile Builder" option produces a Makefile... a couple of questions about this:

    1) Could we use this as a Linux project starting point?

    2) Why is Cygwin referenced in the generated makefile?

    I am not very familiar with the CCS "Generated Makefile Builder", I imagine this means you are using CCSv4?

    I took a look at the .mak files that are generated by CCSv4 in a project and they look like a bit of a mess, but they do appear to be using gmake, and may be of some use in making a usable Linux make file. They are however not designed in the most scale-able fashion, they don't seem to be made to be edited, but rather just used as an interim step in the CCSv4/Eclipse build process, a hand made makefile would likely make more sense.

    I don't see Cygwin referenced in my generated makefiles, I am not sure why it would be referenced, the generated makefiles seem to be targeted at a Windows based make, making Cygwin unnecessary.

    Much like Scott, I also am interested in why you want to use Linux for a DSP device like this?

    This seems to be getting fairly deep into CCS questions, we may want to move this thread to the CCS forum.

  • Scott-

    We'll take a look at the CCS4 project migration wizard.  Are you suggesting this would be a better way to migrate a project over to the Linux tool chain instead of the Generated Makefile Builder?

    To answer your "why" question, we build CIM array cards (compute intensive multicore) and insert them in servers.  Currently we're making the cards OpenMP compatible, in which case we take customer source code and separate/instrument the code to create an x86 code stream and a CIM code stream.  The CIM stream goes through TI's Linux-based tool chain.  Why don't we work entirely under Linux?  As you mentioned, TI's Linux tools are not "quite there yet", which is completely understandable given
    that TI has been slow to arrive at the Linux table (April's announcement of a TI native, factory Linux running on 64x+ cores is just fantastic -- wish it had happened 5 years ago).  So we use WinXP CCS to verify results, download over USB-connected EVM and DSK boards, debug when necessary, experiment with DSP/BIOS and CSL features, etc.

    Basically we're competing with NVIDIA, but using TI multicore chips because they give more horsepower, in a smaller footprint, using far less power consumption.  A Tesla C870 card is 170 W, full length PCI, and takes up 2 slot widths -- can't go there and win server hearts and minds.

    -Jeff

  • Bernie-

    Thanks for your comments on VirtualBox vs. Cygwin.  For now we'll stay with VirtualBox and see how that goes.  The TI Wiki is influential :-)

    Yes we are using CCS4.  Below are a few lines from the Generated Makefile Builder (I included the reference to Cygwin).  It seems to us that the generated Makefile might be suitable as input for a simple utility to convert it into something a Linux shell can eat.

    -Jeff

    ORDERED_OBJS += \"./obj/evm6472_fpga_led_test.obj" \-l"rts64plus.lib" \-l"evm6472_bsl.lib" \"../c6472.cmd" \
    RM := "C:/Program Files/Texas Instruments/ccsv4/utils/Cygwin/rm" -rf
     
    [...]

    # Tool invocations
    ../bin/FPGA_led_test.out: $(GEN_CMDS) $(CMD_SRCS) $(OBJS)
     @echo 'Building target: $@'
     @echo 'Invoking: C6000 Linker'
     "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/bin/cl6x" -z -m"./obj/FPGA_led_test.map" --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/include" -i"../../../lib/" --reread_libs --rom_model -o "../bin/FPGA_led_test.out" $(GEN_CMDS_QUOTED) $(ORDERED_OBJS)
     @echo 'Finished building target: $@'
     @echo ' '

    # Other Targets
    clean:
     -$(RM) $(S62_DEPS)$(ASM_DEPS)$(C55_DEPS)$(C6000_EXECUTABLE_OUTPUTS)$(S_UPPER_DEPS)$(S_DEPS)$(CPP_DEPS)$(C64_DEPS)$(C43_DEPS)$(C62_DEPS)$(OBJS)$(C??_DEPS)$(S??_DEPS)$(S55_DEPS)$(C_DEPS)$(C_UPPER_DEPS)$(SA_DEPS)$(C++_DEPS)$(CC_DEPS)$(S64_DEPS)$(CXX_DEPS)$(S43_DEPS)$(S67_DEPS)$(C67_DEPS)$(ASM_UPPER_DEPS)$(OPT_DEPS) "../bin/FPGA_led_test.out"
     -@echo ' '

     

  • Hello Bernie,

    When used, the Generated Makefile Builder produces a makefile  and a bunch of .mk files. I am generating this make file for EVM6472 using CCSv4.

    When I look at the Makefile generated it includes makefile.def, makefile.target, makefile.init all the three files are missing. I could not locate them anywhere on the computer. 

    However, when I generate the .obj and .out files again using gmake and the Makefile (generated)  in Windows they both are produced correctly with no errors. I searched through CCS documentation and the TI forums  with no gain.

     

    I am planning to use this make file to generate code in Linux environment using Linux Code Gen tools. I manually edited the Makefile and generated the code and it works fine.

     

    My question is, what are these files?

    I am creating code for a simple project, if I switch to a complicated project will this files be needed/populated?

    There are also some variables/macros like C43_DEPS, C64_DEPS, etc. which are also missing and are included in the file. What are these variables?

     

    Bottom line, if I generate code for C6472 using code generation tools and the modified auto generated  Makefile. Will I be needing/using this files and variables in future?

     

    Regards,

    Pranav Desai

  • Unfortunately your questions are getting beyond my knowledge of the internal build workings of CCSv4 (I still mostly use CCS 3.3 these days), so I will be moving this thread to the CCS forum, the folks there should be able to clear this up, and may even have a better solution.

  • Hello,

    Thanks Bernie for moving the thread to the CCS forum.

    Just to summarize my above post

    1. What are the additional files/variables referenced in the Makefile automatically generated by Makefile Builder Generator option in the CCSv4?

    2. When are these files used or populated, are they ever used for C6472?

    3. Does the C6X_C_DIR and C6X_C_OPTION environment variables work properly in Linux Code Gen tools V7.0.1 for C6000 processors? Are there any special setting or something, since I could not get it to work just by setting them as env variables in Ubuntu.

     

    Regards,

    Pranav Desai

     

  •  

    Hello,

    With reference to my above post, I further discover that CCSv4 is using a '-' special character to avoid errors and warning when the additional files referenced in the auto generated make file are not present. It is due to this functionality no error messages are generated.  For what chip or board will all/any of the above files/variables (ref: makefile.init, makefile.def.....) exist? Or are they just phantom variables never used ever?

    Please, can some inside TI answer the questions in my posts above, they are important for me to move forward. 

    Regards,

    Pranav Desai

     

     

  • If you look in the \Debug (or whatever your project configuration name is) you can see the files that the project build generates.  There should be a makefile, objects.mk, sources.mk, subdir.mk that are part of the makefile process.  There are also .opt files that contain the command line options passed to the compiler and linker.  Depending on your build options you may also see .map and .pp files and of course the .obj files and resulting .out file.  These files are all generated when you build from CCS, the .out is the only one that is actually loaded onto the target and used by the debugger.

    makefile.init and .def are not used.

    Note that the makefiles are really intermediate files for our build flow and that the format of them will change between CCS versions.

    If you are just looking to have a build system on Linux one option might be to try the CCS Linux beta.  http://processors.wiki.ti.com/index.php/Linux_Host_Support

    That way you could let CCS manage the makefile generation.

     

    John

     

     

  • John-

    > If you look in the \Debug (or whatever your project configuration name is) you can see
    > the files that the project build generates.  There should be a makefile, objects.mk,
    > sources.mk, subdir.mk that are part of the makefile process.  There are also .opt
    > files that contain the command line options passed to the compiler and linker.
    >  Depending on your build options you may also see .map and .pp files and of course
    > the .obj files and resulting .out file.  These files are all generated when you
    > build from CCS, the .out is the only one that is actually loaded onto the target
    > and used by the debugger.

    Yes we know this having worked with TI codegen tools since the early 1990s and CCS since 1996.

    > makefile.init and .def are not used.

    As Pranav mentioned, we discovered this.  But our question is:  when are makefile.init, makefile.def, etc. used?  If not for C6472 then for what device?  Please be specific, thanks.

    > Note that the makefiles are really intermediate files for our build flow and that
    > the format of them will change between CCS versions.

    We've created a Perl script to convert CCS makefile output so it works with the TI Linux tool-chain.  The conversion is not complex, mainly to do with pathnames.  Our utility figures out which version of CCS did the makefile and accounts for differences, if any.

    > If you are just looking to have a build system on Linux one option might be to try the
    > CCS Linux beta.  http://processors.wiki.ti.com/index.php/Linux_Host_Support
    > That
    way you could let CCS manage the makefile generation.

    We're using v4.1.  Are you saying that v5 beta includes something like a dependency scan or other means of creating a makefile automatically?

    -Jeff

     

  • Jeff Brower said:

    As Pranav mentioned, we discovered this.  But our question is:  when are makefile.init, makefile.def, etc. used?  If not for C6472 then for what device?  Please be specific, thanks.

    They are not used by any device.  It is something that one of the Eclipse components (CDT) inserts into the file but we do not use it.

    Jeff Brower said:

    > If you are just looking to have a build system on Linux one option might be to try the

    > CCS Linux beta.  http://processors.wiki.ti.com/index.php/Linux_Host_Support
    > That way you could let CCS manage the makefile generation.

    We're using v4.1.  Are you saying that v5 beta includes something like a dependency scan or other means of creating a makefile automatically?

    If you are just building on Linux in an automated way and not looking do to anything else then looking at the Linux CCS tools doesn't make sense.  However if you are primarily working on Linux and just using CCS on windows for debug then taking advantage of the CCS-Linux beta would be of interest.

    John

  • John-

    Correction -- we're using Linux 7.1 CGT.  We didn't install v4.1 beta or v5 beta yet (worried about stability).

    For WinXP, we're using v4.1.

    Sorry for confusion.

    -Jeff

  •  

    Hello John,

    Thanks for the reply.

    Thanks for clearing up the questions regarding Makefiles. As you correctly said, we are planning to build and generate code under linux and we will be using windows CCS for Debug (atleast right now).

    I am using Ubuntu 10.04 with GNOME environment. Have CCSv4.1 Linux Beta or CCSv5 Linux Beta 1 versions been tested for successful build environments on this platform?

    Can the CCSv4.1 Linux beta or CSSv5 Linux beta 1 import successfully a project build prior under Windows CCSv4 or CCSv3.3?

     

    Thanks a lot for your help.

    Regards,

    Pranav Desai

  • Pranav,

    I haven't tried importing a windows project into linux CCS.  Off the top of my head I would expect problems if there are any "linked" resources, i.e. files outside of the project structure as Eclipse uses absolute paths for those.  You could workaround that by using macros that we have described here: http://processors.wiki.ti.com/index.php/Portable_Projects

    Similar problems would exist for include paths, unless they are all made to be relative.  We can give it a try and see what problems occur.

    Ubuntu 10.04 is one of our test configurations.

    John