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.

Multiple code/data/stack configurations with a single platform

Other Parts Discussed in Thread: TMS320C6472, SYSBIOS

To start, I am working with the TMS320C6472 DSP.

I have a single platform definition for my code base.  This defines my memory map, but also contains the following:

    override config string codeMemory  = "SL2RAM";   

    override config string dataMemory  = "LL2RAM";                                  

    override config string stackMemory = "L1DSRAM";

 

Now,  for one of my binaries this is fine.  I have another binary that runs on another core and I want to use the same platform file but change codeMemory to LL2RAM.  I have scoured RTSC-pedia, but have been unable to find a way to do this.  I would like to avoid making completely separate platforms just to change these settings so I am trying to use either the .cfg or .bld file for my module.

 

Thanks

  • Kevin,

    What versions of CCS, SYSBIOS, and XDCTOOLS are you using?  Are you building this within a CCS project?

    There is a way to do this but I need to know what your environment is to let you know the best way for you to accomplish this.

    Judah

  • I am not using a CCS project.  I have .xdc and .bld files for my packages and platform and run xdc from the command line.  These are the versions I am currently using:

    SYSBIOS  6.31.04.27

    XDCTOOLS 3.20.08.88

    I have CCS 4.2.1.00004  installed, but only use it for debugging and profiling.

     

    Thanks

  • Kevin,

    If you are building with xdc and already have a config.bld file then this shouldn't be hard to do.  You need to create an "instance" of your platform and make sure to include it in the lists of platforms to build.

    For creating the instance you need to add something like the following to your config.bld:

         Build.platformTable["ti.platforms.evm6472:core1"] = {
             codeMemory: "LL2RAM"
         };

    The name after the colon can be anything you choose.  I put "core1" just as an example. 

    You just need to make sure this new platform instance "ti.platforms.evm6472:core1" is part of the list of platform you are building for.

    This can be done by setting it to the default platform:

         tiTargets.C64P.platform =   "ti.platforms.evm6472:core1";

    or if building for more than one platform:

         tiTargets.C64P.platforms = [ "ti.platforms.evm6472", "ti.platforms.evm6472:core1" ];

    Hope that helps.  If you're still having issues.  Could you attach your config.bld which you are using to build here?

    Judah

  • Thanks for the help, this worked great.  One issue though is I need to 256 byte align these sections.  Can I specify alignment in this same area?  I found that I can specify specific section alignment like .text in the .cfg file, but then I need to respecify my mapping to LL2RAM.  I would like to do all of this work in the same place if possible.

  • Kevin,

    If I understand you correctly, you need to align your output sections?  Are the sections that you need alignment, code or data?  And are these sections something that you are creating or already there and part of SYSBIOS?

    Typically alignment specification is not done in the same place as memory segments declaration because alignment is app specific.

    I think you are on the right track when you say "I can specify section alignment like .text in the .cfg file".  You can do this:

           Program.sectMap["<section>"].loadAlign = value.

    see http://rtsc.eclipse.org/cdoc-tip/xdc/cfg/Program.html for more details.

    I didn't understand the part "but then I need to respecify my mapping to LL2RAM"?  You shouldn't have to respecify any mapping, but if you had to because of a bug, you should be able to specify it to the memory segment you want.

    If you had a buffer that you wanted to align to a particular value, you can do that with a compiler directive:

        #pragma DATA_ALIGN(buffer, 128)

    Judah

  • The issue is that I can't do 

    Program.sectMap["<section>"].loadAlign = value.

    without first doing.

    Program.sectMap['<section>'] = new Program.SectionSpec();

    Unless I am misunderstanding something, this forces me to respecify the .loadSegment field because it gets set to a blank string.

  • Kevin,

    Yes, I think you are correct.  I think you do have to re-specify the loadSegment.

    I'm not aware of any other way to do this.

    Judah