[rtems commit] libcpu/sh: Build cache stubs so apps usign cache API link

Joel Sherrill joel at rtems.org
Tue Apr 22 20:04:23 UTC 2014


Module:    rtems
Branch:    master
Commit:    90bc4d03f08d30220bb40860ba3a2dd971d8fb3a
Changeset: http://git.rtems.org/rtems/commit/?id=90bc4d03f08d30220bb40860ba3a2dd971d8fb3a

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Mon Apr 21 09:07:51 2014 -0500

libcpu/sh: Build cache stubs so apps usign cache API link

---

 c/src/lib/libbsp/sh/gensh1/Makefile.am |    3 +-
 c/src/lib/libbsp/sh/gensh2/Makefile.am |    3 +-
 c/src/lib/libbsp/sh/gensh4/Makefile.am |    3 +-
 c/src/lib/libcpu/sh/Makefile.am        |   34 ++++++++++++++++++++++++-------
 c/src/lib/libcpu/sh/cache/cache_.h     |    5 ++++
 c/src/lib/libcpu/sh/preinstall.am      |    9 ++++++++
 6 files changed, 46 insertions(+), 11 deletions(-)

diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.am b/c/src/lib/libbsp/sh/gensh1/Makefile.am
index 200cfa0..626c783 100644
--- a/c/src/lib/libbsp/sh/gensh1/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh1/Makefile.am
@@ -50,7 +50,8 @@ libbsp_a_LIBADD = \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/sci.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/delay.rel \
-    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/score.rel
+    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/score.rel \
+    ../../../libcpu/@RTEMS_CPU@/cache.rel
 
 EXTRA_DIST = times
 
diff --git a/c/src/lib/libbsp/sh/gensh2/Makefile.am b/c/src/lib/libbsp/sh/gensh2/Makefile.am
index 0b3aa01..33fe223 100644
--- a/c/src/lib/libbsp/sh/gensh2/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh2/Makefile.am
@@ -51,7 +51,8 @@ libbsp_a_LIBADD = \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/sci.rel \
-    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/score.rel
+    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/score.rel \
+    ../../../libcpu/@RTEMS_CPU@/cache.rel
 
 include $(srcdir)/preinstall.am
 include $(top_srcdir)/../../../../automake/local.am
diff --git a/c/src/lib/libbsp/sh/gensh4/Makefile.am b/c/src/lib/libbsp/sh/gensh4/Makefile.am
index cf34c08..e8bb49d 100644
--- a/c/src/lib/libbsp/sh/gensh4/Makefile.am
+++ b/c/src/lib/libbsp/sh/gensh4/Makefile.am
@@ -41,7 +41,8 @@ libbsp_a_LIBADD = \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/sci.rel \
-    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/score.rel
+    ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/score.rel \
+    ../../../libcpu/@RTEMS_CPU@/cache.rel
 
 EXTRA_DIST = times
 
diff --git a/c/src/lib/libcpu/sh/Makefile.am b/c/src/lib/libcpu/sh/Makefile.am
index 3d2b305..532597f 100644
--- a/c/src/lib/libcpu/sh/Makefile.am
+++ b/c/src/lib/libcpu/sh/Makefile.am
@@ -4,14 +4,26 @@ include $(top_srcdir)/../../../automake/compile.am
 
 noinst_PROGRAMS =
 
+include_libcpudir = $(includedir)/libcpu
+include_libcpu_HEADERS = ../shared/include/cache.h
+
+noinst_PROGRAMS += cache.rel
+cache_rel_SOURCES = ../shared/src/cache_aligned_malloc.c
+cache_rel_SOURCES += ../shared/src/cache_manager.c
+cache_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/cache
+cache_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+
 if sh7032
 # NOTE: Unlike other CPUS, we install into a subdirectory to avoid
 #       file name conflicts
 include_shdir = $(includedir)/sh
 include_rtems_scoredir = $(includedir)/rtems/score
 
