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.

Cache warning

Other Parts Discussed in Thread: SYSBIOS, CCSTUDIO, MATHLIB

Hello,

I keep getting the following warning although I don't understand where it's coming from, I do have a platform configuration file in my project and also in sysbios app.cfg which I checked to be the same.

warning: ti.sysbios.family.c64p.Cache: "C:/ti/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Cache.xs", line 497: ti.sysbios.family.c64p.Cache : Cache settings were changed in user configuration. User configuration options will override platform settings. Check your memory map to make sure that Cache does not conflict with your L1/L2 memory placement. To avoid conflicts between L1/L2 memory and cache, we recommended specifying cache sizes along with memory sizes in a platform package.
0167.kelvatek_12_0354.zip
8168.app.cfg

I was able to edit the platform configuration package but not anymore following CCSv5.5 update to 6.40 SYSBIOS and XDCtools 3.30 but I'm pretty sure I selected same settings for cache, L1P=32k, L1D=32k, L2=256K.

What is the syntax format for Cache.xs file in \ti\bios_6_40_01_15\packages\ti\sysbios\family\c64p\Cache.xs to view what cache settings generate the warning?

Something like:

Cache.$logWarning("Cache settings " + "1:" + Cache.initSize.$written("l1pSize") +
"2:" + Cache.initSize.$written("l1dSize")
"3:" + Cache.initSize.$written("l2Size") +
"4:" + Cache.initSize.l1pSize +
"5:" + origSizes["l1pSize"] +
"6:" + Cache.initSize.l1dSize +
"7:" + origSizes["l1dSize"] +
"8:" + Cache.initSize.l2Size +
"9:" + origSizes["l2Size"], this, null);

Thank you in advance,

