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.

RTOS/TDA3XEVM: Cache mess

Part Number: TDA3XEVM
Other Parts Discussed in Thread: TMS320C6747, TMS320C6745, TMS320C6743, OMAPL138, TMS320C6742, TMS320C6746, TMS320C6748, TMS320DM8148, SYSBIOS

Tool/software: TI-RTOS

I try to transfer PDK example DSS to CCS7, I added cache functionality but encountered with cache absence in M4:


**** Build of configuration Debug for project VencRT ****

"C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O
gmake[1]: Entering directory 'C:/ti/Workspace/VencRT/Debug'
'Building file: ../app.cfg'
'Invoking: XDCtools'
"C:/ti/xdctools_3_50_03_33_core/xs" --xdcpath="C:/ti/bios_6_50_01_12/packages;C:/ti/edma3_lld_02_12_00_20/packages;C:/PROCESSOR_SDK_VISION_03_01_00_00/ti_components/drivers/pdk_01_08_00_16;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4 -p ti.platforms.evmTDA3XX -r release -c "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_17.9.0.STS" --compileOptions "-g --optimize_with_debug" "../app.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring app.xem4 from package/cfg/app_pem4.cfg ...
Cache is not supported for the specified device (TDA3XX).
Cache is only supported for the following devices on the M4 target:
TMS320TI816X
TMS320DA830
DM37XX
TMS320CDRA442
AWR16XX
TMS320DA802
TMS320DA803
TMS320DA804
TMS320DA805
TMS320DA807
TMS320DA808
TMS320DA810
TMS320DA828
TMS320C6747
TMS320C6745
TMS320C6743
OMAPL137
OMAPL108
OMAPL118
OMAPL138
TMS320DA840
TMS320DA850
TMS320C6742
TMS320C6746
TMS320C6748
Arctic
TMS320CDRA402
TMS320CDRA404
TMS320CDRA414
TMS320CDRA416
TMS320CDRA444
TMS320CDRA446
TMS320CDM740
TMS320C6A8168
TMS320TI811X
TMS320TI814X
TMS320DM8148
TMS320DM8168
TMS320C6A8149
IWR16XX
subdir_rules.mk:12: recipe for target 'build-1175220767-inproc' failed
js: "C:/ti/bios_6_50_01_12/packages/ti/sysbios/family/c64p/Cache.xs", line 435: Error: Cache unsupported on device!
"C:/ti/bios_6_50_01_12/packages/ti/sysbios/family/c64p/Hwi.xs", line 130
"C:/ti/bios_6_50_01_12/packages/ti/sysbios/family/c64p/EventCombiner.xs", line 45
gmake.exe: *** [package/cfg/app_pem4.xdl] Error 1
Warning: directory "C:/PROCESSOR_SDK_VISION_03_01_00_00/ti_components/drivers/pdk_01_08_00_16" on package path has a "packages" subdirectory - did you mean this instead?
js: "C:/ti/xdctools_3_50_03_33_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
gmake[1]: *** [build-1175220767-inproc] Error 1
gmake[1]: Leaving directory 'C:/ti/Workspace/VencRT/Debug'

SO TDA3XX  Cortex M4 have no cache.

