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.

TMS320F280025: Memory Allocation

Part Number: TMS320F280025


Tool/software:

Hi Forum

I was doing some study on universal_motorcontrol_lab_f28002x I found out that some Data  have been placed in specific location of the memory, by using , for example, #pragma DATA_SECTION(hal, "hal_data"); and 

hal_data : > RAMM1D,
LOAD_START(loadStart_hal_data),
LOAD_END(loadEnd_hal_data),
LOAD_SIZE(loadSize_hal_data)

in linker command file. My question is: is there any specific reason to manually allocate memory? why don't we leave it to Linker to decide about memory allocation?

thanks for reply

Kind regards Arash

  • Hello Arash,

    Access permissions are different for different memories. For example, M-RAMs are only accessible to C28 cores, LS-RAMs are shared between C28 and CLA(You need to configure the ownership in Memcfg), GS-RAMs are shared across cores (need to configure the ownership) and DMA.

    In case F28002x device, you need to make sure, any sections which DMA needs access to is placed in GSRAM. Rest of the sections can be placed anywhere. YOu may also leave it to linker by this - .section : >> RAMM | RAMLS | RAMGS

    Regards,

    Veena

  • Thanks for reply,  

    For the memory allocation I mentioned in my question specifically,  why the Hal_data have been placed in RAMM1D?

    In this case no second core ,no DMA, and no cla are involved

    Thanks again for reply

  • Hi Veena, 

    Did you see my reply to your last reply to my question?  I'm still waiting 

  • Hi,

    Apologies, I missed your previous reply.

    As I mentioned, the sections can be placed in any memory region. In the example, it is placed in RAMM1D, there is no particular reason to keep it in that particular region.

    Regards,

    Veena