Community
Participate
Working Groups
In xdc.platform.Utils.xs: checkFit(), the handling of the memory page attribute is not quite right. For internal memory, if the page attribute is defined by the platform, then it must be enforced. However, for external memory, the memory map should be allowed to set the page attribute as needed. This is required to create memory areas which can be used for either code or data. The current implementation restricts all of external memory to code, no data can be placed in external memory. In addition, the checkFit() function simply returns T/F, there is no way to provide a detailed error message such that the user can distinguish errors from incorrect fit vs. incorrect page attributes. See my xdc-x21x tree for a fix to this function for both issues above.
The outcome of the work on this bug is that the improvement in error messages from Ramsey's xdc-x21x tree are added in xdc-y08. The handling of the 'page' attribute is little bit more lenient now, and an error is generated only if both a physical memory object and a custom memory object specify 'page' and the values are different. Previously we assumed that undefined 'page' means 'page'==0, so if one object defines 'page'=1 and another has 'page' undefined, an error was generated. The new code lets that case go through. Also in xdc-y08, I added an environment property 'xdc.platform.custom.check'. If that property is undefined or set to 'true', we check the custom memory map against the physical memory. If it's set to 'false', the check is prevented.
Verified this to be working correctly on XDC product: 3.23.00.33 I verified the following cases : Page attribute test: Created custom memory for platforms (sim470xx and sim28xx) to check a) physical memory object and custom memory object having page attribute but have different values generates an error. Error generated: error: ti.platforms.sim28xx.Platform: "<PATH>/Linux/xdctools_3_23_00_33/packages/xdc/platform/Utils.xs", line 374: ti.platforms.sim28xx.Platform.Instance#0/customMemoryMap/'MEM2' : Memory object MEM2 has an invalid 'page' attribute. b) if one object defines 'page'=1 and another has 'page' undefined, no error was generated Custom check property test: Created custom memory for platforms (sim470xx and sim28xx) to check a)When property is 'true' or undefined, custom memory map is tested and error is generated for wrong memory maps. Error generated: error: ti.platforms.sim470xx.Platform: "<PATH>/xdctools_3_23_00_33/packages/xdc/platform/Utils.xs", line 365: ti.platforms.sim470xx.Platform.Instance#0/customMemoryMap/'MEM1' : Memory object MEM1 does not fit into any physical memory bank. b) When property is false, there is no check.
shipped in xdctools 3.23.00.33