]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
Separate ldscript for LPC1766 to reflect limited (256kB) Flash size.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 23 Jan 2011 12:54:57 +0000 (13:54 +0100)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 23 Jan 2011 12:54:57 +0000 (13:54 +0100)
This allows to catch Flash overflow during compilation.
Without specification the target system application
and boot block are corrupted.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-app [new file with mode: 0644]
board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-boot [new file with mode: 0644]
board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-cfg [new file with mode: 0644]
board/arm/lpc17xx-common/libs/ldscripts/lpc1768.ld-cfg

diff --git a/board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-app b/board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-app
new file mode 100644 (file)
index 0000000..dd8f18c
--- /dev/null
@@ -0,0 +1,10 @@
+/***********************************************************************/
+/*                                                                     */
+/*  ROM.ld:  Linker Script File                                        */
+/*                                                                     */
+/***********************************************************************/
+
+INCLUDE "lpc1766.ld-cfg"
+
+INCLUDE "lpc17xx-base.ld-app"
+
diff --git a/board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-boot b/board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-boot
new file mode 100644 (file)
index 0000000..e5a9a75
--- /dev/null
@@ -0,0 +1,9 @@
+/***********************************************************************/
+/*                                                                     */
+/*  ROM.ld:  Linker Script File                                        */
+/*                                                                     */
+/***********************************************************************/
+
+INCLUDE "lpc1766.ld-cfg"
+
+INCLUDE "lpc17xx-base.ld-boot"
diff --git a/board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-cfg b/board/arm/lpc17xx-common/libs/ldscripts/lpc1766.ld-cfg
new file mode 100644 (file)
index 0000000..8a7c802
--- /dev/null
@@ -0,0 +1,26 @@
+
+KEYVAL_PAGE_LEN = 0x00001000;
+
+PROVIDE( __bbconf_pt_addr = 0 );
+
+MEMORY
+{
+        /* LPC1768 : 512 ROM + 32k SRAM + 16k SRAM + 16k SRAM */
+        /*--------------------------------------------------- */
+
+
+        /* Main ROM region - 256k for LPC1766 */
+        FLASHBOOT (rx) : ORIGIN = 0x00000000, LENGTH = 0x00007000
+        KEYVAL (rx) : ORIGIN = 0x00007000, LENGTH = 0x00002000
+        FLASHAPP (rx) : ORIGIN = 0x00009000, LENGTH = 0x00037000
+
+        /* local static RAM - 32k for LPC1766 */
+        IRAM0 (rwx) : ORIGIN = 0x10000000, LENGTH = 32k
+
+        /* stack location */
+        STACK (rw) : ORIGIN = 0x10000000 + 0x00007FE0 - 4, LENGTH = 4
+
+        /* AHB SRAM - 16k for LPC1768 - often used for USB */
+        IRAM1 (rwx) : ORIGIN = 0x2007C000, LENGTH = 32k
+}
+
index da96b4f3126fbdf968be85056063fc684646de69..c37ec2de11b5b3d9667a89257c4ec3acecb09b64 100644 (file)
@@ -9,7 +9,7 @@ MEMORY
         /*--------------------------------------------------- */
 
 
-        /* Main ROM region - 512k for LPC1766 */
+        /* Main ROM region - 512k for LPC1768 */
         FLASHBOOT (rx) : ORIGIN = 0x00000000, LENGTH = 0x00007000
         KEYVAL (rx) : ORIGIN = 0x00007000, LENGTH = 0x00002000
         FLASHAPP (rx) : ORIGIN = 0x00009000, LENGTH = 0x00077000