]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
It is possible to compile gdb-stub under omk now.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 15 Nov 2005 07:24:00 +0000 (07:24 +0000)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Tue, 16 Nov 2010 15:54:50 +0000 (16:54 +0100)
darcs-hash:20051115072451-f2ef6-0880eac843d2bd51a5a37b8b65e4cb2dbfd82822.gz

arch/h8300/generic/libs/gdbstub/Makefile
arch/h8300/generic/libs/gdbstub/Makefile.omk [new file with mode: 0644]
arch/h8300/generic/libs/gdbstub/Makefile.std [new file with mode: 0644]
arch/h8300/generic/libs/gdbstub/common_def.h [new file with mode: 0644]
arch/h8300/generic/libs/gdbstub/h8s-2633-defs.h
arch/h8300/generic/libs/gdbstub/h8s-2633-rmap.h
arch/h8300/generic/libs/gdbstub/h8s-2633.c

index 475699dd6813c67ab178da582adbe255e8b5f281..f595272447ee336c2773b8736d60ee6e88cf5189 100644 (file)
@@ -1,46 +1,14 @@
-##############################################################################
-#
-#  Makefile - ID_CPU1 makefile for drivers
-#
-##############################################################################
+# Generic directory or leaf node makefile for OCERA make framework
 
-ifndef TOP
-TOP = ..
-CONFIG = $(TOP)/config
+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
 
-include $(CONFIG)
-
-######################## Additional Flags section ############################
-
-# Directories list for header files
-INCLUDEDIRS +=
-# Defines for preprocessor
-DEFINES +=
-
-# Compilation flags for C files OTHER than include directories
-# Some drivers use outb macro, requires -O optimization
-CFLAGS += -O
-# Preprocessor flags OTHER than defines
-CPPFLAGS +=
-# Linking flags
-LDFLAGS +=
-
-############################# targets section ################################
-
-# If you want to create a library with the objects files, define the name here
-LIBNAME = libgdbstub.a
-LIBNAMESO = libgdbstub.so
-
-# List of objects to compile
-
-OBJS += gdb-stub.o h8s-2633.o h8s-2633-sci.o
-
-ASMOBJS += h8s-2633-asm.o
-
-######################### Makefile.rules section #############################
-
-include $(TOP)/Makefile.rules
-
-######################## Tools targets section ###############################
+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/arch/h8300/generic/libs/gdbstub/Makefile.omk b/arch/h8300/generic/libs/gdbstub/Makefile.omk
new file mode 100644 (file)
index 0000000..0b1a32b
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- makefile -*-
+
+lib_LIBRARIES = gdbstub
+
+gdbstub_SOURCES = gdb-stub.c h8s-2633.c h8s-2633-sci.c h8s-2633-asm.S
+
+include_HEADERS = gdb-stub.h
diff --git a/arch/h8300/generic/libs/gdbstub/Makefile.std b/arch/h8300/generic/libs/gdbstub/Makefile.std
new file mode 100644 (file)
index 0000000..475699d
--- /dev/null
@@ -0,0 +1,46 @@
+##############################################################################
+#
+#  Makefile - ID_CPU1 makefile for drivers
+#
+##############################################################################
+
+ifndef TOP
+TOP = ..
+CONFIG = $(TOP)/config
+endif
+
+include $(CONFIG)
+
+######################## Additional Flags section ############################
+
+# Directories list for header files
+INCLUDEDIRS +=
+# Defines for preprocessor
+DEFINES +=
+
+# Compilation flags for C files OTHER than include directories
+# Some drivers use outb macro, requires -O optimization
+CFLAGS += -O
+# Preprocessor flags OTHER than defines
+CPPFLAGS +=
+# Linking flags
+LDFLAGS +=
+
+############################# targets section ################################
+
+# If you want to create a library with the objects files, define the name here
+LIBNAME = libgdbstub.a
+LIBNAMESO = libgdbstub.so
+
+# List of objects to compile
+
+OBJS += gdb-stub.o h8s-2633.o h8s-2633-sci.o
+
+ASMOBJS += h8s-2633-asm.o
+
+######################### Makefile.rules section #############################
+
+include $(TOP)/Makefile.rules
+
+######################## Tools targets section ###############################
+
diff --git a/arch/h8300/generic/libs/gdbstub/common_def.h b/arch/h8300/generic/libs/gdbstub/common_def.h
new file mode 100644 (file)
index 0000000..5b44cfa
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef _COMMON_DEF_H
+#define _COMMON_DEF_H
+
+#define UNUSED __attribute ((unused))
+
+#ifndef BIT
+#define BIT(n)    (1 << n)
+#endif
+#endif /* _COMMON_DEF_H */
index 3019e70837343984fc5c94cfd3550bf75e946a8c..1a8274c17492dcecd5ffb6df95426a2ff6694833 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef H8S_2633_DEFS
 #define H8S_2633_DEFS
 
