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.

CCSv4 project changes to migrate to CCSv6

Other Parts Discussed in Thread: SYSBIOS

Hi

We have a CCSv4 project that uses logger buffer that I'd like to get working on CCSv6. What changes to the attached .cfg file would I have to make for it to use CCSv6's system analyzer?

3324.7115.M2_6472.cfg

I've attempted to model the .cfg file logger changes after CCSv6's messageQue example .cfg file, but I found that I couldn't even get the canned messageQue project via CCSv6's wizard to give me log_prints.

Cheers2u

  • Hi Eddie,

    To use System Analyzer for viewing Logs, You need to build your target code with UIA (unified instrumentation architecture) support.  If you don't have UIA installed, you can find it here:

    http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/uia/

    or you can get it from the CCS v6 App Center.  However, I just checked this link and found that it does not have the UIA 2.0 version.   So I will have uia 2.0 made available from this link soon.

    If you are using TI-RTOS, this will come with UIA 2.0 as part of it.  Otherwise you can work with the latest UIA 1.x release.  The UIA 1.x release will still work with System Analyzer in CCS 6, although you will get some pop-up warnings that you can ignore.

    Looking at your .cfg file, there are some changes you will need to make:

    - Get rid of the RTA Agent and LoggerBuf

    - Add xdc.useModule('ti.uia.sysbios.LoggingSetup');

    By adding LoggingSetup to your configuration, Logs for BIOS, Main, and Load will be configured automatically for you.

    Best regards,

        Janet

  • What version of SYS/BIOS and XDCtools are you using?

  • Hi Janet/Tom

    I'm in the process of making the changes. Thanks Janet.

    Tom Kopriva said:
    What version of SYS/BIOS and XDCtools are you using?

    CCSv6.0.0.00190, ti.platforms.evm6472, stairstep example, System Analyzer 1.4.0.6, CGT 7.4.8, XDX 3.25.5.94, SYS/BIOS 6.37.2.27, XDS560v2 spectrum digital emulator.

     

  • Hi

    In our CCSv4 .cfg, we set a handle to return to our app for pointing to the logger buffer in order to allow the CPU to read loggerbuffer contents on asserts. What would be the syntax we use now?

    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var loggerBuf0Params = new LoggerBuf.Params();
    loggerBuf0Params.numEntries = 256;
    loggerBuf0Params.instance.name = "loggerBuf0";
    loggerBuf0 = LoggerBuf.create(loggerBuf0Params);
    Program.global.hLogger = loggerBuf0;

    I'd also like to put the logs into DDR. There do not appear to be any .cfg wizard settings I can use to do this.

    Cheers

  • Hi Eddie,

    If you want to place the LoggerBuf buffer in a specific memory region, you can use the bufSection parameter.  For example, this is how you could do it:

    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.numEntries = 256;
    loggerBufParams.bufSection = ".loggerBuf";

    Program.global.hLogger = LoggerBuf.create(loggerBufParams);
    Program.sectMap[".loggerBuf"] = "DDR2";

    Best regards,

        Janet

  • Hi Janet

    We're getting close I think. Now I get a warning and error below:

    warning: xdc.runtime.Main: "C:/ti/uia_1_04_00_06/packages/ti/uia/sysbios/LoggingSetup.xs", line 498: xdc.runtime.Main : xdc.runtime.Main.common$.logger has already been assigned, LoggingSetup reassigning logger to ti.uia.runtime.LoggerStopMode.Instance#1
    js: "C:/ti/uia_1_04_00_06/packages/ti/uia/runtime/UIAMetaData.xs", line 1439: XDC runtime error: ti.sysbios.BIOS: no property named 'getCpuFrequency'

    I think its due to my .cfg specifying the clock freq

    BIOS.cpuFreq.lo = 700000000;

    The help search tool couldn't find anything about 'getCpuFrequency"

    Cheers

  • Hi Eddie,

    If you remove this line from your .cfg file:

    Main.common$.logger = loggerBuf0;  // set the "Main Logger" to be loggerBuf0

    the warning should go away.  To view Log events in System Analyzer, the events must be logged to one of the UIA loggers (eg, LoggerStopMode).  LoggingSetup is configuring a LoggerStopMode logger for Main, but you have already assigned a LoggerBuf instance to Main.  You cannot view LoggerBuf events in System Analyzer.  You will need to use ROV to view the LoggerBuf logs in CCS.

    The second error would be caused by using an older version of BIOS.  You said in an earlier post that you are using BIOS 6.37.02.27, which does have the function 'getCpuFrequency'.  Could you double check the BIOS version you are using?

    Thanks,

        Janet

  • Hi Janet

    For some reason both the 6.37 and 6.33 are both checked. I've 

    I don't think the tool should be selecting two versions.

    On the loggerBuf issue, in order to allow us to extract the logger buffers from the DSP when an assert occurs, we published the logger pointers below to our CPU in order to let it read them. It looks like two of the pointers are no longer valid.

    Is there a better way to publish logger buffer addresses by setting a global in the .cfg file?

    Cheers

    00808640 _xdc_runtime_LoggerBuf_Instance_State_0_entryArr__A
    UNDEFED _xdc_runtime_LoggerBuf_Instance_State_1_entryArr__A
    UNDEFED _xdc_runtime_LoggerBuf_Instance_State_2_entryArr__A
    002b8b40 _xdc_runtime_LoggerBuf_Instance_finalize__F

  • Arg. One step forward, two steps back.

    I started having strange GUI behavior (it was telling me there were platform configuration errors when I built the project yet the platform project built without errors!). So I deleted the workspace .metadata and imported my project again. Now I get the error below.

    "c:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building target: configPkg/linker.cmd'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_25_05_94/xs" --xdcpath="D:/vws/ejp_m2_p4_0_integ_2/spDsp/EVM/M2_Platform6472_configuration;D:/vws/ejp_m2_p4_0_integ_2/spDsp/EVM/M2_Platform6472_configuration/RTSC;D:/vws/ejp_m2_p4_0_integ_2/spDsp/EVM/M2_Platform6472_configuration/RTSC Platform;c:/ti/xdais_7_21_01_07/packages;c:/ti/xdais_7_21_01_07/examples;c:/ti/ccsv6/ccs_base;c:/ti/uia_1_04_00_06/packages;/packages;C:/ti/bios_6_37_02_27/packages;" xdc.tools.configuro -o "configPkg" -t ti.targets.C64P -p C6472 -r debug -b "D:/vws/ejp_m2_p4_0_integ_2/spDsp/EVM/M2_Platform6472_configuration/RTSC Platform/C6472/config.bld" -c "c:/ti/ccsv6/tools/compiler/c6000_7.4.8" ../M2_6472.cfg
    configuring M2_6472.x64P from package/cfg/M2_6472_p64P.cfg ...
    js: "D'D:/vws/ejp_m2_p4_0_integ_2/spDsp/EVM/M2_Platform6472_configuration;D:/vws/ejp_m2_p4_0_integ_2/spDsp/EVM/M2_Platform6472_configuration/RTSC;D:/vws/EJ40EB~1/spDsp/EVM/M2_PLA~1/RTSCPL~1;C:/ti/xdais_7_21_01_07/packages;C:/ti/xdais_7_21_01_07/examples;C:/ti/ccsv6/ccs_base;C:/ti/uia_1_04_00_06/packages;D:/packages;C:/ti/bios_6_37_02_27/packages;C:/ti/xdctools_3_25_05_94/packages;..;'. Ensure that the package path is set correctly.:/vws/ejp_m2_p4_0_integ_2/spDsp/EVM/M2_Platform6472_configuration/M2_6472.cfg", line 30: xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: can't locate the package 'ti.sdo.ipc' along the path

    I've no idea how what was once in the path is no longer in the path. Where do I add the package path thats needed?

    Line 30 is the first line below

    /* Modules explicitly used in the application */
    var MessageQ = xdc.useModule('ti.sdo.ipc.MessageQ');
    var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
    var HeapBufMP = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
    var HeapMemMP = xdc.useModule('ti.sdo.ipc.heaps.HeapMemMP');
    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');

    Cheers

  • Hi Eddie,

    I have never seen two boxes checked for BIOS before.  You might want to post that one to the CCS forum:

    http://e2e.ti.com/support/development_tools/code_composer_studio/default.aspx

    Regarding your question about the undefined LoggerBuf symbols, I think you must be creating two fewer LoggerBuf instances.  Maybe you are using UIA loggers instead of LoggerBuf?

    I don't know of any other way to get the LoggerBuf entry arrays other than as you have done.

    For the PACKAGE_NOT_FOUND error, you don't have the Ipc package in your path.  You would add this in your project properties, under General->RTSC, as in your screen shot.  You only want one Ipc version, though. I'm not sure why there are two boxes checked for Ipc.  I wonder if it might be easier to create a new project rather than trying to import the CCSv4 project.

    Best regards,

        Janet

  • Hi Janet

    janet said:
    I have never seen two boxes checked for BIOS before.  You might want to post that one to the CCS forum:

    Will do.

    janet said:
    Regarding your question about the undefined LoggerBuf symbols, I think you must be creating two fewer LoggerBuf instances.  Maybe you are using UIA loggers instead of LoggerBuf?

    This is going to sound really really dumb, but don't UIA loggers take the place of LoggerBuf? My goal is to update our project to use CCSv6 and UIA instead of the RTA Agent. Does RTA Agent = LoggerBuf and UIA ~= LoggerBuf, or can LoggerBuf exist in both? At the end of the day, all I want is to get Log_prints out to the GUI and to the external CPU that controls the DSP.

    janet said:
    You would add this in your project properties, under General->RTSC, as in your screen shot.  You only want one Ipc version,

    Hmm, don't know what else I can do. Its set to use IPC as shown in the screen shot. 

    Maybe the issue is it can't properly clean the project. See the clean output below.

    **** Clean-only build of configuration Default for project M2_Platform6472_configuration ****

    "c:\\ti\\ccsv6\\utils\\bin\\gmake" -k clean
    DEL /F
    process_begin: CreateProcess(NULL, DEL /F, ...) failed.
    make (e=2): The system cannot find the file specified.

    gmake: [clean] Error 2 (ignored)
    RMDIR /S/Q "configPkg\"
    'Finished clean'
    ' '

    **** Build Finished ****

    Cheers

  • Hi Eddie,

    To use System Analyzer for viewing Logs, UIA loggers should replace LoggerBuf for the SysBIOS, Main, and Load logging.  So you really don't need LoggerBuf in your code.  I'm just not sure about your statement "getting Log_prints to the external CPU that controls the DSP", so I thought that was why you still had LoggerBuf in your configuration:

    00808640 _xdc_runtime_LoggerBuf_Instance_State_0_entryArr__A
    UNDEFED _xdc_runtime_LoggerBuf_Instance_State_1_entryArr__A
    UNDEFED _xdc_runtime_LoggerBuf_Instance_State_2_entryArr__A
    002b8b40 _xdc_runtime_LoggerBuf_Instance_finalize__F

    You may want to start by getting rid of LoggerBuf and just using UIA logs and using System Analyzer.  Then deal with the problem of getting Log_prints to the external CPU.

    Does the 'clean' build always give this error?  Maybe you can try removing all generated files and starting the build again.

    Best regards,

        Janet

  • Hi Janet

    OK, I'll ditch the LoggerBuf and then figure out how to get an address of the UIA loggers for the CPU to use when extracting the UIA logger logs.

    janet said:
    Maybe you can try removing all generated files and starting the build again.

    Thats a bit tricky since there are so many. I guess I can use windows explorer and sort by date. I'll get back to you soon.

    Cheers

  • Hi Janet

    janet said:
    For the PACKAGE_NOT_FOUND error, you don't have the Ipc package in your path.  You would add this in your project properties, under General->RTSC, as in your screen shot.  You only want one Ipc version, though. I'm not sure why there are two boxes checked for Ipc.  I wonder if it might be easier to create a new project rather than trying to import the CCSv4 project.

    I solved the problem by de-selecting ipc 1.24.3.32 and then closing the project. I re-opened it and then deselected 1.24 and selected 3.20.0.06. Now it sees the ipc and the error 

    PACKAGE_NOT_FOUND: can't locate the package 'ti.sdo.ipc' along the path

    is gone. Yay!