-include_sh_HEADERS = sh7032/include/sci.h sh7032/include/sh7_pfc.h sh7032/include/sh7_sci.h
-include_rtems_score_HEADERS = sh7032/include/ispsh7032.h sh7032/include/iosh7032.h
+include_sh_HEADERS = sh7032/include/sci.h
+include_sh_HEADERS += sh7032/include/sh7_pfc.h
+include_sh_HEADERS += sh7032/include/sh7_sci.h
+include_rtems_score_HEADERS = sh7032/include/ispsh7032.h
+include_rtems_score_HEADERS += sh7032/include/iosh7032.h
 
 ## sh7032/clock
 noinst_PROGRAMS += sh7032/clock.rel
@@ -50,9 +62,13 @@ if sh7045
 include_shdir = $(includedir)/sh
 include_rtems_scoredir = $(includedir)/rtems/score
 
-include_sh_HEADERS = sh7045/include/io_types.h sh7045/include/sci.h sh7045/include/sh7_pfc.h \
-    sh7045/include/sh7_sci.h sh7045/include/sci_termios.h
-include_rtems_score_HEADERS = sh7045/include/ispsh7045.h sh7045/include/iosh7045.h
+include_sh_HEADERS = sh7045/include/io_types.h
+include_sh_HEADERS += sh7045/include/sci.h
+include_sh_HEADERS += sh7045/include/sh7_pfc.h
+include_sh_HEADERS += sh7045/include/sh7_sci.h
+include_sh_HEADERS += sh7045/include/sci_termios.h
+include_rtems_score_HEADERS = sh7045/include/ispsh7045.h
+include_rtems_score_HEADERS += sh7045/include/iosh7045.h
 
 ## sh7045/clock
 noinst_PROGRAMS += sh7045/clock.rel
@@ -86,9 +102,11 @@ include_shdir = $(includedir)/sh
 include_rtems_scoredir = $(includedir)/rtems/score
 
 include_sh_HEADERS = sh7750/include/sh/sh4uart.h
-include_rtems_score_HEADERS = sh7750/include/rtems/score/sh7750_regs.h \
-    sh7750/include/rtems/score/ipl.h sh7750/include/rtems/score/iosh7750.h \
-    sh7750/include/rtems/score/ispsh7750.h sh7750/include/rtems/score/sh4_regs.h
+include_rtems_score_HEADERS = sh7750/include/rtems/score/sh7750_regs.h
+include_rtems_score_HEADERS += sh7750/include/rtems/score/ipl.h
+include_rtems_score_HEADERS += sh7750/include/rtems/score/iosh7750.h
+include_rtems_score_HEADERS += sh7750/include/rtems/score/ispsh7750.h
+include_rtems_score_HEADERS += sh7750/include/rtems/score/sh4_regs.h
 
 ## sh7750/clock
 noinst_PROGRAMS += sh7750/clock.rel
diff --git a/c/src/lib/libcpu/sh/cache/cache_.h b/c/src/lib/libcpu/sh/cache/cache_.h
new file mode 100644
index 0000000..12ff05e
--- /dev/null
+++ b/c/src/lib/libcpu/sh/cache/cache_.h
@@ -0,0 +1,5 @@
+/**
+ *  @file
+ *
+ *  Empty cache support file for SuperH.
+ */
diff --git a/c/src/lib/libcpu/sh/preinstall.am b/c/src/lib/libcpu/sh/preinstall.am
index 9b12347..d6d7b83 100644
--- a/c/src/lib/libcpu/sh/preinstall.am
+++ b/c/src/lib/libcpu/sh/preinstall.am
@@ -13,6 +13,15 @@ all-am: $(PREINSTALL_FILES)
 PREINSTALL_FILES =
 CLEANFILES = $(PREINSTALL_FILES)
 
+$(PROJECT_INCLUDE)/libcpu/$(dirstamp):
+	@$(MKDIR_P) $(PROJECT_INCLUDE)/libcpu
+	@: > $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
+
+$(PROJECT_INCLUDE)/libcpu/cache.h: ../shared/include/cache.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/cache.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/cache.h
+
 if sh7032
 $(PROJECT_INCLUDE)/sh/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_INCLUDE)/sh




More information about the vc mailing list