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

Bug 313826

Summary: platform wizard creates section with length = 0, causes linker failure
Product: [Technology] RTSC Reporter: Karl Wechsler <karl>
Component: PlatformsAssignee: Vikram Adiga <vikram.adiga>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: d-russo, dfriedland, sascha
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Karl Wechsler CLA 2010-05-20 18:49:26 EDT
I created new platform for TCI6608 device.

I got this Platform.xdc file:

/*!
 * File generated by platform wizard. DO NOT MODIFY
 *
 */

metaonly module Platform inherits xdc.platform.IPlatform {

    config ti.platforms.generic.Platform.Instance plat =
        ti.platforms.generic.Platform.create("plat", {
            clockRate:      500,                                       
            catalogName:    "ti.catalog.c6000",
            deviceName:     "TMS320TCI6608",
            externalMemoryMap: 
           [          
           ],
          l1DMode:"32k",
          l1PMode:"32k",
          l2Mode:"512k",
    });
    
instance :
    
    override config string codeMemory  = "MSMCSRAM";   
    override config string dataMemory  = "MSMCSRAM";                                
    override config string stackMemory = "MSMCSRAM";
    
}

When I build app, I get .xdl file with a 0-length MEMORY entry:

MEMORY
{
    L2SRAM (RWX) : org = 0x800000, len = 0x0
    MSMCSRAM (RWX) : org = 0xc000000, len = 0x400000
}


When I link with this platform, I get a linker error:

"./configPkg/linker.cmd", line 312: error: length not specified for memory
   range L2SRAM
error: errors encountered during linking; "test66.out" not built
Comment 1 Sasha Slijepcevic CLA 2011-12-02 16:43:52 EST
This was fixed in platform-l14. The cause of the bug was that the function getMemoryMap() in ti.catalog.c6000.ITMS320CTCI6608 wasn't removing L2SRAM from the memory map, in the case where all of that memory was used for L2 cache.
Comment 2 Vikram Adiga CLA 2011-12-02 19:19:12 EST
Verified to be working correctly on 

XDC product version : 3.22.04.46

I created a new platform for TCI6608:

/*!
 * File generated by platform wizard. DO NOT MODIFY
 *
 */

metaonly module Platform inherits xdc.platform.IPlatform {

    config ti.platforms.generic.Platform.Instance CPU =
        ti.platforms.generic.Platform.create("CPU", {
            clockRate:      500,                                       
            catalogName:    "ti.catalog.c6000",
            deviceName:     "TMS320TCI6608",
            externalMemoryMap: 
           [          
           ],
          l2Mode:"512k",
          l1PMode:"32k",
          l1DMode:"32k",

    });
    
instance :
    
    override config string codeMemory  = "MSMCSRAM";   
    override config string dataMemory  = "MSMCSRAM";                           
    override config string stackMemory = "MSMCSRAM";
    
}

successfully built a app. 

The memory entry now in .xdl file is

MEMORY
{
    MSMCSRAM (RWX) : org = 0xc000000, len = 0x400000
}