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.

Change data location with 1 command file

Hi,

In  Code Generation Tools FAQ: http://processors.wiki.ti.com/index.php/Code_Generation_Tools_FAQ#Q:_What_are_the_best_compiler_build_options.3F

It is mentioned that “I can ensure priority ordering of sections across chips with different internal memory sizes with 1 command file”

May I ask can I change the location of my SECTIONS across chips with 1 command file ?

For e.g in DSPC6678 I want for Core0 make data in MSMC, and for Core1..7 use DDR?

Can I do it with 1 command file ? and how ?

  • I presume you build different executable files for each core, which means you invoke the linker once per core.

    The technique shown in that wiki article will not help.  You might be able to use preprocessing.  The linker supports the C preprocessing directives like #define and #if.  Thus, you could have lines in your linker command file like this ...

    #if CORE==0
       .data > MSMC
    #else
       .data > DDR
    #endif

    Then use  --define on the linker command line to set CORE to the proper value.

    For more on preprocessing in linker command files, please see this wiki article.

    Thanks and regards,

    -George