]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
Added LPC23xx FLASH linkerscript
authorMarek Peca <mp@duch.cz>
Tue, 8 Sep 2009 16:57:43 +0000 (18:57 +0200)
committerMarek Peca <mp@duch.cz>
Tue, 8 Sep 2009 16:57:43 +0000 (18:57 +0200)
arch/arm/mach-lpc23xx/libs/ldscripts/lpc2364.ld-flash [new file with mode: 0644]
arch/arm/mach-lpc23xx/libs/ldscripts/lpc23xx-flash.ld [new file with mode: 0644]

diff --git a/arch/arm/mach-lpc23xx/libs/ldscripts/lpc2364.ld-flash b/arch/arm/mach-lpc23xx/libs/ldscripts/lpc2364.ld-flash
new file mode 100644 (file)
index 0000000..e34fa04
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * LPC2364 internal FLASH (128KB FLASH + 8KB SRAM + 8KB USB RAM + 16KB Eth RAM)
+ */
+
+STARTUP(crt0.o)
+INCLUDE board.ld               /* Allow to INPUT board specific files */
+
+ENTRY(_start)
+STACK_SIZE = 0x400;
+
+/* memory definitions */
+MEMORY
+{
+  FLASH    (rx) : ORIGIN = 0x00000000, LENGTH = 0x20000
+  RAM      (rw) : ORIGIN = 0x40000000, LENGTH = 0x02000
+  RAM_USB  (rw) : ORIGIN = 0x7fd00000, LENGTH = 0x02000
+  RAM_ETH  (rw) : ORIGIN = 0x7fe00000, LENGTH = 0x04000
+}
+
+/* include section definitions */
+INCLUDE lpc23xx-flash.ld
diff --git a/arch/arm/mach-lpc23xx/libs/ldscripts/lpc23xx-flash.ld b/arch/arm/mach-lpc23xx/libs/ldscripts/lpc23xx-flash.ld
new file mode 100644 (file)
index 0000000..60e74c9
--- /dev/null
@@ -0,0 +1,124 @@
+/***
+ * LPC23xx internal FLASH loadable by ISP
+ * uses internal FLASH and whole RAM at runtime
+ *
+ * by Marek Peca <mp@duch.cz> 2009/09
+ ***/
+
+/*!* to be included by chip-specific linkerscript, containing memory defs *!*/
+
+/* section definitions only */
+
+SECTIONS
+{
+  .ivec :
+  {
+    *(.ivec)                   /* interrupt entry points */
+  } > FLASH
+
+  /* first section is .text which is used for code */
+  .text :
+  {
+    *crt0.o (.text)            /* Startup code */
+    *(.text)                   /* remaining code */
+    *(.glue_7)
+    *(.glue_7t)
+    . = ALIGN(4);
+    _etext = .;
+  } > FLASH
+
+  .rodata :
+  {
+    *(.rodata)                 /* read-only data (constants) */
+    *(.rodata*)
+    . = ALIGN(4);
+  } > FLASH
+
+  /* .init_array - pointers to functions called before main */
+  PROVIDE(__init_array_start = .);
+  .init_array :
+  {
+    *(.init_array)
+    . = ALIGN(4);
+  } > FLASH = 0
+  PROVIDE (__init_array_end = .);
+
+  /* .data section which is used for initialized data */
+  _datainit = LOADADDR(.data);
+  .data :
+  {
+    _data = .;
+    *(.data)
+    SORT(CONSTRUCTORS)
+    . = ALIGN(4);
+    _edata = .;
+  } > RAM  AT> FLASH
+
+  /* .bss section which is used for uninitialized data */
+  .bss (NOLOAD) :
+  {
+    __bss_start = .;
+    __bss_start__ = .;
+    *(.bss)
+    *(COMMON)
+    . = ALIGN(4);
+    __bss_end__ = .;
+  } > RAM
+
+  .stack :
+  {
+    . += STACK_SIZE;
+    PROVIDE (_stack = .);
+  } > RAM
+
+  _end = . ;
+  PROVIDE (end = .);
+
+  /* optional generic use of USB RAM */
+  .usbram :
+  {
+    *(.textusb)
+    *(.datausb)
+  } > RAM_USB
+
+  /* optional generic use of Ethernet RAM */
+  .ethram :
+  {
+    *(.texteth)
+    *(.dataeth)
+  } > RAM_ETH
+
+  /* Stabs debugging sections.  */
+  .stab          0 : { *(.stab) }
+  .stabstr       0 : { *(.stabstr) }
+  .stab.excl     0 : { *(.stab.excl) }
+  .stab.exclstr  0 : { *(.stab.exclstr) }
+  .stab.index    0 : { *(.stab.index) }
+  .stab.indexstr 0 : { *(.stab.indexstr) }
+  .comment       0 : { *(.comment) }
+  /* DWARF debug sections.
+     Symbols in the DWARF debugging sections are relative to the beginning
+     of the section so we begin them at 0.  */
+  /* DWARF 1 */
+  .debug          0 : { *(.debug) }
+  .line           0 : { *(.line) }
+  /* GNU DWARF 1 extensions */
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }
+  .debug_sfnames  0 : { *(.debug_sfnames) }
+  /* DWARF 1.1 and DWARF 2 */
+  .debug_aranges  0 : { *(.debug_aranges) }
+  .debug_pubnames 0 : { *(.debug_pubnames) }
+  /* DWARF 2 */
+  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
+  .debug_abbrev   0 : { *(.debug_abbrev) }
+  .debug_line     0 : { *(.debug_line) }
+  .debug_frame    0 : { *(.debug_frame) }
+  .debug_str      0 : { *(.debug_str) }
+  .debug_loc      0 : { *(.debug_loc) }
+  .debug_macinfo  0 : { *(.debug_macinfo) }
+  /* SGI/MIPS DWARF 2 extensions */
+  .debug_weaknames 0 : { *(.debug_weaknames) }
+  .debug_funcnames 0 : { *(.debug_funcnames) }
+  .debug_typenames 0 : { *(.debug_typenames) }
+  .debug_varnames  0 : { *(.debug_varnames) }
+}