How to workaround this problem?

  • Hi Alexander,

    TDA3xx M4 has cache. I will ping BIOS expert to help you with this.

    Regards,
    Rishabh
  • I must give some comments... Recently I removed all cache option from BIOS cfg file. But error "Cache unsupported on device!" is still alive - from C:\ti\bios_6_50_01_12\packages\ti\sysbios\family\c64p\Cache.xs   script execution. It seemed this for ARM A8 core, not for V7M4.

  • Hello Alexander, 

    Cache configuration is used in many of TDA3xx CCS example projects with M4.

    Please refer to \ti_components\nsp_xx_xx\packages\ti\ndk\tda3xx\examples_ipu1\client\client.cfg for creating BIOS config file. Make sure you configure AMMU to use cache.

    var Cache       = xdc.useModule('ti.sysbios.hal.unicache.Cache');

    Cache.enableCache = true;

    Also please share your config file for review.

  • /* XDC modules */
    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Memory = xdc.useModule('xdc.runtime.Memory');
    var System = xdc.useModule('xdc.runtime.System');


    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 SysMin = xdc.useModule('xdc.runtime.SysMin');
    var Text = xdc.useModule('xdc.runtime.Text');

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Swi = xdc.useModule('ti.sysbios.knl.Swi');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
    var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
    var HalHwi = xdc.useModule('ti.sysbios.hal.Hwi');

    var ti_sysbios_io_GIO = xdc.useModule('ti.sysbios.io.GIO');

    //var Cache = xdc.useModule('ti.sysbios.hal.Cache');
    //var xdc_runtime_knl_Cache = xdc.useModule('xdc.runtime.knl.Cache');
    var Cache = xdc.useModule('ti.sysbios.hal.unicache.Cache');
    Cache.enableCache = true;

    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var Core = xdc.useModule('ti.sysbios.family.arm.ducati.Core');
    var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
    var Load = xdc.useModule('ti.sysbios.utils.Load');
    var SysStd = xdc.useModule("xdc.runtime.SysStd");

    /*
    * Uncomment this line to globally disable Asserts.
    * All modules inherit the default from the 'Defaults' module. You
    * can override these defaults on a per-module basis using Module.common$.
    * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
    */

    /*
    * Uncomment this line to keep module names from being loaded on the target.
    * The module name strings are placed in the .const section. Setting this
    * parameter to false will save space in the .const section. Error and
    * Assert messages will contain an "unknown module" prefix instead
    * of the actual module name.
    Defaults.common$.namedModule = false;
    */

    /*
    * Minimize exit handler array in System. The System module includes
    * an array of functions that are registered with System_atexit() to be
    * called by System_exit().
    */
    System.maxAtexitHandlers = 4;

    /*
    * Uncomment this line to disable the Error print function.
    * We lose error information when this is disabled since the errors are
    * not printed. Disabling the raiseHook will save some code space if
    * your app is not using System_printf() since the Error_print() function
    * calls System_printf().
    Error.raiseHook = null;
    */

    /*
    * Uncomment this line to keep Error, Assert, and Log strings from being
    * loaded on the target. These strings are placed in the .const section.
    * Setting this parameter to false will save space in the .const section.
    * Error, Assert and Log message will print raw ids and args instead of
    * a formatted message.
    Text.isLoaded = false;
    */

    /*
    * Uncomment this line to disable the output of characters by SysMin
    * when the program exits. SysMin writes characters to a circular buffer.
    * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
    */

    /*
    * The BIOS module will create the default heap for the system.
    * Specify the size of this default heap.
    */
    BIOS.heapSize = 0x1000;

    /*
    * Build a custom SYS/BIOS library from sources.
    */
    BIOS.libType = BIOS.LibType_Custom;

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

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

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

    System.SupportProxy = SysMin;
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
    Defaults.common$.memoryPolicy = xdc.module("xdc.runtime.Types").STATIC_POLICY;
    Semaphore.supportsEvents = true;
  • Hello Alexandar,

    Have you tried building your project with client.cfg?

    Interestingly with your config file I could build my example M4 application. You can see attached build log.

    I am thinking issue might be in your project RTSC settings. In error log you can see cache module of c64p is shown to be used.

    C:/ti/bios_6_50_01_12/packages/ti/sysbios/family/c64p/Cache.x

  • OK!!! Finally this compiles!
    I attached project to you make se is there some wrong at a glance, of course, not for long stady.
  • Alexander,

    The project won't work on my set up as include paths are hardcoded. Anyway I see you are including varient type as "TDA3x", instead you can try it as "Generic M4"

    Also in your config file you should change hwi module to below for M4

    var Hwi         = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');

  • So, as I can see I must insert
    var Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');

    in config and I may still use TDA3XX ???
  • Alexander,

    Yes, for using interrupt configuration you should use m3.Hwi module of sysbios. This module is common for all "v7m" architecture as can be seen in "bios_x_xx\packages\ti\sysbios\family\arm\m3\Hwi.xs" file.

    You can try using "Generic M4" if getting error for TDA3xx.
  • now there is no any error from TDA3XX, so I will continue with it...