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.

Possible to put data both in L2D and MSMC(C6678)?

Hi,everyone

I'm wondering is it possible by changing rtsc platform file to put my data partly in L2D and partly in MSMC?

Or if I choose to put my data in MSMC in platform file,I have to  put all my data in MSMC?if this is true,what should I do with the L2D,I believe there is some way to utilize this memory space?

Could anyone help me? Thank you very much.

Zhao

  • Hi Zhao,

    You can define your own sections using #pragma DATA_SECTION and than use your own cmd file where you define where the section goes L2D or MSMC

    SECTIONS

    {

        .mydatasec >> L2D

    }

    Please check spru187t.pdf (TMS320C6000 Optimizing Compiler v 7.3 User's Guide)

    BR,

    HR

  • Hi,HR

    Thank you very much.This is my first time to use cmd file.follow your advice,I'v tried writing cmd file myself,but I met some problem:when I place my section in MSMC by:

    SECTIONS {

     .flag_section: >MSMC

     .my_data: >MSMC

    }

    I check the .map file,these two sections are actually placed in L2D memory:

    flag_section *          0    00805ec0    00000004                      

                                   00805ec0    00000004     test.obj (flag_section)

    my_data                0    00805ec4    00000004                      

                                   00805ec4    00000004     test.obj (my_data)

    And here is my code,a very simple one:

    #include<std.h>

     #include<stdio.h>

     #pragma DATA_SECTION(flag,"flag_section")

    int flag=0;

     #pragma DATA_SECTION(data,"my_data")

    int data=0;

    main(){  

    data=7;  

    flag=1;  

    printf("wait!");

     }

    but when I build there are warning message:

    Description Resource Path Location Type #10247-D creating output section "flag_section" without a SECTIONS specification cmdtest    C/C++ Problem

    Description Resource Path Location Type #10247-D creating output section "my_data" without a SECTIONS specification cmdtest    C/C++ Problem

    could you please spare me some time to find where my problem lies?Thank you very much.

    Best Regards,

    Zhao

     

     

  • Hi Zhao,

    You should use the name you used in the DATA_SECTION which means that your SECTIONS should be (without the dot as you didn't used dot in your name)

    SECTIONS

    {

      flag_section :> MSMC

      my_data :> MSMC

    }

    BR,

    HR

  • Hi,HR

    Thank you for your patience,It seems I've got some wrong cmd file to learn from.And now it works.

    Best regards,

    Zhao

  • Great !!! Good-Luck !