Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322607

Summary: platform instance create should validate args structure for supported fields
Product: [Technology] RTSC Reporter: Karl Wechsler <karl>
Component: PlatformsAssignee: Sasha Slijepcevic <sascha>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: d-russo
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: target:3.22.01

Description Karl Wechsler CLA 2010-08-12 20:45:35 EDT
In this configuro/CCS example where project is setup with aux config.bld, the clockRate is specified, but it does not work.  I think this project is derived from the generic platform or some other place where 'clockRate' is supported.

For evm6748 and evm6472 (and probably most others) the clockRate parameter is not supported, but there is no warning or error.  

I think a warning would be good.  Not sure if we should make it an error as people might be using this mechanism for god knows what and we don't want to break existing platforms.




var C64P = xdc.useModule('ti.targets.C64P');
// Defined in .ccsproject: C64P.ccOpts.suffix += " -mi10 -mo --define=EFUSE_MAC --define=TYPES_BIOS6 --define=PHY_MODE_100MBPS --define=_INCLUDE_NIMU_CODE --define=_NDK_EXTERN_CONFIG ";

//set default platform and list of all interested platforms for c64P
C64P.platforms = [
                     "ti.platforms.evm6472:core0",
                 ];
C64P.platform = C64P.platforms[0];

Build.targets = [
                    C64P,
                ];

Build.platformTable["ti.platforms.evm6472:core0"] = {
    clockRate:      700,
}
Comment 1 Dave Russo CLA 2010-08-18 13:32:48 EDT
XDCtools should return a warning if it detects incorrect arguments.
Comment 2 Sasha Slijepcevic CLA 2010-09-03 20:53:22 EDT
Fixed in xdc-w09. The following warning is displayed when an invalid parameter is passed:
warning: ti.platforms.evm6472.Platform: "./package/cfg/client_p64P.cfg", line 714: (xdc.platform.IPlatform.Instance)ti.platforms.evm6472.Platform.Instance#0 platformName: The parameter 'clockRate' is passed to this platform instance through Build.platformTable, but the instance does not have a configuration parameter with that name.
Comment 3 Karl Wechsler CLA 2011-06-16 14:44:51 EDT
updated avala tree to use this in config.bld:

Build.platformTable["ti.platforms.generic:C6670"] = {
    deviceName: "TMS320C6670",
    catalogName: "ti.catalog.c6000",
    clockRate: 1000.0,
    codeMemory: "L2SRAM",
    dataMemory: "L2SRAM",
    stackMemory: "L2SRAM",
    foo : "bar",
    externalMemoryMap: [
        ["DDR2", {name: "DDR2", base: 0x80000000, len: 0x10000000}],
    ]
};

and I get a good warning now:

warning: ti.platforms.generic.Platform: "./package/cfg/whole_program/TaskTest1_p
e66.cfg", line 183: (xdc.platform.IPlatform.Instance)ti.platforms.generic.Platfo
rm.Instance#0 C6670: The parameter 'foo' is passed to this platform instance thr
ough Build.platformTable, but the instance does not have a configuration paramet
er with that name.

verify pass.
Comment 4 Dave Russo CLA 2011-06-20 14:07:53 EDT
Shipped in XDCtools 3.22