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.

CCS/TMS320F28035: 'MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart)' is right ?

Part Number: TMS320F28035

Tool/software: Code Composer Studio

SECTIONS
{
   /* Allocate program areas: */
   .cinit            : > FLASHA,     PAGE = 0
   .pinit            : > FLASHA,     PAGE = 0
   .text             : > FLASHA,     PAGE = 0

   codestart         : > BEGIN       PAGE = 0
   ramfuncs          : LOAD = FLASHD, 
                       RUN = progRAM, 
                       LOAD_START(_RamfuncsLoadStart),
                       LOAD_END(_RamfuncsLoadEnd),
                       RUN_START(_RamfuncsRunStart),
                       PAGE = 0

void MemCopy(Uint16 *SourceAddr, Uint16* SourceEndAddr, Uint16* DestAddr)
{
    while(SourceAddr < SourceEndAddr)
    { 
       *DestAddr++ = *SourceAddr++;
    }
    return;
}

extern Uint16 *RamfuncsLoadStart, *RamfuncsLoadEnd, *RamfuncsRunStart;

MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

       For the above program, I think it is correct to change from ‘MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart)’ to ’MemCopy(RamfuncsLoadStart, RamfuncsLoadEnd, RamfuncsRunStart)‘.

      For example, RamfuncsLoadStart points to the program's first address 0x1000,  the address of RamfuncsLoadStart itself is 0xff00, and &RamfuncsLoadStart takes the address 0xff00 instead of 0x1000. This obviously does not copy the program from flash to ram.