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.

#pragma DATA_SECTION(Buf1,".far:DataMem"),what does this sentence mean?

Could someone tell me what does this sentence mean:#pragma DATA_SECTION(Buf1,".far:DataMem")?

Hope for reply.

  • Hi,

    The DATA_SECTION pragma allocates space for the symbol in C, or the next symbol declared in C++, in
    a section named section name.
    The syntax of the pragma in C is:
    #pragma DATA_SECTION ( symbol , " section name ");

    For more information please refer to:

    http://focus.ti.com/lit/ug/spru187q/spru187q.pdf

     

    Kind regards,

    one and zero

     

  • Thank you for your reply!And another question,can EDMA3 transfer be parallel?For example,while Core0 is using channel 0 to transfer data to Core1,Core 1 uses channel 1 to transfer data to Core2.

  • ... yes you can do that ...

    Please open a new post for starting a discussion on a new topic that makes it easier for others to find and follow.

    Thanks,

    one and zero

  • Hi,

       Can I Combine 2 memory Sections & give it for a single Symbol? The basic Idea is to increase the length from two memory Sections available.

    ie. #pragma DATA_SECTION ( symbol , " section name ");

    instead, I want something like

    #pragma DATA_SECTION ( symbol , " section 1", "Section 2", "Section N");

    so that Symbol has length with sum of Section 1 + Section 2 ...

  • Hi Prasanna,

    I dont think it is possible. Why do you want to that way? that is not recommended way of doing. I assume you want to place an array and put it in some section of memory. For that you can define single section reserving it for your symbol so that you dont have to mess up with multiple memory section.

    Hope this helps.

    Regards

    Radhesh

  • Hi Prasanna,

    the pragma DATA_SECTION does not control the length of the section. It just defines a non-standard section name that you can then refer to in the linker command file and cotrol it's placement. The length of the section is purely defined by what you put into it.

    So no combining two sections is not possible (and makes no sense either).

    Kind regards,

    one and zero

  • Thanks Radhesh, I realized my Question makes no sense as the memory will become Non-Contiguous (Even say, if Possible ).

    I had an Issue of Increasing memory for an variable, whose size comes from Linker command file. I found some un-used memory from some other Section (whose address is at beginning) , so Just had an thought to use it instead of altering all other memory sections.