mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
SAMA5: On some hardware, reconfiguring the PLL while executing out of NOR FLASH causes crashes. This was fixed by David Sidrane by implementing RAM functions. The killer code is copied and executed from ISRAM and the crash is avoided.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/sama5d3x-ek/scripts/nor-isram.ld
|
* configs/sama5d3x-ek/scripts/nor-isram.ld
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
norflash (W!RX) : ORIGIN = 0x10000000, LENGTH = 128M
|
norflash (W!RX) : ORIGIN = 0x10000000, LENGTH = 128M
|
||||||
isram (WR) : ORIGIN = 0x00304000, LENGTH = 128K - 16K
|
isram (WRX) : ORIGIN = 0x00304000, LENGTH = 128K - 16K
|
||||||
}
|
}
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
||||||
@@ -111,6 +111,14 @@ SECTIONS
|
|||||||
_ebss = ABSOLUTE(.);
|
_ebss = ABSOLUTE(.);
|
||||||
} > isram
|
} > isram
|
||||||
|
|
||||||
|
.ramfunc ALIGN(4): {
|
||||||
|
_sramfuncs = ABSOLUTE(.);
|
||||||
|
*(.ramfunc .ramfunc.*)
|
||||||
|
_eramfuncs = ABSOLUTE(.);
|
||||||
|
} > isram AT > norflash
|
||||||
|
|
||||||
|
_framfuncs = LOADADDR(.ramfunc);
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
/* Stabs debugging sections. */
|
||||||
.stab 0 : { *(.stab) }
|
.stab 0 : { *(.stab) }
|
||||||
.stabstr 0 : { *(.stabstr) }
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
|||||||
Reference in New Issue
Block a user