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.

config1.tcf file read-only

I am migrating from the CCS3.3 toolset to the CCS5.1 toolset.  After I clean the build, and build the project, I get a message:

js: Can't modify read-only field

That it cannot modify my config1.tcf file.  If I start the build again, the build proceeds correctly.

At first, I checked out config1.tcf thinking that was the problem (no longer read-only), but it still fails the first time after the "clean".

  • David,
    can you post the console output for the first build after cleaning the project, and also for the subsequent succesfull build.

    The error message indicates that there is a specific statement in your TCF script that tries to modify a readonly field. If the error message does not contain the line number, you can detect which line is causing the error by inserting debugging print statements in the script.

  • First I right-click on the project and then "Clean Project"  I removed some proprietary path info below

    **** Clean-only build of configuration Release for project VCE ****

    C:\ti\ccsv5\utils\bin\gmake -k clean
    DEL /F  "Config1cfg.cmd" "Config1cfg.s??" "Config1cfg_c.c"  "Config1cfg.h" "Config1cfg.h??" "Config1.cdb"  "Y:......\VCE.out"
    DEL /F "AddressConversion.pp" 

    ...  Many, many files deleted here

    DEL /F "Config1cfg.pp"
    Could Not Find Y:......\Config1cfg.pp
    'Finished clean'
    ' '

    **** Build Finished ****

    Then I right-click on the project and then "Build Project"

    **** Build of configuration Release for project VCE ****


    C:\ti\ccsv5\utils\bin\gmake -k all
    'Building file: Y:...../Config1.tcf'
    'Invoking: TConf'
    "C:/ti/xdctools_3_22_04_46/tconf" -b -Dconfig.importPath="C:/ti/bios_5_41_11_38/packages;" "Y:....../Config1.tcf"
    js: Can't modify read-only field
    js: Can't modify read-only field
    js: Can't modify read-only field
    gmake: *** [Config1cfg.cmd] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    Running it again

    **** Build of configuration Release for project VCE ****

    C:\ti\ccsv5\utils\bin\gmake -k all
    'Building file: Y:...../AddressConversion.cpp'

    Everything builds successfully.

  • David,
    when tconf failed, it returned an error status, but it still generated the files needed for the rest of the build. That can happen is when at the end of your TCF script you have

    prog.gen();

    instead of

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

    If you want to prevent tconf from generating files, use the latter. The error messages about read-only fields should contain a line number, but there could be a bug in tconf that is causing line numbers not to appear. You can try adding print statements in your script to try to isolate the lines that are generating error messages. If you can post these lines, we could try to detect what's causing the errors.

  • What doe the "print" statement look like?  I'm not familiar with this script file.

  • The print statements looks like this:
    print("OK 2");
    You can add a bunch of these in your script, with different strings in them, and check which ones show up before and which ones after the error messages. After a couple of builds, you should be able to identify the lines that are causing the errors.

  • The offending line is:

    bios.ECM.instance("EVENT24").comment = "EDMA GLOBAL";

    There were three of these but the other two were:

    bios.ECM.instance("EVENT24").comment = "";

    bios.ECM.instance("EVENT24").comment = "<add comments here>";

    Which looked unnecessary, so I deleted them.

  • This also brings up the question of how (in CCSv5.1) do you modify the .tcf file?  In 3.3 you could do that in the tool.

  • You can edit the file in the textual mode, as you already did when you added the print statements, or you can open the graphical mode by right-clicking on the TCF script and click on Open With->DSP/BIOS Configuration Tool. Once you open a file with the configuration tool, your selection will be remembered and the file will open in it by default.

    BTW, have you removed all ECM comment statements or you still have the first one in your script? You should remove them all. In the version of DSP/BIOS you are using, comments are disabled for all ECM instances. I guess some earlier versions of DSP/BIOS allowed the changes in comments, and that's why you have them in your script.