From c65ca01044495774ad51c26c16ea97cf60798ecb Mon Sep 17 00:00:00 2001 From: TitanMKD Date: Wed, 13 Jun 2012 01:05:49 +0200 Subject: Fix Linker bug copy ROM to RAM & exec from RAM (need more test). --- lib/lpc43xx/vector.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/lpc43xx/vector.c') diff --git a/lib/lpc43xx/vector.c b/lib/lpc43xx/vector.c index 631e54e..daef5a9 100644 --- a/lib/lpc43xx/vector.c +++ b/lib/lpc43xx/vector.c @@ -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++; -- cgit v1.2.3