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.

Error using SYS/BIOS xs tool (continued from 4/20/15 thread)

Other Parts Discussed in Thread: SYSBIOS

This is a continuation of my thread from yesterday (//e2e.ti.com/support/embedded/tirtos/f/355/p/413808/1486169) which somehow had all the 21 replies removed except for the last one. So it is useless now. I'm converting my working DSP/BIOS v5.42 project to SYS/BIOS v6.41.02.41 using the xs tool and following syntax listed in TI app note: SPRAAS7G, titled "Migrating a DSP/BIOS 5 Application to SYS/BIOS 6", Page-6, Sec: 2.1, Conversion Tool Syntax. I first had trouble with an environment variable for Java, but that's fixed now and the Java being used is v7, located in: C:\ti\ccsv6\eclipse\jre. I get an error that I can't understand too well. Here is the command line text and the xs output:

C:\ti\xdctools_3_31_00_24_core>xs --xp "C:\ti\bios_6_41_02_41\packages" ti.bios.conversion -c SingenX05-3b_RTOS.cfg --pr C:\ti\xdctools_3_31_00_24_core\SingenX05 --pn SingenX05-3b_RTOS SingenX05-3b_RTOS.tcf

TypeError: Cannot call property oldLoadPlat in object [object Object]. It is not a function, it is "undefined".
js: "./packages/xdc/tools/Cmdr.xs", line 51: Error: ti.bios.conversion: ReferenceError: "prog" is not defined.
"C:/ti/bios_6_41_02_41/packages/ti/bios/conversion/Main.xs", line 91
"./packages/xdc/tools/ICmd.xs", line 50
"./packages/xdc/xs.js", line 188

Here is a more detailed output of xs, using the --d -dxdc.traceEnable="all" command, in case that helps"

C:\ti\xdctools_3_31_00_24_core>xs --d -Dxdc.traceEnable="all" --xp "C:\ti\bios_6_41_02_41\packages" ti.bi
os.conversion -c SingenX05-3b_RTOS.cfg --pn SingenX05-3b_RTOS SingenX05-3b_RTOS.tcf
TC - 0: TCF_create('', 0x18feb4, 0x18fefc)
TC - 0: getClassPath(0x18e950, 0x406010, 0x407d78)
TC - 0: findFile(js.jar, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\js.jar ...
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\js.jar ...
TC - 0: found C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\js.jar
TC - 0: findFile(config.jar, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\config.jar ...
TC - 0: found C:\ti\xdctools_3_31_00_24_core\config.jar
TC - 0: findFile(antlr.jar, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\antlr.jar ...
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\antlr.jar ...
TC - 0: found C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\antlr.jar
TC - 0: default class path = C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\js.jar;C:\ti\xdctools
_3_31_00_24_core\config.jar;C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\antlr.jar;
TC - 0: findFile(jre\bin\java.exe, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\jre\bin\java.exe ...
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\jre\bin\java.exe ...
TC - 0: file 'jre\bin\java.exe' not found.
TC - 0: findFile(jre\bin\java, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\jre\bin\java ...
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\jre\bin\java ...
TC - 0: file 'jre\bin\java' not found.
TC - 0: findFile(bin\java.exe, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\bin\java.exe ...
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\bin\java.exe ...
TC - 0: file 'bin\java.exe' not found.
TC - 0: findFile(bin\java, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\bin\java ...
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\bin\java ...
TC - 0: file 'bin\java' not found.
TC - 0: XDCTOOLS_JAVA_HOME = C:\ti\ccsv6\eclipse\jre
TC - 0: findFile(jre\bin\client\jvm.dll, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\jre\bin\client\jvm.dll ...
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\jre\bin\client\jvm.dll ...
TC - 0: file 'jre\bin\client\jvm.dll' not found.
TC - 0: testing C:\ti\ccsv6\eclipse\jre\jre\bin\client\jvm.dll ...
TC - 0: findFile(bin\client\jvm.dll, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\bin\client\jvm.dll ...
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\bin\client\jvm.dll ...
TC - 0: file 'bin\client\jvm.dll' not found.
TC - 0: testing C:\ti\ccsv6\eclipse\jre\bin\client\jvm.dll ...
TC - 0: found C:\ti\ccsv6\eclipse\jre\bin\client\jvm.dll
TC - 0: createVM(0x58394c, C:\ti\ccsv6\eclipse\jre\bin\client\jvm.dll, 0x18fc5c)
TC - 0: JVM option[0] = -Xverify:none
TC - 0: JVM option[1] = -Dxdc.traceEnable=all
TC - 0: JVM option[2] = -DXDCPATH=C:\ti\bios_6_41_02_41\packages
TC - 0: JVM option[3] = -Dxdc.root=C:\ti\xdctools_3_31_00_24_core
TC - 0: JVM option[4] = -Djava.class.path=C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\js.jar;C
:\ti\xdctools_3_31_00_24_core\config.jar;C:\ti\xdctools_3_31_00_24_core\packages\xdc\shelf\java\antlr.jar
;
TC - 0: JVM option[5] = -Dconfig.rootDir=C:\ti\xdctools_3_31_00_24_core
TC - 0: JVM option[6] = -Dconfig.gopts=
TC - 0: JVM option[7] = vfprintf
TC - 0: JVM option[8] = exit
TC - 0: JVM option[9] = abort
TC - 0: getVMCreateFxn(0x58394c, C:\ti\ccsv6\eclipse\jre\bin\client\jvm.dll)
GD - 0: GLD_create(C:\ti\ccsv6\eclipse\jre\bin\client\jvm.dll)
GD - 0: GLD_getFxn(0x61580000, JNI_CreateJavaVM)
TC - 0: TCF_run(0x58394c, 0x7, 0x5825b8)
TC - 0: runJS(0x58394c, 0x7, 0x5825b8): config/Shell
TC - 0: mkArgs(0x58394c, 7, 0x5825b8)
TC - 0: findFile(tconfini.tcf, 0x407d78)
TC - 0: testing C:\ti\xdctools_3_31_00_24_core\tconfini.tcf ...
TC - 0: found C:\ti\xdctools_3_31_00_24_core\tconfini.tcf
TC - 0: JVM arg[0] = -f
TC - 0: JVM arg[1] = C:\ti\xdctools_3_31_00_24_core\tconfini.tcf
TC - 0: JVM arg[2] = C:\ti\xdctools_3_31_00_24_core/packages/xdc/xs.js
TC - 0: JVM arg[3] = ti.bios.conversion
TC - 0: JVM arg[4] = -c
TC - 0: JVM arg[5] = SingenX05-3b_RTOS.cfg
TC - 0: JVM arg[6] = --pn
TC - 0: JVM arg[7] = SingenX05-3b_RTOS
TC - 0: JVM arg[8] = SingenX05-3b_RTOS.tcf
TIME=01:40:12.912 PM -- xdc: loadPackage: xdc shell --> xdc (no dependency) (packageLoad, all)
TIME=01:40:12.917 PM -- xdc: loadPackage: xdc shell --> ti.bios.conversion (packageLoad, all)
TIME=01:40:12.924 PM -- xdc: loadPackage: ti.bios.conversion loaded from C:/ti/bios_6_41_02_41/packages/
(packageLoad, all)
TIME=01:40:12.938 PM -- xdc: loadPackage: ti.bios.conversion --> xdc (packageLoad, all)
TIME=01:40:12.941 PM -- xdc: loadPackage: ti.bios.conversion --> xdc.corevers (packageLoad, all)
TIME=01:40:12.948 PM -- xdc: loadPackage: ti.bios.conversion --> xdc.tools (packageLoad, all)
TIME=01:40:12.957 PM -- xdc: loadPackage: xdc.tools loaded from C:/ti/xdctools_3_31_00_24_core/packages/
(packageLoad, all)
TIME=01:40:12.971 PM -- xdc: loadPackage: xdc.tools --> xdc (packageLoad, all)
TIME=01:40:12.977 PM -- xdc: loadPackage: xdc.tools --> xdc.corevers (packageLoad, all)
TIME=01:40:13.038 PM -- xdc: loadPackage: xdc shell --> xdc.tools (no dependency) (packageLoad, all)
TypeError: Cannot call property oldLoadPlat in object [object Object]. It is not a function, it is "undef
ined".
js: "./packages/xdc/tools/Cmdr.xs", line 51: Error: ti.bios.conversion: ReferenceError: "prog" is not def
ined.
"C:/ti/bios_6_41_02_41/packages/ti/bios/conversion/Main.xs", line 91
"./packages/xdc/tools/ICmd.xs", line 50
"./packages/xdc/xs.js", line 188
TC - 0: returned from config/Shell.main (status = 1)
C:\ti\xdctools_3_31_00_24_core\xs: exit status: 1
TC - 0: TCF_delete(0x58394c)
GD - 0: GLD_delete(0x61580000)
TC - 0: TCF_exit(): (init count = 1)

I've tried looking at the source files and line numbers that the error is mentioning, but they don't seem to match up. I don't see oldLoadPlat nor do I see an object called [object Object] as the error msg states. For example, Cmdr.xs", line 51, opened in the location shown in the error msg contains: throw new Error(this.$private.cmdname, and a text search for oldLoadPlat or for object comes up empty. 

Any help would be appreciated. Thanks.

  • Kamran,
    you can remove '--d' and '-Dxdc.traceEnable' options from the command line. The JRE problem is solved, so they are not useful anymore. Your new error is caused by incompatible XDCtools as you already guessed. I think you'll have to go back to XDCtools 3.23, but only for the conversion. Once the conversion is done, please post again so we can find out what's the newest version of XDCtools you can use with a converted script.

  • I'm a bit confused on this. The SYS/BIOS Product Releases page shows that for SYS/BIOS v 6.41.02.41, Ithe recommended xdctools is: v3.30.06.67, but you recommend xdctools v3.23, right? And that version of xdctools seems to be for SYS/BIOS v6.33. Please confirm that I should install xdctools v3.23 for use with SYS/BIOS v6.41.02.41.
    Thanks.
  • To finish the conversion successfully, you'll have to use 3.23. For that step, the incompatibility between new versions of SYS/BIOS and old versions of XDCtools doesn't matter. Once you have a converted script, we'll have to figure out what combination of XDCtools and SYS/BIOS would work. I also want to mention that if your script is not overly complicated or if you think that you will be keep changing the script even after the conversion, you may consider rewriting your configuration script manually and use SYS/BIOS configuration APIs directly.

  • OK, I got it converted, without an error, but the xs tool never completed either, it just hangs in the dos cmd window. Here are the results:

    C:\ti\xdctools_3_23_05_61>xs --xp "C:\ti\bios_6_41_02_41\packages" ti.bios.conversion -c SingenX05-3b_RTOS.cfg --pr C:\ti\xdctools_3_23_05_61\SingenX05b_RTOS --pn SingenX05-3b_RTOS SingenX05-3b_RTOS.tcf
    Platform: ti.platforms.ezdsp2812
    params.clockRate:150
    params.catalogName:ti.catalog.c2800
    params.deviceName:2812
    Target: ti.targets.C28_large
    Clock Rate: 300

    Does it matter that it never finished and went back to the dos prompt or not? It did create the .cfg and .cfg.h files, as well as config.bld and package.bld, .xdcenv.mak, package.xdc, Platform.xdc, and Platform.xs files. Is there any concern about this?

    Thanks.
  • If cfg.h file is generated and it contains only one line
    #include <xdc/cfg/global.h>
    then everything is generated as expected. I don't know why it hangs. Now you can switch back to XDCtools 3.31 and follow instructions from the conversion guide on how to use the generated script and the platform.

  • Thanks, Sasha. The cfg.h file is as you said it should be with that 1 line. I'll continue on now.
    I appreciate your help.
  • When I open the newly-converted .cfg file in CCSv6, I get the following error:
    Sorry, I'm having problems creating this editor. An unexpected exception was thrown.
    org.eclipse.rtsc.xdctools.INVALID_CODEGEN_LOCATION: Invalid codegen location

    This is using the newly converted cfg file, with a few edits. These edits are only commenting-out lines that have warnings above them like:
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("LedBlink_PRD").order = 1; (commented out after conversion)

    I was told recently on this forum that the PRD functionality has been removed from SYS/BIOS, but there are many lines related to PRD that do not have warnings after the conversion like these:
    bios.PRD.instance("LedBlink_PRD").period = 250;
    bios.PRD.instance("LedBlink_PRD").fxn = "LedBlink";
    bios.PowerOff_PRD = bios.PRD.create("PowerOff_PRD");
    bios.PowerOn_PRD = bios.PRD.create("PowerOn_PRD");
    bios.Vadjust_PRD = bios.PRD.create("Vadjust_PRD");

    Does this mean there is some PRD functionality or will all my PRD code need to get converted to clock functions in SYS/BIOS?

    Also, in the .cfg file, now open in CCS, the properties tab is empty , but the cfg script tab is editable. I notice when comparing my .cfg file to an example project's app.cfg file the following differences:
    a) The app.cfg in the example project, project explorer has a [TI-RTOS] next to the filename, but my .cfg file does not have this.
    b) When I open the app.cfg file in the example project, there is a TI-RTOS tab that my open cfg file doesn'e have.
    c) In the example project app.cfg open file, the properties tab is populated, but in my open .cfg file that tab is empty.
    d) The syntax looks different in the example app.cfg file in that most every line starts with "var" and my converted .cfg file doesn't have the word "var" in it.

    Are any of my observations relevant? Thanks.
  • The error message about invalid codegen location doesn't seem related to your converted script. I haven't seen that error before but can you tell me what's the path where you installed the compiler?

    As for the rest of your questions, the converted CFG script uses different modules from the actual SYS/BIOS modules. All uppercase modules are just placeholders for the actual SYS/BIOS modules, which have longer names. These placeholder modules do not have corresponding HTML pages that would display them in the Properties tab. If you want to keep working on the configuration, you would probably want to gradually replace all uppercase modules with the actual SYS/BIOS modules, which would then allow you to use graphical environment.

    PRD instances are converted into Clock instances, so they are still valid in your converted script. In SYS/BIOS, there is no PRD module, but the functionality exists in Clock.

  • Sasha, I have the compiler installed at: C:\ti\ccsv6\tools\compiler\ti-cgt-c2000_6.4.3\bin. I noticed after running the installer for xdctools 3.23 that after conversion of the tcf file, then closing and reopening CCSv6 the next day, that only then did CCSv6 give a message saying it was installing 3.23 to CCS. So I'm not clear on whether it was not installed properly or not.

    However, I temporarily put the new SYS/BIOS project on the side and re-opened the previously working DSP/BIOS project (all the C-code is exactly the same between the two projects). I went to go continue some debugging and noticed that it wasn't working properly. For example, while stepping, it could not show any source code in the disassembly window, despite that I set the proper switches in that window, as I had done many times before. Also, I started having problems with the emulator not wanting to reset, despite multiple attempts. This is my new, XDS-200 USB. It would give an error in CCS, and when I used the test function in Target Config, it would give errors. I disconnected it from the windows PC and from the target, waited 30 seconds, then reconnected and it would still show the error. FInally, after about >10 times of trying it would be ok. It wasn't working in a flaky manner previous to installing SYS/BIOS xdctools 3.23. It was ultra stable then, just about a week ago and the only change to CCS is the xdctools 3.23 install and starting the new project for SYS/BIOS versus DSP/BIOS. During debug, instead of running the code on my target, after a reset, it would run to 0x3FFC00, then stop without a breakpoint and say that there were no symbols at that location. I could not get it to run on it's own as it would always stop almost immediately after pressing the run button in CCS. If I then disconnected the xds-200 and physically unplugged from the target, then the target would run ok on it's own. Of course, I can't debug it that way.

    Regarding the PRD, after conversion, I still have PRD statements like: 

    bios.PRD.instance("LedBlink_PRD").period = 250;
    bios.PRD.instance("LedBlink_PRD").fxn = "LedBlink";
    bios.PowerOff_PRD = bios.PRD.create("PowerOff_PRD");
    bios.PowerOn_PRD = bios.PRD.create("PowerOn_PRD");
    bios.Vadjust_PRD = bios.PRD.create("Vadjust_PRD");

    Are you saying those statements, after the conversion, are valid SYS/BIOS clock module statements? In case it helps, here is the entire converted tcf with a few statements that had warnings commented out. Also, I added a few statements at the top of the file starting with "var":

    /* By: Kamran Kazem, Revised on: 04/21/2015 */
    /* For use with SYS/BIOS v 6.41.02.41 */
    /* loading the F2812 platform */

    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Main = xdc.useModule('xdc.runtime.Main');
    var Memory = xdc.useModule('xdc.runtime.Memory')
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    var ti_sysbios_BIOS = xdc.useModule('ti.sysbios.BIOS');

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Task = xdc.useModule('ti.sysbios.knl.Task');

    var Hwi = xdc.useModule('ti.sysbios.family.c28.Hwi');
    BIOS.heapSize = 0x800;
    /*
    * Build a custom SYS/BIOS library from sources.
    */
    BIOS.libType = BIOS.LibType_Custom;

    /* System stack size (used by ISRs and Swis) */
    Program.stack = 0x100;

    /* Circular buffer size for System_printf() */
    SysMin.bufSize = 0x200;

    /*
    * Create and install logger for the whole system
    */
    var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.numEntries = 32;
    var logger0 = LoggerBuf.create(loggerBufParams);
    Defaults.common$.logger = logger0;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;

    System.SupportProxy = SysMin;

    ti_sysbios_BIOS.rtsGateType = ti_sysbios_BIOS.NoLocking;
    BIOS.cpuFreq.lo = 150000000;


    var params = {};
    params.clockRate = 150.000000;
    params.deviceName = "2812";
    params.catalogName = "ti.catalog.c2800";
    params.regs = {};
    params.regs.pllcr = 0xa;
    xdc.loadPackage('ti.bios.tconf');

    /* enabling SYS/BIOS components */
    bios.GBL.ENABLEINST = true;
    bios.MEM.NOMEMORYHEAPS = false;
    // WARNING: RTDX module is not supported in BIOS 6. --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // bios.RTDX.ENABLERTDX = true;
    // WARNING: HST module is not supported in BIOS 6.
    // bios.HST.HOSTLINKTYPE = "RTDX"; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.TSK.ENABLETSK = true;
    bios.GBL.ENABLEALLTRC = true;

    /* The following SYS/BIOS Features are enabled. */
    bios.enableMemoryHeaps(prog);
    bios.enableRealTimeAnalysis(prog);
    bios.enableRtdx(prog);
    bios.enableTskManager(prog);

    bios.MEM.create("L1SARAM");
    bios.MEM.instance("L1SARAM").base = 0x009000;
    bios.MEM.instance("L1SARAM").len = 0x1000;
    bios.MEM.instance("L1SARAM").createHeap = 1;
    bios.BUF.OBJMEMSEG = prog.get("L1SARAM");
    bios.SYS.TRACESEG = prog.get("L1SARAM");
    bios.GBL.CLKIN = 30000;
    bios.LOG.OBJMEMSEG = prog.get("L1SARAM");
    bios.LOG.instance("LOG_system").bufSeg = prog.get("L1SARAM");
    bios.STS.OBJMEMSEG = prog.get("L1SARAM");
    bios.CLK.OBJMEMSEG = prog.get("L1SARAM");
    bios.PRD.OBJMEMSEG = prog.get("L1SARAM");
    bios.SWI.OBJMEMSEG = prog.get("L1SARAM");
    bios.TSK.OBJMEMSEG = prog.get("L1SARAM");
    bios.TSK.instance("TSK_idle").stackMemSeg = prog.get("L1SARAM");
    bios.IDL.OBJMEMSEG = prog.get("L1SARAM");
    bios.SEM.OBJMEMSEG = prog.get("L1SARAM");
    bios.MBX.OBJMEMSEG = prog.get("L1SARAM");
    bios.QUE.OBJMEMSEG = prog.get("L1SARAM");
    bios.LCK.OBJMEMSEG = prog.get("L1SARAM");
    bios.DIO.OBJMEMSEG = prog.get("L1SARAM");
    bios.DHL.OBJMEMSEG = prog.get("L1SARAM");
    // WARNING: RTDX module is not supported in BIOS 6.
    // bios.RTDX.RTDXDATASEG = prog.get("L1SARAM"); --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: HST module is not supported in BIOS 6.
    // bios.HST.OBJMEMSEG = prog.get("L1SARAM"); --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: HST module is not supported in BIOS 6.
    // bios.HST.instance("RTA_fromHost").bufSeg = prog.get("L1SARAM"); --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: HST module is not supported in BIOS 6.
    // bios.HST.instance("RTA_toHost").bufSeg = prog.get("L1SARAM"); --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: PIP module is not supported in BIOS 6.
    // bios.PIP.OBJMEMSEG = prog.get("L1SARAM"); --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.SIO.OBJMEMSEG = prog.get("L1SARAM");

    // Commands added manually
    bios.MEM.SYSMEMSEG = prog.get("L1SARAM");
    // WARNING: RTDX module is not supported in BIOS 6.
    // bios.RTDX.TEXTMEMSEG = prog.get("L1SARAM"); --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // End of manual block

    bios.MEM.MALLOCSEG = prog.get("L1SARAM");
    bios.MEM.create("L0SARAM");
    bios.MEM.instance("L0SARAM").createHeap = 0;
    bios.MEM.instance("L0SARAM").len = 0x1000;
    bios.MEM.instance("L0SARAM").base = 0x008000;
    bios.GBL.CALLUSERINITFXN = 1;
    bios.GBL.USERINITFXN = "UserInit";
    bios.MEM.create("M1SARAM");
    bios.MEM.instance("M1SARAM").base = 0x000400;
    bios.MEM.instance("M1SARAM").len = 0x0400;
    bios.MEM.instance("M1SARAM").createHeap = 0;
    bios.MEM.create("M0SARAM");
    bios.MEM.instance("M0SARAM").createHeap = 0;
    bios.MEM.instance("M0SARAM").len = 0x0400;

    bios.MEM.create("ZONE1");
    bios.MEM.create("ZONE2");
    bios.MEM.create("ZONE6");
    bios.MEM.instance("ZONE1").comment = "External";
    bios.MEM.instance("ZONE1").base = 0x004000;
    bios.MEM.instance("ZONE1").len = 0x2000;
    bios.MEM.instance("ZONE1").createHeap = 0;
    bios.MEM.instance("ZONE2").comment = "External";
    bios.MEM.instance("ZONE2").base = 0x080000;
    bios.MEM.instance("ZONE2").len = 0x80000;
    bios.MEM.instance("ZONE2").createHeap = 0;
    bios.MEM.instance("ZONE6").comment = "External";
    bios.MEM.instance("ZONE6").base = 0x100000;
    bios.MEM.instance("ZONE6").len = 0x80000;
    bios.MEM.instance("ZONE6").createHeap = 0;

    bios.MEM.create("PASSWORDS");
    bios.MEM.instance("PASSWORDS").comment = "CSM Passwords in Flash";
    bios.MEM.instance("PASSWORDS").base = 0x3f7ff8;
    bios.MEM.instance("PASSWORDS").len = 0x0008;
    bios.MEM.instance("PASSWORDS").createHeap = 0;
    bios.MEM.instance("PASSWORDS").space = "code";
    bios.MEM.create("BEGIN_H0");
    bios.MEM.instance("BEGIN_H0").base = 0x3f8000;
    bios.MEM.instance("BEGIN_H0").len = 0x0002;
    bios.MEM.instance("BEGIN_H0").createHeap = 0;
    bios.MEM.instance("BEGIN_H0").space = "code";
    bios.MEM.instance("BEGIN_H0").comment = "Boot to H0 Entry Point";
    bios.MEM.instance("FLASH").destroy();
    bios.MEM.create("BEGIN_FLASH");
    bios.MEM.instance("BEGIN_FLASH").base = 0x3f7ff6;
    bios.MEM.instance("BEGIN_FLASH").len = 0x0002;
    bios.MEM.instance("BEGIN_FLASH").createHeap = 0;
    bios.MEM.instance("BEGIN_FLASH").space = "code";
    bios.MEM.instance("BEGIN_FLASH").comment = "Boot to Flash Entry Point";
    bios.MEM.create("CSM_RSVD");
    bios.MEM.instance("CSM_RSVD").comment = "Reserved by CSM";
    bios.MEM.instance("CSM_RSVD").base = 0x3f7f80;
    bios.MEM.instance("CSM_RSVD").len = 0x0076;
    bios.MEM.instance("CSM_RSVD").createHeap = 0;
    bios.MEM.instance("CSM_RSVD").space = "code";
    bios.MEM.create("FLASH_A");
    bios.MEM.instance("FLASH_A").createHeap = 0;
    bios.MEM.instance("FLASH_A").comment = "On-Chip Flash Memory";
    bios.MEM.instance("FLASH_A").base = 0x3f6000;
    bios.MEM.instance("FLASH_A").len = 0x1f80;
    bios.MEM.instance("FLASH_A").space = "code";
    bios.MEM.create("FLASH_BCDEFGHIJ");
    bios.MEM.instance("FLASH_BCDEFGHIJ").base = 0x3d8000;
    bios.MEM.instance("FLASH_BCDEFGHIJ").len = 0x1e000;
    bios.MEM.instance("FLASH_BCDEFGHIJ").createHeap = 0;
    bios.MEM.instance("FLASH_BCDEFGHIJ").comment = "On-Chip Flash Memory";
    bios.MEM.instance("FLASH_BCDEFGHIJ").space = "code";
    bios.LedBlink_PRD = bios.PRD.create("LedBlink_PRD");
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("LedBlink_PRD").order = 1; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.PRD.instance("LedBlink_PRD").period = 250;
    bios.PRD.instance("LedBlink_PRD").fxn = "LedBlink";
    bios.PowerOff_PRD = bios.PRD.create("PowerOff_PRD");
    bios.PowerOn_PRD = bios.PRD.create("PowerOn_PRD");
    bios.Vadjust_PRD = bios.PRD.create("Vadjust_PRD");

    bios.HWI.instance("HWI_RESET").fxn = "HWI_unused", "asm";
    bios.ADC_swi = bios.SWI.create("ADC_swi");
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.SWI.instance("ADC_swi").order = 1; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.SWI.instance("ADC_swi").fxn = "AdcSwi";
    bios.SWI.instance("ADC_swi").priority = 2;
    bios.MakeSine_swi = bios.SWI.create("MakeSine_swi");
    bios.RTA_fromHost.statistics = 1;
    bios.RTA_toHost.statistics = 1;
    bios.MEM.STACKSIZE = 0x2f0;

    bios.TSK.STACKSIZE = 128;
    bios.TSK.instance("TSK_idle").stackSize = 128;
    bios.PIE.instance("PIE_INT1_6").fxn = "ADCINT_ISR";
    bios.PIE.instance("PIE_INT1_6").useDispatcher = 1;
    bios.PIE.instance("PIE_INT3_5").fxn = "CAPINT1_ISR";
    bios.PIE.instance("PIE_INT3_5").useDispatcher = 1;
    bios.trace = bios.LOG.create("trace");

    bios.LOG.instance("trace").bufSeg = prog.get("M0SARAM");
    bios.LOG.instance("LOG_system").bufLen = 128;
    bios.MEM.LOADHWIVECSEG = prog.get("L0SARAM");
    bios.MEM.LOADHWIVECSEG = prog.get("FLASH_BCDEFGHIJ");
    // bios.SYS.TRACESEG = prog.get("L0SARAM"); --04/21/15: Not sure if this was commented out from before conversion or not. If so, then delete it.
    bios.SYS.TRACESEG = prog.get("L1SARAM");
    bios.BUF.OBJMEMSEG = prog.get("L0SARAM");
    bios.BUF.OBJMEMSEG = prog.get("M0SARAM");
    bios.BUF.OBJMEMSEG = prog.get("ZONE1");
    bios.BUF.OBJMEMSEG = prog.get("L1SARAM");
    bios.SYS.TRACESEG = prog.get("M0SARAM");
    bios.SYS.TRACESEG = prog.get("L1SARAM");
    bios.SYS.TRACESEG = prog.get("L0SARAM");
    bios.SYS.TRACESEG = prog.get("M0SARAM");
    bios.SYS.TRACESEG = prog.get("L1SARAM");
    bios.SIO.OBJMEMSEG = prog.get("L0SARAM");
    bios.SIO.OBJMEMSEG = prog.get("M0SARAM");
    bios.SIO.OBJMEMSEG = prog.get("L1SARAM");
    bios.MEM.LOADHWIVECSEG = prog.get("PIEVECT");
    bios.MEM.LOADHWIVECSEG = prog.get("H0_0SARAM");
    bios.MEM.LOADHWIVECSEG = prog.get("FLASH_BCDEFGHIJ");
    bios.PRD.OBJMEMSEG = prog.get("L0SARAM");
    bios.PIE.instance("PIE_INT3_1").fxn = "T2PINT_ISR";
    bios.PIE.instance("PIE_INT3_1").useDispatcher = 1;
    bios.PIE.instance("PIE_INT1_1").fxn = "PDPINTA_ISR";
    bios.PIE.instance("PIE_INT1_1").useDispatcher = 1;
    bios.PIE.instance("PIE_INT1_8").fxn = "WAKEINT_ISR";
    bios.SWI.instance("ADC_swi").priority = 1;
    bios.SWI.instance("MakeSine_swi").fxn = "MakeSineswi";
    bios.SWI.instance("MakeSine_swi").priority = 7;
    bios.SWI.instance("PRD_swi").priority = 6;
    bios.CLK.OBJMEMSEG = prog.get("L0SARAM");
    bios.PRD.instance("LedBlink_PRD").period = 1000;
    bios.PRD.instance("PowerOff_PRD").fxn = "PowerOff";
    bios.PRD.instance("PowerOn_PRD").fxn = "PowerOn";
    bios.PRD.instance("Vadjust_PRD").fxn = "Output_adj";

    bios.PRD.instance("PowerOff_PRD").period = 100;
    bios.PRD.instance("PowerOn_PRD").period = 100;
    bios.PRD.instance("Vadjust_PRD").period = 100;

    bios.MEM.create("H0_0SARAM");
    bios.MEM.instance("H0_0SARAM").base = 0x3f8000;
    bios.MEM.instance("H0_0SARAM").len = 0x1000;
    bios.MEM.instance("H0_0SARAM").createHeap = 0;
    bios.MEM.instance("H0_0SARAM").space = "code";

    bios.SWI.instance("PRD_swi").priority = 5;
    bios.SWI.instance("ADC_swi").priority = 7;

    bios.PRD.create("RegAdj_PRD");
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("RegAdj_PRD").order = 2; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.PRD.instance("RegAdj_PRD").period = 1000;
    bios.PRD.instance("RegAdj_PRD").fxn = "VoltageReg";

    bios.PRD.instance("RegAdj_PRD").period = 20;
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("PowerOff_PRD").order = 2; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("PowerOn_PRD").order = 3; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("Vadjust_PRD").order = 4; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("RegAdj_PRD").order = 5; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.PRD.instance("RegAdj_PRD").fxn = "FXN_F_nop", "asm";
    bios.PRD.instance("RegAdj_PRD").fxn = "VoltageReg";
    bios.PRD.instance("RegAdj_PRD").fxn = "FXN_F_nop", "asm";
    bios.PRD.instance("RegAdj_PRD").fxn = "VoltageReg";
    bios.PRD.create("Reg_PRD");

    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("Reg_PRD").order = 5; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.PRD.instance("Reg_PRD").fxn = "VoltageReg";
    bios.PRD.instance("Reg_PRD").fxn = "FXN_F_nop", "asm";
    bios.PRD.instance("Reg_PRD").fxn = "VoltageReg";
    bios.PRD.instance("Reg_PRD").period = 22;

    bios.PIE.instance("PIE_INT1_2").fxn = "PDPINTB_ISR";
    bios.PIE.instance("PIE_INT1_2").useDispatcher = 1;
    bios.PIE.instance("PIE_INT3_5").fxn = "CAP1_ISR";
    bios.PIE.instance("PIE_INT5_7").fxn = "CAP6_ISR";
    bios.PIE.instance("PIE_INT5_7").useDispatcher = 1;

    bios.MEM.create("FLASH_1K_VAR");
    bios.MEM.instance("FLASH_1K_VAR").createHeap = 0;
    bios.MEM.instance("FLASH_1K_VAR").len = 0x0400;
    bios.MEM.instance("FLASH_1K_VAR").base = 0x3f5c00;
    bios.MEM.instance("FLASH_BCDEFGHIJ").len = 0x1dc00;
    bios.MEM.instance("FLASH_1K_VAR").space = "data";
    bios.MEM.instance("FLASH_BCDEFGHIJ").len = 0x1e000;
    bios.MEM.instance("FLASH_1K_VAR").destroy();

    bios.MEM.instance("PASSWORDS").space = "code";
    bios.PRD.create("BattLowChk_PRD");
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("BattLowChk_PRD").order = 6; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.PRD.instance("BattLowChk_PRD").period = 1;
    bios.PRD.instance("BattLowChk_PRD").fxn = "BattLowChk";

    bios.MEM.instance("H0_0SARAM").base = 0x3f8002;
    bios.MEM.instance("H0_0SARAM").len = 0x0ffe;
    bios.MEM.instance("H0SARAM").destroy();
    bios.MEM.instance("LSARAM").destroy();
    bios.MEM.instance("ZONE1").destroy();
    bios.MEM.instance("ZONE6").destroy();
    bios.MEM.instance("SRAM").destroy();
    bios.MEM.instance("ZONE2").destroy();
    bios.MEM.instance("MSARAM").destroy();
    bios.MEM.instance("H0_0SARAM").len = 0x0ffd;
    bios.MEM.instance("H0_0SARAM").len = 0x0ffe;
    bios.MEM.instance("CSM_RSVD").base = 0x3f7ff8;
    bios.MEM.instance("CSM_RSVD").len = 0x0008;
    bios.MEM.instance("CSM_RSVD").base = 0x3f7f80;
    bios.MEM.instance("CSM_RSVD").len = 0x0075;
    bios.MEM.instance("CSM_RSVD").len = 0x0076;
    bios.MEM.instance("CSM_RSVD").len = 0x0075;

    bios.MEM.instance("L1SARAM").heapSize = 0x0400;
    bios.MEM.instance("CSM_RSVD").len = 0x0076;

    bios.MEM.instance("L1SARAM").heapSize = 0x0200;
    bios.MEM.instance("H0_0SARAM").space = "data";
    bios.MEM.instance("BEGIN_H0").space = "code/data";
    bios.MEM.instance("H0_0SARAM").space = "code/data";


    bios.MEM.instance("H0_0SARAM").len = 0x1ffc;
    bios.MEM.instance("H0_0SARAM").len = 0x1ffe;

    bios.MEM.instance("L1SARAM").heapSize = 0x0300;
    bios.MEM.instance("H0_0SARAM").space = "code";
    bios.MEM.instance("BEGIN_H0").space = "code";
    bios.GBL.SPECIFYRTSLIB = 0;
    // WARNING: MEM.USERCOMMANDFILE property is not supported in BIOS 6.
    // bios.MEM.USERCOMMANDFILE = 0; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("Vadjust_PRD").order = 1; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("LedBlink_PRD").order = 2; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("PowerOff_PRD").order = 3; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("PowerOn_PRD").order = 4; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("Reg_PRD").order = 6; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    // WARNING: 'order' property is not supported in BIOS 6.
    // bios.PRD.instance("BattLowChk_PRD").order = 7; --04/21/15: Commented out next line, s/b replaced w/ different line maybe
    bios.MEM.instance("H0_0SARAM").space = "data";
    bios.MEM.instance("BEGIN_H0").space = "data";
    bios.GBL.BOARDNAME = "c28xx ";
    bios.MEM.instance("BEGIN_FLASH").comment = "Boot to Flash Entry Point ";
    bios.MEM.LOADHWIVECSEG = prog.get("PIEVECT");
    bios.MEM.create("RESET");
    bios.MEM.create("VECTORS");
    bios.MEM.instance("RESET").base = 0x3fffc0;
    bios.MEM.instance("RESET").len = 0x0002;
    bios.MEM.instance("RESET").createHeap = 0;
    bios.MEM.instance("RESET").space = "code";
    bios.MEM.instance("RESET").space = "reserved";
    bios.MEM.instance("RESET").space = "code";
    bios.MEM.instance("RESET").comment = "RESET Point in BOOTROM";
    bios.MEM.instance("VECTORS").base = 0x3fffc2;
    bios.MEM.instance("VECTORS").len = 0x0100;
    bios.MEM.instance("VECTORS").createHeap = 0;
    bios.MEM.instance("VECTORS").space = "code";
    bios.MEM.instance("VECTORS").comment = "BOOT ROM VECTORS";
    bios.PRD.instance("PowerOff_PRD").period = 16;
    bios.PRD.instance("PowerOn_PRD").period = 16;
    bios.PRD.instance("Vadjust_PRD").period = 16;

    bios.MEM.STACKSIZE = 0x0380;
    bios.MEM.ARGSSIZE = 0x0100;
    bios.MEM.HWIVECSEG = prog.get("FLASH_BCDEFGHIJ");
    bios.MEM.HWIVECSEG = prog.get("PIEVECT");
    bios.MEM.LOADHWIVECSEG = prog.get("FLASH_BCDEFGHIJ");

    // !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!

    Program.sectMap[".args"] = new Program.SectionSpec()
    Program.sectMap[".args"] = "H0_0SARAM";
    Program.sectMap[".bss"] = new Program.SectionSpec()
    Program.sectMap[".bss"] = "L1SARAM";
    Program.sectMap[".const"] = new Program.SectionSpec()
    Program.sectMap[".const"].runSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".const"].loadSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".data"] = new Program.SectionSpec()
    Program.sectMap[".data"] = "L1SARAM";
    Program.sectMap[".cio"] = new Program.SectionSpec()
    Program.sectMap[".cio"] = "M0SARAM";
    Program.sectMap[".econst"] = new Program.SectionSpec()
    Program.sectMap[".econst"] = "FLASH_BCDEFGHIJ";
    Program.sectMap[".stack"] = new Program.SectionSpec()
    Program.sectMap[".stack"] = "L1SARAM";
    Program.sectMap[".text"] = new Program.SectionSpec()
    Program.sectMap[".text"].runSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".text"].loadSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".switch"] = new Program.SectionSpec()
    Program.sectMap[".switch"].runSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".switch"].loadSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".cinit"] = new Program.SectionSpec()
    Program.sectMap[".cinit"].runSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".cinit"].loadSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".pinit"] = new Program.SectionSpec()
    Program.sectMap[".pinit"].runSegment = "FLASH_BCDEFGHIJ";
    Program.sectMap[".pinit"].loadSegment = "FLASH_BCDEFGHIJ";
    prog = xdc.module('xdc.cfg.Program');

    Do you have any thoughts on the debug problem or the error I get when opening the cfg file?

    Thanks.

  • Kamran,
    I really don't know much about emulators and CCS target configurations, and I can't really tell if installing XDCtools 3.23 has anything to do with the debugging problems. I think it's not very likely, but I guess it's possible. You could try uninstalling XDCtools 3.23 from CCS and then from your PC because you don't need it anymore now that you have a converted CFG script.
    Also, you can keep multiple versions of CCS side-by-side. You can try installing another copy of the same version of CCS, but without XDCtools 3.23 and see if you can debug with that new version. Finally, the CCS forum is where you can get more help with target configurations and similar.

    When you are asking about the error you got when you opened the cfg file, is that the error about invalid compiler path? I have looked at the code that generates that error, and it is usually caused by an invalid project file. The best way is to solve it is to create a new project and copy your source files including the new converted cfg script into a new project. Once you have a new project working, you can remove the old one.
    Even better, if you install another copy of CCS, create that new project in the new CCS. Considering all your problems with debugging and CCS projects, I would think that a new CCS installation would clear things up a little.

    Your PRD statements will create corresponding Clock instances in the background, so they are fine.
  • This error:

    org.eclipse.rtsc.xdctools.INVALID_CODEGEN_LOCATION: Invalid codegen location

    has something to do with the XDCTOOLS_JAVA_HOME path and/or the "wrong" version of XDCTools.
  • I would guess not. Whenever the term 'codegen' shows up in CCS, it is a reference to the code generation tools (the compiler and the linker). The best way to resolve that kind of error is to post on the CCS forum and supply the project in question.