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.

Migrating from CCS V3.1 to CCS v5.1

Other Parts Discussed in Thread: CCSTUDIO, ADS7881

Hi,

I am trying to import CCS v3.1 based DSP/BIOS project for C6713 to CCS v5.1 but couldn't succeed. I followed the following wiki page but no use.

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

When I check the box "Copy projects into workspace", I get the following errors.

!ERROR: java.lang.IllegalArgumentException
    at java.net.URI.create(Unknown Source)
    at com.ti.ccstudio.project.core.internal.legacy.LegacyProjectImporter.processSources(LegacyProjectImporter.java:672)
    at com.ti.ccstudio.project.core.internal.legacy.LegacyProjectImporter.createManagedMakeProject(LegacyProjectImporter.java:459)
    at com.ti.ccstudio.project.core.internal.legacy.LegacyProjectImporter.doRun(LegacyProjectImporter.java:265)
    at com.ti.ccstudio.project.core.internal.legacy.LegacyProjectImporter.access$0(LegacyProjectImporter.java:226)
    at com.ti.ccstudio.project.core.internal.legacy.LegacyProjectImporter$1.run(LegacyProjectImporter.java:209)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
    at com.ti.ccstudio.project.core.internal.legacy.LegacyProjectImporter.run(LegacyProjectImporter.java:207)
    at com.ti.ccstudio.project.ui.internal.wizards.importlegacy.ImportLegacyProjectWizard$1.run(ImportLegacyProjectWizard.java:111)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.net.URISyntaxException: Illegal character in path at index 4: BAS_ main.c
    at java.net.URI$Parser.fail(Unknown Source)
    at java.net.URI$Parser.checkChars(Unknown Source)
    at java.net.URI$Parser.parseHierarchical(Unknown Source)
    at java.net.URI$Parser.parse(Unknown Source)
    at java.net.URI.<init>(Unknown Source)
    ... 11 more

Without checking the box, It doesn't show any error but it doesn't produce .out file either while building the project.

If I am correct, I need to convert CDB file to TCF but I don't know how to do it.

I will appreciate if some one help me solving this problem.

Regards,

