| Summary: | platform instance create should validate args structure for supported fields | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Karl Wechsler <karl> |
| Component: | Platforms | Assignee: | 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 | ||
XDCtools should return a warning if it detects incorrect arguments. 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. 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.
Shipped in XDCtools 3.22 |
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, }