Fix Linker bug copy ROM to RAM & exec from RAM (need more test).

This commit is contained in:
TitanMKD
2012-06-13 01:05:49 +02:00
parent da27adcf1c
commit c65ca01044
4 changed files with 11 additions and 7 deletions

View File

@@ -171,6 +171,9 @@ void reset_handler(void)
if( (&_etext_ram-&_text_ram) > 0 )
{
src = &_etext_rom-(&_etext_ram-&_text_ram);
/* Change Shadow memory to ROM (for Debug Purpose in case Boot has not set correctly the M4MEMMAP because of debug) */
CREG_M4MEMMAP = (unsigned long)src;
for(dest = &_text_ram; dest < &_etext_ram; )
{
*dest++ = *src++;