Tariq Siddiqui

  • Hello Tariq,

    If your project is using BIOS 4.9, then yes, you need to update your version of BIOS to v5 before importing. This includes converting your BIOS v4.x CDB file to v5 TCF format. See: http://processors.wiki.ti.com/index.php/Migrating_from_BIOS_4.9_to_BIOS_5.x

    Thanks

    ki

  • Ki,

    Thanks for your help.

    I am sorry but I couldn't get this it work. That wiki page doesn't say any thing about how to use CDB2TCF utility to convert from v4.9 to v5.1.

    Can you please tell me how can I run CDB2TCF.exe to get the migration done ?

  • Ki,

    I followed the page you mentioned and unzipped the file update.zip located at %BIOS_INSTALL_DIR%\packages\ti\bios\config\update. When I open the CDF file of the project which I am intending to migrate, a new window open and ask to SPECIFY XDC TOOLS INSTALLATION DIRECTORY. When I provide path to this folder in the following way: C:\ti\xdctools_3_22_04_46, it says Error retrieving version if file c6x1x.cdb: Failed to open file.

    Please help to solve this issue.

    My old program is based on DSP/BIOS where an ADC is interfaced with C6713 using 5-6K Interface board.

    Thanks.

  • Hi Tariq,

    I will move this post into the BIOS forum. The BIOS experts can help you best.

    Thanks

    ki

  • Tariq,
    can you try running the app cdb2tcf from the command line? When you unpacked update.zip, it should have contained cdb2tcf.exe. Run it and pass your CDB file as the only argument. Please post here the output that cdb2tcf generates on the command line.

  • Sasha,

    Please find attached cdb2tcf output.

    C:\ti\bios_5_41_11_38\packages\ti\bios\config\update>cdb2tcf
    usage: cdb2tcf [-h] [-d] [-i <customImport>.tci <customSeed>.cdb] [-l <logfile>]
     [-a <verbosity level>] <application>.cdb

    C:\ti\bios_5_41_11_38\packages\ti\bios\config\update>cdb2tcf ADS7881.cdb
    Application: ADS7881.cdb
    Original seed file: c:/ti/bios_5_41_11_38/packages/ti/bios/config/update/4.90.27
    0/c6x1x.cdb
    Loading application CDB file
    Device name: 6713
    Catalog: ti.catalog.c6000
    Generating CSL files
    Unloading the application CDB file
    Loading original seed: c:/ti/bios_5_41_11_38/packages/ti/bios/config/update/4.90
    .270/c6x1x.cdb
    Finding user changes
    Loading new seed file
    New seed: c:/ti/bios_5_41_11_38/packages/ti/bios/config/cdb/c6x1x.cdb
    Applying changes
    Saving original ADS7881.cdb in ADS7881.cdb.Tue_Jun_05_15.21.24_2012
    Creating TCF file: C:/ti/bios_5_41_11_38/packages/ti/bios/config/update/ADS7881.
    tcf
    Tconf search path information is required for running the generated tcf file.
    The search path info for the Tconf.exe command line has been saved in
    tcfopts.dat.

    I did convert to TCF. After that I tried to open the new ADS7881.tcf file, a dialog box asked to Specify XDC Tools Root Directory, I gave the path C:/ti/xdctools_3_22_04_46. Another dialog box asked to Set Import File Search Path, I gave this path c:/ti/bios_5_41_11_38/packages and got the following error mesages.

    js: Can't modify read-only field
    js: Can't modify read-only field
    Correct any script errors in C:/ti/bios_5_41_11_38/packages/ti/bios/config/update/ADS7881.tcf
    using the Configuration Tool or a text editor, if necessary.
    TConf initialization arguments:
    -e environment['config.importPath']='c:/ti/bios_5_41_11_38/packages;C:/ti/bios_5_41_11_38/packages;' -e environment['config.scriptName']='ADS7881.tcf'

    Thanks for your help.

    Regards,

    Tariq


  • Tariq,
    the conversion finished without errors, but it seems there are things in the new Tconf script that are not generated correctly. Such problems are solved by further editing of the Tconf script, but we have to first find out which statements are causing errors.
    There is a bug that prevents Tconf from displaying line numbers in such cases, so you'll have to find out which lines are incorrect by inserting print() statements in the script until you identify the lines with the errors. The function print() accepts a string parameter.
    You can also post your Tconf script here, and I'll try to run it.

  • Sasha,

    Please find Tconf script here.

    /* loading the generic platform */
    var params = {};
    params.clockRate = 50;
    params.deviceName = "6713";
    params.catalogName = "ti.catalog.c6000";
    params.regs = {};
    params.regs.l2Mode = "SRAM";
    utils.loadPlatform("ti.platforms.generic", params);


    /* enabling DSP/BIOS components */
    bios.GBL.ENABLEINST = true;
    bios.MEM.NOMEMORYHEAPS = false;
    bios.RTDX.ENABLERTDX = true;
    bios.HST.HOSTLINKTYPE = "RTDX";
    bios.TSK.ENABLETSK = true;
    bios.GBL.ENABLEALLTRC = true;

    bios.GBL.ENDIANMODE = "little";

    bios.GBL.C621XCONFIGUREL2 = false;

    /* applying user changes */
    bios.IRAM.len = 0x40000;

    bios.IRAM.createHeap = 1;

    bios.MEM.BIOSOBJSEG = prog.get("IRAM");

    bios.MEM.MALLOCSEG = prog.get("IRAM");

    bios.GBL.CHIPTYPE = "6713";

    bios.GBL.BOARDNAME = "c6713";

    bios.TSK.STACKSEG = prog.get("IRAM");

    bios.LNK_dataPump.order = 1;

    bios.RTA_dispatcher.order = 0x2;

    bios.IDL_cpuLoad.order = 0x3;

    bios.PRD_clock.order = 1;

    bios.HWI.EXTPIN4POLARITY = "high-to-low";

    bios.HWI.EXTPIN5POLARITY = "high-to-low";

    bios.HWI.EXTPIN6POLARITY = "high-to-low";

    bios.HWI.EXTPIN7POLARITY = "high-to-low";

    bios.HWI_INT5.fxn = prog.extern("ExtINT5_ISR");

    bios.HWI_INT5.useDispatcher = 1;

    bios.HWI_INT6.fxn = prog.extern("ExtINT5_ISR");

    // !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!

    if (config.hasReportedError == false) {
        prog.gen();
    }

    Please mention the errors you fixed to help me understand the problem. Does that mean, every time during migration from CCS v3.1 to CCS v5.1, I will have to fix them manually ?

    Thanks for your help.

  • I opened your script in the GUI without any problems.
    I also tried using building a project that contains your script and that worked just fine for me. Here is the command line from my CCS console that built your script:
    'Building file: ../hello.tcf'
    'Invoking: TConf'
    "C:\ccsproducts\xdctools_3_23_01_43/tconf" -b -Dconfig.importPath="C:/ccsproducts/bios_5_41_11_38/packages;" "../hello.tcf"
    'Finished building: ../hello.tcf'
    ' '

    Can you try building the project and see ff that works for you. If it does, then we will know that the script is valid but there is a problem with the GUI. If you get Tconf errors on the console, please post the output.

  • Sasha,

    Please find attached list of errors I got on building the project.

    Let me explain the steps I followed to migrate the project.

    I made new installation of CCSv5.1, I copied ADS7881.cdb from old project to the directory 'update' where cdb2tcf.exe exists. Used the command line to convert from cdb to tcf, it successfully converted to ADS7881.tcf file. When I tried to open ADS7881.tcf file, a message box asked for 'Specify XDC Tools Root Directory' and 'Set Import File Search Path', on providing those information, tcf script opened with out those errors which I posted yesterday. In addition, it generated another file TEMPtcf88C1.cdb. I copied both new files to workspace directory where old project was copied.

    Then used 'Import Legacy CCSv3.3 Project' to import old project to CCSv5.1, made some changes to the include path to locate some csl file from C6000 folder. On building the project, I got 46 Errors which can be seen in the attached file.

  • Tariq,
    can you try creating a new project from scratch? The assembly file that caused the compilation errors looks like a C6000 assembly source, but it doesn't look like a file Tconf would generate. I haven't tried importing legacy projects but it's possible that some files generated by DSP/BIOS 4.9 were recognized as sources for the new project.

    Try the following steps:
    1. File->New->CCS Project, choose the name and the device.
    2. Choose Empty Projects->Empty Project
    3. Copy from your imported project only the TCF script generated by cdb2tcf and your app C sources to your new empty project. CDB files and any other generated files are not needed anymore.
    4. CCS might ask you to add RTSC support, click Yes.
    5. Try building that new project.

  • Sasha,

    I tried doing that but still the same amount of errors. I can successfully open TCF file but project doesn't build up, some of the .h file for ADS7881 seem to be missing.

    Attached is the project made for CCSv3.1. Can you please see what should be done to run it on CCSv5.1 ?

    I appreciate your help.

    Regards,

    Tariq

    4265.ADS7881_C6713.zip

  • Tariq,
    when you converted your CDB files there were two more files generated in the same directory as your ADS7881.tcf. The files are <project>_csl.h and <project>_csl.c. They should also be in the project you attached, but they are missing. You need to add them too. Those two files in addition to BAS_main.c and ADS7881.tcf are only file you need in your new project. Here are the additional steps you need to follow to have your CSL related code work correctly (this is from Setup Guide for CCSv3 from the directory docs in your BIOS 5 installation):

    •  Add <project>_csl.c to your project.
    • Add a call to cslCfgInit() to your main() function. The function is in the generated <project>_csl.c file. DSP/BIOS no longer calls this function for you.
    • You may need to modify source files that #include <project>cfg.h to also #include <project>_csl.h. You need only modify files that use CSL configuration structures defined in these two files.
    • If you have device driver code that makes CSL calls, make sure that code calls CSL_init() before calling any other CSL API. Alternately, you may want to create a function that calls CSL_init() and reference that function in your DSP/BIOS configuration by adding the following lines to the Tconf script:
    bios.GBL.CALLUSERINITFXN = true;
    bios.GBL.USERINITFXN = prog.extern(“your_function_name”);
    • Add the appropriate CSL library for your target to the project or to a linker command file that is separate from the one generated by Tconf (<project>cfg.cmd). For example:
    -lcsl6713.lib
    • You may see some CSL related warnings when you build your project. If you see a warning that says “Creating output section .csldata:SYS_data without SECTIONS specification”, you need to add the .csldata section to the memory section of your linker command file. (If you are using the generated linker command file, then you will need to create (and add to your project) your own that includes the BIOS generated linker command file and then adds this .csldata section.)  For example:
    SECTIONS {
       .csldata > IDATA
    }
    •  Add the CSL include directory to your project build’s include path.
    • You are now responsible for managing and updating <project>_csl.c and <project>_csl.h as source files. DSP/BIOS no longer supports configuring CSL. See the CSL documentation for details.

    You probably did some of these steps already, but you may have missed some. When you create a new project with only those four source files, try to build it and let me know how it went.

  • Sasha,

    Thanks for your detailed comments and sorry for my delayed response as I was away for some time.

    I followed those steps carefully that results enormous reduction in number of errors. Now I am getting few linking errors which can be seen below. Moreover, I am getting a warning for HWI_enable() call inside main.

    <Linking>
    error #10056: symbol "_hMcbsp1" redefined: first defined in "./BAS_ main.obj";
       redefined in "./ADS7881cfg_csl.obj"
    error #10056: symbol "_hMcbsp0" redefined: first defined in "./BAS_ main.obj";
       redefined in "./ADS7881cfg_csl.obj"
    error #10056: symbol "_timerCfg0" redefined: first defined in "./BAS_
       main.obj"; redefined in "./ADS7881cfg_csl.obj"
    error #10056: symbol "_cslCfgInit" redefined: first defined in "./BAS_
       main.obj"; redefined in "./ADS7881cfg_csl.obj"

    error #10056: symbol "_hTimer1" redefined: first defined in "./BAS_ main.obj";
    >> Compilation failure
       redefined in "./ADS7881cfg_csl.obj"
    error #10056: symbol "_mcbspCfg1" redefined: first defined in "./BAS_
       main.obj"; redefined in "./ADS7881cfg_csl.obj"
    error #10056: symbol "_mcbspCfg0" redefined: first defined in "./BAS_
       main.obj"; redefined in "./ADS7881cfg_csl.obj"
    error #10010: errors encountered during linking; "ADC7881.out" not built
    gmake: *** [ADC7881.out] Error 1
    gmake: Target `all' not remade because of errors.

    I am attaching complete project along with missing files if you want to have a look.

    Thanks.

    2526.ADC7881.zip

  • I am very near to solve this problem, please help.

    Thanks.

  • You are including the wrong file in your BAS_main.c, you should include the header file ADS7881cfg_csl.h, not the source file ADS7881cfg_csl.c.

    I don't see the warning for HWI_enable in the output you posted. Please post the warning message if you see it again.


  • **** Build of configuration Debug for project ADS7881 ****

    C:\ti\ccsv5\utils\bin\gmake -k all
    'Building file: ../main.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -g --include_path="C:/ti/ccsv5/tools/compiler/c6000/include" --include_path="C:/ti/ccsv5/tools/compiler/c6000/csl/include" --include_path="C:/ti/workspace_v5_1/ADS7881/Debug" --include_path="C:/ti/bios_5_41_11_38/packages/ti/bios/include" --include_path="C:/ti/bios_5_41_11_38/packages/ti/rtdx/include/c6000" --display_error_number --diag_warning=225 --abi=coffabi --preproc_with_compile --preproc_dependency="main.pp"  "../main.c"
    "../main.c", line 33: warning #225-D: function declared implicitly
    'Finished building: ../main.c'
    ' '
    'Building target: ADS7881.out'
    'Invoking: C6000 Linker'
    "C:/ti/ccsv5/tools/compiler/c6000/bin/cl6x" -g --display_error_number --diag_warning=225 --abi=coffabi -z -m"ADS7881.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c6000/lib" -i"C:/ti/ccsv5/tools/compiler/c6000/include" -i"C:/ti/bios_5_41_11_38/packages/ti/rtdx/lib/c6000" -i"C:/ti/bios_5_41_11_38/packages/ti/bios/lib" --reread_libs --rom_model -o "ADS7881.out" -l"./ADS7881cfg.cmd"  "./main.obj" "./ADS7881cfg_csl.obj" "./ADS7881cfg_c.obj" "./ADS7881cfg.obj" -l"csl6713.lib"
    <Linking>
    'Finished building target: ADS7881.out'
    ' '

    **** Build Finished ****

    See the warning highligted in RED. After debug, when I run the project, I see no sine wave on graph window. I also see this "No source available for "c_int00() at 0x11d10".


  • Can you provide me LED based project to check if my DSK is working properly with CCS v5.1 ?

  • Hi Tariq,

    Tariq Siddiqui said:
    "../main.c", line 33: warning #225-D: function declared implicitly

    See slide 35 of: http://processors.wiki.ti.com/images/c/c8/Cgt_tips_April2011.pdf

    Tariq Siddiqui said:
    "No source available for "c_int00() at 0x11d10".

    This is expected. You are at the entry point of the program. I believe c_int00 is defined in the run-time library and CCS does not have the source for that.

    ki

  • Ki-Soo, Sasha,

    Thanks for your valuable help. I really appreciate that.

    I didn't get much from slide 35. However, I added rts6700 library to Linker Search Path and the warning has gone. Now I can see the sample sine wave on the graph window.

    One thing, do I need to add rts6700 and csl6713 lib with every project ?

    Thanks.

  • As I posted previously, if you are calling into the CSL, you have to add the library manually. The C runtime support library should be added to the linker command file generated by DSP/BIOS. The file has the extension .cmd, and you can find in the directory Debug. If the library is not there, open your TCF script in the GUI and check Global Settings. There is a setting there that allows you to remove the C runtime library from the generated linker command file.