This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Why a customized platform not recognized by XDCTools?

Hi Guys,

Based on our platform,  I create a new platform package(for example named ABCD) by the means of RTSC tools. The content of ABCD/Platform.xdc is as follows:

metaonly module Platform inherits xdc.platform.IPlatform {

    config ti.platforms.generic.Platform.Instance CPU =
        ti.platforms.generic.Platform.create("CPU", {
            clockRate:      500.0,                                      
            catalogName:    "ti.catalog.c6000",
            deviceName:     "TMS320TI814X",
            externalMemoryMap:
           [         
                ["DSPIPC_MAGIC",
                     {
                        name: "DSPIPC_MAGIC",
                        base: 0x82800000,                   
                        len: 0x00001000,                   
                        space: "code/data",
                        access: "RWX",
                     }
                ],
                ["DSPIPC_HEAP",
                     {
                        name: "DSPIPC_HEAP",
                        base: 0x82801000,                   
                        len: 0x0007F000,                   
                        space: "code/data",
                        access: "RWX",
                     }
                ],
                ["EMIFB",
                     {
                        name: "EMIFB",
                        base: 0x82900000,                   
                        len: 0x00F00000,                   
                        space: "code/data",
                        access: "RWX",
                     }
                ],
                ["SYSLINK_SR0",
                     {
                        name: "SYSLINK_SR0",
                        base: 0x82880000,                   
                        len: 0x00080000,                   
                        space: "code/data",
                        access: "RWX",
                     }
                ],
                ["DDR2",
                     {
                        name: "DDR2",
                        base: 0x8B000000,                   
                        len: 0x01FFDB00,                   
                        space: "code/data",
                        access: "RWX",
                     }
                ],
                ["SR0",
                     {
                        name: "SR0",
                        base: 0x8E000000,                   
                        len: 0x01000000,                   
                        space: "code/data",
                        access: "RWX",
                     }
                ],
                ["SR1",
                     {
                        name: "SR1",
                        base: 0x8D000000,                   
                        len: 0x00C00000,                   
                        space: "code/data",
                        access: "RWX",
                     }
                ],
                ["HOST_DSP_NOTIFYMEM",
                     {
                        name: "HOST_DSP_NOTIFYMEM",
                        base: 0x8CFFDB00,                   
                        len: 0x00002500,                   
                        space: "code/data",
                        access: "RWX",
                     }
                ],
           ],
          l2Mode:"0k",
          l1PMode:"32k",
          l1DMode:"32k",

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

Then I place the ABCD directory to xdctools/packages\ti\platforms.

Now I establish a new RTSC project, with the project setting" device = Generic C674x Device" and "ELF output format". Then CCS will automatically set the "RTSC Target = ti.targets.elf.C674". But when I need to select the RTSC Platform to ABCD, the XDCtools always find nothing about this new platform. The ABCD platform is composed by a C674x DSP and one ARM, but how do I tell this information to XDC? In other words, when we create new platform, how the RTSC target and RTSC platform setting establish relation with each other?

Allen

  • Hi,

    What works for me is put the ABCD directory in xdctools/packages and add xdctoolsdirectory in other repositories in RTSC configuration settings.

  • Allen,
    I think Johannes correctly identified that your new platform is most likely not on the package path that is searched for new platforms. If you open the file package.xdc in your ABCD directory you can find out what is the name of your platform package. The name of a repository and the name of a package added together must create a full path to your platform package. If your repository is 'C:/ti/xdctools/packages' and the name in package.xdc is 'ABCD', when you add them together you end up with  'C:/ti/xdctools/packages/ABCD' which is not the path to your package. So, you either move 'ABCD' as Johanness proposed, or you add  'C:/ti/xdctools/packages/ti/platforms' to the list of your repositories. Even better, you should create a directory outside of your XDCtools installation, in C:/myPlatforms for example, and keep your platforms there. Then, just add 'C;/myPlatforms' to the repositories for your project. The advantage of it is that you won't accidentally remove your platforms when you decide to update your XDCtools installation.  

    As for your question about matching the targets and the platforms, it is handled as follows.
    I think you used the Platform Wizard to create your platform. The Platform Wizard can only create a platform that represents one of the CPUs available on the actual hardware platform. In your case you selected 'ti.catalog.c6000' and 'TMS320TI814X' for catalogName and deviceName, which means the platform represents C674x CPU. If you want the ARM platform, you have to choose 'ti.catalog.arm.cortexa8' and 'TMS320TI814X'. When you select a RTSC target, the target checks the content of catalogName and deviceName to evaluate if the platform is compatible with the target.

     

  • Thanks Johannes and Sasha, when I place the platform package into xdctools/package, I could see it through the RTSC Tools->Platform->Edit/View when I choose the xdctools/package as the search area.

    But I still couldn't show up the platform in project setting when I choose RTSC target = ti.target.elf.C674. And I already add the xdctools/package into my repository. What might be the reasons? Thanks.

    Allen

  • Sorry, I find the issue where I add the xdctools/packages directory into the repository, actually I should add xdctools directory into it as Johannes said. It works now.

    Thanks.