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.

How do I configure a CCS5 .cfg project file such that each core of a C6678 has is own section in MSMCSRAM for static variables?

Greetings, 

I am trying to set up a single-image application that runs on all 8 cores of a C6678. However, I find that I quickly run out of L2SRAM when I assign memory sections for private data structures (e.g., stacks and system heap). 

My question is: Is there a way for XGCONF to assign/allocate private sections of MSMCSRAM to each individual core within a single .cfg file?  For example, is it possible to use a switch statement in RTSC to assign section names based on the core ID?

Thanks.

  • Hi Nicholas --

    We don't have a good answer for you at this point.  L2 is easy since each core has its own local L2.  Once you go off-chip and you want to share the off chip, you are forced to make separate platform packages which specify different external memory layouts.  It might be possible to remap the MSMC RAM to support a single image, but I don't know if anyone has done that or if we have examples for that.

    -Karl-

     

  • That is what I suspected, I just wasn't sure what the alternatives were.  

    By the sounds of it, I would need a separate CCS project for each core, where there are two options:

    1) I can use the same .cfg configuration file for each core (i.e., project), but use different platform packages, which are individually arranged not to interfere with eachother

    2) I can use the same platform package (defining all 8 private memory sections), but use slightly different .cfg files so that only one of the private sections are used by each core.

    In either case, I assume that I would need to manage 8 different projects which would contain code that 99.9% identical. Since they are separate projects, they would generate separate binary files, which I would need to be individually loaded onto each core for debugging. This sounds like it would make the project development environment rather unwieldy. I would at least hope that the Multi-core Application Deployment utility properly manages all the common code.

    So my next question is, how should I configure CCS5.1 to create a super-project containing all the common code while also containing 8 sub-projects with slightly different .cfg files? or is the MCSDK image processing demo project structure the best possible layout for programming on multiple cores?

    Thanks, 

    Nick

  • Nicholas Jankovic said:

    That is what I suspected, I just wasn't sure what the alternatives were.  

    By the sounds of it, I would need a separate CCS project for each core, where there are two options:

    1) I can use the same .cfg configuration file for each core (i.e., project), but use different platform packages, which are individually arranged not to interfere with eachother

    2) I can use the same platform package (defining all 8 private memory sections), but use slightly different .cfg files so that only one of the private sections are used by each core.

    Nick,
    the case 2) won't work because you can't change the memory map in you cfg script. By the time the script runs, the memory map is already fixed.

    Here is a thread with a question somewhat similar to yours. You may want to take look and check if it's of any help.

  • Actually, I did managed to implement case 2).

    I created multiple projects within a subfolder, where

    • there is one project that defines a common .cfg file and contains all common code
    • there are 8 projects (one for each core) that compile the same common code (by creating a folder that is linked to the common source folder)
    • all use the same platform package (which defines partitions for each individual core)
    • each core project has a custom .cfg file that only define private memory section mappings
    • the common .cfg file is included using the xdc.loadCapsule();

    So in CCS, I just need to open all 9 projects. Unfortunately, I need to compile and load each one individually for debugging. 

    I haven't tried this yet, but in the future I will try to create a script in CCS that will automatically compile and load all 8 .out files to the target for debugging. 

    I also envision the MAD utility will create a small deployment package (less than the sum of the 8 binaries) since each compiled the same source.