David.

  • Hi David,

    I don't know the answer off the top of my head; but let me look into it and I will get back to you.

    Thanks,

    -- Emmanuel

  • Hi David,

    The device platforms have been moved out of XDCtools 3.30 and moved into SYS/BIOS 6.40.01.15.  The warning only shows up when the settings in your .cfg file differ from those in the used platform.  I think you are getting the warning because the platform you may be pointing to is the one provided by SYS/BIOS and not the one you have modified.  

    The platforms are now found in C:\ti\bios_6_40_01_15\packages\ti\platforms

    Please copy your platform and rebuild the package.  If the Cache settings in your .cfg and your custom platform match, you should not receive the warning when you build.

    Additionally, if you have the desired cache settings in your custom platform, there is no need to have them in the project .cfg; they can be removed.

    Hope this helps,

    -- Emmanuel

  • Hi Emmanuel,

    Thank you for replying, unfortunately I don't quite understand what you mean. We have to keep the platform package with the project since it's source versioned and related to the project otherwise setting up the environment on different workstations would be quite difficult. This is a custom platform so I don't think it should belong in some obscure path inside SYSBIOS folder. However I can no longer edit it, although compiler/linker don't seem to complain when we use certain memory areas. This means I cannot rebuild the platform package since I cannot go back and load it. As I've said, I'm pretty sure I selected same cache settings since I was able to check when I was using SYSBIOS 6.35. Should I remove the settings from app.cfg then?

    Any idea what is the command syntax for the Cache.logWarning to print the sizes, something like System_printf("l1dSize:%d", l1dSize) to find out where is the problem?

    And how can I edit the platform package again, only by copying it into SYSBIOS 6.40 folder?

    Best regards,

    David.

  • Hi David,

    I'm not sure about the new versions and this change of platform from XDC to SYS/BIOS, but in the previous versions you could save the platform to anywhere in your computer and then add the path to your project's RTSC->Product and Repositories.

    BTW, if you have access to csl_cacheAux.h you can find functions like CACHE_getL1DSize(), that will return an enum that identifies cache size.

    Regards

    J

  • David,
    there is a bug in xdctools 3.30.01 that prevents you from loading and editing your platform. Here is the thread with more info and a workaround:
    http://e2e.ti.com/support/embedded/tirtos/f/355/t/338321.aspx

    The syntax for $logWarning seems correct, but I am guessing that you are simply not seeing the output anywhere. Is that correct or you are actually seeing an error message caused by your usage of $logWarning?
    To see that output you need to add "-console" to the command line that starts CCS. If you are using a shortcut, you need to edit the Target field to show "...ccstudio.exe - console". You'll see an extra command window where you'll be able to see the output. If you have trouble with $logWarning, you can just use print(String) function.

    It would be also helpful if you can post the output from the CCS output console, which should show the configuro command line.

  • Hi Sasha, 

    This is the output I get when using print function in the console:

    'Building file: ../app.cfg'
    'Invoking: XDCtools'
    "E:/ti/xdctools_3_30_01_25_core/xs" --xdcpath="E:/ti/biospsp_03_00_01_00/drivers;E:/ti/dsplib_c674x_3_1_1_1/packages;E:/ti/edma3_lld_02_11_11_13/packages;E:/ti/mathlib_c674x_3_0_1_1/packages;E:/PG/branches/David/PG_sysbios/Repository;E:/ti/uia_1_03_01_08/packages;E:/ti/ccsv5/ccs_base;E:/ti/bios_6_40_01_15/packages;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C674 -p kelvatek_12_0354 -r release -c "E:/ti/ccsv5/tools/compiler/c6000_7.4.8" --compileOptions "-g --optimize_with_debug" "../app.cfg"
    configuring app.xe674 from package/cfg/app_pe674.cfg ...
    js: "E:/ti/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Cache.xs", line 506: missing ) after argument list
    js: "3:" + Cache.initSize.$written("l2Size") +
    js: .........................^
    js: "E:/ti/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Cache.xs", line 512: missing ; before statement
    js: "9:" + origSizes["l2Size"], this, null);
    js: ............................................................^
    js: "E:/ti/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Cache.xs", line 1: Compilation produced 2 syntax errors.
    js: "E:/ti/bios_6_40_01_15/packages/ti/sysbios/family/Settings.xs", line 118: Compilation produced 2 syntax errors. (E:/ti/bios_6_40_01_15/packages/ti/sysbios/family/c64p/Cache.xs#1)
    "E:/PG/branches/David/PG_sysbios/app.cfg", line 10
    "./package/cfg/app_pe674.cfg", line 187
    xdctools_3_30_01_25_core\gmake.exe: *** [package/cfg/app_pe674.xdl] Error 1
    js: "E:/ti/xdctools_3_30_01_25_core/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** [configPkg/linker.cmd] Error 1

    Can I ask what version of XDCtools and SYSBIOS should I be using with CCSv5.5 since I have similar problem as the thread you mentioned?

    Best regards,

    David.

  • The function print() has only one argument and it is a string. Remove 'this' and 'null' from the call site. Please post the output so we can see which cache value is causing the warning.

    The workaround for the Platform Wizard problem was tested only in CCS 6 because that's what the majority of SYS/BIOS 6.40 users are using. You may want to install CCS 6 alongside CCS 5 and use a different workspace so you can import your project and copy it into a new workspace. You can then apply the workaround in CCS 6 without any possible disruption in your CCS 5 installation. But, before you do any of that let's see what's the problem with cache. Your platform might be OK, and just removing the cache-related lines from your CFG script could be enough to get you back on track.

  • Hi Sasha,

    CCSv6 hangs for me while building a library from my project so I cannot use it. It builds fine in CCSv5.5 and occasionally in CCSv6, I have another open thread regarding this issue.

    I corrected the syntax and it reports: Cache settings 1:true 2:true 3:true 4:4 5:4 6:4 7:4 8:4 9:0

    This tells me there's something wrong with either Cache.initSize.l2Size or origSizes["l2Size"], however I checked the Platform.xdc and l2Mode : "256k", and in my app.cfg I have ti_sysbios_family_c64p_Cache.initSize.l2Size = ti_sysbios_family_c64p_Cache.L2Size_256K which equals 4 but the condition generating the warning doesn't recognize the same string. I can see in Cache.xs that it has something to do with the else clause of condition line 452 regarding ECL410545 which I don't know about.

    Best regards,

    David.

  • David,
    the values you are seeing for origSizes[] are default values, and the problem seems to be that they are not changed. It's a bug in SYS/BIOS. The good news is that the values you specified in your config script are the ones that SYS/BIOS will use to initialize cache, and also values that you used in your platforms are the ones that are used in the linker command file. You can verify this second point by looking into the map file after a successful build. The bad news is that to fix the bogus warning will require a new SYS/BIOS release, and there is no a simple workaround.

    Edit:
    David, I understand you can't switch to CCS 6, but for the benefit of other users that may end up with the same bogus warning, I need to mention that switching to CCS 6 and applying the pach as described in this thread: http://e2e.ti.com/support/embedded/tirtos/f/355/t/338321.aspx will fix this warning.

  • Thank you Sasha, as long as I have the correct functionality, the warning no longer bothers me. I will patch CCSv6 though.

    Edit: Just to let you know, XDCTools 3.30.02.35_core_eng still reports the warning after I changed project settings to use the new RTSC.

    Best regards,

    David.