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.

TMS320F280049C: What is the use of memcpy function?

Part Number: TMS320F280049C

I need to know what is the use of memcpy function?

On power on it is called as:-

memcpy(&RamfunctionStart,&RamfunctionLoadStart,(size_t)&RamfunctionLoadsize);

RamfunctionStart, RamfunctionLoadStart & RamfunctionLoadsize are declared as 16 bit variables

memcpy function is declared as :-

#pragma CHECK_MISRA("-16.4")

_code_access void *memcpy (void *s1, void *s2, size_t n)

Thanks in advance.

Regards

  • Hi Mahesh,

    Here memcpy is used copy the ram function sections from Flash to RAM.

    When the complete code is placed in Flash, there are a few functions such as interrupt and flash configuration related functions etc. need to be run in RAM either for faster execution or due to the design need.

    All these functions can be assigned to ramfunction section. At the device start memcpy will takes care to copy these functions from Flash to RAM.

    Hope it is clear now.

    Thanks,

    Katta