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