]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
Added support for LPCEurobot by clonning spejblarm.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 10 Dec 2007 11:37:00 +0000 (11:37 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 10 Dec 2007 11:37:00 +0000 (11:37 +0000)
darcs-hash:20071210113730-f2ef6-88a0fc8b37edf49036723f6cf6d489111cf3abfa.gz

15 files changed:
board/lpceurobot/Makefile [new file with mode: 0644]
board/lpceurobot/Makefile.omk [new file with mode: 0644]
board/lpceurobot/config.lpceurobot [new file with mode: 0644]
board/lpceurobot/defines/Makefile [new file with mode: 0644]
board/lpceurobot/defines/Makefile.omk [new file with mode: 0644]
board/lpceurobot/libs/Makefile [new file with mode: 0644]
board/lpceurobot/libs/Makefile.omk [new file with mode: 0644]
board/lpceurobot/libs/ldscripts/Makefile [new file with mode: 0644]
board/lpceurobot/libs/ldscripts/Makefile.omk [new file with mode: 0644]
board/lpceurobot/libs/ldscripts/lpc21xx.ld-canld [new file with mode: 0644]
board/lpceurobot/libs/ldscripts/lpc21xx.ld-flash [new file with mode: 0644]
board/lpceurobot/libs/ldscripts/lpc21xx.ld-mpflash [new file with mode: 0644]
board/lpceurobot/libs/ldscripts/lpc21xx.ld-mpram [new file with mode: 0644]
board/lpceurobot/libs/ldscripts/lpc21xx.ld-ram [new file with mode: 0644]
board/lpceurobot/libs/ldscripts/lpc21xx.ld-ramisp [new file with mode: 0644]

diff --git a/board/lpceurobot/Makefile b/board/lpceurobot/Makefile
new file mode 100644 (file)
index 0000000..f595272
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else   
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/board/lpceurobot/Makefile.omk b/board/lpceurobot/Makefile.omk
new file mode 100644 (file)
index 0000000..dba8475
--- /dev/null
@@ -0,0 +1,3 @@
+# -*- makefile -*-
+
+SUBDIRS = defines libs
diff --git a/board/lpceurobot/config.lpceurobot b/board/lpceurobot/config.lpceurobot
new file mode 100644 (file)
index 0000000..e73d118
--- /dev/null
@@ -0,0 +1,29 @@
+# -*- makefile -*-
+
+ARCH=arm
+MACH=lpc21xx
+BOARD=spejblarm
+
+CROSS_COMPILE = arm-elf-
+TARGET_ARCH = -mcpu=arm7tdmi 
+
+# Set default C flags. If theese are set elsewhere (e.g. on a command
+# line), these default flags are not used.
+DEBUG ?= -g
+OPTIMIZE ?= -O2
+
+LPC_BAUD = 38400
+TOLPC = $(MAKERULES_DIR)/$(COMPILED_DIR_NAME)/bin-utils/tolpc --baud $(LPC_BAUD) --sdev /dev/ttyS0
+LOAD_CMD-ramisp = $(TOLPC)  -v -q 7372 -L -f 
+LOAD_CMD-mpram = $(TOLPC)  -v -q 7372 -L -f 
+
+# This selects linker script
+LD_SCRIPT=lpc21xx
+DEFAULT_LD_SCRIPT_VARIANT=ramisp
+
+#OUTPUT_FORMATS = bin hex srec
+
+###
+CONFIG_USB_BASE=
+CONFIG_USB_PDIUSB=
+CONFIG_USB_MORE=
diff --git a/board/lpceurobot/defines/Makefile b/board/lpceurobot/defines/Makefile
new file mode 100644 (file)
index 0000000..f595272
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else   
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/board/lpceurobot/defines/Makefile.omk b/board/lpceurobot/defines/Makefile.omk
new file mode 100644 (file)
index 0000000..176b8a6
--- /dev/null
@@ -0,0 +1,2 @@
+# -*- makefile -*-
+include_HEADERS = $(notdir $(wildcard $(SOURCES_DIR)/*.h))
diff --git a/board/lpceurobot/libs/Makefile b/board/lpceurobot/libs/Makefile
new file mode 100644 (file)
index 0000000..f595272
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else   
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/board/lpceurobot/libs/Makefile.omk b/board/lpceurobot/libs/Makefile.omk
new file mode 100644 (file)
index 0000000..192bf05
--- /dev/null
@@ -0,0 +1,3 @@
+# -*- makefile -*-
+
+SUBDIRS = ldscripts
diff --git a/board/lpceurobot/libs/ldscripts/Makefile b/board/lpceurobot/libs/ldscripts/Makefile
new file mode 100644 (file)
index 0000000..f595272
--- /dev/null
@@ -0,0 +1,14 @@
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ;  while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd`  ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+       @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else   
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
diff --git a/board/lpceurobot/libs/ldscripts/Makefile.omk b/board/lpceurobot/libs/ldscripts/Makefile.omk
new file mode 100644 (file)
index 0000000..e47cf33
--- /dev/null
@@ -0,0 +1,3 @@
+# -*- makefile -*-
+
+lib_LDSCRIPTS = $(notdir $(wildcard $(SOURCES_DIR)/*.ld*))
diff --git a/board/lpceurobot/libs/ldscripts/lpc21xx.ld-canld b/board/lpceurobot/libs/ldscripts/lpc21xx.ld-canld
new file mode 100644 (file)
index 0000000..08bf7c4
--- /dev/null
@@ -0,0 +1,136 @@
+/***********************************************************************/\r
+/*  This file is part of the ARM Compiler package                      */\r
+/*  Copyright KEIL ELEKTRONIK GmbH 1992-2004                           */\r
+/***********************************************************************/\r
+/*                                                                     */\r
+/*  TARGET.LD:  Linker Script File                                     */\r
+/*                                                                     */\r
+/***********************************************************************/\r
+\r
+\r
+/*\r
+//*** <<< Use Configuration Wizard in Context Menu >>> *** \r
+*/\r
+\r
+\r
+/*\r
+// <h> Memory Configuration\r
+//   <h> Code (Read Only)\r
+//     <o>  Start <0x0-0xFFFFFFFF>\r
+//     <o1> Size  <0x0-0xFFFFFFFF>\r
+//   </h>\r
+//   <h> Data (Read/Write)\r
+//     <o2> Start <0x0-0xFFFFFFFF>\r
+//     <o3> Size  <0x0-0xFFFFFFFF>\r
+//   </h>\r
+// </h>\r
+*/\r
+\r
+/* Memory Definitions */\r
+\r
+MEMORY\r
+{\r
+  CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x0003E000\r
+  /*DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000*/\r
+  DATA (rw) : ORIGIN = 0x40000120, LENGTH = 0x00000050\r
+}\r
+\r
+STARTUP(startup.o)\r
+\r
+/* Section Definitions */\r
+\r
+SECTIONS\r
+{\r
+\r
+  /* first section is .text which is used for code */\r
+\r
+  .text :\r
+  {\r
+    *startup.o (.text)         /* Startup code */\r
+    *(.text)                   /* remaining code */\r
+\r
+    *(.glue_7t) *(.glue_7)\r
+\r
+  } >CODE =0\r
+\r
+  . = ALIGN(4);\r
+\r
+  /* .rodata section which is used for read-only data (constants) */\r
+\r
+  .rodata :\r
+  {\r
+    *(.rodata)\r
+  } >CODE\r
+\r
+  . = ALIGN(4);\r
+\r
+  _etext = . ;\r
+  PROVIDE (etext = .);\r
+\r
+  /* .data section which is used for initialized data */\r
+\r
+  .data : AT (_etext)\r
+  {\r
+    _data = . ;\r
+    /* *!*!*!* */\r
+    PROVIDE (canload_id = .);\r
+    . += 4;\r
+    /* *!*!*!* */\r
+    *(.data)\r
+    SORT(CONSTRUCTORS)\r
+  } >DATA\r
+  . = ALIGN(4);\r
+\r
+  _edata = . ;\r
+   PROVIDE (edata = .);\r
+\r
+  /* .bss section which is used for uninitialized data */\r
+\r
+  .bss :\r
+  {\r
+    __bss_start = . ;\r
+    __bss_start__ = . ;\r
+    *(.bss)\r
+    *(COMMON)\r
+  } >DATA\r
+  . = ALIGN(4);\r
+  __bss_end__ = . ;\r
+  __bss_end__ = . ;\r
+\r
+  _end = .;\r
+  PROVIDE (end = .);\r
+\r
+  /* Stabs debugging sections.  */\r
+  .stab          0 : { *(.stab) }\r
+  .stabstr       0 : { *(.stabstr) }\r
+  .stab.excl     0 : { *(.stab.excl) }\r
+  .stab.exclstr  0 : { *(.stab.exclstr) }\r
+  .stab.index    0 : { *(.stab.index) }\r
+  .stab.indexstr 0 : { *(.stab.indexstr) }\r
+  .comment       0 : { *(.comment) }\r
+  /* DWARF debug sections.\r
+     Symbols in the DWARF debugging sections are relative to the beginning\r
+     of the section so we begin them at 0.  */\r
+  /* DWARF 1 */\r
+  .debug          0 : { *(.debug) }\r
+  .line           0 : { *(.line) }\r
+  /* GNU DWARF 1 extensions */\r
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }\r
+  .debug_sfnames  0 : { *(.debug_sfnames) }\r
+  /* DWARF 1.1 and DWARF 2 */\r
+  .debug_aranges  0 : { *(.debug_aranges) }\r
+  .debug_pubnames 0 : { *(.debug_pubnames) }\r
+  /* DWARF 2 */\r
+  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }\r
+  .debug_abbrev   0 : { *(.debug_abbrev) }\r
+  .debug_line     0 : { *(.debug_line) }\r
+  .debug_frame    0 : { *(.debug_frame) }\r
+  .debug_str      0 : { *(.debug_str) }\r
+  .debug_loc      0 : { *(.debug_loc) }\r
+  .debug_macinfo  0 : { *(.debug_macinfo) }\r
+  /* SGI/MIPS DWARF 2 extensions */\r
+  .debug_weaknames 0 : { *(.debug_weaknames) }\r
+  .debug_funcnames 0 : { *(.debug_funcnames) }\r
+  .debug_typenames 0 : { *(.debug_typenames) }\r
+  .debug_varnames  0 : { *(.debug_varnames) }\r
+}\r
diff --git a/board/lpceurobot/libs/ldscripts/lpc21xx.ld-flash b/board/lpceurobot/libs/ldscripts/lpc21xx.ld-flash
new file mode 100644 (file)
index 0000000..5a06010
--- /dev/null
@@ -0,0 +1,101 @@
+/***********************************************************************/\r
+/*                                                                     */\r
+/*  ROM.ld:  Linker Script File                                        */\r
+/*                                                                     */\r
+/***********************************************************************/\r
+ENTRY(_boot)\r
+STACK_SIZE = 0x400;\r
+\r
+/* Memory Definitions */\r
+MEMORY\r
+{\r
+  ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000\r
+  RAM (rw) : ORIGIN = 0x40000000, LENGTH = 0x00010000\r
+}\r
+\r
+/* Section Definitions */\r
+SECTIONS\r
+{\r
+  /* first section is .text which is used for code */\r
+  .text :\r
+  {\r
+    *crt0.o (.text)            /* Startup code */\r
+    *(.text)                   /* remaining code */\r
+    *(.rodata)                 /* read-only data (constants) */\r
+    *(.rodata*)\r
+    *(.glue_7)\r
+    *(.glue_7t)\r
+  } > ROM\r
+\r
+  . = ALIGN(4);\r
+  _etext = . ;\r
+  PROVIDE (etext = .);\r
+\r
+  /* .data section which is used for initialized data */\r
+  .data : AT (_etext)\r
+  {\r
+    _data = .;\r
+    *(.data)\r
+  } > RAM\r
\r
+  . = ALIGN(4);\r
+  _edata = . ;\r
+  PROVIDE (edata = .);\r
+\r
+  /* .bss section which is used for uninitialized data */\r
+  .bss (NOLOAD) :\r
+  {\r
+    __bss_start = . ;\r
+    __bss_start__ = . ;\r
+    *(.bss)\r
+    *(COMMON)\r
+    . = ALIGN(4);\r
+  } > RAM\r
+\r
+  . = ALIGN(4);\r
+  __bss_end__ = . ;\r
+  PROVIDE (__bss_end = .);\r
+\r
+  .stack ALIGN(256) :\r
+  {\r
+    . += STACK_SIZE;\r
+    PROVIDE (_stack = .);\r
+  } > RAM\r
+\r
+  _end = . ;\r
+  PROVIDE (end = .);\r
+\r
+  /* Stabs debugging sections.  */\r
+  .stab          0 : { *(.stab) }\r
+  .stabstr       0 : { *(.stabstr) }\r
+  .stab.excl     0 : { *(.stab.excl) }\r
+  .stab.exclstr  0 : { *(.stab.exclstr) }\r
+  .stab.index    0 : { *(.stab.index) }\r
+  .stab.indexstr 0 : { *(.stab.indexstr) }\r
+  .comment       0 : { *(.comment) }\r
+  /* DWARF debug sections.\r
+     Symbols in the DWARF debugging sections are relative to the beginning\r
+     of the section so we begin them at 0.  */\r
+  /* DWARF 1 */\r
+  .debug          0 : { *(.debug) }\r
+  .line           0 : { *(.line) }\r
+  /* GNU DWARF 1 extensions */\r
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }\r
+  .debug_sfnames  0 : { *(.debug_sfnames) }\r
+  /* DWARF 1.1 and DWARF 2 */\r
+  .debug_aranges  0 : { *(.debug_aranges) }\r
+  .debug_pubnames 0 : { *(.debug_pubnames) }\r
+  /* DWARF 2 */\r
+  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }\r
+  .debug_abbrev   0 : { *(.debug_abbrev) }\r
+  .debug_line     0 : { *(.debug_line) }\r
+  .debug_frame    0 : { *(.debug_frame) }\r
+  .debug_str      0 : { *(.debug_str) }\r
+  .debug_loc      0 : { *(.debug_loc) }\r
+  .debug_macinfo  0 : { *(.debug_macinfo) }\r
+  /* SGI/MIPS DWARF 2 extensions */\r
+  .debug_weaknames 0 : { *(.debug_weaknames) }\r
+  .debug_funcnames 0 : { *(.debug_funcnames) }\r
+  .debug_typenames 0 : { *(.debug_typenames) }\r
+  .debug_varnames  0 : { *(.debug_varnames) }\r
+}\r
diff --git a/board/lpceurobot/libs/ldscripts/lpc21xx.ld-mpflash b/board/lpceurobot/libs/ldscripts/lpc21xx.ld-mpflash
new file mode 100644 (file)
index 0000000..c8452cd
--- /dev/null
@@ -0,0 +1,135 @@
+/***********************************************************************/\r
+/*  This file is part of the ARM Compiler package                      */\r
+/*  Copyright KEIL ELEKTRONIK GmbH 1992-2004                           */\r
+/***********************************************************************/\r
+/*                                                                     */\r
+/*  TARGET.LD:  Linker Script File                                     */\r
+/*                                                                     */\r
+/***********************************************************************/\r
+\r
+\r
+/*\r
+//*** <<< Use Configuration Wizard in Context Menu >>> *** \r
+*/\r
+\r
+\r
+/*\r
+// <h> Memory Configuration\r
+//   <h> Code (Read Only)\r
+//     <o>  Start <0x0-0xFFFFFFFF>\r
+//     <o1> Size  <0x0-0xFFFFFFFF>\r
+//   </h>\r
+//   <h> Data (Read/Write)\r
+//     <o2> Start <0x0-0xFFFFFFFF>\r
+//     <o3> Size  <0x0-0xFFFFFFFF>\r
+//   </h>\r
+// </h>\r
+*/\r
+\r
+/* Memory Definitions */\r
+\r
+MEMORY\r
+{\r
+  CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x0003E000\r
+  DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000\r
+}\r
+\r
+STARTUP(startup.o)\r
+\r
+/* Section Definitions */\r
+\r
+SECTIONS\r
+{\r
+\r
+  /* first section is .text which is used for code */\r
+\r
+  .text :\r
+  {\r
+    *startup.o (.text)         /* Startup code */\r
+    *(.text)                   /* remaining code */\r
+\r
+    *(.glue_7t) *(.glue_7)\r
+\r
+  } >CODE =0\r
+\r
+  . = ALIGN(4);\r
+\r
+  /* .rodata section which is used for read-only data (constants) */\r
+\r
+  .rodata :\r
+  {\r
+    *(.rodata)\r
+  } >CODE\r
+\r
+  . = ALIGN(4);\r
+\r
+  _etext = . ;\r
+  PROVIDE (etext = .);\r
+\r
+  /* .data section which is used for initialized data */\r
+\r
+  .data : AT (_etext)\r
+  {\r
+    _data = . ;\r
+    /* *!*!*!* */\r
+    PROVIDE (canload_id = .);\r
+    . += 4;\r
+    /* *!*!*!* */\r
+    *(.data)\r
+    SORT(CONSTRUCTORS)\r
+  } >DATA\r
+  . = ALIGN(4);\r
+\r
+  _edata = . ;\r
+   PROVIDE (edata = .);\r
+\r
+  /* .bss section which is used for uninitialized data */\r
+\r
+  .bss :\r
+  {\r
+    __bss_start = . ;\r
+    __bss_start__ = . ;\r
+    *(.bss)\r
+    *(COMMON)\r
+  } >DATA\r
+  . = ALIGN(4);\r
+  __bss_end__ = . ;\r
+  __bss_end__ = . ;\r
+\r
+  _end = .;\r
+  PROVIDE (end = .);\r
+\r
+  /* Stabs debugging sections.  */\r
+  .stab          0 : { *(.stab) }\r
+  .stabstr       0 : { *(.stabstr) }\r
+  .stab.excl     0 : { *(.stab.excl) }\r
+  .stab.exclstr  0 : { *(.stab.exclstr) }\r
+  .stab.index    0 : { *(.stab.index) }\r
+  .stab.indexstr 0 : { *(.stab.indexstr) }\r
+  .comment       0 : { *(.comment) }\r
+  /* DWARF debug sections.\r
+     Symbols in the DWARF debugging sections are relative to the beginning\r
+     of the section so we begin them at 0.  */\r
+  /* DWARF 1 */\r
+  .debug          0 : { *(.debug) }\r
+  .line           0 : { *(.line) }\r
+  /* GNU DWARF 1 extensions */\r
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }\r
+  .debug_sfnames  0 : { *(.debug_sfnames) }\r
+  /* DWARF 1.1 and DWARF 2 */\r
+  .debug_aranges  0 : { *(.debug_aranges) }\r
+  .debug_pubnames 0 : { *(.debug_pubnames) }\r
+  /* DWARF 2 */\r
+  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }\r
+  .debug_abbrev   0 : { *(.debug_abbrev) }\r
+  .debug_line     0 : { *(.debug_line) }\r
+  .debug_frame    0 : { *(.debug_frame) }\r
+  .debug_str      0 : { *(.debug_str) }\r
+  .debug_loc      0 : { *(.debug_loc) }\r
+  .debug_macinfo  0 : { *(.debug_macinfo) }\r
+  /* SGI/MIPS DWARF 2 extensions */\r
+  .debug_weaknames 0 : { *(.debug_weaknames) }\r
+  .debug_funcnames 0 : { *(.debug_funcnames) }\r
+  .debug_typenames 0 : { *(.debug_typenames) }\r
+  .debug_varnames  0 : { *(.debug_varnames) }\r
+}\r
diff --git a/board/lpceurobot/libs/ldscripts/lpc21xx.ld-mpram b/board/lpceurobot/libs/ldscripts/lpc21xx.ld-mpram
new file mode 100644 (file)
index 0000000..e1bf8c1
--- /dev/null
@@ -0,0 +1,108 @@
+/***\r
+ * LPC21xx RAM with <0x40000120;0x40000200) hole\r
+ * used by ISP or CAN bootloader\r
+ ***/\r
+\r
+STARTUP(crt0.o)\r
+ENTRY(_start)\r
+STACK_SIZE = 0x400;\r
+\r
+/* Memory Definitions */\r
+MEMORY\r
+{\r
+  RAML (rw) : ORIGIN = 0x40000000, LENGTH = 0x00000120\r
+  RAMH (rw) : ORIGIN = 0x40000200, LENGTH = 0x00004000\r
+}\r
+\r
+/* Section Definitions */\r
+\r
+SECTIONS\r
+{\r
+  .ivec :\r
+  {\r
+    *(.ivec)                   /* interrupt entry points */\r
+  } > RAML\r
+\r
+  /* first section is .text which is used for code */\r
+  .text :\r
+  {\r
+    *crt0.o (.text)            /* Startup code */\r
+    *(.text)                   /* remaining code */\r
+    *(.rodata)                 /* read-only data (constants) */\r
+    *(.rodata*)\r
+    *(.glue_7)\r
+    *(.glue_7t)\r
+  } > RAMH\r
+\r
+  . = ALIGN(4);\r
+  _etext = . ;\r
+  PROVIDE (etext = .);\r
+\r
+  /* .data section which is used for initialized data */\r
+  .data :\r
+  {\r
+    _data = .;\r
+    *(.data)\r
+  } > RAMH\r
+\r
+  . = ALIGN(4);\r
+  _edata = . ;\r
+  PROVIDE (edata = .);\r
+\r
+  /* .bss section which is used for uninitialized data */\r
+  .bss (NOLOAD) :\r
+  {\r
+    __bss_start = . ;\r
+    __bss_start__ = . ;\r
+    *(.bss)\r
+    *(COMMON)\r
+    . = ALIGN(4);\r
+  } > RAMH\r
+\r
+  . = ALIGN(4);\r
+  __bss_end__ = . ;\r
+  PROVIDE (__bss_end = .);\r
+\r
+  .stack ALIGN(256) :\r
+  {\r
+    . += STACK_SIZE;\r
+    PROVIDE (_stack = .);\r
+  } > RAMH\r
+\r
+  _end = . ;\r
+  PROVIDE (end = .);\r
+\r
+  /* Stabs debugging sections.  */\r
+  .stab          0 : { *(.stab) }\r
+  .stabstr       0 : { *(.stabstr) }\r
+  .stab.excl     0 : { *(.stab.excl) }\r
+  .stab.exclstr  0 : { *(.stab.exclstr) }\r
+  .stab.index    0 : { *(.stab.index) }\r
+  .stab.indexstr 0 : { *(.stab.indexstr) }\r
+  .comment       0 : { *(.comment) }\r
+  /* DWARF debug sections.\r
+     Symbols in the DWARF debugging sections are relative to the beginning\r
+     of the section so we begin them at 0.  */\r
+  /* DWARF 1 */\r
+  .debug          0 : { *(.debug) }\r
+  .line           0 : { *(.line) }\r
+  /* GNU DWARF 1 extensions */\r
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }\r
+  .debug_sfnames  0 : { *(.debug_sfnames) }\r
+  /* DWARF 1.1 and DWARF 2 */\r
+  .debug_aranges  0 : { *(.debug_aranges) }\r
+  .debug_pubnames 0 : { *(.debug_pubnames) }\r
+  /* DWARF 2 */\r
+  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }\r
+  .debug_abbrev   0 : { *(.debug_abbrev) }\r
+  .debug_line     0 : { *(.debug_line) }\r
+  .debug_frame    0 : { *(.debug_frame) }\r
+  .debug_str      0 : { *(.debug_str) }\r
+  .debug_loc      0 : { *(.debug_loc) }\r
+  .debug_macinfo  0 : { *(.debug_macinfo) }\r
+  /* SGI/MIPS DWARF 2 extensions */\r
+  .debug_weaknames 0 : { *(.debug_weaknames) }\r
+  .debug_funcnames 0 : { *(.debug_funcnames) }\r
+  .debug_typenames 0 : { *(.debug_typenames) }\r
+  .debug_varnames  0 : { *(.debug_varnames) }\r
+}\r
diff --git a/board/lpceurobot/libs/ldscripts/lpc21xx.ld-ram b/board/lpceurobot/libs/ldscripts/lpc21xx.ld-ram
new file mode 100644 (file)
index 0000000..e1f4224
--- /dev/null
@@ -0,0 +1,101 @@
+/***********************************************************************/\r
+/*                                                                     */\r
+/*  RAM.ld:  Linker Script File                                        */\r
+/*                                                                     */\r
+/***********************************************************************/\r
+ENTRY(_start)\r
+STACK_SIZE = 0x400;\r
+\r
+/* Memory Definitions */\r
+MEMORY\r
+{\r
+  ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000\r
+  RAM (rw) : ORIGIN = 0x40000000, LENGTH = 0x00010000\r
+}\r
+\r
+/* Section Definitions */\r
+SECTIONS\r
+{\r
+  /* first section is .text which is used for code */\r
+  .text :\r
+  {\r
+    *crt0.o (.text)            /* Startup code */\r
+    *(.text)                   /* remaining code */\r
+    *(.rodata)                 /* read-only data (constants) */\r
+    *(.rodata*)\r
+    *(.glue_7)\r
+    *(.glue_7t)\r
+  } > RAM\r
+\r
+  . = ALIGN(4);\r
+  _etext = . ;\r
+  PROVIDE (etext = .);\r
+\r
+  /* .data section which is used for initialized data */\r
+  .data :\r
+  {\r
+    _data = .;\r
+    *(.data)\r
+  } > RAM\r
+\r
+  . = ALIGN(4);\r
+  _edata = . ;\r
+  PROVIDE (edata = .);\r
+\r
+  /* .bss section which is used for uninitialized data */\r
+  .bss (NOLOAD) :\r
+  {\r
+    __bss_start = . ;\r
+    __bss_start__ = . ;\r
+    *(.bss)\r
+    *(COMMON)\r
+    . = ALIGN(4);\r
+  } > RAM\r
+\r
+  . = ALIGN(4);\r
+  __bss_end__ = . ;\r
+  PROVIDE (__bss_end = .);\r
+\r
+  .stack ALIGN(256) :\r
+  {\r
+    . += STACK_SIZE;\r
+    PROVIDE (_stack = .);\r
+  } > RAM\r
+\r
+  _end = . ;\r
+  PROVIDE (end = .);\r
+\r
+  /* Stabs debugging sections.  */\r
+  .stab          0 : { *(.stab) }\r
+  .stabstr       0 : { *(.stabstr) }\r
+  .stab.excl     0 : { *(.stab.excl) }\r
+  .stab.exclstr  0 : { *(.stab.exclstr) }\r
+  .stab.index    0 : { *(.stab.index) }\r
+  .stab.indexstr 0 : { *(.stab.indexstr) }\r
+  .comment       0 : { *(.comment) }\r
+  /* DWARF debug sections.\r
+     Symbols in the DWARF debugging sections are relative to the beginning\r
+     of the section so we begin them at 0.  */\r
+  /* DWARF 1 */\r
+  .debug          0 : { *(.debug) }\r
+  .line           0 : { *(.line) }\r
+  /* GNU DWARF 1 extensions */\r
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }\r
+  .debug_sfnames  0 : { *(.debug_sfnames) }\r
+  /* DWARF 1.1 and DWARF 2 */\r
+  .debug_aranges  0 : { *(.debug_aranges) }\r
+  .debug_pubnames 0 : { *(.debug_pubnames) }\r
+  /* DWARF 2 */\r
+  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }\r
+  .debug_abbrev   0 : { *(.debug_abbrev) }\r
+  .debug_line     0 : { *(.debug_line) }\r
+  .debug_frame    0 : { *(.debug_frame) }\r
+  .debug_str      0 : { *(.debug_str) }\r
+  .debug_loc      0 : { *(.debug_loc) }\r
+  .debug_macinfo  0 : { *(.debug_macinfo) }\r
+  /* SGI/MIPS DWARF 2 extensions */\r
+  .debug_weaknames 0 : { *(.debug_weaknames) }\r
+  .debug_funcnames 0 : { *(.debug_funcnames) }\r
+  .debug_typenames 0 : { *(.debug_typenames) }\r
+  .debug_varnames  0 : { *(.debug_varnames) }\r
+}\r
diff --git a/board/lpceurobot/libs/ldscripts/lpc21xx.ld-ramisp b/board/lpceurobot/libs/ldscripts/lpc21xx.ld-ramisp
new file mode 100644 (file)
index 0000000..5a3ea25
--- /dev/null
@@ -0,0 +1,111 @@
+/***********************************************************************/\r
+/*                                                                     */\r
+/* RAMISP.ld:  Linker Script File - for use with serial line boo loader*/\r
+/*                                                                     */\r
+/***********************************************************************/\r
+ENTRY(_start)\r
+STACK_SIZE = 0x400;\r
+\r
+/* Memory Definitions */\r
+MEMORY\r
+{\r
+  ROM (rx) : ORIGIN = 0x00000000, LENGTH = 0x00020000\r
+  RAMBEG (rw) : ORIGIN = 0x40000000, LENGTH = 0x00000120\r
+  RAMISP (r)  : ORIGIN = 0x40000120, LENGTH = 0x000000E0\r
+  RAMREST (rw) : ORIGIN = 0x40000200, LENGTH = 0x0000FE00\r
+}\r
+\r
+STARTUP(crt0.o)\r
+\r
+/* Section Definitions */\r
+SECTIONS\r
+{\r
+  /* first section is .text which is used for code */\r
+  .text :\r
+  {\r
+    . = ALIGN(4);\r
+/*    LONG( ((ABSOLUTE( _start ) - . - 8) >> 2) + 0xea000000 ) /* B _start */\r
+    *(.text)                   /* remaining code */\r
+    *(.rodata)                 /* read-only data (constants) */\r
+    *(.rodata*)\r
+    *(.glue_7)\r
+    *(.glue_7t)\r
+  } > RAMREST\r
+\r
+  . = ALIGN(4);\r
+  _etext = . ;\r
+  PROVIDE (etext = .);\r
+\r
+  .ivec :\r
+  {\r
+    *(.ivec)                   /* remaining code */\r
+  } > RAMBEG\r
+  \r
+  /* .data section which is used for initialized data */\r
+  .data :\r
+  {\r
+    _data = .;\r
+    *(.data)\r
+  } > RAMREST\r
+\r
+  . = ALIGN(4);\r
+  _edata = . ;\r
+  PROVIDE (edata = .);\r
+\r
+  /* .bss section which is used for uninitialized data */\r
+  .bss (NOLOAD) :\r
+  {\r
+    __bss_start = . ;\r
+    __bss_start__ = . ;\r
+    *(.bss)\r
+    *(COMMON)\r
+    . = ALIGN(4);\r
+  } > RAMREST\r
+\r
+  . = ALIGN(4);\r
+  __bss_end__ = . ;\r
+  PROVIDE (__bss_end = .);\r
+\r
+  .stack ALIGN(256) :\r
+  {\r
+    . += STACK_SIZE;\r
+    PROVIDE (_stack = .);\r
+  } > RAMREST\r
+\r
+  _end = . ;\r
+  PROVIDE (end = .);\r
+\r
+  /* Stabs debugging sections.  */\r
+  .stab          0 : { *(.stab) }\r
+  .stabstr       0 : { *(.stabstr) }\r
+  .stab.excl     0 : { *(.stab.excl) }\r
+  .stab.exclstr  0 : { *(.stab.exclstr) }\r
+  .stab.index    0 : { *(.stab.index) }\r
+  .stab.indexstr 0 : { *(.stab.indexstr) }\r
+  .comment       0 : { *(.comment) }\r
+  /* DWARF debug sections.\r
+     Symbols in the DWARF debugging sections are relative to the beginning\r
+     of the section so we begin them at 0.  */\r
+  /* DWARF 1 */\r
+  .debug          0 : { *(.debug) }\r
+  .line           0 : { *(.line) }\r
+  /* GNU DWARF 1 extensions */\r
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }\r
+  .debug_sfnames  0 : { *(.debug_sfnames) }\r
+  /* DWARF 1.1 and DWARF 2 */\r
+  .debug_aranges  0 : { *(.debug_aranges) }\r
+  .debug_pubnames 0 : { *(.debug_pubnames) }\r
+  /* DWARF 2 */\r
+  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }\r
+  .debug_abbrev   0 : { *(.debug_abbrev) }\r
+  .debug_line     0 : { *(.debug_line) }\r
+  .debug_frame    0 : { *(.debug_frame) }\r
+  .debug_str      0 : { *(.debug_str) }\r
+  .debug_loc      0 : { *(.debug_loc) }\r
+  .debug_macinfo  0 : { *(.debug_macinfo) }\r
+  /* SGI/MIPS DWARF 2 extensions */\r
+  .debug_weaknames 0 : { *(.debug_weaknames) }\r
+  .debug_funcnames 0 : { *(.debug_funcnames) }\r
+  .debug_typenames 0 : { *(.debug_typenames) }\r
+  .debug_varnames  0 : { *(.debug_varnames) }\r
+}\r