| Summary: | IPlatform.create() should not allow undeclared params | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Nitya Ramdas <nitya> |
| Component: | Platforms | Assignee: | Sasha Slijepcevic <sascha> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | d-russo, dfriedland, vikram.adiga |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | targets: 3.25.00 | ||
|
Description
Nitya Ramdas
I'll fix evm6670 to be used as a template how all platform should be changed to fix this bug. 1. All c6000 platforms must declare l1PMode, l1DMode and l2Mode in Platform.xdc. 2. All references to this.$private must be removed from Platform.xs. We used that structure to gather arguments from config.bld and then passed them to the device, at the time when we allowed platforms to accept any argument and just pass it to the device. We don't do that anymore, and the existence of that parameter makes it difficult for xdc.platform.Utils functions to figure out which platform is an old platform that doesn't declare all parameters passed to the device. 3. The structure 'args' passed to instance$meta$init in Platform.xs must be checked for properties that correspond to the config parameters for the platform, and the values must be copied to the actual config parameters. 4. If there is a function getCreateArgs in the platform, it should be removed. That function is deprecated. 1. is done for all c6000 platforms. 3. is also done, but the correct wording for that is that the content of Build.platformTable entries must be checked before being passed in the place of the platform instance params. The check removes the fields that do not correspond to any instance parameter, and a warning is issued. The check is in the generated config shell script. 2. and 4. are planned for 3.25. - fixed in platform-o06 2. and 4. are implemented for all platforms in the platform tree, in the gep tree, and in the xdc tree. Verified using XDCtools 3.25.00.41
1. 2. 4. Verified by inspection.
3. Verified by inspection and also, I built a test app for elf C64P target. In config.bld, I added a fake platform parameter
Build.platformTable["ti.platforms.sim6xxx:TMS320CDM420"] = {
fakeparam: false
};
The build produced the following warning as expected:
warning: ti.platforms.sim6xxx.Platform: "./package/cfg/test_pe64P.cfg", line 147: (xdc.platform.IPlatform.Instance)ti.platforms.sim6xxx.Platform.Instance#0 TMS320CDM420: The parameter 'fakeparam' is passed to this platform instance through Build.platformTable, but the instance does not have a configuration parameter with that name.
5. Also, I built and ran the platform/compatTest testcase in xdctest-c to test for compatibility with old platforms. The test case passed.
shipped in 3.25.00.48: http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_25_00_48/index_FDS.html. |