+#include <system_def.h>
+
 /* use expedited response insead of just signal */
 #define GDB_STATUS_EXPEDITED 1
 /* fetch MAC from register file */
 #define GDB_HOOK_SUPPORT 0
 /* serial port to talk to gdb */
 /*#define GDB_SCI_PORT 4 */    /* RS232/485 */
-#define GDB_SCI_PORT 0         /* IRDA */
+#define GDB_SCI_PORT 1         /* IRDA */
 /* serial speed */
 /*#define GDB_SCI_SPEED 115200U*/
 #define GDB_SCI_SPEED 38400U
 /* clock speed */
 /*#define TARGET_CLOCK_HZ 18432000.0*/
 //#define TARGET_CLOCK_HZ 12000000 /*CPU_SYS_HZ*/
-#define TARGET_CLOCK_HZ 11059200 /*CPU_SYS_HZ*/
-
+//#define TARGET_CLOCK_HZ 11059200 /*CPU_SYS_HZ*/
+#define TARGET_CLOCK_HZ CPU_SYS_HZ
 
 #endif
 
index 6b6c678fb783fbeacf0b2fddac7ba8b85f808a4e..882bac75f12c7174464e8d2c50099330862f8b05 100644 (file)
 #define RTCOR           R_UCHAR(0xfffffed9)   /* Refresh timer const     */
 #define PFCR            R_UCHAR(0xfffffdeb)   /* Pin Function control   */
 
+/* Exception vectors */
+#define EXCPTVEC_ERI0  80      /* SCI 0 */
+#define EXCPTVEC_ERI1  84      /* SCI 1 */
+#define EXCPTVEC_ERI2  88      /* SCI 2 */
+#define EXCPTVEC_NMI   7
+#define EXCPTVEC_TRAP2 10
+#define EXCPTVEC_TRAP3 11
+#define EXCPTVEC_PBC   27
+
 
 #endif
index 983866f725342fd545a5d63c0e8ef4e2a3ea1b80..04248a3237487b434fda6cbab37720b535c26d38 100644 (file)
@@ -584,7 +584,7 @@ void gdb_kill ( void )
 #if defined(HW_INDEPENDENT)&&HW_INDEPENDENT
 #include "cpu_def.h"
 #include "system_def.h"
-#include "h8s2633h.h"
+/* #include "h8s2638h.h" */
 
 /* extern void *excptvec_get(int vectnum); */
 /* extern void *excptvec_set(int vectnum,void *vect); */
@@ -595,7 +595,7 @@ void gdb_kill ( void )
 void gdb_platform_init() {
 #if defined(HW_INDEPENDENT)&&HW_INDEPENDENT
   static const int sci_vect_tab[]=
-    {EXCPTVEC_ERI0,EXCPTVEC_ERI1,EXCPTVEC_ERI2,EXCPTVEC_ERI3,EXCPTVEC_ERI4};
+    {EXCPTVEC_ERI0,EXCPTVEC_ERI1,EXCPTVEC_ERI2};
   int sci_vect=sci_vect_tab[GDB_SCI_PORT];
   
   excptvec_initfill(gdb_unhandled_isr,0);