This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

remapping of ddr

Hi again

I am still struggling with debugging my code in DDR3 memory using the Keil uLink2. I have created a .ini file for the uLink2 to execute which initializes the DDR3 for use, load my code to DDR3, and attempts to change the pc and sp to that memory. The last thing is not working. the code definitely is in the DDR3 memory OK. Below is the the script function.

The code was linked to 0xA0000000

This is a microsemi cortex m3 FPGA arm.

Can anyone see a reason why this would not work? or why the uLink2 jumps away to undefined memory space? I assume people have debugged out of external RAM before

Thanks :-)


FUNC void SetupPC_SP (void) {
       // Stack pointer and vector table offset
       // registers are set to 0x00000000
       // Setup Stack Pointer

    SP = _RDWORD(0xA0000000);          // Setup Stack Pointer

       // Program Counter is set to (0x00000004 -1)
    PC = _RDWORD(0xA0000004-1);        // Setup Program Counter

       // change vector table address to 0
    _WDWORD(0xE000ED08, 0x0);          // 0xE000ED08 SCB->VTOR = readonly_region_base;

}