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.

C6000 .0ut format changes from CCStudio V3 to V4

Other Parts Discussed in Thread: CCSTUDIO

Hi

we have a product that uses CCStudio to compile and link code from customer generated Matlab Simulink models with our standard DSP code.  

 We have been using CCStudio V3.    This process is automated via various scripts . 

   On a customer system running V4 it proved relatively easy to modify the scripts to compile and link to produce new .out files,  however when we come to anlyse and download the  new files they appear to be in a different format.   - is there a switch or coversion utiltiy to endure backward compatibility of the .out files ?

 

 best regards

 Glen Wardrop

 

 

 

  • On further investigation the problem appear to be related to the handling of entries in a linker .cmd file.      Currently the same file (below) is used for both V3 and V4 systems but the data in section headers is coming out very differently  with different addess pointers specified.

    MEMORY
    {
       /* 256k internal, used for L2 cache or RAM  */
       VECS (IX)     : origin = 0x00000000   len = 0x00000200
       IRAM (RWIX)   : origin = 0x00000200   len = 0x0001F200
       IRESERVED_FOR_HOST (RW)
                     : origin = 0x0001F400   len = 0x00020C00

       EDMA_PRAM (RW)
                     : origin = 0x01A00000   len = 0x00000800

       /* There is 32M (0x02000000) of external memory.                         */
       /* The host (PC) allocates the object data blocks in this memory.        */
       /* Hence the linker does not need to know about most of the memory.      */

       ERESERVED_FOR_HOST (RW)
                   : origin = 0x80000000   len = 0x02000000
    }

    SECTIONS
    {
        .vectors align=0x00004000 > VECS /* interrupt vector table              */
        .text                     > IRAM /* executable code                     */
        /* data for any assembly-coded functions such as the                    */
        /* functions in fastmath67x                                             */
        .data                     > IRAM
        .bss                      > IRAM /* global and static variables         */
        /* Initialisation tables unallocated because we're initialising the     */
        /* variables at load time.                                              */
        .cinit
        .const                    > IRAM /* strings, constants, const variables */
        .far                      > IRAM /* variables declared as far           */
        .stack   fill=0x12345678  > IRAM /* system stack                        */
        /* .cio would normally be placed in ERAM but it's not used and I think  */
        /* putting it in ERAM requires a memory model other than small.         */
        .cio                      > IRAM /* stdio buffers                       */
        .switch                   > IRAM /* jump tables                         */
        .sysmem  fill=0xdeadbeef  > IRAM /* memory for malloc, etc.             */
        .EDMA_PRAM                > EDMA_PRAM
        .IReservedForHost         > IRESERVED_FOR_HOST
        .IReservedForHostEnd: load=0x0003FFFC
        .EReservedForHost         > ERESERVED_FOR_HOST
        .EReservedForHostEnd: load=0x81FFFFFC
        .comment: type = COPY
    }

    clockFrequencyHz = 200000000;
    bootType = 2;     /* 1 for Orsys boot, 2 for host boot */

  • What was the version of c6000 compiler tools used with CCS v3? If it was a couple of major revisions older than the current version in CCSv4 that could account for a lot of differences. The default object file format itself should be the same, so we may need to look closer at what differences appear in the section headers. How are you analyzing the differences? The object file display (ofd) utility included with the codegen tools is a useful tool for dumping the contents of the .out file and can be very helpful in comparing the differences.

  • Previous (current working) version ic CCStudio 3.3     - cl6x  v 6.0.8.0 1 Nov 2006    - CCv4  cl6x v 6.1.9.0

    Our system uses a PC Host program working with a DSP unit for real-time control.    The PC software is parsing the .out file to identify memory regions in the DSP.    On tracking down problems with the V4 build I found that the sections specified as  .IReservedForHost  and .EReservedForHost were not behaving as expected.

    In V3  the PhysicalAddress is defined as expected for the relevant sections     while in V4 only the Raw Data Pointer is defined.    

    The attached zip file contains map file outputs for both versions.

    One further piece of information.   - What we are trying to do is to compile and link custom generated code with a standard pre-built .out file.  On the V4 system the new code is compiled , but  it is linked with a version build under V3.

    thanks for your support.

         Glen

     

     

     

     

    bothmaps.zip
  • Glen,

    Glen Wardrop said:

    Our system uses a PC Host program working with a DSP unit for real-time control.    The PC software is parsing the .out file to identify memory regions in the DSP.    On tracking down problems with the V4 build I found that the sections specified as  .IReservedForHost  and .EReservedForHost were not behaving as expected.

    In V3  the PhysicalAddress is defined as expected for the relevant sections     while in V4 only the Raw Data Pointer is defined.    

    The 6.1.x tools feature a new linker designed to accomodate a broader range of features, therefore the differences on the .map files are probably a side effect - basically the zero-length memory sections .IReservedForHost and .EReservedForHost were removed. Since they are zero-length they do not impact functionality, but your parser will definitely miss them. The only fix that I can think right now is to allocate a global variable to these sections, preventing the linker to discard them (I tested this here).

    Glen Wardrop said:

    (...)What we are trying to do is to compile and link custom generated code with a standard pre-built .out file.  On the V4 system the new code is compiled , but  it is linked with a version build under V3.

    What exactly do you mean by that? Are you issuing cl6x <source_files.c> with 6.1.9 and then issues cl6x -z <object_files.obj> with 6.0.8? I wouldn't recommend that as 6.1.x added a lot more features (particularly to the linker) when compared to 6.0.x versions.

    Regards,

    Rafael

  • Our system is built using CCstudio V3 and has been for some time.   We have the custom code facility for our customers that that has also been set-up with to compile and  link with V3,  and our host PC software downloads the resulting .out files to the target DSP.   For a new customer shipment it proved difficult to source a new V3 CCstudio,  but all we want to do with CCStudio V4 is what we have been doing successfully for years with V3.   We expected some small changes,  and it took a few hours to get the code to compile and link,  which was  no surprise.    What is a surprise is the apparent lack of backward compatibility in the linker.    If there is a way that I can install CCStudio V3 under the new V4 license,  I may have to do that.  I only need something that works - and doesn't take many hours to get working and support.

    best regards

     

     Glen

     

     

  • Glen,

    I understand the trouble. However you can still download and use the version 6.0.x with CCSv4.

    In CCSv4.1.3, follow this procedure:

    - Go to menu Help --> Software Updates --> Find and Install

    - Select New Features to Install

    - Check the box close to Code Generation Tools Updates and click Finish

    - Under C6000 Code Generation Tools you will see release 6.0.27 (the latest in the 6.0.x tools branch)

    Restart the workbench; it will finish installing the updated tools and reopen CCS

    Since you are building the project from the command line you probably does not need the following steps.

    Even still, if you have worked to port your existing project to CCSv4 you won't lose it. To use the newly installed tool from within the IDE, right-click on the project and select Build Properties. Select CCS Build in the tree on the left and the tool version in the Code Generation Tools drop-down menu.

     

    At last, if you created your CCSv4 project from scratch during the porting you will have to select a different Run-time support library from the project linker options (right-click on the project --> Build Properties --> C/C++ Build in the left tree --> C6000 Linker --> Include library file or command file as input) . The 6.1.x tools' new linker performs an automatic selection of the run-time support library, which points to <libc.a> and does not exist in 6.0.x.

    Please try this and see if it helps working around the issues.

    Regards,

    Rafael

  • Thanks Rafael

       that sounds like exactly what I need - however on my system I don't get offered the code generation utilities from ... Find and Install ...

    I was offered only Code Composer Studio updates and Spectrum Digital CCS4.2 Updates   rightly or wrongly  the I took a Code Composer Update which seemed to work fine and eventually updated me to CCS 4.1.3.00038   - but I can find no sign of the code generation updates.

     

        best regards

     

     

     Glen

     

     

  • Thanks Rafael

       that sounds like exactly what I need - however on my system I don't get offered the code generation utilities from ... Find and Install ...

    I was offered only Code Composer Studio updates and Spectrum Digital CCS4.2 Updates   rightly or wrongly  the I took a Code Composer Update which seemed to work fine and eventually updated me to CCS 4.1.3.00038   - but I can find no sign of the code generation updates.

     

        best regards

     

     

     Glen

     

     

  • Glen,

    Take a look at this page for an alternate location to download the compiler releases:
    http://processors.wiki.ti.com/index.php/Compiler_Releases

     

  • Big thanks to Rafael and Aarti    -  I've now downloaded 6.0.27 code generation -  it installed without problems and after pointing my build tools to the new location everything seems to work fine. 

       Your suport has been invaluable  - I'd have got nowehere without it.