AnsweredAssumed Answered

Problem in code move

Question asked by wang zhongyuan on Apr 16, 2018
Latest reply on Apr 23, 2018 by Daniel Martynek

Hi eveyone

I have some question in Flash Program. I segemented non-paged FLASHs named BOOT_MEM and relocated this segement to RAM (in .prm file). So i need to copy my function code in RAM. But something wrong in this step. When run my program, it was paused in move code function and reminder me that "No source available for "0x000001 (0x000001)() "



this is main function

void main(void)
    word sector = 0;
    dword addr = 0xFD8000;
    word databuffer[4] = {0x1234, 0x2344, 0x4562, 0x4525};
    INIT_PLL_64M();    // 
    Code_Move((dword*)0x00FD6400, (dword*)0x00003c00,0x400);
    PFlash_Write(addr, databuffer);



this is Code_Move function


void Code_Move(dword *source, dword *desk, dword size)
    while (size--)
        *desk++ = *source++;