[rtems commit] bsp/leon2: Add at697f variant
Sebastian Huber
sebh at rtems.org
Tue Jul 25 09:44:12 UTC 2017
Module: rtems
Branch: master
Commit: 671efc50a3aa1c14b501390168d89f0c2a3c09fa
Changeset: http://git.rtems.org/rtems/commit/?id=671efc50a3aa1c14b501390168d89f0c2a3c09fa
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jul 19 14:06:06 2017 +0200
bsp/leon2: Add at697f variant
---
c/src/lib/libbsp/sparc/leon2/Makefile.am | 5 +++-
c/src/lib/libbsp/sparc/leon2/configure.ac | 1 +
.../lib/libbsp/sparc/leon2/make/custom/at697f.cfg | 18 +++++++++++++++
c/src/lib/libbsp/sparc/leon2/preinstall.am | 14 ++++++++---
.../lib/libbsp/sparc/leon2/startup/linkcmds.at697f | 1 +
.../lib/libbsp/sparc/leon2/startup/linkcmds.leon2 | 27 ++++++++++++++++++++++
6 files changed, 62 insertions(+), 4 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/leon2/Makefile.am b/c/src/lib/libbsp/sparc/leon2/Makefile.am
index 349b44d..969a278 100644
--- a/c/src/lib/libbsp/sparc/leon2/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon2/Makefile.am
@@ -23,7 +23,10 @@ noinst_LIBRARIES = libbspstart.a
libbspstart_a_SOURCES = ../../sparc/shared/start/start.S
project_lib_DATA = start.$(OBJEXT)
-dist_project_lib_DATA += startup/linkcmds ../shared/startup/linkcmds.base
+dist_project_lib_DATA += ../shared/startup/linkcmds.base
+dist_project_lib_DATA += startup/linkcmds
+dist_project_lib_DATA += startup/linkcmds.leon2
+dist_project_lib_DATA += startup/linkcmds.at697f
noinst_LIBRARIES += libbsp.a
libbsp_a_SOURCES =
diff --git a/c/src/lib/libbsp/sparc/leon2/configure.ac b/c/src/lib/libbsp/sparc/leon2/configure.ac
index cb92d69..9376cca 100644
--- a/c/src/lib/libbsp/sparc/leon2/configure.ac
+++ b/c/src/lib/libbsp/sparc/leon2/configure.ac
@@ -36,6 +36,7 @@ RTEMS_BSPOPTS_HELP([BSP_POWER_DOWN_AT_FATAL_HALT],
error which will hand over to debugger, simulator, etc.])
RTEMS_BSP_CLEANUP_OPTIONS(0, 0, 1)
+RTEMS_BSP_LINKCMDS
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
diff --git a/c/src/lib/libbsp/sparc/leon2/make/custom/at697f.cfg b/c/src/lib/libbsp/sparc/leon2/make/custom/at697f.cfg
new file mode 100644
index 0000000..3facbbe
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/leon2/make/custom/at697f.cfg
@@ -0,0 +1,18 @@
+#
+# Config file for the AT697F LEON2 SPARC processor.
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=sparc
+RTEMS_CPU_MODEL=leon2
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+CPU_CFLAGS = -mcpu=leon -mfix-at697f
+
+# optimize flag: typically -O2
+CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
diff --git a/c/src/lib/libbsp/sparc/leon2/preinstall.am b/c/src/lib/libbsp/sparc/leon2/preinstall.am
index 19152fe..0f1af00 100644
--- a/c/src/lib/libbsp/sparc/leon2/preinstall.am
+++ b/c/src/lib/libbsp/sparc/leon2/preinstall.am
@@ -69,13 +69,21 @@ $(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
+$(PROJECT_LIB)/linkcmds.base: ../shared/startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
+PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
+
$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-$(PROJECT_LIB)/linkcmds.base: ../shared/startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
-PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
+$(PROJECT_LIB)/linkcmds.leon2: startup/linkcmds.leon2 $(PROJECT_LIB)/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.leon2
+PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.leon2
+
+$(PROJECT_LIB)/linkcmds.at697f: startup/linkcmds.at697f $(PROJECT_LIB)/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.at697f
+PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.at697f
$(PROJECT_INCLUDE)/bsp/gnatcommon.h: ../shared/include/gnatcommon.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/gnatcommon.h
diff --git a/c/src/lib/libbsp/sparc/leon2/startup/linkcmds.at697f b/c/src/lib/libbsp/sparc/leon2/startup/linkcmds.at697f
new file mode 100644
index 0000000..36e6ec4
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/leon2/startup/linkcmds.at697f
@@ -0,0 +1 @@
+INCLUDE linkcmds.leon2
diff --git a/c/src/lib/libbsp/sparc/leon2/startup/linkcmds.leon2 b/c/src/lib/libbsp/sparc/leon2/startup/linkcmds.leon2
new file mode 100644
index 0000000..bee29a2
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/leon2/startup/linkcmds.leon2
@@ -0,0 +1,27 @@
+/* linkcmds
+ */
+
+/* Default values, can be overridden */
+
+_PROM_SIZE = DEFINED (_PROM_SIZE) ? _PROM_SIZE : 2M;
+_PROM_START = DEFINED (_PROM_START) ? _PROM_START : 0x00000000;
+
+_RAM_SIZE = DEFINED (_RAM_SIZE) ? _RAM_SIZE : 4M;
+_RAM_START = DEFINED (_RAM_START) ? _RAM_START : 0x40000000;
+
+/*
+ * Base address of the on-CPU peripherals
+ */
+
+_LEON_REG = 0x80000000;
+LEON_REG = _LEON_REG;
+
+/* these are the maximum values */
+
+MEMORY
+{
+ rom : ORIGIN = 0x00000000, LENGTH = 256M
+ ram : ORIGIN = 0x40000000, LENGTH = 1024M
+}
+
+INCLUDE linkcmds.base
More information about the vc
mailing list