Index: /atk1_sh2/trunk/config/sh2-gnu/Makefile.config
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/Makefile.config	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/Makefile.config	(revision 4)
@@ -0,0 +1,77 @@
+#
+#  TOPPERS/OSEK Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      OSEK Kernel
+# 
+#  Copyright (C) 2006 by Witz Corporation, JAPAN
+# 
+#  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+#  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+#  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+#  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+#  pÆÄÔj·é±Æð³Åø·éD
+#  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+#       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+#      XR[hÉÜÜêÄ¢é±ÆD
+#  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+#      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+#      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+#      Ì³ÛØKèðfÚ·é±ÆD
+#  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+#      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+#      ÆD
+#    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+#        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+#    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+#        ñ·é±ÆD
+#  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+#      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+# 
+#  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+#  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+#  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+#  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+# 
+#
+
+#
+# CPUË¶p Makefile
+#
+
+#
+# ^[Qbg¼Ì
+#
+TARGET = sh-hitachi-elf
+
+
+#
+# CPUË¶fBNgðJ[lfBNgè`ÉÇÁ
+#
+KERNEL_DIR := $(KERNEL_DIR):$(TOPDIR)/config/$(CPU)
+
+
+#
+# CPUË¶t@CðJ[lIuWFNgt@CÉÇÁ
+#
+
+KERNEL_COBJS := $(KERNEL_COBJS) cpu_config.o
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) start.o cpu_support.o
+
+#
+# includefBNgÌÇÁ
+#
+INCLUDES := $(INCLUDES) -I $(TOPDIR)/config/sh2-gnu/
+
+#
+# JXNvgÌwè
+#
+LDFLAGS := $(LDFLAGS) -T $(TOPDIR)/config/$(CPU)/shelf.ld
+
+#
+# ^[QbgË¶ÌRpCtO
+#
+CFLAGS := $(CFLAGS) -m2
Index: /atk1_sh2/trunk/config/sh2-gnu/cpu_config.c
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cpu_config.c	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cpu_config.c	(revision 4)
@@ -0,0 +1,78 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *  vZbTË¶W
+[iSH2pj
+ */
+
+
+/*wb_t@C*/
+#include	"osek_kernel.h"
+
+UINT32 lock_flag;
+UINT32 intmask;
+
+/*
+ *  vZbTË¶Ìú»
+ */
+void
+cpu_initialize(void)
+{
+	/* J[lÅgp·éÏÌú» */
+	lock_flag = 0;
+	intmask = 0;
+}
+
+/*
+ *  vZbTË¶ÌI¹
+ */
+void
+cpu_terminate(void)
+{
+	/* ÁÉKvÈ¢ */
+}
+
+
+
Index: /atk1_sh2/trunk/config/sh2-gnu/cpu_config.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cpu_config.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cpu_config.h	(revision 4)
@@ -0,0 +1,293 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *  vZbTË¶W
+[iSH2pj
+ */
+
+
+#ifndef	_CPU_CONFIG_H_
+#define	_CPU_CONFIG_H_
+
+#define MAX_IPM  0xf	/* X^uÈµÌêÍÅDæxÅCPUbN */
+
+
+#ifndef _MACRO_ONLY
+#include "cpu_insn.h"
+#endif /* _MACRO_ONLY */
+
+
+#ifndef _MACRO_ONLY
+/* CCÖvg^Cvé¾	*/
+Inline void set_ipl(UINT8 ipl);
+Inline UINT8 current_ipl(void);
+
+extern UINT32 lock_flag;
+extern UINT32 intmask;
+
+/*
+ *  {OSJ[lÅÍÝ§äðItOyÑIPLÌoûðp¢Äs¤
+ *  ±ÆðOñÆ·éD{CPUÍIPLÌÝµ©½È¢½ßA
+ *  ItOð\tgEFAÅâ¤dlÆ·é
+ */
+
+/*
+ *  ÝDæxxÝè
+ */
+Inline void set_ipl(UINT8 ipl)
+{
+	/*
+	 *  CPUbN©Ç¤©»èµAbNÅÈ¯êÎ
+	 *  SRWX^É¼ÚÝè·éDbNÅ êÎ
+	 *  intmaskÉIPLðÛ¶·éD
+	 */
+	if(lock_flag == 0){
+		set_sr(ipl << 4);
+	}
+	else{
+		intmask = ipl << 4;
+	}
+}
+
+
+/*
+ *  ÝDæxxæ¾
+ */
+Inline UINT8 current_ipl(void)
+{
+	/*
+	 *  CPUbN©Ç¤©»èµAbNÅÈ¯êÎ
+	 *  SRWX^©ç¼ÚÇÝo·DbNÅ êÎ
+	 *  intmask©çIPLðÇÝo·D
+	 */
+	if(lock_flag == 0)
+	{
+		return (UINT8)((current_sr() & 0x000000f0u ) >> 4);
+	}
+	else
+	{
+		return intmask >> 4;
+	}
+}
+
+
+/*
+ *  vZbTË¶Ìú»(cpu_config.c)
+ */
+extern void	cpu_initialize(void);
+
+/*
+ *  vZbTË¶ÌI¹(cpu_config.c)
+ */
+extern void	cpu_terminate(void);
+
+#define DEFINE_CTXB(tnum) \
+FP tcxb_pc[tnum]; \
+VP tcxb_sp[tnum];
+
+extern FP tcxb_pc[];
+extern VP tcxb_sp[];
+
+/* fBXpb`üèÌAZuÖvg^Cvé¾	*/
+extern void  dispatch(void);
+extern void  exit_and_dispatch(void);
+extern void  start_dispatch(void);
+
+
+/*
+ *  ISR1¶¬}N
+ *
+ *  ISR1ÌSÄÌð[UªLq·éêÍCcpu_defs.h É é³ø»}N
+ *  uOMIT_ISR1_ENTRYvÌè`ðLøÉ·é±ÆD
+ */
+
+/*
+ *  OQÆé¾¶¬}N
+ */
+#if defined(OMIT_ISR1_ENTRY)
+#define ISR1_EXTERNAL(isr)	\
+	extern void isr(void);
+#else	/* OMIT_ISR1_ENTRY	*/
+#define ISR1_EXTERNAL(isr)	\
+	extern void isr##_entry(void);
+#endif	/* OMIT_ISR1_ENTRY	*/
+
+/* xN^e[uo^V{¶¬}N	*/
+#if defined(OMIT_ISR1_ENTRY)
+#define	ISR1_SYMBOL(isr)		#isr
+#else	/* OMIT_ISR1_ENTRY	*/
+#define	ISR1_SYMBOL(isr)		isr##_entry
+#endif	/* OMIT_ISR1_ENTRY	*/
+
+/* üûÌ¶¬}N	*/
+#if defined(OMIT_ISR1_ENTRY)
+#define ISR1_ENTRY(isr)
+#else	/* OMIT_ISR1_ENTRY	*/
+#define ISR1_ENTRY(isr)\
+asm("	.globl _" #isr);\
+asm("	.section \".text\", \"ax\"	");\
+asm("	.align	2");	\
+asm("_" #isr "_entry:");\
+asm("	mov.l	r0 , @-r15");	\
+asm("	mov.l	r1 , @-r15");	\
+asm("	mov.l	r2 , @-r15");	\
+asm("	mov.l	r3 , @-r15");	\
+asm("	mov.l	r4 , @-r15");	\
+asm("	mov.l	r5 , @-r15");	\
+asm("	mov.l	r6 , @-r15");	\
+asm("	mov.l	r7 , @-r15");	\
+asm("	sts.l	pr , @-r15");	\
+asm("	sts.l	macl , @-r15");	\
+asm("	sts.l	mach , @-r15");	\
+asm("	stc.l	gbr , @-r15");	\
+asm("	mov.l	_" #isr "_adr , r0");	\
+asm("	jsr @r0");	\
+asm("	nop");	\
+asm("	ldc.l	@r15+ , gbr");	\
+asm("	lds.l	@r15+ , mach");	\
+asm("	lds.l	@r15+ , macl");	\
+asm("	lds.l	@r15+ , pr");	\
+asm("	mov.l	@r15+ , r7");	\
+asm("	mov.l	@r15+ , r6");	\
+asm("	mov.l	@r15+ , r5");	\
+asm("	mov.l	@r15+ , r4");	\
+asm("	mov.l	@r15+ , r3");	\
+asm("	mov.l	@r15+ , r2");	\
+asm("	mov.l	@r15+ , r1");	\
+asm("	mov.l	@r15+ , r0");	\
+asm("	rte	");	\
+asm("	nop");	\
+asm(".align	4");	\
+asm("_" #isr "_adr:");	\
+asm("	.long	_" #isr);
+#endif	/* OMIT_ISR1_ENTRY	*/
+
+/*
+ *  ISR2¶¬}N
+ */
+
+/*
+ *	OQÆé¾¶¬}N
+ */
+#define ISR2_EXTERNAL(isr)	\
+	extern void isr##_entry(void);
+
+/* xN^e[uo^V{¶¬}N	*/
+#define	ISR2_SYMBOL(isr)		isr##_entry
+
+/* üûÌ¶¬}N	*/
+#define ISR2_ENTRY(isr, isrid)	\
+asm("	.globl _runisr	");													\
+asm("	.globl _ISRMain" #isr);												\
+asm("	.globl _interrupt	");												\
+asm("	.section \".text\" , \"ax\"	");										\
+asm("	.align	2");														\
+asm("_" #isr "_entry:					");									\
+asm("	mov.l	r0 , @-r15	/* ÅáÀÌWX^ðÞð */");					\
+asm("	mov.l	r1 , @-r15");												\
+asm("	mov.l	r2 , @-r15");												\
+asm("	stc		sr , r2		/* SRWX^ðÞð */");						\
+asm("	mov.l	_maxipm_"	#isr	" , r1	/* èÝÖ~ */");			\
+asm("	ldc 	r1 , sr");													\
+asm("	mov.l	r3 , @-r15");												\
+asm("	mov.l	_runisr_"	#isr	"_adr, r3		");						\
+asm("	mov.b	@r3 , r1	/* runisrðXV */");							\
+asm("	mov		#" #isrid " , r0");											\
+asm("	mov.b	r0 , @r3			");										\
+asm("	mov.l	_ISRMain" #isr "_adr , r0	/* ISRÌAhXðÛ¶ */");	\
+asm("	mov.l	_interrupt_"	#isr	"_adr , r3");						\
+asm("	jmp	@r3		/* èÝ¤ÊÖ */");								\
+asm("	nop");																\
+asm(".align	4	");															\
+asm("_interrupt_"	#isr	"_adr:	");										\
+asm("	.long	_interrupt	");												\
+asm("_runisr_"	#isr	"_adr:	");											\
+asm("	.long	_runisr	");													\
+asm("_ISRMain" #isr "_adr:	");												\
+asm("	.long	_ISRMain" #isr);											\
+asm("_maxipm_"	#isr ":");													\
+asm("	.long	0x000000f0");
+
+
+
+/*
+ *  ¢gpÝ¶¬}N
+ */
+
+/* xN^e[u©çÌOQÆé¾¶¬}N	*/
+#define	UNUSED_INT_EXTERNAL()	extern void unused_interrupt(void);
+
+/* xN^e[uo^V{¶¬}N	*/
+#define	UNUSED_INT_SYMBOL()		unused_interrupt
+
+
+/*
+ *  tbN[`NULLV{¶¬}N
+ */
+#define	NULL_ERRORHOOK \
+asm(".globl	_ErrorHook");\
+asm("	.equ _ErrorHook , 0");
+
+#define	NULL_STARTUPHOOK \
+asm(".globl	_StartupHook");\
+asm("	.equ _StartupHook , 0");
+
+#define	NULL_SHUTDOWNHOOK \
+asm(".globl	_ShutdownHook"); \
+asm("	.equ _ShutdownHook , 0");
+
+#define	NULL_PRETASKHOOK \
+asm(".globl	_PreTaskHook"); \
+asm("	.equ	_PreTaskHook ,0");
+
+#define	NULL_POSTTASKHOOK \
+asm(".globl	_PostTaskHook"); \
+asm("	.equ	_PostTaskHook , 0");
+
+
+
+#endif /* _MACRO_ONLY */
+#endif	/* _CPU_CONFIG_H_	*/
+
Index: /atk1_sh2/trunk/config/sh2-gnu/cpu_context.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cpu_context.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cpu_context.h	(revision 4)
@@ -0,0 +1,82 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	^XNReLXgì[`iSH2pj
+ *
+ *  ±Ìt@Cð cpu_config.h Æª£µÄ¢éÌÍC±Ìt@CÍ TCB
+ *  ªè`³ê½ãÉÇÞKvª éÌÉÎµÄCcpu_config.h ÉÍ TCB ð
+ *  è`·éOÉÇÞKvª éè`ðÜñÅ¢é½ßÅ éD
+ */
+
+
+#ifndef _CPU_CONTEXT_H_
+#define _CPU_CONTEXT_H_
+
+/*
+ *  ^XNðN®Å«éóÔÉÝè·éÖÌ(cpu_support.S)vg^Cvé¾
+ */
+Inline void activate_context(TaskType TaskID);
+/*
+ *  ^XNÌN®Ö(cpu_support.S)vg^Cvé¾
+ */
+extern void activate_r(void);
+
+/*
+ *  ^XNÌN®õ(TCBÌú»)
+ *
+ *  ^XNªx~óÔ©çÀsÅ«éóÔÉÚs·éÉÄÎêéD
+ */
+Inline void
+activate_context(TaskType TaskID)
+{
+	/* fBXpb`ãÀsJnÊuÝè	*/
+	tcxb_pc[TaskID] = (FP)activate_r;	/*  cpu_support.S  */
+
+	/* X^bN|C^úlÝè	*/
+	tcxb_sp[TaskID] = (VP)( (UINT32)tinib_stk[TaskID] + (UINT32)tinib_stksz[TaskID]);
+}
+
+
+#endif /* _CPU_CONTEXT_H_ */
Index: /atk1_sh2/trunk/config/sh2-gnu/cpu_defs.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cpu_defs.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cpu_defs.h	(revision 4)
@@ -0,0 +1,67 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	^[QbgCPUÉË¶·éè`iSH2pj
+ */
+
+
+#ifndef _CPU_DEFS_H_
+#define _CPU_DEFS_H_
+
+/* 
+ *  ^[Qbg¯Ê}N(vZbT¼Ìè`)
+ */
+#define	SH2
+
+/*
+ *  ISR1üèû¶¬³ø»}N
+ *
+ *  ISR1ÌSÄÌð[UªLq·éêÍCÈºÉ é³ø»}N
+ *  uOMIT_ISR1_ENTRYvÌè`ðLøÉ·é±ÆD
+ */
+/*#define	OMIT_ISR1_ENTRY	*/
+
+
+#endif /* _CPU_DEFS_H_ */
Index: /atk1_sh2/trunk/config/sh2-gnu/cpu_insn.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cpu_insn.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cpu_insn.h	(revision 4)
@@ -0,0 +1,129 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2001-2003 by Industrial Technology Institute,
+ *                              Miyagi Prefectural Government, JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *  áxvZbTì[`(SH2p)
+ */
+
+
+#ifndef	_CPU_INSN_H_
+#define	_CPU_INSN_H_
+
+/*
+ *  InlineÖvg^Cvé¾
+ */
+Inline void disable_int(void);
+Inline void enable_int(void);
+Inline void nop(void);
+Inline void set_sr(UINT32 sr);
+Inline UINT32 current_sr(void);
+
+
+extern UINT32 lock_flag;
+extern UINT32 intmask;
+
+/*
+ *  Xe[^XWX^iSRjÌ»ÝlÌÏX
+ */
+Inline void
+set_sr(UINT32 sr)
+{
+	Asm("ldc %0, sr" : : "r"(sr) );
+}
+
+/*
+ *  Xe[^XWX^iSRjÌ»ÝlÌÇoµ
+ */
+Inline UINT32
+current_sr(void)
+{
+	UINT32 sr;
+	Asm("stc  sr,%0" : "=r"(sr));
+	return(sr);
+}
+
+
+/*
+ *  OÝSÖ~
+ */
+Inline void
+disable_int(void)
+{
+	volatile UINT32 intmask_temp;
+	
+	/*
+	 * ±±Å[JÏÉSRWX^ÌlðÛ¶µÄ¢éÌÍA
+	 * SRWX^ÌÇÝoµÆÀÛÉÝÖ~ÌÔÉèÝªüÁ½êÉA
+	 * èÝnhàÅèÝÖ~ðÀs·éÆintmasklª
+	 * «·íÁÄµÜ¤½ßÅ é
+	 */
+	
+	intmask_temp = current_sr() & 0x000000f0u;
+	set_sr((current_sr() & ~0x000000f0u) |  (MAX_IPM << 4) );
+	intmask = intmask_temp;
+	lock_flag = 1;
+}
+
+
+/*
+ *  OÝSÖ~ð
+ */
+Inline void
+enable_int(void)
+{
+	lock_flag = 0;
+	set_sr((current_sr() & ~0x000000f0u) | intmask);
+}
+
+
+/*
+ *  nop ½ßÌÀs
+ */
+Inline void
+nop(void)
+{
+	asm("	nop");
+}
+
+#endif /* _CPU_INSN_H_ */
Index: /atk1_sh2/trunk/config/sh2-gnu/cpu_support.S
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cpu_support.S	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cpu_support.S	(revision 4)
@@ -0,0 +1,573 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ *  Copyright (C) 2010 by Meika Sugimoto
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*	vZbTË¶W
+[ AZu¾êiSH2pj*/
+ 
+#define _MACRO_ONLY
+#include "sys_defs.h"
+
+/*	OQÆé¾ */
+	.globl	_runtsk
+	.globl	_schedtsk
+	.globl	_tcxb_pc
+	.globl	_tcxb_sp
+	.globl	_tinib_task
+	.globl	_callevel
+	.globl	_runisr
+	.globl	_tinib_exepri
+	.globl	_tcb_curpri
+	.globl	_call_pretaskhook
+	.globl	_call_posttaskhook
+	.globl	_PreTaskHook
+	.globl	_PostTaskHook
+	.globl	_lock_flag
+	.globl	_intmask
+
+/*	OöJé¾ */
+	.globl	_dispatch
+	.globl	_start_dispatch
+	.globl	_exit_and_dispatch
+	.globl	_activate_r
+	.globl	_interrupt
+	.globl	dispatch_r
+
+.section	".text" , "ax"
+.align	2
+
+/*
+ *	^XNfBXpb`
+ *
+ *	ÄÑoµð:
+ *		ÝFIPL=0, FLGWX^Irbg=0 (CPUbNóÔ)
+ *		ReLXgFcallevel=1(^XNReLXg)
+ *		X^bNF ^XNX^bN
+*/
+
+_dispatch:
+	/* X^bNÖWX^Û¶ */
+	mov.l	 r8 , @-r15
+	mov.l	 r9 , @-r15
+	mov.l	r10 , @-r15
+	mov.l	r11 , @-r15
+	mov.l	r12 , @-r15
+	mov.l	r13 , @-r15
+	mov.l	r14 , @-r15
+	sts.l	pr , @-r15
+	mov.l	runtsk_adr , r1
+	mov.b	@r1 , r0
+	extu.b	r0 , r0
+	shll2	r0
+	mov.l	tcxb_sp_adr , r2
+	mov.l	r15 , @(r0 , r2)	/* X^bN|C^ðTCBÉÛ¶ */
+	mov.l	dispatch_r_adr , r3
+	mov.l	tcxb_pc_adr , r2	/* ÀsÄJÔnðTCBÉÛ¶ */
+	mov.l	r3 , @(r0 , r2)
+	bra		dispatcher			/* dispatcherÖ */
+	nop
+	
+.align	4
+dispatch_r_adr:
+	.long	dispatch_r
+
+/*
+ *	ÄÑoµð:
+ *		ÝFIPL=0xf, (CPUbNóÔ)
+ *		ReLXgFcallevel=1(^XNReLXg)
+ *		X^bNF ^XNX^bN
+ */
+
+.align	2
+dispatch_r:
+	/* ^XNX^bN©çWX^A */
+	lds.l	@r15+ ,  pr
+	mov.l	@r15+ , r14
+	mov.l	@r15+ , r13
+	mov.l	@r15+ , r12
+	mov.l	@r15+ , r11
+	mov.l	@r15+ , r10
+	mov.l	@r15+ ,  r9
+	mov.l	@r15+ ,  r8
+	rts						/* dispatch ÄÑoµ³Ößé. */
+	nop
+
+/*
+ *	^XNN®
+ *	±±ÅÍ, CPUbNðóÔÉµ, ^XNðN®·é.
+ *
+ *	Äoð: FLGWX^Irbg=0xf (CPUbNóÔ), ^XNX^bN
+ *			callevel = 1(^XNReLXg), ^XNX^bN
+ */
+
+.align	2
+_activate_r:
+	mov.l	runtsk_adr	,r2			/* ÀsJn^XNID */
+	mov.b	@r2 , r0
+	extu.b	r0 , r0
+	mov.l	tinib_exepri_adr , r2		/* úDæxÌÇÝÝ */
+	mov.b	@(r0 , r2) , r1
+	extu.b	r1 , r1
+	mov.l	tcb_curpri_adr , r3		/* »ÝDæxÉÝè */
+	mov.b	r1 , @(r0 , r3)
+	
+	mov		#0 , r3
+	shll2	r0
+	mov.l	tinib_task_adr , r1
+	mov.l	@(r0 , r1) , r2
+	jmp		@r2
+	ldc		r3 , sr				/* xXbgAèÝÂ */
+
+.align	4
+tinib_exepri_adr:
+	.long	_tinib_exepri
+tcb_curpri_adr:
+	.long	_tcb_curpri
+tinib_task_adr:
+	.long	_tinib_task
+
+/*
+ *	dispatcherÄÑoµð:
+ *		E·×ÄÌ^XNÌReLXgÍÛ¶³êÄ¢é.
+ *		ESRWX^IPLrbg=0xf (CPUbNóÔ),
+ *		EReLXgÍJ[lN®ð«^XNReLXg(callevel=1)
+ *				callevelÌúlÍ1H
+ *		N®Íñ^XNReLXg(callevel=1)Å, »ÌêÉàÎ.
+ *	dispatcher ÄoÌX^bN:
+ *		__kernel_dispatch ©ç«½ê: ^XNX^bN
+ *		exit_and_dispatch ©ç«½ê: 
+ *			exit_task ©ç«½êÍ^XNX^bN
+ *			J[lN®ÍÝX^bN
+ *		ret_int ©ç«½ê: ^XNX^bN
+ *		dispatcher_1 ÅÌÝÒ¿©ç«½ê: ÝX^bN
+ */
+
+.align	2
+_exit_and_dispatch:
+dispatcher:
+	/* |Xg^XNtbNÌÄÑoµ */
+	mov.l	PostTaskHook_adr , r0
+	tst		r0 , r0
+	bt		_start_dispatch
+	mov.l	call_posttaskhook_adr , r0
+	jsr		@r0
+	nop
+_start_dispatch:
+	mov.l	schedtsk_adr, r0	/* schedtsk ð runtsk É */
+	mov.b	@r0 , r2
+	extu.b	r2 , r2
+	mov.l	runtsk_adr , r1
+	mov.b	r2 , @r1
+	
+	mov.l	invalid_tsk , r0
+	cmp/eq	r0 , r2		/* schedtsk ª³øÈçÎACh[vÖ */
+	bt		pre_idle
+	shll2	r2
+	mov.l	tcxb_sp_adr , r0	
+	mov.l	@(r0 , r2) , r15		/* ^XNX^bN|C^ðA */
+	mov.l	tcxb_pc_adr , r0
+	mov.l	@(r0 , r2) , r3
+	mov.l	PreTaskHook_adr , r1
+	tst		r1 , r1
+	bt		PreTaskHook_r
+	mov.l	call_pretaskhook_adr , r1
+	mov.l	r3 , @-r15		/* PreTaskHookpÉßèPCðX^bNÞð */
+	jsr		@r1
+	nop
+	mov.l	@r15+ , r3		/* ßèPCðß· */
+PreTaskHook_r:
+	jmp		@r3				/* ßèÔnÖ */
+	nop
+
+.align	4
+_activate_r_adr:
+	.long	_activate_r
+PreTaskHook_adr:
+	.long	_PreTaskHook
+PostTaskHook_adr:
+	.long	_PostTaskHook
+call_pretaskhook_adr:
+	.long	_call_pretaskhook
+call_posttaskhook_adr:
+	.long	_call_posttaskhook
+
+/*
+ *	±±©çÍ schedtsk ªÈ¢ê
+ */
+.align	2
+pre_idle:
+	/*
+	 *	±±Åñ^XNReLXg,ÝX^bNÉØè·¦½ÌÍ,
+	 *	±±Å­¶·éÝÉÇÌX^bNðg¤©Æ¢¤âèÌðÆ,
+	 *	ÝnhàÅÌfBXpb`h~Æ¢¤2ÂÌÓ¡ª éD
+	 */
+	mov.l	int_stack, r15		/* ÝpÌX^bNÖØÖ¦ */
+	mov.l	callevel_adr , r0
+	mov		#TCL_ISR2 , r1
+	mov.b	r1 , @r0			/* ñ^XNReLXg */
+	/* ACh[vÌõ */
+	mov		#0 , r2
+	mov.l	_lock_flag_adr , r8
+	mov.l	r2 , @r8
+	mov.l	mask_ipm , r3
+	mov.l	schedtsk_adr , r5
+	mov.l	invalid_tsk , r4
+idle_loop:
+	ldc		r2 , sr				/* èÝÒ¿ */
+	nop
+	ldc		r3 , sr				/* èÝÂ */
+	mov.b	@r5 , r1			/* schedtskðÇÝoµ */
+	extu.b	r1 , r1
+	cmp/eq	r4 , r1				/* XPW
+[·×«^XNª é©H */
+	bt		idle_loop			/* ÄÑACh[v */
+	
+	mov		#TCL_TASK , r3
+	mov.b	r3 , @r0			/* callevelðß· */
+	mov		#1 , r2
+	mov.l	r2 , @r8
+	bra		_start_dispatch		/* fBXpb`Ö */
+	nop
+
+/*
+ *  Ýnhoû(fBXpb`v è)
+ *
+ *	Äoµð:
+ *	EFLGWX^ÌIPL=0xf, ^XNReLXg(callevel=1)
+ *	EgpX^bNÍ^XNX^bN
+ *	E^XNReLXgÍr0-r7,mach,machl,gbr,prªX^bNÉÏÜê½óÔ
+ */
+	.align	2
+	.globl	ret_int
+ret_int:
+	/* cèÌWX^ðÛ¶ */
+	mov.l	r8 , @-r15
+	mov.l	r9 , @-r15
+	mov.l	r10 , @-r15
+	mov.l	r11 , @-r15
+	mov.l	r12 , @-r15
+	mov.l	r13 , @-r15
+	mov.l	r14 , @-r15
+	shll2	r0						/* runtskÍr0ÉüÁÄ¢é */
+	mov.l	tcxb_sp_adr , r1
+	mov.l	r15 , @(r0 , r1)		/* X^bN|C^ðÛ¶ */
+	mov.l	tcxb_pc_adr , r1
+	mov.l	ret_int_r_adr , r2		/* ßèÔnðret_int_rÉÝè */
+	mov.l	r2 , @(r0 , r1)			/* X^bN|C^ðÛ¶ */
+	/* CPUbNóÔÉÉ */
+	xor		r0 , r0
+	mov.l	_intmask_adr , r1
+	mov.l	r0 , @r1
+	mov.l	_lock_flag_adr , r1
+	mov		#1 , r0
+	mov.l	r0 , @r1
+	bra		dispatcher				/* fBXpb`Ö */
+	nop
+
+.align	4
+ret_int_r_adr:
+	.long	ret_int_r
+_intmask_adr:
+	.long	_intmask
+_lock_flag_adr:
+	.long	_lock_flag
+
+
+/*
+ *	ÄÑoµð: IPL=0xf, (CPUbNóÔ),
+ *			callevel=1(^XNReLXg), ^XNX^bN
+ *	X^bNÉÍr14-r8,gbr,mach,machl,pr,r7-r0ÌÅÏÜêÄ¢é
+ */
+.align	2
+ret_int_r:
+	mov.l	@r15+ , r14		/* WX^ðA */
+	mov.l	@r15+ , r13
+	mov.l	@r15+ , r12
+	mov.l	@r15+ , r11
+	mov.l	@r15+ , r10
+	mov.l	@r15+ , r9
+	mov.l	@r15+ , r8
+	ldc.l	@r15+ , gbr
+	lds.l	@r15+ , mach
+	lds.l	@r15+ , macl
+	lds.l	@r15+ , pr
+	mov.l	@r15+ , r7
+	mov.l	@r15+ , r6
+	mov.l	@r15+ , r5
+	mov.l	@r15+ , r4
+	mov.l	@r15+ , r3
+	mov.l	@r15+ , r2
+	mov.l	@r15+ , r1
+	mov.l	@r15+ , r0
+	rte						/* èÝ³ÖA */
+	nop
+
+/*
+ *	Ýoüû(AZu¾êLqª)
+ *
+ *	Äoµð:
+ *	ESRWX^ÌIPLÍ0xf
+ *	EX^bNÍ½dèÝÈçÝX^bN, »¤ÅÈ¯êÎ
+ *	  ^XNX^bN
+ *	Er0 ÉÍÝnhÌAhXªi[³êÄ¢é.
+ *	Er1 ÉÍOñÌÀsÝIDªi[³êÄ¢éD
+ *	Er2 ÉÍèÝótÌSRWX^Ìlªi[³êÄ¢é
+ *
+ *	WX^ªX^bNãÉÇÌæ¤ÉÛ¶³êÄ¢é©ðÈºÉ¦·.
+ *	±Ì}ÅÍãªáÊ, ºªÊÌAhXÅ, X^bNÍº©ç
+ *	ãûüÉü©ÁÄÏÝã°çêéàÌÆ·é.
+ *
+ *	-------------------------
+ *	|       R3(4byte)        |
+ *	--------------------------
+ *	|       R2(4byte)        |
+ *	--------------------------
+ *	|       R1(4byte)        |
+ *	--------------------------
+ *	|       R0(4byte)        |
+ *	--------------------------
+ *	|       SR(4byte)        | <- èÝ­¶ÌSRWX^(H/WÉÄÛ¶)
+ *	--------------------------
+ *	|       PC(4byte)        | <- èÝ©çA·éPC(H/WÉÄÛ¶)
+ *	--------------------------
+ * 
+ *  èÝ¤ÊÅcèÌWX^ðÞðµ½ãÌX^bNðÈºÉ¦·D
+ *	-------------------------
+ *	|      GBR(4byte)        |
+ *	-------------------------
+ *	|     MACH(4byte)        |
+ *	-------------------------
+ *	|     MACL(4byte)        |
+ *	-------------------------
+ *	|       PR(4byte)        |
+ *	-------------------------
+ *	|       R7(4byte)        |
+ *	-------------------------
+ *	|       R6(4byte)        |
+ *	-------------------------
+ *	|       R5(4byte)        |
+ *	-------------------------
+ *	|       R4(4byte)        |
+ *	-------------------------
+ *	|       R3(4byte)        |
+ *	--------------------------
+ *	|       R2(4byte)        |
+ *	--------------------------
+ *	|       R1(4byte)        |
+ *	--------------------------
+ *	|       R0(4byte)        |
+ *	--------------------------
+ *	|       SR(4byte)        | <- èÝ­¶ÌSRWX^(H/WÉÄÛ¶)
+ *	--------------------------
+ *	|       PC(4byte)        | <- èÝ©çA·éPC(H/WÉÄÛ¶)
+ *	--------------------------
+ * 
+ *	xfBXpb`vÉret_intÉÄX^bNÉÏÜêéWX^ð
+ *	ÈºÉ¦·D
+ *
+ *	-------------------------
+ *	|      R14(4byte)        |
+ *	-------------------------
+ *	|      R13(4byte)        |
+ *	-------------------------
+ *	|      R12(4byte)        |
+ *	--------------------------
+ *	|      R11(4byte)        |
+ *	--------------------------
+ *	|      R10(4byte)        |
+ *	--------------------------
+ *	|       R9(4byte)        |
+ *	-------------------------
+ *	|       R8(4byte)        |
+ *	-------------------------
+ *	|     MACH(4byte)        |
+ *	-------------------------
+ *	|     MACL(4byte)        |
+ *	-------------------------
+ *	|       PR(4byte)        |
+ *	-------------------------
+ *	|       R7(4byte)        |
+ *	-------------------------
+ *	|       R6(4byte)        |
+ *	-------------------------
+ *	|       R5(4byte)        |
+ *	-------------------------
+ *	|       R4(4byte)        |
+ *	-------------------------
+ *	|       R3(4byte)        |
+ *	--------------------------
+ *	|       R2(4byte)        |
+ *	--------------------------
+ *	|       R1(4byte)        |
+ *	--------------------------
+ *	|       R0(4byte)        |
+ *	--------------------------
+ *	|       SR(4byte)        | <- èÝ­¶ÌSRWX^(H/WÉÄÛ¶)
+ *	--------------------------
+ *	|       PC(4byte)        | <- èÝ©çA·éPC(H/WÉÄÛ¶)
+ *	--------------------------
+ *
+ *	nh©ç^[µ½ãÍ, ½dÝÅÈ­, 
+ *	fBXpb`vª é(schedtsk != runtsk)ÉC
+ *	ret_int Öªò·éD
+ *
+ *	½dÝ©Ç¤©ÍcallevelÌlÅ»è·é.
+ *	callevel != 1 ÈçÎ½dÝÅ éÆ»è·é.
+ *
+ */
+ 
+.align	2
+_interrupt:
+	/* cèÌX^bNðÞð */
+	mov.l	r4 , @-r15
+	mov.l	r5 , @-r15
+	mov.l	r6 , @-r15
+	mov.l	r7 , @-r15
+	sts.l	pr , @-r15
+	sts.l	macl , @-r15
+	sts.l	mach , @-r15
+	stc.l	gbr , @-r15
+	mov		#TCL_TASK , r4		/* ½dèÝ©ð`FbN */
+	mov.l	callevel_adr , r3
+	mov.b	@r3 , r5
+	cmp/eq	r4 , r5
+	bf int_from_int
+int_from_task:
+	mov.l	int_stack , r4			/* X^bNðØèÖ¦ */
+	mov.l	r15 , @-r4
+	mov		r4 , r15
+	mov		#TCL_ISR2 , r6		/* ÀsxðÏX */
+	mov.b	r6 , @r3
+int_from_int:
+	mov.w	r1 , @-r15		/* OÌèÝIDðX^bNÉÛ¶ */
+	mov.w	r5 , @-r15		/* OÌÀsxðX^bNÉÛ¶ */
+							/* ±±Å[hÅÛ¶µÄ¢éÌÍA */
+							/* SPð4oCg«EÉÛÂ½ßÅ é */
+	ldc		r2 , sr			/* èÝÂ */
+	jsr		@r0				/* èÝ[`ÄÑoµ */
+	nop
+	mov.l	mask_ipm , r0	/* èÝÖ~ */
+	ldc		r0 , sr
+	mov.w	@r15+ , r0		/* OÌÀsxðA */
+	mov.l	callevel_adr , r1
+	mov.b	r0 , @r1
+	mov.w	@r15+ , r2		/* OÌèÝIDðA */
+	mov.l	runisr_adr , r1
+	mov.b	r2 , @r1
+	mov		#TCL_TASK , r1	/* ½dèÝ©Ç¤©H */
+	cmp/eq	r0 , r1
+	bf		int_return
+	
+	/* iÌèÝ©çA·é */
+	mov.l	@r15 , r15			/* ^XNX^bNÉß· */
+	mov.l	callevel_adr , r2
+	mov.b	r1 , @r2
+	
+	/* èÝüèûÅèÝªüÁÄÈ¢©ðmF */
+	mov		r15 , r0
+	mov.l	@(52, r0) , r0	/* èÝOÌSRWX^ðæèoµ */
+	mov.l	mask_ipm , r1		/* IPMðæèoµ */
+	and		r1 , r0
+	tst		r0 , r0				/* 0©Ç¤©`FbN */
+	bf		int_return			/* 0ÅÈ¢êÍ½dèÝ */
+	
+	mov.l	runtsk_adr , r1	/* fBXpb`vª é©H */
+	mov.b	@r1 , r0
+	extu.b	r0 , r0
+	mov.l	schedtsk_adr , r1
+	mov.b	@r1 , r2
+	extu.b	r2 , r2
+	cmp/eq	r0 , r2
+	bf		ret_int
+int_return:
+	ldc.l	@r15+ , gbr		/* WX^ðA */
+	lds.l	@r15+ , mach
+	lds.l	@r15+ , macl
+	lds.l	@r15+ , pr
+	mov.l	@r15+ , r7
+	mov.l	@r15+ , r6
+	mov.l	@r15+ , r5
+	mov.l	@r15+ , r4
+	mov.l	@r15+ , r3
+	mov.l	@r15+ , r2
+	mov.l	@r15+ , r1
+	mov.l	@r15+ , r0
+	rte						/* èÝ³ÉA */
+	nop
+
+
+/* ¢gpÝÌ */
+.globl _unused_interrupt
+_unused_interrupt:
+	rte
+	nop
+
+.align	4
+runtsk_adr:
+	.long	_runtsk
+schedtsk_adr:
+	.long	_schedtsk
+tcxb_sp_adr:
+	.long	_tcxb_sp
+tcxb_pc_adr:
+	.long	_tcxb_pc
+int_stack:
+	.long	STACK_TOP
+callevel_adr:
+	.long	_callevel
+runisr_adr:
+	.long	_runisr
+mask_ipm:
+	.long	0x000000f0
+invalid_tsk:
+	.long	INVALID_TASK
+
+/* èÌè` */
+.equ TCL_TASK , 1
+.equ TCL_ISR2 , 2
+.equ INVALID_TASK , 0xff
+	
+	
+
+	.end
Index: /atk1_sh2/trunk/config/sh2-gnu/cq7144a/Makefile.config
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cq7144a/Makefile.config	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cq7144a/Makefile.config	(revision 4)
@@ -0,0 +1,70 @@
+#
+#  TOPPERS/OSEK Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      OSEK Kernel
+# 
+#  Copyright (C) 2006 by Witz Corporation, JAPAN
+# 
+#  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+#  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+#  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+#  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+#  pÆÄÔj·é±Æð³Åø·éD
+#  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+#       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+#      XR[hÉÜÜêÄ¢é±ÆD
+#  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+#      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+#      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+#      Ì³ÛØKèðfÚ·é±ÆD
+#  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+#      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+#      ÆD
+#    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+#        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+#    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+#        ñ·é±ÆD
+#  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+#      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+# 
+#  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+#  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+#  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+#  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+# 
+#
+
+#
+# VXeË¶p Makefile
+#
+
+#
+# VXeË¶fBNgðJ[lfBNgè`ÉÇÁ
+#
+KERNEL_DIR := $(KERNEL_DIR):$(TOPDIR)/config/$(CPU)/$(SYS)
+
+#
+# VXeË¶t@CðJ[lIuWFNgt@CÉÇÁ
+#
+KERNEL_COBJS := $(KERNEL_COBJS) sys_config.o
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) sys_support.o
+
+
+#
+# includefBNgÌÇÁ
+#
+INCLUDES := $(INCLUDES) -I $(TOPDIR)/config/sh2-gnu/cq7144a
+
+#
+# ROMÌææªÔnARAMÌææªÔnÌè`
+#
+LDFLAGS := $(LDFLAGS) -Ttext=0x400 -Tdata=0xffffe000
+
+#
+# SGev[gt@C¼Ìè`
+#
+TEMPLATE = sh2_7144f
Index: /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sh2_7144f.sgt
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sh2_7144f.sgt	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sh2_7144f.sgt	(revision 4)
@@ -0,0 +1,347 @@
+	/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *  SH2 7144pÌev[gt@C
+ */
+ 
+/* SGpîñÌÊm */
+@@ISR_MIN_PRIORITY=1@@
+@@ISR_MAX_PRIORITY=15@@
+@@ISR_MIN_ENTRY=0@@
+@@ISR_MAX_ENTRY=255@@
+@@ISR_ENTRY_INTERVAL=1@@
+
+/* X^[gAbvÖÌOQÆè` */
+extern void start(void);
+/* ¢gpÝÌOQÆè` */
+UNUSED_INT_EXTERNAL();
+/* ÝüèûÖÌOQÆè` */
+@@FOR_EACH EXTERNAL_SYMBOL_FOR_ISR@@
+
+/* ÝüèûÖ */
+@@FOR_EACH ENTRY_FOR_ISR@@
+
+/* ÝxN^e[u */
+typedef void (*inthandler)(void);
+
+const inthandler inthandler_table[256] __attribute((section (".vector"))) =
+{
+	start,					/* 0   p[IZbg */
+	(inthandler)STACK_TOP,	/* 1   úX^bNÊu   */
+	start,					/* 2   }j
+AZbg */
+	(inthandler)STACK_TOP,	/* 3   úX^bNÊu   */
+	@@INT_ENTRY4@@,			/* 4   +0x0010 êÊs½ß    */
+	@@INT_ENTRY5@@,			/* 5   +0x0014 VXe\ñ    */
+	@@INT_ENTRY6@@,			/* 6   +0x0018 Xbgs½ß */
+	@@INT_ENTRY7@@,			/* 7   +0x001C VXe\ñ    */
+	(inthandler)(0xC91F0606),	/* 8   +0x0020 VXe\ñ    */
+	@@INT_ENTRY9@@,			/* 9   +0x0024 CPU/AUD ADDRESS ERROR  */
+	@@INT_ENTRY10@@,		/* 10  +0x0028 DMAC/DTC ADDRESS ERROR */
+	@@INT_ENTRY11@@,		/* 11  +0x002C NMI             */
+	@@INT_ENTRY12@@,		/* 12  +0x0030 [Uu[N  */
+	@@INT_ENTRY13@@,		/* 13  +0x0034 VXe\ñ    */
+	@@INT_ENTRY14@@,		/* 14  +0x0038 H-UDI           */
+	/* VXe\ñ */
+	@@INT_ENTRY15@@,		/* 15  +0x003C VXe\ñ */
+	@@INT_ENTRY16@@,		/* 16  +0x0040 VXe\ñ */
+	@@INT_ENTRY17@@,		/* 17  +0x0044 VXe\ñ */
+	@@INT_ENTRY18@@,		/* 18  +0x0048 VXe\ñ */
+	@@INT_ENTRY19@@,		/* 19  +0x004C VXe\ñ */
+	@@INT_ENTRY20@@,		/* 20  +0x0050 VXe\ñ */
+	@@INT_ENTRY21@@,		/* 21  +0x0054 VXe\ñ */
+	@@INT_ENTRY22@@,		/* 22  +0x0058 VXe\ñ */
+	@@INT_ENTRY23@@,		/* 23  +0x005C VXe\ñ */
+	@@INT_ENTRY24@@,		/* 24  +0x0060 VXe\ñ */
+	@@INT_ENTRY25@@,		/* 25  +0x0064 VXe\ñ */
+	@@INT_ENTRY26@@,		/* 26  +0x0068 VXe\ñ */
+	@@INT_ENTRY27@@,		/* 27  +0x006C VXe\ñ */
+	@@INT_ENTRY28@@,		/* 28  +0x0070 VXe\ñ */
+	@@INT_ENTRY29@@,		/* 29  +0x0074 VXe\ñ */
+	@@INT_ENTRY30@@,		/* 30  +0x0078 VXe\ñ */
+	@@INT_ENTRY31@@,		/* 31  +0x007C VXe\ñ */
+	/* gbv½ß */
+	@@INT_ENTRY32@@,		/* 32  +0x0080 gbv½ß */
+	@@INT_ENTRY33@@,		/* 33  +0x0084 gbv½ß */
+	@@INT_ENTRY34@@,		/* 34  +0x0088 gbv½ß */
+	@@INT_ENTRY35@@,		/* 35  +0x008C gbv½ß */
+	@@INT_ENTRY36@@,		/* 36  +0x0090 gbv½ß */
+	@@INT_ENTRY37@@,		/* 37  +0x0094 gbv½ß */
+	@@INT_ENTRY38@@,		/* 38  +0x0098 gbv½ß */
+	@@INT_ENTRY39@@,		/* 39  +0x009C gbv½ß */
+	@@INT_ENTRY40@@,		/* 40  +0x00A0 gbv½ß */
+	@@INT_ENTRY41@@,		/* 41  +0x00A4 gbv½ß */
+	@@INT_ENTRY42@@,		/* 42  +0x00A8 gbv½ß */
+	@@INT_ENTRY43@@,		/* 43  +0x00AC gbv½ß */
+	@@INT_ENTRY44@@,		/* 44  +0x00B0 gbv½ß */
+	@@INT_ENTRY45@@,		/* 45  +0x00B4 gbv½ß */
+	@@INT_ENTRY46@@,		/* 46  +0x00B8 gbv½ß */
+	@@INT_ENTRY47@@,		/* 47  +0x00BC gbv½ß */
+	@@INT_ENTRY48@@,		/* 48  +0x00C0 gbv½ß */
+	@@INT_ENTRY49@@,		/* 49  +0x00C4 gbv½ß */
+	@@INT_ENTRY50@@,		/* 50  +0x00C8 gbv½ß */
+	@@INT_ENTRY51@@,		/* 51  +0x00CC gbv½ß */
+	@@INT_ENTRY52@@,		/* 52  +0x00D0 gbv½ß */
+	@@INT_ENTRY53@@,		/* 53  +0x00D4 gbv½ß */
+	@@INT_ENTRY54@@,		/* 54  +0x00D8 gbv½ß */
+	@@INT_ENTRY55@@,		/* 55  +0x00DC gbv½ß */
+	@@INT_ENTRY56@@,		/* 56  +0x00E0 gbv½ß */
+	@@INT_ENTRY57@@,		/* 57  +0x00E4 gbv½ß */
+	@@INT_ENTRY58@@,		/* 58  +0x00E8 gbv½ß */
+	@@INT_ENTRY59@@,		/* 59  +0x00EC gbv½ß */
+	@@INT_ENTRY60@@,		/* 60  +0x00F0 gbv½ß */
+	@@INT_ENTRY61@@,		/* 61  +0x00F4 gbv½ß */
+	@@INT_ENTRY62@@,		/* 62  +0x00F8 gbv½ß */
+	@@INT_ENTRY63@@,		/* 63  +0x00FC gbv½ß */
+	/* Ý */
+	@@INT_ENTRY64@@,		/* 64  +0x0100 IPRA15-IPRA12 IRQ0 */
+	@@INT_ENTRY65@@,		/* 65  +0x0104 IPRA11-IPRA8  IRQ1 */
+	@@INT_ENTRY66@@,		/* 66  +0x0108 IPRA7-IPRA4   IRQ2 */
+	@@INT_ENTRY67@@,		/* 67  +0x010C IPRA3-IPRA0   IRQ3 */
+	@@INT_ENTRY68@@,		/* 68  +0x0110 IPRB15-IPRB12 IRQ4 */
+	@@INT_ENTRY69@@,		/* 69  +0x0114 IPRB11-IPRB8  IRQ5 */
+	@@INT_ENTRY70@@,		/* 70  +0x0118 IPRB7-IPRB4   IRQ6 */
+	@@INT_ENTRY71@@,		/* 71  +0x011C IPRB3-IPRB0   IRQ7 */
+	/* DMAC */
+	@@INT_ENTRY72@@,		/* 72  +0x0120 IPRC15-IPRC12 DEI0 */
+	@@INT_ENTRY73@@,		/* 73  +0x0124 */
+	@@INT_ENTRY74@@,		/* 74  +0x0128 */
+	@@INT_ENTRY75@@,		/* 75  +0x012C */
+	@@INT_ENTRY76@@,		/* 76  +0x0130 IPRC11-IPRC8 DEI1 */
+	@@INT_ENTRY77@@,		/* 77  +0x0134 */
+	@@INT_ENTRY78@@,		/* 78  +0x0138 */
+	@@INT_ENTRY79@@,		/* 79  +0x013C */
+	@@INT_ENTRY80@@,		/* 80  +0x0140 IPRC7-IPRC4  DEI2 */
+	@@INT_ENTRY81@@,		/* 81  +0x0144 */
+	@@INT_ENTRY82@@,		/* 82  +0x0148 */
+	@@INT_ENTRY83@@,		/* 83  +0x014C */
+	@@INT_ENTRY84@@,		/* 84  +0x0150 IPRC3-IPRC0  DEI3 */
+	@@INT_ENTRY85@@,		/* 85  +0x0154 */
+	@@INT_ENTRY86@@,		/* 86  +0x0158 */
+	@@INT_ENTRY87@@,		/* 87  +0x015C */
+	/* MTU`l0 */
+	@@INT_ENTRY88@@,		/* 88  +0x0160 IPRD15-IPRD12 TGIA_0 */
+	@@INT_ENTRY89@@,		/* 89  +0x0164 IPRD15-IPRD12 TGIB_0 */
+	@@INT_ENTRY90@@,		/* 90  +0x0168 IPRD15-IPRD12 TGIC_0 */
+	@@INT_ENTRY91@@,		/* 91  +0x016C IPRD15-IPRD12 TGID_0 */
+	@@INT_ENTRY92@@,		/* 92  +0x0170 IPRD11-IPRD8  TCIV_0 */
+	@@INT_ENTRY93@@,		/* 93  +0x0174 */
+	@@INT_ENTRY94@@,		/* 94  +0x0178 */
+	@@INT_ENTRY95@@,		/* 95  +0x017C */
+	/* MTU`l1 */
+	@@INT_ENTRY96@@,		/* 96  +0x0180 IPRD7-IPRD4 TGIA_1 */
+	@@INT_ENTRY97@@,		/* 97  +0x0184 IPRD7-IPRD4 TGIB_1 */
+	@@INT_ENTRY98@@,		/* 98  +0x0188 */
+	@@INT_ENTRY99@@,		/* 99  +0x018C */
+	@@INT_ENTRY100@@,		/* 100 +0x0190 IPRD3-IPRD0 TCIV_1 */
+	@@INT_ENTRY101@@,		/* 101 +0x0194 IPRD3-IPRD0 TCIU_1 */
+	@@INT_ENTRY102@@,		/* 102 +0x0198 */
+	@@INT_ENTRY103@@,		/* 103 +0x019C */
+	/* MTU`l2 */
+	@@INT_ENTRY104@@,		/* 104 +0x01A0 IPRE15-IPRE12 TGIA_2 */
+	@@INT_ENTRY105@@,		/* 105 +0x01A4 IPRE15-IPRE12 TGIB_2 */
+	@@INT_ENTRY106@@,		/* 106 +0x01A8 */
+	@@INT_ENTRY107@@,		/* 107 +0x01AC */
+	@@INT_ENTRY108@@,		/* 108 +0x01B0 IPRE11-IPRE8 TCIV_2 */
+	@@INT_ENTRY109@@,		/* 109 +0x01B4 IPRE11-IPRE8 TCIU_2 */
+	@@INT_ENTRY110@@,		/* 110 +0x01B8 */
+	@@INT_ENTRY111@@,		/* 111 +0x01BC */
+	/* MTU`l3 */
+	@@INT_ENTRY112@@,		/* 112 +0x01C0 IPRE7-IPRE4 TGIA_3 */
+	@@INT_ENTRY113@@,		/* 113 +0x01C4 IPRE7-IPRE4 TGIB_3 */
+	@@INT_ENTRY114@@,		/* 114 +0x01C8 IPRE7-IPRE4 TGIC_3 */
+	@@INT_ENTRY115@@,		/* 115 +0x01CC IPRE7-IPRE4 TGID_3 */
+	@@INT_ENTRY116@@,		/* 116 +0x01D0 IPRE3-IPRE0 TCIV_3 */
+	@@INT_ENTRY117@@,		/* 117 +0x01D4 */
+	@@INT_ENTRY118@@,		/* 118 +0x01D8 */
+	@@INT_ENTRY119@@,		/* 119 +0x01DC */
+	/* MTU`l4 */
+	@@INT_ENTRY120@@,		/* 120 +0x01E0 IPRF15-IPRF12 TGIA_4 */
+	@@INT_ENTRY121@@,		/* 121 +0x01E4 IPRF15-IPRF12 TGIB_4 */
+	@@INT_ENTRY122@@,		/* 122 +0x01E8 IPRF15-IPRF12 TGIC_4 */
+	@@INT_ENTRY123@@,		/* 123 +0x01EC IPRF15-IPRF12 TGID_4 */
+	@@INT_ENTRY124@@,		/* 124 +0x01F0 IPRF11-IPRF8  TCIV_4 */
+	@@INT_ENTRY125@@,		/* 125 +0x01F4 */
+	@@INT_ENTRY126@@,		/* 126 +0x01F8 */
+	@@INT_ENTRY127@@,		/* 127 +0x01FC */
+	/* SCI`l0 */
+	@@INT_ENTRY128@@,		/* 128 +0x0200 IPRF7-IPRF4 ERI_0 */
+	@@INT_ENTRY129@@,		/* 129 +0x0204 IPRF7-IPRF4 RXI_0 */
+	@@INT_ENTRY130@@,		/* 130 +0x0208 IPRF7-IPRF4 TXI_0 */
+	@@INT_ENTRY131@@,		/* 131 +0x020C IPRF7-IPRF4 TEI_0 */
+	/* SCI`l1 */
+	@@INT_ENTRY132@@,		/* 132 +0x0210 IPRF3-IPRF0 ERI_1 */
+	@@INT_ENTRY133@@,		/* 133 +0x0214 IPRF3-IPRF0 RXI_1 */
+	@@INT_ENTRY134@@,		/* 134 +0x0218 IPRF3-IPRF0 TXI_1 */
+	@@INT_ENTRY135@@,		/* 135 +0x021C IPRF3-IPRF0 TEI_1 */
+	/* A/D */
+	@@INT_ENTRY136@@,		/* 136 +0x0220 IPRG15-IPRG12 ADI0 */
+	@@INT_ENTRY137@@,		/* 137 +0x0224 IPRG15-IPRG12 ADI1 */
+	@@INT_ENTRY138@@,		/* 138 +0x0228 */
+	@@INT_ENTRY139@@,		/* 139 +0x022C */
+	/* DTC */
+	@@INT_ENTRY140@@,		/* 140 +0x0230 IPRG11-IPRG8 SWDTEND */
+	@@INT_ENTRY141@@,		/* 141 +0x0234 */
+	@@INT_ENTRY142@@,		/* 142 +0x0238 */
+	@@INT_ENTRY143@@,		/* 143 +0x023C */
+	/* RyA}b`^C} */
+	@@INT_ENTRY144@@,		/* 144 +0x0240 IPRG7-IPRG4 CMI0 */
+	@@INT_ENTRY145@@,		/* 145 +0x0244 */
+	@@INT_ENTRY146@@,		/* 146 +0x0248 */
+	@@INT_ENTRY147@@,		/* 147 +0x024C */
+	@@INT_ENTRY148@@,		/* 148 +0x0250 IPRG3-IPRG0 CMI1 */
+	@@INT_ENTRY149@@,		/* 149 +0x0254 */
+	@@INT_ENTRY150@@,		/* 150 +0x0258 */
+	@@INT_ENTRY151@@,		/* 151 +0x025C */
+	/* EHb`hbO^C} */
+	@@INT_ENTRY152@@,		/* 152 +0x0260 IPRH15-IPRH12 ITI */
+	/* VXe\ñ */
+	@@INT_ENTRY153@@,		/* 153 +0x0264 VXe\ñ */
+	@@INT_ENTRY154@@,		/* 154 +0x0268 VXe\ñ */
+	@@INT_ENTRY155@@,		/* 155 +0x026C VXe\ñ */
+	/* I/O */
+	@@INT_ENTRY156@@,		/* 156 +0x0270 IPRH11-IPRH8 MTUOEI */
+	@@INT_ENTRY157@@,		/* 157 +0x0274 */
+	@@INT_ENTRY158@@,		/* 158 +0x0278 */
+	@@INT_ENTRY159@@,		/* 159 +0x027C */
+	/* VXe\ñ */
+	@@INT_ENTRY160@@,		/* 160 +0x0280 VXe\ñ */
+	@@INT_ENTRY161@@,		/* 161 +0x0284 VXe\ñ */
+	@@INT_ENTRY162@@,		/* 162 +0x0288 VXe\ñ */
+	@@INT_ENTRY163@@,		/* 163 +0x028C VXe\ñ */
+	@@INT_ENTRY164@@,		/* 164 +0x0290 VXe\ñ */
+	@@INT_ENTRY165@@,		/* 165 +0x0294 VXe\ñ */
+	@@INT_ENTRY166@@,		/* 166 +0x0298 VXe\ñ */
+	@@INT_ENTRY167@@,		/* 167 +0x029C VXe\ñ */
+	/* SCI`l2 */
+	@@INT_ENTRY168@@,		/* 168 +0x02A0 IPRI15-IPRI12 ERI_2 */
+	@@INT_ENTRY169@@,		/* 169 +0x02A4 IPRI15-IPRI12 RXI_2 */
+	@@INT_ENTRY170@@,		/* 170 +0x02A8 IPRI15-IPRI12 TXI_2 */
+	@@INT_ENTRY171@@,		/* 171 +0x02AC IPRI15-IPRI12 TEI_2 */
+	/* SCI`l3 */
+	@@INT_ENTRY172@@,		/* 172 +0x02B0 IPRI11-IPRI8 ERI_3 */
+	@@INT_ENTRY173@@,		/* 173 +0x02B4 IPRI11-IPRI8 RXI_3 */
+	@@INT_ENTRY174@@,		/* 174 +0x02B8 IPRI11-IPRI8 TXI_3 */
+	@@INT_ENTRY175@@,		/* 175 +0x02BC IPRI11-IPRI8 TEI_3 */
+	/* VXe\ñ */
+	@@INT_ENTRY176@@,		/* 176 +0x02C0 VXe\ñ */
+	@@INT_ENTRY177@@,		/* 177 +0x02C4 VXe\ñ */
+	@@INT_ENTRY178@@,		/* 178 +0x02C8 VXe\ñ */
+	@@INT_ENTRY179@@,		/* 179 +0x02CC VXe\ñ */
+	@@INT_ENTRY180@@,		/* 180 +0x02D0 VXe\ñ */
+	@@INT_ENTRY181@@,		/* 181 +0x02D4 VXe\ñ */
+	@@INT_ENTRY182@@,		/* 182 +0x02D8 VXe\ñ */
+	@@INT_ENTRY183@@,		/* 183 +0x02DC VXe\ñ */
+	@@INT_ENTRY184@@,		/* 184 +0x02E0 VXe\ñ */
+	@@INT_ENTRY185@@,		/* 185 +0x02E4 VXe\ñ */
+	@@INT_ENTRY186@@,		/* 186 +0x02E8 VXe\ñ */
+	@@INT_ENTRY187@@,		/* 187 +0x02EC VXe\ñ */
+	@@INT_ENTRY188@@,		/* 188 +0x02F0 VXe\ñ */
+	@@INT_ENTRY189@@,		/* 189 +0x02F4 VXe\ñ */
+	@@INT_ENTRY190@@,		/* 190 +0x02F8 VXe\ñ */
+	@@INT_ENTRY191@@,		/* 191 +0x02FC VXe\ñ */
+	/* IIC */
+	@@INT_ENTRY192@@,		/* 192 +0x0300 IPRJ7-IPRJ4 ICI */
+	@@INT_ENTRY193@@,		/* 193 +0x0304 */
+	@@INT_ENTRY194@@,		/* 194 +0x0308 */
+	@@INT_ENTRY195@@,		/* 195 +0x030C */
+	/* VXe\ñ */
+	@@INT_ENTRY196@@,		/* 196 +0x0310 VXe\ñ */
+	@@INT_ENTRY197@@,		/* 197 +0x0314 VXe\ñ */
+	@@INT_ENTRY198@@,		/* 198 +0x0318 VXe\ñ */
+	@@INT_ENTRY199@@,		/* 199 +0x031C VXe\ñ */
+	@@INT_ENTRY200@@,		/* 200 +0x0320 VXe\ñ */
+	@@INT_ENTRY201@@,		/* 201 +0x0324 VXe\ñ */
+	@@INT_ENTRY202@@,		/* 202 +0x0328 VXe\ñ */
+	@@INT_ENTRY203@@,		/* 203 +0x032C VXe\ñ */
+	@@INT_ENTRY204@@,		/* 204 +0x0330 VXe\ñ */
+	@@INT_ENTRY205@@,		/* 205 +0x0334 VXe\ñ */
+	@@INT_ENTRY206@@,		/* 206 +0x0338 VXe\ñ */
+	@@INT_ENTRY207@@,		/* 207 +0x033C VXe\ñ */
+	@@INT_ENTRY208@@,		/* 208 +0x0340 VXe\ñ */
+	@@INT_ENTRY209@@,		/* 209 +0x0344 VXe\ñ */
+	@@INT_ENTRY210@@,		/* 210 +0x0348 VXe\ñ */
+	@@INT_ENTRY211@@,		/* 211 +0x034C VXe\ñ */
+	@@INT_ENTRY212@@,		/* 212 +0x0350 VXe\ñ */
+	@@INT_ENTRY213@@,		/* 213 +0x0354 VXe\ñ */
+	@@INT_ENTRY214@@,		/* 214 +0x0358 VXe\ñ */
+	@@INT_ENTRY215@@,		/* 215 +0x035C VXe\ñ */
+	@@INT_ENTRY216@@,		/* 216 +0x0360 VXe\ñ */
+	@@INT_ENTRY217@@,		/* 217 +0x0364 VXe\ñ */
+	@@INT_ENTRY218@@,		/* 218 +0x0368 VXe\ñ */
+	@@INT_ENTRY219@@,		/* 219 +0x036C VXe\ñ */
+	@@INT_ENTRY220@@,		/* 220 +0x0370 VXe\ñ */
+	@@INT_ENTRY221@@,		/* 221 +0x0374 VXe\ñ */
+	@@INT_ENTRY222@@,		/* 222 +0x0378 VXe\ñ */
+	@@INT_ENTRY223@@,		/* 223 +0x037C VXe\ñ */
+	@@INT_ENTRY224@@,		/* 224 +0x0380 VXe\ñ */
+	@@INT_ENTRY225@@,		/* 225 +0x0384 VXe\ñ */
+	@@INT_ENTRY226@@,		/* 226 +0x0388 VXe\ñ */
+	@@INT_ENTRY227@@,		/* 227 +0x038C VXe\ñ */
+	@@INT_ENTRY228@@,		/* 228 +0x0390 VXe\ñ */
+	@@INT_ENTRY229@@,		/* 229 +0x0394 VXe\ñ */
+	@@INT_ENTRY230@@,		/* 230 +0x0398 VXe\ñ */
+	@@INT_ENTRY231@@,		/* 231 +0x039C VXe\ñ */
+	@@INT_ENTRY232@@,		/* 232 +0x03A0 VXe\ñ */
+	@@INT_ENTRY233@@,		/* 233 +0x03A4 VXe\ñ */
+	@@INT_ENTRY234@@,		/* 234 +0x03A8 VXe\ñ */
+	@@INT_ENTRY235@@,		/* 235 +0x03AC VXe\ñ */
+	@@INT_ENTRY236@@,		/* 236 +0x03B0 VXe\ñ */
+	@@INT_ENTRY237@@,		/* 237 +0x03B4 VXe\ñ */
+	@@INT_ENTRY238@@,		/* 238 +0x03B8 VXe\ñ */
+	@@INT_ENTRY239@@,		/* 239 +0x03BC VXe\ñ */
+	@@INT_ENTRY240@@,		/* 240 +0x03C0 VXe\ñ */
+	@@INT_ENTRY241@@,		/* 241 +0x03C4 VXe\ñ */
+	@@INT_ENTRY242@@,		/* 242 +0x03C8 VXe\ñ */
+	@@INT_ENTRY243@@,		/* 243 +0x03CC VXe\ñ */
+	@@INT_ENTRY244@@,		/* 244 +0x03D0 VXe\ñ */
+	@@INT_ENTRY245@@,		/* 245 +0x03D4 VXe\ñ */
+	@@INT_ENTRY246@@,		/* 246 +0x03D8 VXe\ñ */
+	@@INT_ENTRY247@@		/* 247 +0x03DC VXe\ñ */
+};
+
+/* tbN[`ÌNULLV{ */
+@@NULL_ERRORHOOK_SYMBOL@@
+@@NULL_STARTUPHOOK_SYMBOL@@
+@@NULL_SHUTDOWNHOOK_SYMBOL@@
+@@NULL_PRETASKHOOK_SYMBOL@@
+@@NULL_POSTTASKHOOK_SYMBOL@@
+
Index: /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_config.c
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_config.c	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_config.c	(revision 4)
@@ -0,0 +1,77 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	^[QbgVXeË¶W
+[iCQ7144Apj
+ */
+
+#include	"osek_kernel.h"
+#include "sh7144.h"
+
+
+/*
+ *  ^[QbgVXeË¶Ìú»
+ */
+void
+sys_initialize(void)
+{
+
+	/*
+	 *  LEDÌú»
+	 *
+	 *  PE15ðoÍûüÉÝè·é
+	 */
+	PEIORL |= 0x8000;
+}
+
+
+/*
+ *  ^[QbgVXeÌI¹
+ */
+void
+sys_exit(void)
+{
+	while(1){
+		/* ³À[v	*/
+	}
+}
+
+
Index: /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_config.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_config.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_config.h	(revision 4)
@@ -0,0 +1,61 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *  ^[QbgVXeË¶W
+[iCQ7144Apj
+ */
+
+#ifndef _SYS_CONFIG_H_
+#define _SYS_CONFIG_H_
+
+
+#ifndef _MACRO_ONLY
+/* Övg^Cvé¾	*/
+extern void	sys_initialize(void);
+extern void	sys_exit(void);
+#endif /* _MACRO_ONLY */
+
+
+#endif /* _SYS_CONFIG_H_ */
Index: /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_defs.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_defs.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_defs.h	(revision 4)
@@ -0,0 +1,200 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2003 by Naoki Saito
+ *             Nagoya Municipal Industrial Research Institute, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	^[QbgVXeÉË¶·éè`iCQ7144Apj
+ */
+
+#ifndef _SYS_DEFS_H_
+#define _SYS_DEFS_H_
+
+/*
+ * X^bNæªÔn
+ */
+
+#define STACK_TOP (0xFFFFFFFC)
+
+/*
+ * èÝxN^ÌæªÔn
+ */
+
+#define VECTOR_TOP	(0x0)
+
+/* 
+ *  ^[Qbg¯Ê}N(VXe¼Ìè`)
+ */
+#define INTERFACE
+
+/*
+ *  N®bZ[WÌ^[QbgVXe¼
+ */
+#define TARGET_NAME "SH2/CQ7144A"
+
+/*
+ *  ORAMðgp·é©Ìè`
+ */
+ 
+#define USE_SRAM
+
+/*
+ *  ÝÔÌè`
+ */
+
+#define INT_ILGL_OP			(4)			/* 4  +0x0010 êÊs½ß */
+										/* 5  +0x0014 VXe\ñ */
+#define INT_SLOT_ILGL		(6)			/* 6  +0x0018 Xbgs½ß */
+										/* 7  +0x001C VXe\ñ */
+										/* 8  +0x0020 VXe\ñ */
+#define INT_AUD_ADRERR		(9)			/* 9  +0x0024 CPU/AUD ADDRESS ERROR */
+#define INT_DMAC_ADRERR		(10)		/* 10 +0x0028 DMAC/DTC ADDRESS ERROR */
+#define INT_NMI				(11)		/* 11 +0x002C NMI */
+#define INT_USRBRK			(12)		/* 12 +0x0030 [Uu[N */
+										/* 13 +0x0034 VXe\ñ */
+#define INT_HUDI			(14)		/* 14 +0x0038 H-UDI*/
+										/* 15 +0x003C VXe\ñ */
+										/*           F            */
+										/* 31 +0x007C VXe\ñ */
+#define INT_TRAP20			(32)		/* 32 +0x0080 gbv½ß */
+#define INT_TRAP21			(33)		/* 33 +0x0084 gbv½ß */
+#define INT_TRAP22			(34)		/* 34 +0x0088 gbv½ß */
+#define INT_TRAP23			(35)		/* 35 +0x008C gbv½ß */
+#define INT_TRAP24			(36)		/* 36 +0x0090 gbv½ß */
+#define INT_TRAP25			(37)		/* 37 +0x0094 gbv½ß */
+#define INT_TRAP26			(38)		/* 38 +0x0098 gbv½ß */
+#define INT_TRAP27			(39)		/* 39 +0x009C gbv½ß */
+#define INT_TRAP28			(40)		/* 40 +0x00A0 gbv½ß */
+#define INT_TRAP29			(41)		/* 41 +0x00A4 gbv½ß */
+#define INT_TRAP30			(42)		/* 42 +0x00A8 gbv½ß */
+#define INT_TRAP31			(43)		/* 43 +0x00AC gbv½ß */
+#define INT_TRAP32			(44)		/* 44 +0x00B0 gbv½ß */
+#define INT_TRAP33			(45)		/* 45 +0x00B4 gbv½ß */
+#define INT_TRAP34			(46)		/* 46 +0x00B8 gbv½ß */
+#define INT_TRAP35			(47)		/* 47 +0x00BC gbv½ß */
+#define INT_TRAP36			(48)		/* 48 +0x00C0 gbv½ß */
+#define INT_TRAP37			(49)		/* 49 +0x00C4 gbv½ß */
+#define INT_TRAP38			(50)		/* 50 +0x00C8 gbv½ß */
+#define INT_TRAP39			(51)		/* 51 +0x00CC gbv½ß */
+#define INT_TRAP40			(52)		/* 52 +0x00D0 gbv½ß */
+#define INT_TRAP41			(53)		/* 53 +0x00D4 gbv½ß */
+#define INT_TRAP42			(54)		/* 54 +0x00D8 gbv½ß */
+#define INT_TRAP43			(55)		/* 55 +0x00DC gbv½ß */
+#define INT_TRAP44			(56)		/* 56 +0x00E0 gbv½ß */
+#define INT_TRAP45			(57)		/* 57 +0x00E4 gbv½ß */
+#define INT_TRAP46			(58)		/* 58 +0x00E8 gbv½ß */
+#define INT_TRAP47			(59)		/* 59 +0x00EC gbv½ß */
+#define INT_TRAP48			(60)		/* 60 +0x00F0 gbv½ß */
+#define INT_TRAP49			(61)		/* 61 +0x00F4 gbv½ß */
+#define INT_TRAP50			(62)		/* 62 +0x00F8 gbv½ß */
+#define INT_TRAP51			(63)		/* 63 +0x00FC gbv½ß */
+#define INT_IRQ0			(64)		/* 64 +0x0100 IPRA15-IPRA12 IRQ0*/
+#define INT_IRQ1			(65)		/* 65 +0x0104 IPRA11-IPRA8  IRQ1*/
+#define INT_IRQ2			(66)		/* 66 +0x0108 IPRA7-IPRA4   IRQ2*/
+#define INT_IRQ3			(67)		/* 67 +0x010C IPRA3-IPRA0   IRQ3*/
+#define INT_IRQ4			(68)		/* 68 +0x0110 IPRB15-IPRB12 IRQ4*/
+#define INT_IRQ5			(69)		/* 69 +0x0114 IPRB11-IPRB8  IRQ5*/
+#define INT_IRQ6			(70)		/* 70 +0x0118 IPRB7-IPRB4   IRQ6*/
+#define INT_IRQ7			(71)		/* 71 +0x011C IPRB3-IPRB0   IRQ7*/
+#define INT_DEI0			(72)		/* 72 +0x0120 IPRC15-IPRC12 DEI0 */
+#define INT_DEI1			(76)		/* 76 +0x0130 IPRC11-IPRC8 DEI1 */
+#define INT_DEI2			(80)		/* 80 +0x0140 IPRC7-IPRC4  DEI2 */
+#define INT_DEI3			(84)		/* 84 +0x0150 IPRC3-IPRC0  DEI3 */
+#define INT_TGIA0			(88)		/* 88 +0x0160 IPRD15-IPRD12 TGIA_0 */
+#define INT_TGIB0			(89)		/* 89 +0x0164 IPRD15-IPRD12 TGIB_0 */
+#define INT_TGIC0			(90)		/* 90 +0x0168 IPRD15-IPRD12 TGIC_0 */
+#define INT_TGID0			(91)		/* 91 +0x016C IPRD15-IPRD12 TGID_0 */
+#define INT_TCIV0			(92)		/* 92 +0x0170 IPRD11-IPRD8 TCIV_0 */
+#define INT_TGIA1			(96)		/* 96  +0x0180 IPRD7-IPRD4 TGIA_1 */
+#define INT_TGIB1			(97)		/* 97  +0x0184 IPRD7-IPRD4 TGIB_1 */
+#define INT_TCIV1			(100)		/* 100 +0x0190 IPRD3-IPRD0 TCIV_1 */
+#define INT_TCIU1			(101)		/* 101 +0x0194 IPRD3-IPRD0 TCIU_1 */
+#define INT_TGIA2			(104)		/* 104 +0x01A0 IPRE15-IPRE12 TGIA_2 */
+#define INT_TGIB2			(105)		/* 105 +0x01A4 IPRE15-IPRE12 TGIB_2 */
+#define INT_TCIV2			(108)		/* 108 +0x01B0 IPRE11-IPRE8 TCIV_2 */
+#define INT_TCIU2			(109)		/* 109 +0x01B4 IPRE11-IPRE8 TCIU_2 */
+#define INT_TGIA3			(112)		/* 112 +0x01C0 IPRE7-IPRE4 TGIA_3 */
+#define INT_TGIB3			(113)		/* 113 +0x01C4 IPRE7-IPRE4 TGIB_3 */
+#define INT_TGIC3			(114)		/* 114 +0x01C8 IPRE7-IPRE4 TGIC_3 */
+#define INT_TGID3			(115)		/* 115 +0x01CC IPRE7-IPRE4 TGID_3 */
+#define INT_TCIV3			(116)		/* 116 +0x01D0 IPRE3-IPRE0 TCIV_3 */
+#define INT_TGIA4			(120)		/* 120 +0x01E0 IPRF15-IPRF12 TGIA_4 */
+#define INT_TGIB4			(121)		/* 121 +0x01E4 IPRF15-IPRF12 TGIB_4 */
+#define INT_TGIC4			(122)		/* 122 +0x01E8 IPRF15-IPRF12 TGIC_4 */
+#define INT_TGID4			(123)		/* 123 +0x01EC IPRF15-IPRF12 TGID_4 */
+#define INT_TCIV4			(124)		/* 124 +0x01F0 IPRF11-IPRF8 TCIV_4 */
+#define INT_ERI0			(128)		/* 128 +0x0200 IPRF7-IPRF4 ERI_0 */
+#define INT_RXI0			(129)		/* 129 +0x0204 IPRF7-IPRF4 RXI_0 */
+#define INT_TXI0			(130)		/* 130 +0x0208 IPRF7-IPRF4 TXI_0 */
+#define INT_TEI0			(131)		/* 131 +0x020C IPRF7-IPRF4 TEI_0 */
+#define INT_ERI1			(132)		/* 132 +0x0210 IPRF3-IPRF0 ERI_1 */
+#define INT_RXI1			(133)		/* 133 +0x0214 IPRF3-IPRF0 RXI_1 */
+#define INT_TXI1			(134)		/* 134 +0x0218 IPRF3-IPRF0 TXI_1 */
+#define INT_TEI1			(135)		/* 135 +0x021C IPRF3-IPRF0 TEI_1 */
+#define INT_ADI0			(136)		/* 136 +0x0220 IPRG15-IPRG12 ADI0 */
+#define	INT_ADI1			(137)		/* 137 +0x0224 IPRG15-IPRG12 ADI1 */
+#define INT_SWDTEND			(140)		/* 140 +0x0230 IPRG11-IPRG8 SWDTEND */
+#define CMI0				(144)		/* 144 +0x0240 IPRG7-IPRG4 CMI0 */
+#define CMI1				(148)		/* 148 +0x0250 IPRG3-IPRG0 CMI1 */
+#define ITI					(152)		/* 152 +0x0260 IPRH15-IPRH12 ITI */
+										/* 153 +0x0264 VXe\ñ */
+										/* 154 +0x0268 VXe\ñ */
+										/* 155 +0x026C VXe\ñ */
+#define MTUOEI							/* 156 +0x0270 IPRH11-IPRH8 MTUOEI */
+										/* 160 +0x0280 VXe\ñ */
+										/*            F            */
+										/* 167 +0x029C VXe\ñ */
+#define INT_ERI2			(128)		/* 168 +0x02A0 IPRI15-IPRI12 ERI_2 */
+#define INT_RXI2			(129)		/* 169 +0x02A4 IPRI15-IPRI12 RXI_2 */
+#define INT_TXI2			(130)		/* 170 +0x02A8 IPRI15-IPRI12 TXI_2 */
+#define INT_TEI2			(131)		/* 171 +0x02AC IPRI15-IPRI12 TEI_2 */
+#define INT_ERI3			(128)		/* 172 +0x02B0 IPRI11-IPRI8 ERI_3 */
+#define INT_RXI3			(129)		/* 173 +0x02B4 IPRI11-IPRI8 RXI_3 */
+#define INT_TXI3			(130)		/* 174 +0x02B8 IPRI11-IPRI8  TXI_3 */
+#define INT_TEI3			(131)		/* 175 +0x02BC IPRI11-IPRI8  TEI_3 */
+										/* 176 +0x02C0 VXe\ñ */
+										/*            F            */
+										/* 191 +0x02FC VXe\ñ */
+
+#endif /* _SYS_DEFS_H_ */
Index: /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_support.S
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_support.S	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/cq7144a/sys_support.S	(revision 4)
@@ -0,0 +1,164 @@
+/*
+*  TOPPERS/OSEK Kernel
+*      Toyohashi Open Platform for Embedded Real-Time Systems/
+*      OSEK Kernel
+* 
+*  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+*                              Toyohashi Univ. of Technology, JAPAN
+*  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+*              Graduate School of Information Science, Nagoya Univ., JAPAN
+*  Copyright (C) 2005-2006 by Witz Corporation, JAPAN
+* 
+*  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+*  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+*  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+*  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+*  pÆÄÔj·é±Æð³Åø·éD
+*  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+*       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+*      XR[hÉÜÜêÄ¢é±ÆD
+*  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+*      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+*      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+*      Ì³ÛØKèðfÚ·é±ÆD
+*  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+*      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+*      ÆD
+*    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+*        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+*    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+*        ñ·é±ÆD
+*  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+*      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+* 
+*  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+*  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+*  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+*  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+*/ 
+
+/*
+ *	^[QbgVXeË¶W
+[ AZu¾êiSH2pj
+ */
+
+
+	.section ".text", "ax"
+
+/*
+ *	áxÌ^[QbgVXeË¶Ìú»
+ *
+ *	X^[gAbvW
+[ÌÅCX^bNú»ÌãÉÄÑo³êéD
+ */
+	.globl hardware_init_hook
+/*
+ * hardware_init_hookð³øÉ·éêÍºL.equ è`ðRgAEgµC
+ * ÖÌLqðí·é±ÆD
+*/
+hardware_init_hook:
+#ifdef	USE_SRAM
+	/*
+	 *	CS1óÔA16rbgANZXAAT[gg£Èµ AEFCgTCN1
+	 *  TCNÔAChÈµAA±ANZXACh è
+	 */
+	mov.w	bcr1_init , r0
+	mov.l	bcr1_adr , r1
+	mov.w	r0 , @r1
+	mov.w	bcr2_init , r0
+	mov.l	bcr2_adr , r1
+	mov.w	r0 , @r1
+	mov.w	wcr1_init , r0
+	mov.l	wcr1_adr , r1
+	mov.w	r0 , @r1
+	mov.w	wcr2_init , r0
+	mov.l	wcr2_adr , r1
+	mov.w	r0 , @r1
+	/* PFCÝè */
+	mov.w	pacrh_init , r0
+	mov.l	pacrh_adr , r1
+	mov.w	r0 , @r1
+	mov.w	pacrl1_init , r0
+	mov.l	pacrl1_adr , r1
+	mov.w	r0 , @r1
+	mov.w	pccr_init , r0
+	mov.l	pccr_adr , r1
+	mov.w	r0 , @r1
+	mov.w	pdcrl1_init , r0
+	mov.l	pdcrl1_adr , r1
+	mov.w	r0 , @r1
+	mov.w	pdcrl2_init , r0
+	mov.l	pdcrl2_adr , r1
+	mov.w	r0 , @r1
+	rts
+	nop
+
+bcr1_init:
+	.word	0x500f
+bcr2_init:
+	.word	0xf3fd
+wcr1_init:
+	.word	0xff1f
+wcr2_init:
+	.word	0x000f
+pacrh_init:
+	.word	0x0000
+pacrl1_init:
+	.word	0x1540
+pccr_init:
+	.word	0xffff
+pdcrl1_init:
+	.word	0xffff
+pdcrl2_init:
+	.word	0x0000
+
+.align	4
+bcr1_adr:
+	.long	0xffff8620
+bcr2_adr:
+	.long	0xffff8622
+wcr1_adr:
+	.long	0xffff8624
+wcr2_adr:
+	.long	0xffff8626
+pacrh_adr:
+	.long	0xffff8388
+pacrl1_adr:
+	.long	0xffff838c
+pccr_adr:
+	.long	0xffff839c
+pdcrl1_adr:
+	.long	0xffff83ac
+pdcrl2_adr:
+	.long	0xffff83ae
+
+#else
+.align	4
+	.long 0 
+#endif	/* USE_SRAM */
+
+
+/*
+ *	áxÌ\tgEFAË¶Ìú»
+ *
+ *	X^[gAbvW
+[ÌÅC[UCÖÄÑoµÌOÉ
+ *	ÄÑo³êéD
+ */
+	.globl software_init_hook
+/*
+ *	software_init_hookðLøÉ·éêÍºL.equ è`ðRg»µC
+ *	ÖV{ÌRgAEgÆÖàÌLqðs¤±ÆD
+ */
+.align	4
+software_init_hook:
+	.long	0
+/*software_init_hook:
+ *	rts
+ *	nop
+ */
+	.end
Index: /atk1_sh2/trunk/config/sh2-gnu/sh7144.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/sh7144.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/sh7144.h	(revision 4)
@@ -0,0 +1,104 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ *
+ *  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *  SH2 7144FpAhXè`ish2 7144Fpj
+ */
+
+#ifndef _SH7144_H_
+#define _SH7144_H_
+
+/* SCIi`lPj */
+#define SMR1     *(((volatile UINT8  *)0xFFFF81B0))
+#define BRR1     *(((volatile UINT8  *)0xFFFF81B1))
+#define SCR1     *(((volatile UINT8  *)0xFFFF81B2))
+#define TDR1     *(((volatile UINT8  *)0xFFFF81B3))
+#define SSR1     *(((volatile UINT8  *)0xFFFF81B4))
+#define RDR1     *(((volatile UINT8  *)0xFFFF81B5))
+
+/* MTUi¤Êj */
+#define TSTR     *(((volatile UINT8  *)0xFFFF8240))
+
+/* MTUi`lPj */
+#define TCR_1    *(((volatile UINT8  *)0xFFFF8280))
+#define TIER_1   *(((volatile UINT8  *)0xFFFF8284))
+#define TSR_1    *(((volatile UINT8  *)0xFFFF8285))
+#define TCNT_1   *(((volatile UINT16 *)0xFFFF8286))
+#define TGRA_1   *(((volatile UINT16 *)0xFFFF8288))
+
+/* MTUi`lQj */
+#define TCR_2    *(((volatile UINT8  *)0xFFFF82A0))
+#define TIER_2   *(((volatile UINT8  *)0xFFFF82A4))
+#define TSR_2    *(((volatile UINT8  *)0xFFFF82A5))
+#define TCNT_2   *(((volatile UINT16 *)0xFFFF82A6))
+#define TGRB_2   *(((volatile UINT16 *)0xFFFF82AA))
+
+/* INTC */
+#define IPRD     *(((volatile UINT16 *)0xFFFF834E))
+#define IPRE     *(((volatile UINT16 *)0xFFFF8350))
+#define IPRF     *(((volatile UINT16 *)0xFFFF8352))
+#define IPRG     *(((volatile UINT16 *)0xFFFF8354))
+
+/* PFC |[gA */
+#define PADRL    *(((volatile UINT16 *)0xFFFF8382))
+#define PAIORL   *(((volatile UINT16 *)0xFFFF8386))
+#define PACRL1   *(((volatile UINT16 *)0xFFFF838C))
+#define PACRL2   *(((volatile UINT16 *)0xFFFF838E))
+
+/* PFC |[gE */
+#define PEDRL    *(((volatile UINT16 *)0xFFFF83B0))
+#define PEIORL   *(((volatile UINT16 *)0xFFFF83B4))
+
+/* CMT */
+#define CMSTR    *(((volatile UINT16 *)0xFFFF83D0))
+#define CMCSR_0  *(((volatile UINT16 *)0xFFFF83D2))
+#define CMCNT_0  *(((volatile UINT16 *)0xFFFF83D4))
+#define CMCOR_0  *(((volatile UINT16 *)0xFFFF83D6))
+#define CMCSR_1  *(((volatile UINT16 *)0xFFFF83D8))
+#define CMCNT_1  *(((volatile UINT16 *)0xFFFF83DA))
+#define CMCOR_1  *(((volatile UINT16 *)0xFFFF83DC))
+
+/* áÁïdÍóÔ */
+#define MSTCR1   *(((volatile UINT16 *)0xFFFF861C))
+#define MSTCR2   *(((volatile UINT16 *)0xFFFF861E))
+
+
+#endif /* _SH7144_H_ */
+
Index: /atk1_sh2/trunk/config/sh2-gnu/shelf.ld
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/shelf.ld	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/shelf.ld	(revision 4)
@@ -0,0 +1,123 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2001-2003 by Industrial Technology Institute,
+ *                              Miyagi Prefectural Government, JAPAN
+ *  
+ *
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ *
+ */
+
+OUTPUT_FORMAT("elf32-sh","elf32-sh","elf32-sh")
+OUTPUT_ARCH(sh)
+ENTRY(_start)
+
+
+PROVIDE (__stack = 0) ;
+PROVIDE(_hardware_init_hook = 0);
+PROVIDE(_software_init_hook = 0);
+PROVIDE(_software_term_hook = 0);
+
+SECTIONS
+{
+    .vector : AT(0)
+    {
+	*(.vector)
+    }
+    .init :
+    {
+        KEEP (*(.init))
+    }
+    .text :
+    {
+        __text = . ;
+        *(.text .stub .text.* .gnu.linkonce.t.*)
+    }
+    .fini :
+    {
+        KEEP (*(.fini))
+    }
+    _etext = . ;
+    PROVIDE (etext = .) ;
+    .rodata :
+    {
+        *(.rodata .rodata.* .gnu.linkonce.r.*)
+    }
+    . = ALIGN(4) ;
+    __idata_start = . ;
+    .data : AT(__idata_start) 
+    {
+        __data_start = . ;
+        *(.data)
+    }
+    .eh_frame : { KEEP (*(.eh_frame)) }
+    .gcc_except_table : { *(.gcc_except_table) }
+    .ctors :
+    {
+        KEEP (*crtbegin.o(.ctors))
+        KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
+        KEEP (*(SORT(.ctors.*)))
+        KEEP (*(.ctors))
+    }
+    .dtors :
+    {
+        KEEP (*crtbegin.o(.dtors))
+        KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
+        KEEP (*(SORT(.dtors.*)))
+        KEEP (*(.dtors))
+    }
+    __idata_end = __idata_start + SIZEOF(.data) ;
+    _edata  = . ;
+    PROVIDE (edata = .) ;
+    . = ALIGN(4) ;
+    __bss_start = . ;
+    .bss :
+    {
+        *(.bss)
+        *(COMMON)
+    }
+    _end = . ;
+    __bss_end = . ;
+    PROVIDE (end = .) ;
+    .comment        0 : { *(.comment) }
+    .debug          0 : { *(.debug) }
+    .line           0 : { *(.line) }
+    .debug_srcinfo  0 : { *(.debug_srcinfo) }
+    .debug_sfnames  0 : { *(.debug_sfnames) }
+    .debug_aranges  0 : { *(.debug_aranges) }
+    .debug_pubnames 0 : { *(.debug_pubnames) }
+}
Index: /atk1_sh2/trunk/config/sh2-gnu/start.S
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/start.S	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/start.S	(revision 4)
@@ -0,0 +1,180 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2001-2003 by Industrial Technology Institute,
+ *                              Miyagi Prefectural Government, JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *  J[lpÌX^[gAbvW
+[(SH2p)
+ */
+
+#define _MACRO_ONLY
+#include "cpu_config.h"
+#include "sys_defs.h"
+
+/*
+ *  ZNVè`ÌCN[h
+ */
+
+/*	OQÆé¾ */
+	.globl	hardware_init_hook
+	.globl	software_init_hook
+	.globl	_main
+
+	.section ".text" , "ax"
+	.align	2
+/*
+ *  ZbgãÍ±±©çvOJn
+ */
+	.globl _start
+_start:
+	/*
+	 *  SRÝè
+	 */
+	mov.l	maxipm , r0
+	ldc 	r0 , sr
+	
+	/*
+	 *  ÝX^bN|C^ú»
+	 */
+	mov.l	stack_init, r15
+	
+	/*
+	 *  èÝxN^æªÔnÝè
+	 */
+	mov.l	vbr_init, r0
+	ldc	r0 , vbr
+	
+	/*
+	 *  hardware_init_hook ÌÄoµi0 ÅÈ¢êj
+	 *
+	 *  ^[Qbgn[hEFAÉË¶µÄKvÈú»ª éê
+	 *  ÍChardware_init_hook Æ¢¤ÖðpÓ·éD
+	 */
+	mov.l	hardware_init_hook_adr , r1
+	tst		r1 , r1
+	bt		hardware_init_hook_r
+	jsr		@r1
+	nop
+hardware_init_hook_r:
+
+	/*
+	 *  bssÌæÌ[NA
+	 */
+	mov.l	_bss_start_adr , r0
+	mov.l	_bss_end_adr , r1
+	mov		#0 , r2
+bss_clear_loop:
+	cmp/ge	r1 , r0
+	bt		bss_clear_end
+	mov.l	r2 , @r0
+	add		#4 , r0
+	bra		bss_clear_loop
+bss_clear_end:
+	/*
+	 *  dataÌæÌú»
+	 */
+	mov.l   __idata_start_adr,r1
+	mov.l   __idata_end_adr,r2
+	cmp/eq  r1,r2
+	bt      data_init_end
+	mov.l   __data_start_adr,r0
+data_init:
+	mov.l   @r1+,r4
+	mov.l   r4,@r0
+	cmp/hi  r1,r2
+	add     #4,r0
+	bt      data_init
+data_init_end:
+	/*
+	 *  software_init_hook ðÄoµi0 ÅÈ¢êj
+	 *
+	 *  \tgEFAÂ«iÁÉCujÉË¶µÄKvÈú»
+	 *  ª éêÍCsoftware_init_hook Æ¢¤ÖðpÓ·êÎ
+	 *  æ¢D
+	 */
+	mov.l	software_init_hook_adr , r1
+	tst		r1 , r1
+	bt		software_init_hook_r
+	jsr		@r1
+	nop
+software_init_hook_r:
+	/*
+	 *  [U[CÖÖWv
+	*/
+	mov.l	main_adr , r0
+	jsr	@r0
+	nop
+exit_loop:
+	/*
+	 *  main©çßÁÄ«½êÍÀSÌ½ß³À[v
+	 */
+	bra	exit_loop
+	nop
+
+stack_init:
+	.long	STACK_TOP
+vbr_init:
+	.long	VECTOR_TOP
+hardware_init_hook_adr:
+	.long	_hardware_init_hook
+software_init_hook_adr:
+	.long	_software_init_hook
+_bss_start_adr:
+	.long	__bss_start
+_bss_end_adr:
+	.long	__bss_end
+main_adr:
+	.long	_main
+maxipm:
+	.long	0x000000f0
+	
+__idata_start_adr:
+	.long 	__idata_start
+__idata_end_adr:
+	.long   __idata_end
+__data_start_adr:
+	.long  	__data_start
+
+	.end
Index: /atk1_sh2/trunk/config/sh2-gnu/tool_config.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/tool_config.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/tool_config.h	(revision 4)
@@ -0,0 +1,121 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	J­Â«Ë¶W
+[(sh-hitachi-elf-gccp)
+ *
+ *  ±ÌCN[ht@CÍCt_config.h ÌÝ©çCN[h³êéD
+ *  ¼Ìt@C©ç¼ÚCN[hµÄÍÈçÈ¢D
+ */
+
+
+#ifndef _TOOL_CONFIG_H_
+#define _TOOL_CONFIG_H_
+
+/*
+ *  J­Â«Ë¶Ìú»ÍgpµÈ¢
+ */
+#define tool_initialize()
+
+/*
+ *  g[XOÌÝè
+ */
+
+#define LOG_ACTTSK_ENTER(tskid)
+#define LOG_ACTTSK_LEAVE(ercd)
+#define LOG_TERTSK_ENTER()
+#define LOG_TERTSK_LEAVE(ercd)
+#define LOG_CHNTSK_ENTER(tskid)
+#define LOG_CHNTSK_LEAVE(ercd)
+#define LOG_SCHED_ENTER()
+#define LOG_SCHED_LEAVE(ercd)
+#define LOG_GETTID_ENTER(p_tskid)
+#define LOG_GETTID_LEAVE(ercd, tskid)
+#define LOG_GETTST_ENTER(tskid, p_state)
+#define LOG_GETTST_LEAVE(ercd, state)
+#define LOG_DISINT_ENTER()
+#define LOG_DISINT_LEAVE()
+#define LOG_ENAINT_ENTER()
+#define LOG_ENAINT_LEAVE()
+#define LOG_SUSALL_ENTER()
+#define LOG_SUSALL_LEAVE()
+#define LOG_RSMALL_ENTER()
+#define LOG_RSMALL_LEAVE()
+#define LOG_SUSOSI_ENTER()
+#define LOG_SUSOSI_LEAVE()
+#define LOG_RSMOSI_ENTER()
+#define LOG_RSMOSI_LEAVE()
+#define LOG_GETRES_ENTER(resid)
+#define LOG_GETRES_LEAVE(ercd)
+#define LOG_RELRES_ENTER(resid)
+#define LOG_RELRES_LEAVE(ercd)
+#define LOG_SETEVT_ENTER(tskid, mask)
+#define LOG_SETEVT_LEAVE(ercd)
+#define LOG_CLREVT_ENTER(mask)
+#define LOG_CLREVT_LEAVE(ercd)
+#define LOG_GETEVT_ENTER(tskid, p_mask)
+#define LOG_GETEVT_LEAVE(ercd, mask)
+#define LOG_WAIEVT_ENTER(mask)
+#define LOG_WAIEVT_LEAVE(ercd)
+#define LOG_GETALB_ENTER(almid, info)
+#define LOG_GETALB_LEAVE(ercd)
+#define LOG_GETALM_ENTER(almid, p_tick)
+#define LOG_GETALM_LEAVE(ercd)
+#define LOG_SETREL_ENTER(almid, incr, cycle)
+#define LOG_SETREL_LEAVE(ercd)
+#define LOG_SETABS_ENTER(almid, start, cycle)
+#define LOG_SETABS_LEAVE(ercd)
+#define LOG_CANALM_ENTER(almid)
+#define LOG_CANALM_LEAVE(ercd)
+#define LOG_SIGCNT_ENTER(cntid)
+#define LOG_SIGCNT_LEAVE(ercd)
+#define LOG_GETAAM_ENTER()
+#define LOG_GETAAM_LEAVE(mode)
+#define LOG_STAOS_ENTER(mode)
+#define LOG_STAOS_LEAVE()
+#define LOG_STUTOS_ENTER(ercd)
+#define LOG_STUTOS_LEAVE()
+
+#endif /* _TOOL_CONFIG_H_ */
Index: /atk1_sh2/trunk/config/sh2-gnu/tool_defs.h
===================================================================
--- /atk1_sh2/trunk/config/sh2-gnu/tool_defs.h	(revision 4)
+++ /atk1_sh2/trunk/config/sh2-gnu/tool_defs.h	(revision 4)
@@ -0,0 +1,76 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	J­Â«ÉË¶·éè`(sh-hitachi-elf-gccp)
+ *
+ *  ±ÌCN[ht@CÍCt_stddef.h ÌæªÅCN[h³êéD
+ *  ¼Ìt@C©çÍ¼ÚCN[h·é±ÆÍÈ¢D¼ÌCN[h
+ *  t@CÉæ§ÁÄ³êé½ßC¼ÌCN[ht@CÉË¶µ
+ *  ÄÍÈçÈ¢D
+ */
+
+
+#ifndef _TOOL_DEFS_H_
+#define _TOOL_DEFS_H_
+
+/*
+ *  RpCË¶Ìf[^^Ìè`
+ */
+#define	_int8_		char		/* 8rbgÌ®^ */
+#define	_int16_		short		/* 16rbgÌ®^ */
+#define	_int32_		long		/* 32rbgÌ®^ */
+#define _int64_		long long	/* 64rbgÌ®^ */
+
+#define _bool_		_Bool	/* u[^ */
+
+/*
+ *  RpCÌg£@\Ì½ßÌ}Nè`
+ */
+#define	Inline		static inline
+
+#define	asm		__asm__
+#define	Asm		__asm__ volatile
+
+#endif /* _TOOL_DEFS_H_ */
Index: /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.c
===================================================================
--- /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.c	(revision 4)
+++ /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.c	(revision 4)
@@ -0,0 +1,190 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	Tvü¯^[QbgË¶VAIOW
+[iCQ7144Apj
+ */
+
+/*
+ *	{îÂÍUART1ðAISP(In system programming)ÆVAÊMÅp·éD
+ *	±Ì½ßA{W
+[ÉÂ¢ÄàUART1ðVAIOÉgp·éD
+ */
+
+#include	"hw_serial.h"
+#include	"sh7144.h"
+
+
+/*
+ *  VAIOW
+[ú»
+ *
+ *  ÝÖ~óÔÅÄo·±ÆD
+ */
+void
+InitHwSerial( void )
+{
+	/*
+	 *  SCI1W
+[X^oCð
+	 */
+	MSTCR1 &= (UINT16)~0x0002;		/* SCI_1Lø */
+
+	/*
+	 *  óMðÖ~µÄeWX^Ýè
+	 */
+	SCR1 = (UINT8)0x00;				/* óMÖ~(SCK[q0,1Æà³) */
+
+	/*
+	 *  àNbNgp, ²à¯úÊM, 8rbgf[^, 1Xgbvrbg,
+	 *  peBÈµ, }`vZbT³ø, PªüNbN
+	 */
+	SMR1 = (UINT8)0x00;
+
+	/*
+	 *  {[[gÝèiÝèlÍwb_QÆj
+	 */
+	BRR1 = CFG_BRR_SERIAL;
+
+	/*
+	 *  óMÝxÝèiÝèxÍwb_QÆj
+	 *  SSR Ì RDRF ªÝvtO¾ªAúl0Ì½ßìµÈ¢D
+	 *
+	 *  MÝÍgpµÈ¢D
+	 */
+	IPRF = (UINT16) ((IPRF & ~0xF) | CFG_INTLVL_SERIAL_RX1);
+	SCR1 |= (UINT8)0x40;
+
+	/*
+	 *  IO|[gðVA|[gÉÏX
+	 */
+	PACRL2 |= (UINT16)0x0140;		/* PA4ð TXD1 oÍÉ, PA3ð RXD üÍÉ */
+
+	/*
+	 *  óMðÂ
+	 */
+	SCR1 |= (UINT8)0x30;			/* óMÂ */
+
+}	/* InitHwSerial	*/
+
+
+/*
+ *  VAIOW
+[â~
+ *
+ *  ÝÖ~óÔÅÄo·±ÆD
+ *  ãÊÅoÍª®¹µÄ¢é±ÆðÛá·é±ÆD
+ */
+void
+TermHwSerial( void )
+{
+	/*
+	 *  óM¨æÑóMÝÖ~
+	 */
+	SCR1 = (UINT8)0x0;			/* óMÖ~(SCK[q0,1Æà³) */
+	SSR1 = (UINT8)0x0;			/* Xe[^Xú» */
+
+	/*
+	 *  VAÝxÅá»
+	 */
+	IPRF &= (UINT16)(~(0xF << 12));
+
+	/*
+	 *  SCI1W
+[X^oC
+	 */
+	MSTCR1 &= (UINT16)~0x0002;	/* SCI_1³ø */
+
+}	/* TermHwSerial	*/
+
+
+/*
+ *  VAIOW
+[óMG[ÝT[rX[`
+ */
+#if defined( OMIT_ISR1_ENTRY )
+/* ISR1üèû¢¶¬Í{ÖðÝÖwè·é	*/
+#pragma interrupt	ErrHwSerialInt
+#endif	/* OMIT_ISR1_ENTRY */
+void ErrHwSerialInt( void );
+void ErrHwSerialInt( void )
+{
+	SSR1 &= (UINT8)~0x38;
+}
+
+
+/*
+ *  VAIOW
+[óMÝT[rX[`
+ */
+#if defined( OMIT_ISR1_ENTRY )
+/* ISR1üèû¢¶¬Í{ÖðÝÖwè·é	*/
+#pragma interrupt	RxHwSerialInt
+#endif	/* OMIT_ISR1_ENTRY	*/
+void RxHwSerialInt( void );
+void RxHwSerialInt( void )
+{
+	UINT8	rx_data;	/* f[^óMobt@	*/
+
+	/*
+	 *  I[oh~Ì½ßÜ¸ÇÞ
+	 */
+	rx_data = RDR1;
+
+	/*
+	 * ÝvðNA
+	 */
+	SSR1 &= ~0x40;
+
+	/*
+	 *  ³íóMÍR[obNÀs
+	 *  G[ÍG[A
+	 */
+	if( ( SSR1 & (UINT8)0x38 ) == 0x0 ){
+		RxSerialInt( rx_data );
+	}
+	else{
+		SSR1 &= (UINT8)~0x38;
+	}
+
+}	/* RxHwSerialInt	*/
+
+
Index: /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.h
===================================================================
--- /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.h	(revision 4)
+++ /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.h	(revision 4)
@@ -0,0 +1,126 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	Tvü¯^[QbgË¶VAIOW
+[iCQ7144Apj
+ */
+
+/*
+ *	{îÂÍUART1ðAISP(In system programming)ÆVAÊMÅp·éD
+ *	±Ì½ßA{W
+[ÉÂ¢ÄàUART1ðVAIOÉgp·éD
+ */
+
+#if !defined( _HW_SERIAL_H_ )
+#define _HW_SERIAL_H_
+
+
+#include	"kernel.h"
+#include	"sh7144.h"
+
+
+/*
+ *  VA|[gÌÝxè`
+ */
+#define	CFG_INTLVL_SERIAL_RX1	(UINT16)( 0x6 )	/* VAóM */
+
+/*
+ *  VA|[gÌ{[[gè`
+ *
+ *  CFG_BRR_SERIAL Ìè`ÏXÅ{[[gðÏXÂ\
+ */
+#define	BRR_SERIAL_9600		(UINT8)( 77 )	/* 750000/{BRR+1} =  9615	*/
+#define	BRR_SERIAL_19200	(UINT8)( 38 )	/* 750000/{BRR+1} = 19230	*/
+#define	BRR_SERIAL_38400	(UINT8)( 19 )	/* 750000/{BRR+1} = 37500	*/
+#define	BRR_SERIAL_57600	(UINT8)( 12 )	/* 750000/{BRR+1} = 57692	*/
+#define	CFG_BRR_SERIAL		BRR_SERIAL_57600
+
+
+#if !defined( _MACRO_ONLY )
+
+/*
+ *  VXeOoÍW
+[ú»Övg^Cvé¾
+ */
+extern void	InitHwSerial( void );
+
+/*
+ *  VXeOoÍW
+[â~Övg^Cvé¾
+ */
+extern void	TermHwSerial( void );
+
+/*
+ *  ÄÑwµReLXgÅÌ¶MÖvg^Cvé¾
+ */
+Inline void	PutHwChar( UINT8 character );
+
+/*
+ *  R[obNÖOQÆ
+ */
+extern void	RxSerialInt( UINT8 character );
+
+/*
+ *  ÄÑwµReLXgÅÌ¶MD
+ *
+ *  {ÖÍÝÖ~óÔÅÄÑo·±ÆD
+ *  üsR[hÈÇÌ§äR[hàv¤Ås¤±ÆD
+ */
+Inline void
+PutHwChar( UINT8 character )
+{
+	/* Mobt@ªóÉÈéÜÅÒÂ	*/
+	while( (SSR1 & (UINT8)0x80) == 0 ){
+	}
+
+	/* P¶«Ý */
+	TDR1 = character;
+
+	/* MÆ·é */
+	SSR1 &= (UINT8)~0x80;
+
+}	/* PutHwChar	*/
+
+#endif /* _MACRO_ONLY */
+
+
+#endif /* _HW_SERIAL_H_ */
+
Index: /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.oil
===================================================================
--- /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.oil	(revision 4)
+++ /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_serial.oil	(revision 4)
@@ -0,0 +1,13 @@
+	/* VAIOG[Ý(SCI1)	*/
+	ISR ErrHwSerialInt {
+		CATEGORY = 1;
+		ENTRY = 132;
+		PRIORITY = 6;
+	};
+
+	/* VAIOóMÝ(SCI1)	*/
+	ISR RxHwSerialInt {
+		CATEGORY = 1;
+		ENTRY = 133;
+		PRIORITY = 6;
+	};
Index: /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.c
===================================================================
--- /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.c	(revision 4)
+++ /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.c	(revision 4)
@@ -0,0 +1,109 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	Tvü¯^[QbgË¶VXe^C}W
+[iCQ7144Apj
+ */
+
+
+#include	"hw_sys_timer.h"
+
+
+/*
+ *  VXe^C}ÌN®
+ *
+ *  ÝÖ~óÔÅÄo·±ÆD
+ */
+void
+InitHwSysTimer( void )
+{
+	/*
+	 *  CMTW
+[X^oCð
+	 */
+	MSTCR2 &= (UINT16)~0x1000;		/* CMTLø */
+	
+	/*
+	 *  RyA}b`^C}ðâ~µÄeWX^Ýè
+	 *  RyA}b`^C}0ðgp·éD
+	 */
+	CMSTR &= (UINT16)~0x0001;		/* JEgâ~ */
+
+	/*
+	 *  ªüä üÓNbN 1/8, èÝÖ~
+	 *  CMCSR Ì bit7 ªÝvtOÅ èC¯ÉNAµÄ¢éD
+	 */
+	CMCSR_0 = (UINT16)0x0000;
+
+	/*
+	 *  Ry}b`JE^ÚWlÝè
+	 */
+	CMCOR_0 = CFG_SYSCLK;
+
+	/*
+	 *  ^C}RyAÝxÝèiÝèxÍwb_QÆj
+	 */
+	IPRG = (UINT16)((IPRG & ~(0xFu << 4)) | (CFG_INTLVL_SYSCLK << 4));
+
+	/*
+	 *  JE^NAÆÝÂ
+	 */
+	CMCNT_0 = (UINT16)0x0000;		/* JEgNA */
+	CMCSR_0 |= (UINT16)0x0040;		/* RyA}b`ÝÂ */
+
+	CMSTR |= (UINT16)0x0001;		/* JEgJn */
+
+}	/* InitHwSysTimer	*/
+
+
+/*
+ *  VXe^C}Ìâ~
+ *
+ *  ÝÖ~óÔÅÄo·±ÆD
+ */
+void
+TermHwSysTimer( void )
+{
+	CMSTR &= (UINT16)~0x0001;		/* JEgâ~ */
+	CMCSR_0 = (UINT16)0x0000;		/* @\ú» */
+}	/* TermHwSysTimer	*/
+
+
Index: /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.h
===================================================================
--- /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.h	(revision 4)
+++ /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.h	(revision 4)
@@ -0,0 +1,98 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	Tvü¯^[QbgË¶VXe^C}W
+[iCQ7144Apj
+ */
+
+#if !defined( _HW_SYS_TIMER_H_ )
+#define _HW_SYS_TIMER_H_
+
+
+#include	"kernel.h"
+#include	"sh7144.h"
+
+
+/*
+ *  VXe^C}ÌÝxè`
+ */
+#define CFG_INTLVL_SYSCLK	(UINT16)( 0x0004 )
+
+/*
+ *  VXe^C}ÌRyAli1msj
+ */
+#define	CFG_SYSCLK		(UINT16)( 3000 )
+
+#if !defined( _MACRO_ONLY )
+/*
+ *  VXe^C}ÌN®Övg^Cvé¾
+ */
+extern void InitHwSysTimer( void );
+
+/*
+ *  VXe^C}Ìâ~Övg^Cvé¾
+ */
+extern void TermHwSysTimer( void );
+
+/*
+ *  VXe^C}ÌÝvNAÖvg^Cvé¾
+ */
+Inline void	ClearHwSysTimerInt( void );
+
+/*
+ *  VXe^C}ÌÝvNA
+ *
+ *  Ý­¶É©®IÉNA³êéªCÝÈO©ç
+ *  Às³êé±ÆàzèµCºLðÀ·éD
+ */
+Inline void
+ClearHwSysTimerInt( void )
+{
+	CMCSR_0 &= ~0x0080;		/* ÝvNA */
+}	/* ClearHwSysTimerInt	*/
+
+#endif /* _MACRO_ONLY */
+
+
+#endif /* _HW_SYS_TIMER_H_ */
+
Index: /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.oil
===================================================================
--- /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.oil	(revision 4)
+++ /atk1_sh2/trunk/syslib/sh2-gnu/cq7144a/hw_sys_timer.oil	(revision 4)
@@ -0,0 +1,8 @@
+	/* VXe^C}Ý	*/
+	ISR SysTimerInt {
+		CATEGORY = 2;
+		ENTRY = 144;
+		PRIORITY = 4;
+	};
+
+
Index: /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/Makefile
===================================================================
--- /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/Makefile	(revision 4)
+++ /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/Makefile	(revision 4)
@@ -0,0 +1,378 @@
+#
+#  TOPPERS/OSEK Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      OSEK Kernel
+# 
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+#  Copyright (C) 2010 by Meika Sugimoto
+# 
+#  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+#  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+#  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+#  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+#  pÆÄÔj·é±Æð³Åø·éD
+#  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+#       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+#      XR[hÉÜÜêÄ¢é±ÆD
+#  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+#      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+#      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+#      Ì³ÛØKèðfÚ·é±ÆD
+#  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+#      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+#      ÆD
+#    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+#        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+#    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+#        ñ·é±ÆD
+#  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+#      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+# 
+#  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+#  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+#  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+#  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+#
+#
+
+all:
+#
+#  ^[Qbg¼Ìè`
+#
+CPU = sh2-gnu
+SYS = cq7144a
+
+#
+#  RtH[}XNXÌè`
+#
+
+CONFCLASS = ecc2
+
+#
+#  \[Xt@CÌgbvfBNgÌè`
+#
+TOPDIR = ../../..
+
+#
+#  oÍt@CÌfBNgÌè`
+#
+OUTDIR = ./output
+
+#
+#  RtBM
+[Vt@CÌüsR[hÏ·c[è`
+#
+#  SystemGeneratorÉæèoÍ³êéRtBO[Vt@CÌ
+#  üsR[hÍCR+LFÆÈÁÄ¢é½ßA
+#  LFÉÏ··éc[¼EpX¼EIvVðè`·éB
+#  gp·éc[ÍCÓBÈºÍQlgpá
+#
+#CHANGELINE_TOOL = nkf.exe
+#CHANGELINE_TOOL_PATH = 
+#CHANGELINE_TOOL_OPTION = -d
+
+#
+#  ^[QbgË¶Ìè`ÌCN[h
+#
+include $(TOPDIR)/config/$(CPU)/$(SYS)/Makefile.config
+include $(TOPDIR)/config/$(CPU)/Makefile.config
+
+#
+#  ¤ÊRpCIvVÌè`
+#
+COPTS := $(COPTS)
+CDEFS := $(CDEFS)
+INCLUDES := -I. -I$(TOPDIR)/include $(INCLUDES) \
+			-I$(TOPDIR)/syslib -I$(TOPDIR)/syslib/$(CPU)/$(SYS)
+LDFLAGS := -nostdlib -lgcc $(LDFLAGS)
+LIBS := $(LIBS)
+CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+
+#
+#  AvP[VvOÉÖ·éè`
+#
+UNAME = sample1_ecc2
+UTASK_DIR := $(UTASK_DIR):$(TOPDIR)/sample
+UTASK_ASMOBJS =
+UTASK_COBJS = $(UNAME).o sample1_log_ecc2.o
+UTASK_CFLAGS =
+UTASK_LIBS =
+
+#
+#  VXeT[rXÉÖ·éè`
+#  i»ÝVXeT[rXÉÖ·éè`Í¶ÝµÈ¢ªA«ÌÇÁÌ½ßõµÄ éj
+#
+STASK_DIR := $(STASK_DIR)
+STASK_ASMOBJS := $(STASK_ASMOBJS)
+STASK_COBJS := $(STASK_COBJS)
+STASK_CFLAGS := $(STASK_CFLAGS)
+STASK_LIBS := $(STASK_LIBS)
+
+#
+#  J[lÉÖ·éè`
+#
+#  KERNEL_ASMOBJS: J[lCuÉÜßéC\[XªAZu¾êÌ
+#		   IuWFNgt@CD
+#  KERNEL_COBJS: J[lÌCuÉÜßéC\[XªC¾êÅC\[X
+#		 t@CÆ1Î1ÉÎ·éIuWFNgt@CD
+KERNEL = $(TOPDIR)/kernel
+KERNEL_DIR := $(KERNEL_DIR):$(KERNEL):$(KERNEL)/$(CONFCLASS)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := alarm.o event.o interrupt.o osctl.o resource.o \
+				task.o task_manage.o $(KERNEL_COBJS)
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(KERNEL) -I$(KERNEL)/$(CONFCLASS)
+
+#
+#  VXeCuÉÖ·éè`
+#
+SYSLIB_DIR := $(SYSLIB_DIR):$(TOPDIR)/syslib:$(TOPDIR)/syslib/$(CPU)/$(SYS)
+SYSLIB_ASMOBJS =
+SYSLIB_COBJS := $(SYSLIB_COBJS) serial.o sys_timer.o
+SYSLIB_CFLAGS =
+SYSLIB_LIBS =
+
+#
+#  VXeCuË¶ÉÖ·éè`
+#
+SYSLIB_DIR := $(SYSLIB_DIR):$(TOPDIR)/syslib/$(CPU)/$(SYS)
+SYSLIB_ASMOBJS =
+SYSLIB_COBJS := $(SYSLIB_COBJS) hw_serial.o hw_sys_timer.o sample_config.o
+SYSLIB_CFLAGS =
+SYSLIB_LIBS =
+
+#
+#  IuWFNgt@C¼Ìg£qÌÝè
+#
+OBJEXT = elf
+
+#
+#  IuWFNgt@C¼Ìè`
+#
+OBJNAME = toppers_osek_$(SYS)
+ifdef OBJEXT
+    OBJFILE = $(OUTDIR)/$(OBJNAME).$(OBJEXT)
+else
+    OBJFILE = $(OUTDIR)/$(OBJNAME)
+endif
+
+#
+#  ^[Qbgt@Ci¡ð¯ÉIðµÄÍÈçÈ¢j
+#
+all: $(OBJNAME).mot
+
+
+##### ÈºÍÒWµÈ¢±Æ #####
+
+#
+#  \[Xt@CÌ éfBNgÉÖ·éè`
+#
+vpath %.c $(KERNEL_DIR):$(STASK_DIR):$(UTASK_DIR):$(SYSLIB_DIR)
+vpath %.S $(KERNEL_DIR):$(STASK_DIR):$(UTASK_DIR):$(SYSLIB_DIR)
+
+#
+#  IuWFNgt@CÌ éfBNgÉÖ·éè`
+#
+vpath %.o $(OUTDIR)
+
+#
+#  RpCÌ½ßÌÏÌè`
+#
+START_OBJS  = $(START_ASMOBJS)
+KERNEL_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS)
+STASK_OBJS  = $(STASK_ASMOBJS) $(STASK_COBJS)
+UTASK_OBJS  = $(UTASK_ASMOBJS) $(UTASK_COBJS)
+SYSLIB_OBJS = $(SYSLIB_ASMOBJS) $(SYSLIB_COBJS)
+
+ALL_OBJS  = $(START_OBJS) kernel_cfg.o $(KERNEL_OBJS) $(UTASK_OBJS) $(STASK_OBJS) $(SYSLIB_OBJS)
+
+ifdef LDSCRIPT
+	LDFLAGS := $(LDFLAGS) -T $(TOPDIR)/config/$(LDSCRIPT)
+endif
+
+#
+#  SÌÌN
+#
+$(OBJFILE): $(ALL_OBJS)
+	$(LINK) $(CFLAGS) -Wl,-Map,$(OUTDIR)/$(OBJNAME).map -o $(OBJFILE) $(addprefix $(OUTDIR)/, $(ALL_OBJS)) $(LDFLAGS)
+	$(NM) $(OBJFILE) > $(OUTDIR)/$(OBJNAME).syms
+
+#
+#  MOTt@CÌ¶¬iSR[ht@CÆ¯êj
+#
+$(OBJNAME).mot: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OUTDIR)/$(OBJNAME).mot
+
+
+#
+#  RpCÊÌÁ
+#
+clean:
+	rm -f \#* *~ $(OUTDIR)/*.o tmpfile?
+	rm -f $(OUTDIR)/$(OBJNAME).map
+	rm -f $(OUTDIR)/$(OBJNAME)
+	rm -f $(OUTDIR)/$(OBJNAME).syms $(OUTDIR)/$(OBJNAME).mot
+	rm -f $(OUTDIR)/$(OBJNAME).elf
+	rm -f implementation.oil
+	rm -f kernel_cfg.c kernel_id.h
+
+cleandep:
+	rm -f Makefile.depend
+
+realclean: cleandep clean
+
+#
+#  J[lÌRtBM
+[Vt@CÌ¶¬
+#
+kernel_cfg.c kernel_id.h: $(UNAME).oil
+	$(TOPDIR)/sg/sg.exe $(UNAME).oil -I$(TOPDIR)/sg/impl_oil		\
+	-I$(TOPDIR)/syslib/$(CPU)/$(SYS) -I$(TOPDIR)/syslib -os=ECC2	\
+	-template=$(TOPDIR)/config/$(CPU)/$(SYS)/$(TEMPLATE).sgt
+
+#
+#  RtBM
+[Vt@CÌüsR[hÏ·
+#  ãLSystemGeneratorÉæèoÍ³êéRtBO[Vt@CÌ
+#  üsR[hÍCR+LFÆÈÁÄ¢é½ßALFÉÏ··éB
+#
+ifdef CHANGELINE_TOOL
+	@echo "kernel_cfg.c/kernel_id.h Change Line CR+LF -> LF!!"
+	$(CHANGELINE_TOOL_PATH)/$(CHANGELINE_TOOL) $(CHANGELINE_TOOL_OPTION) kernel_cfg.c
+	$(CHANGELINE_TOOL_PATH)/$(CHANGELINE_TOOL) $(CHANGELINE_TOOL_OPTION) kernel_id.h
+endif
+
+#
+#  kernel_cfg.c ÌRpC[
+#
+#  kernel_cfg.c ÍCAvP[VvOpCVXeT[rXpC
+#  J[lpÌ·×ÄÌIvVðt¯ÄRpC·éD
+#
+KERNEL_CFG_CFLAGS = $(UTASK_CFLAGS) $(STASK_CFLAGS) $(KERNEL_CFLAGS) $(SYSLIB_CFLAGS)
+
+kernel_cfg.o: kernel_cfg.c
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/kernel_cfg.o $(KERNEL_CFG_CFLAGS) $<
+
+kernel_cfg.d: kernel_cfg.c
+	$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(KERNEL_CFG_CFLAGS)" $< >> Makefile.depend
+
+#
+#  Ë¶ÖWt@CÌ¶¬
+#
+gendepend:
+	@echo "Generating Makefile.depend."
+
+depend: cleandep gendepend $(ALL_OBJS:.o=.d)
+
+#
+#  Ë¶ÖWt@CðCN[h
+#
+-include Makefile.depend
+
+#
+#  J­c[ÌR}h¼Ìè`
+#
+#
+#  GNUJ­Â«p
+#
+TARGET_PREFIX = $(TARGET)-
+
+CC = $(TARGET_PREFIX)gcc
+CXX = $(TARGET_PREFIX)g++
+AS = $(TARGET_PREFIX)as
+LD = $(TARGET_PREFIX)ld
+AR = $(TARGET_PREFIX)ar
+NM = $(TARGET_PREFIX)nm
+RANLIB = $(TARGET_PREFIX)ranlib
+OBJCOPY = $(TARGET_PREFIX)objcopy
+OBJDUMP = $(TARGET_PREFIX)objdump
+
+LINK = $(CC)
+
+PERL = perl
+
+#
+#  RpC[Ìè`
+#
+$(KERNEL_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/$(patsubst %.c,%.o,$(notdir $<)) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/$(patsubst %.S,%.o,$(notdir $<)) $(KERNEL_CFLAGS) $<
+
+$(STASK_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/$(patsubst %.c,%.o,$(notdir $<)) $(STASK_CFLAGS) $<
+
+$(STASK_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/$(patsubst %.S,%.o,$(notdir $<)) $(STASK_CFLAGS) $<
+
+$(UTASK_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/$(patsubst %.c,%.o,$(notdir $<)) $(UTASK_CFLAGS) $<
+
+$(UTASK_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/$(patsubst %.S,%.o,$(notdir $<))) $(UTASK_CFLAGS) $<
+
+$(SYSLIB_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/$(patsubst %.c,%.o,$(notdir $<)) $(SYSLIB_CFLAGS) $<
+
+$(SYSLIB_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) -o $(OUTDIR)/$(patsubst %.S,%.o,$(notdir $<)) $(SYSLIB_CFLAGS) $<
+
+#
+#  Ë¶ÖWì¬[Ìè`
+#
+$(KERNEL_COBJS:.o=.d): %.d: %.c
+	@$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(KERNEL_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(STASK_COBJS:.o=.d): %.d: %.c
+	@$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(STASK_CFLAGS)" $< >> Makefile.depend
+
+$(STASK_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(STASK_CFLAGS)" $< >> Makefile.depend
+
+$(UTASK_COBJS:.o=.d): %.d: %.c
+	@$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(UTASK_CFLAGS)" $< >> Makefile.depend
+
+$(UTASK_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(UTASK_CFLAGS)" $< >> Makefile.depend
+
+$(SYSLIB_COBJS:.o=.d): %.d: %.c
+	@$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(SYSLIB_CFLAGS)" $< >> Makefile.depend
+
+$(SYSLIB_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) makedep -C $(CC) \
+		-O "$(CFLAGS) $(SYSLIB_CFLAGS)" $< >> Makefile.depend
+
+#
+#  ftHgRpC[ðã«
+#
+%.o: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c $(CFLAGS) $<
+
+%.s: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -S $(CFLAGS) $<
+
+%.o: %.S
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c $(CFLAGS) $<
+
+test:
+	@echo $(INCLUDES)
Index: /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/makedep
===================================================================
--- /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/makedep	(revision 4)
+++ /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/makedep	(revision 4)
@@ -0,0 +1,149 @@
+#! /usr/bin/perl 
+#
+#  TOPPERS/OSEK Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      OSEK Kernel
+# 
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2004-2006 by Witz Corporation, JAPAN
+# 
+#  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+#  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+#  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+#  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+#  pÆÄÔj·é±Æð³Åø·éD
+#  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+#       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+#      XR[hÉÜÜêÄ¢é±ÆD
+#  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+#      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+#      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+#      Ì³ÛØKèðfÚ·é±ÆD
+#  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+#      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+#      ÆD
+#    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+#        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+#    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+#        ñ·é±ÆD
+#  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+#      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+# 
+#  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+#  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+#  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+#  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+# 
+# 
+
+require "getopt.pl";
+
+#  IvVÌè`
+#
+#  -C <cc_path>	CRpCÌR}h¼
+#  -O <cc_opts>	CRpC/CPPÉn·IvV
+#
+#  -X		\[Xt@Cð­§IÉCwb_t@CÆ©È·
+#
+#  -T <target>	^[QbgÌt@C¼
+#  -D <t_dir>	^[QbgÌfBNg¼ðwè·é
+#  -d		^[QbgÌfBNgðÛ·é
+#  -s		^[QbgÌTtBbNXð ".s" É·éiftHgÍ ".o"j
+
+#
+#  IvVÌ
+#
+do Getopt("COTD");
+
+$cc_path = $opt_C;
+$cc_opts = $opt_O;
+
+$suffix = $opt_s ? "s" : "o";
+if ($opt_T) {
+	$target_file = $opt_T;
+}
+elsif ($opt_D) {
+	$target_dir = $opt_D;
+}
+elsif (!$opt_d) {
+	$target_dir = "";
+}
+
+#
+#  %dependlist Éìçê½Ë¶ÖWðoÍ·é
+#
+sub output_dependlist {
+	local($file) = @_;
+	local($target, $column, $len);
+
+	if ($target_file) {
+		$target = $target_file;
+	}
+	else {
+		$target = $file;
+		$target =~ s/(.*)\.(.)/$1.$suffix/;
+	}	
+	if (defined($target_dir)) {
+		$target =~ s/^.*\/([^\/]+)$/$1/;
+		if ($target_dir) {
+			$target = $target_dir."/".$target;
+		}
+	}
+	print $target, ": ";
+	$column = length($target) + 2;
+    
+	foreach $file (keys(%dependlist)) {
+		$len = length($file) + 1;
+		if ($column > 8 && $column + $len >= 70) {
+			print "\\\n\t";
+			$column = 8;
+		}
+		$column += $len;
+		print "$file ";
+	}
+	print "\n";
+}
+
+#
+#  $file ÌË¶ÖWð %dependlist Éìé
+#
+sub makedepend_one {
+	local($file) = @_;
+	local($command, $input, $dir, $filename);
+
+	$command = "$cc_path -E $cc_opts";
+	if ($opt_X) {
+		$command .= " -x c-header";
+	}
+	unless (open(INPUT, "$command $file |")) {
+		print STDERR "makedep: can't open $file\n";
+		exit(1);
+	}
+	while ($line = <INPUT>) {
+		if ($line =~ /^\#\s*([0-9]+)\s*\"([^\"]+)\"/) {
+			$filename = $2;
+			$filename =~ s/ /\\ /;
+			if ($filename !~ /^\<.*\>$/ && $filename !~ /\/$/) {
+				$dependlist{$filename} = 1;
+			}
+		}
+	}
+	unless (close(INPUT)) {
+		print STDERR "makedep: can't execute $command\n";
+		exit(1);
+	}
+}
+
+#
+#  C[`
+#
+foreach $file (@ARGV) {
+	%dependlist = ();
+	do makedepend_one($file);
+	do output_dependlist($file) if (%dependlist);
+}
Index: /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample1_ecc2.oil
===================================================================
--- /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample1_ecc2.oil	(revision 4)
+++ /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample1_ecc2.oil	(revision 4)
@@ -0,0 +1,281 @@
+/*
+ *  TvvO(1)ÌOILt@CD
+ */
+
+/*
+ *  è`ÌCN[h
+ */
+#include "implementation.oil"
+
+/*
+ *  À
+ */
+CPU current {
+/* syslibÌVA@\ðgp·é */
+#include <serial.oil>
+
+/* syslibÌVXe^C}@\ðgp·é */
+#include <sys_timer.oil>
+
+	/*
+	 *  OSè`
+	 */
+	OS os {
+		STATUS = EXTENDED;
+		STARTUPHOOK = TRUE;
+		ERRORHOOK = TRUE;
+		SHUTDOWNHOOK = TRUE;
+		PRETASKHOOK = FALSE;
+		POSTTASKHOOK = FALSE;
+		USEGETSERVICEID = TRUE;
+		USEPARAMETERACCESS = TRUE;
+		USERESSCHEDULER = TRUE;
+	};
+
+	/*
+	 *  AvP[V[hè`
+	 */
+	APPMODE AppMode1 {};	/* ÀñÀs^XN©®N®Èµ	*/
+	APPMODE AppMode2 {};	/* ^XN1©®N®[h		*/
+	APPMODE AppMode3 {};	/* ^XN3©®N®[h		*/
+
+	/*
+	 *  ^XNè`
+	 */
+	/* C^XN	*/
+	TASK MainTask {
+		AUTOSTART = TRUE {
+			APPMODE = AppMode1;
+			APPMODE = AppMode2;
+			APPMODE = AppMode3;
+		};
+		PRIORITY = 14;
+		STACKSIZE = 0x0400;
+		ACTIVATION = 1;
+		SCHEDULE = NON;
+		EVENT = MainEvt;
+		EVENT = TestEvt;
+	};
+
+	/* ÅDæx^XN	*/
+	TASK HighPriorityTask {
+		AUTOSTART = FALSE;
+		PRIORITY = 15;
+		STACKSIZE = 0x00C0;
+		ACTIVATION = 1;
+		SCHEDULE = FULL;
+	};
+
+	/* mvGveBu^XN	*/
+	TASK NonPriTask {
+		AUTOSTART = FALSE;
+		PRIORITY = 1;
+		STACKSIZE = 0x0100;
+		ACTIVATION = 8;
+		SCHEDULE = NON;
+	};
+
+	/* ÀñÀs^XN1	*/
+	TASK Task1 {
+		AUTOSTART = TRUE {
+			APPMODE = AppMode2;
+		};
+		PRIORITY = 4;
+		STACKSIZE = 0x0100;
+		ACTIVATION = 8;
+		SCHEDULE = FULL;
+		RESOURCE = TskLevelRes;
+		RESOURCE = IntLevelRes;
+	};
+
+	/* ÀñÀs^XN2	*/
+	TASK Task2 {
+		AUTOSTART = FALSE;
+		PRIORITY = 7;
+		STACKSIZE = 0x0100;
+		ACTIVATION = 1;
+		SCHEDULE = FULL;
+		RESOURCE = TskLevelRes;
+		RESOURCE = IntLevelRes;
+		EVENT = T2Evt;
+	};
+
+	/* ÀñÀs^XN3	*/
+	TASK Task3 {
+		AUTOSTART = TRUE {
+			APPMODE = AppMode3;
+		};
+		PRIORITY = 12;
+		STACKSIZE = 0x0100;
+		ACTIVATION = 1;
+		SCHEDULE = FULL;
+		RESOURCE = IntLevelRes;
+		EVENT = T3Evt;
+	};
+
+	/* ÀñÀs^XN4	*/
+	TASK Task4 {
+		AUTOSTART = FALSE;
+		PRIORITY = 6;
+		STACKSIZE = 0x0100;
+		ACTIVATION = 5;
+		SCHEDULE = FULL;
+		RESOURCE = GroupRes;
+		RESOURCE = TskLevelRes;
+		RESOURCE = IntLevelRes;
+	};
+
+	/* ÀñÀs^XN5	*/
+	TASK Task5 {
+		AUTOSTART = FALSE;
+		PRIORITY = 9;
+		STACKSIZE = 0x0100;
+		ACTIVATION = 5;
+		SCHEDULE = FULL;
+		RESOURCE = GroupRes;
+		RESOURCE = TskLevelRes;
+		RESOURCE = IntLevelRes;
+	};
+
+	/*
+	 *  ÝT[rX[`è`
+	 */
+
+	/* HWJE^Ý1	*/
+	ISR HwCnt1Int {
+		CATEGORY = 1;
+		ENTRY = 96;
+		PRIORITY = 5;
+	};
+	
+	/* TvJE^\[XÝ	*/
+	ISR CounterInt {
+		CATEGORY = 2;
+		ENTRY = 148;
+		PRIORITY = 3;
+	};
+
+	/* HWJE^Ý2	*/
+	ISR HwCnt2Int {
+		CATEGORY = 2;
+		ENTRY = 105;
+		PRIORITY = 2;
+		RESOURCE = IntLevelRes;
+	};
+
+	/*
+	 *  \[Xè`
+	 */
+	/* ^XNE^XNÔ\[X	*/
+	RESOURCE TskLevelRes {
+		RESOURCEPROPERTY = STANDARD;
+	};
+
+	/* ^XNEÝÔ\[X	*/
+	RESOURCE IntLevelRes {
+		RESOURCEPROPERTY = STANDARD;
+	};
+
+	/* O[v^XNpà\[X	*/
+	RESOURCE GroupRes {
+		RESOURCEPROPERTY = INTERNAL;
+	};
+
+	/*
+	 *  Cxgè`
+	 */
+	/* C^XNüúCxg	*/
+	EVENT MainEvt {
+		MASK = AUTO;
+	};
+
+	/* ÀñÀs^XN2pCxg	*/
+	EVENT T2Evt {
+		MASK = AUTO;
+	};
+
+	/* ÀñÀs^XN3pCxg	*/
+	EVENT T3Evt {
+		MASK = AUTO;
+	};
+
+	/* ÀñÀs^XN3pCxg	*/
+	EVENT TestEvt {
+		MASK = AUTO;
+	};
+	
+	/*
+	 *  JE^è`
+	 */
+	
+	/* TvJE^	*/
+	COUNTER SampleCnt { 
+		MINCYCLE = 10;
+		MAXALLOWEDVALUE = 99; 
+		TICKSPERBASE = 10; 
+	};
+
+	/*
+	 *  A[è`
+	 */
+	/* C^XNüúA[	*/
+	ALARM MainCycArm { 
+		COUNTER = SysTimerCnt;
+		ACTION  = SETEVENT {
+			TASK = MainTask;
+			EVENT = MainEvt;
+		};
+		AUTOSTART = TRUE {
+			APPMODE = AppMode1;
+			APPMODE = AppMode2;
+			APPMODE = AppMode3;
+			ALARMTIME = 100; 
+			CYCLETIME = 100;
+		};
+	};
+
+	/* ^XNN®pA[	*/
+	ALARM ActTskArm { 
+		COUNTER = SysTimerCnt;
+		ACTION  = ACTIVATETASK {
+			TASK = Task1;
+		};
+		AUTOSTART = FALSE;
+	};
+
+	/* CxgÝèpA[	*/
+	ALARM SetEvtArm { 
+		COUNTER = SysTimerCnt;
+		ACTION  = SETEVENT {
+			TASK = Task3;
+			EVENT = T3Evt;
+		};
+		AUTOSTART = FALSE;
+	};
+
+	/* R[obNÀspA[	*/
+	ALARM CallBackArm { 
+		COUNTER = SysTimerCnt;
+		ACTION  = ALARMCALLBACK {
+			ALARMCALLBACKNAME = "SysTimerAlmCb";
+		};
+		AUTOSTART = FALSE;
+	};
+
+	/* TvJE^®ìmFpA[	*/
+	ALARM SampleArm { 
+		COUNTER = SampleCnt;
+		ACTION  = ALARMCALLBACK {
+			ALARMCALLBACKNAME = "SampleAlmCb";
+		};
+		AUTOSTART = TRUE {
+			APPMODE = AppMode1;
+			APPMODE = AppMode2;
+			APPMODE = AppMode3;
+			ALARMTIME = 10; 
+			CYCLETIME = 10;
+		};
+	};
+
+};
+
Index: /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample_config.c
===================================================================
--- /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample_config.c	(revision 4)
+++ /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample_config.c	(revision 4)
@@ -0,0 +1,314 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	Tvü¯^[QbgË¶W
+[iCQ7144Apj
+ */
+
+
+#include	"sample_config.h"
+#include	"sh7144.h"
+
+
+/*
+ *  OILè`V{ÌOQÆ
+ */
+DeclareCounter( SampleCnt );
+
+
+/*
+ *	àÖvg^Cvé¾
+ */
+ISR( CounterInt );
+ISR( HwCnt2Int );
+
+
+/*
+ *  AvP[V[hp
+ */
+/*
+ *  AvP[V[hèpÌîñæ¾
+ *
+ *  VXe²ÆÉCÓÌüÍè@ÉæèÀ·é±ÆD
+ *  0,1,2ª»ÊÅ«é±ÆD3Í2Æ¯¶µ¢ÉÈéD
+ */
+UINT8
+GetAppModeInfo( void )
+{
+	/*
+	 *  {Í±±ÅAvP[V[hÌ»èðs¤×«¾ªA
+	 *  {[hãÉ[hðæ¾Å«éH/WªÀ³êÄ¢È¢½ßA
+	 *  íÉ0ðÔ·D
+	 */
+	
+	return 0;
+
+}	/* GetAppModeInfo	*/
+
+
+/*
+ *  TvJE^\[Xp
+ *
+ *  CQ7144AÅÍCMT1ÅÀ·éD
+ */
+
+/*
+ *  SignalCounterÀspÝú»
+ *
+ *  ^C}ÌN®ÍÊÖÅs¤D
+ */
+void
+InitCounterInt( void )
+{
+	/*
+	 *  CMTW
+[X^oCð
+	 */
+	MSTCR2 &= (UINT16)~0x1000;		/* CMTLø */
+	
+	/*
+	 *  RyA}b`^C}ðâ~µÄeWX^Ýè
+	 */
+	CMSTR &= (UINT16) ~0x0002;		/* JEgâ~ */
+
+	/*
+	 *  ªüä üÓNbN 1/8, èÝÖ~
+	 *  CMCSR Ì bit7 ªÝvtOÅ èC¯ÉNAµÄ¢éD
+	 */
+	CMCSR_1 = 0x0000;
+
+	/*
+	 *  Ry}b`JE^ÚWlÝè
+	 *  ^C}N®¼ãÉRyA}b`³¹é½ß
+	 */
+	CMCOR_1 = (UINT16)0x0001;
+
+	/*
+	 *  ^C}RyAÝxÝèiÝèxÍwb_QÆj
+	 */
+	IPRG = (UINT16) ((IPRG & ~0xF) | (UINT16)CFG_INTLVL_COUNTER);
+
+	/*
+	 *  JE^NAÆÝÂ
+	 */
+	CMCNT_1 = 0x0000;				/* JEgNA */
+	CMCSR_1 |= 0x0040;				/* RyA}b`ÝÂ */
+
+}	/* InitCounterInt	*/
+
+/*
+ *  SignalCounterÀspÝâ~
+ */
+void
+TermCounterInt( void )
+{
+	CMSTR &= (UINT16) ~0x0002;		/* JEgâ~ */
+	CMCSR_1 = 0x0000;				/* @\ú» */
+}	/* TermCounterInt	*/
+
+/*
+ *  SignalCounterÀspÝN®
+ */
+void
+ActCounterInt( void )
+{
+	CMCNT_1 = (UINT16)0x0000;		/* JEgNA */
+	CMSTR |= (UINT16) 0x0002;		/* JEgJn */
+}	/* ActCounterInt	*/
+
+/*
+ *  SignalCounterÀspÝT[rX[`
+ */
+ISR( CounterInt )
+{
+	StatusType ercd;
+
+	/*
+	 *  1ñÌÝ SignalCounter Àsµ½¢½ßC^C}ðâ~·éD
+	 */
+	CMCSR_1 &= (UINT16)~0x0040;		/* RyA}b`ÝÖ~ */
+	CMSTR &= (UINT16) ~0x0002;		/* JEgâ~ */
+
+	/*
+	 *  ÝvNA
+	 */
+	CMCSR_1 &= (UINT16)~0x0080;		/* ÝvNA */
+
+	/*
+	 *  JE^ÁZÊmÀs
+	 */
+	ercd = SignalCounter( SampleCnt );
+
+	/* G[^[ÌêÍVbg_E	*/
+	if( ercd != E_OK ){
+		ShutdownOS( ercd );
+	}
+}	/* ISR( CounterInt )	*/
+
+
+/*
+ *  ISR1EISR2Ò®mFp
+ *
+ *  CQ7144AÅÍMTUA1,B2ÅÀ·éD
+ */
+/*
+ *  n[hEFAJE^obt@
+ */
+static UINT8	hw_cnt1;
+static UINT8	hw_cnt2;
+
+/*
+ *  ISR1EISR2JE^ú»
+ */
+void
+InitHwCntInt( void )
+{
+	/*
+	 *  n[hEFAJE^ú»
+	 */
+	hw_cnt1 = (UINT8)0;
+	hw_cnt2 = (UINT8)0;
+
+	/*
+	 *  MTUW
+[X^oCð
+	 */
+	MSTCR2 &= (UINT16)~0x2000;		/* MTULø */
+
+	/*
+	 *  ^C}ðâ~µÄeWX^Ýè
+	 */
+	TSTR &= (UINT8)~0x06;
+
+	/*
+	 *  ^C}JE^NA
+	 */
+	TCNT_1 = (UINT16)0x0000;
+	TCNT_2 = (UINT16)0x0000;
+	
+	/*
+	 *  ^C}`l1,2 AbvGbW, 1/64ªü
+	 *  ^C}`l1 = TGR-A
+	 *  ^C}`l2 = TGR-B
+	 */
+	TCR_1 = (UINT8)0x23;
+	TCR_2 = (UINT8)0x43;
+
+	/*
+	 *  RyA}b`JE^Ýè
+	 */
+	TGRA_1 = CFG_HW_CNT1;
+	TGRB_2 = CFG_HW_CNT2;
+
+	/*
+	 *  ^C}RyAÝxÝèiÝèxÍwb_QÆj
+	 *  TSR Ì bit0,1 ªÝvtOÉæèNAµÄ¢éD
+	 */
+	IPRD = (UINT16) ((IPRD & ~(0xFu <<  4)) | (CFG_INTLVL_HW_CNT1 <<  4));
+	IPRE = (UINT16) ((IPRE & ~(0xFu << 12)) | (CFG_INTLVL_HW_CNT2 << 12));
+	TSR_1 &= (UINT8) ~0x01;
+	TSR_2 &= (UINT8) ~0x02;
+
+	/*
+	 * ÝÂ A,B
+	 */
+	TIER_1 |= (UINT8)0x01;
+	TIER_2 |= (UINT8)0x02;
+
+	/*
+	 *  ^C}JEgJn
+	 */
+	TSTR |= (UINT8)0x06;
+
+}	/* InitHwCntInt	*/
+
+/*
+ *  ISR1EISR2JE^â~
+ */
+void
+TermHwCntInt( void )
+{
+	TIER_1 &= (UINT8) ~0x01;	/* ÝÖ~		*/
+	TIER_2 &= (UINT8) ~0x02;	/* ÝÖ~		*/
+	TSTR   &= (UINT8) ~0x06;	/* JEgâ~		*/
+}	/* TermHwCntInt	*/
+
+/*
+ *  ISR1EISR2JE^æ¾
+ *
+ *  hw_cnt1Æhw_cnt2Ì¯æ¾ÍÛáµÈ­Äæ¢iÝÖ~ÍsvjD
+ */
+void
+GetHwCnt( UINT8 *isr1_cnt, UINT8 *isr2_cnt )
+{
+	*isr1_cnt = hw_cnt1;
+	*isr2_cnt = hw_cnt2;
+}	/* GetHwCnt	*/
+
+/*
+ *  ISR1JE^ÁZpÝT[rX[`
+ */
+#if defined( OMIT_ISR1_ENTRY )
+/* ISR1üèû¢¶¬Í{ÖðÝÖwè·é	*/
+#pragma interrupt	HwCnt1Int
+#endif	/* OMIT_ISR1_ENTRY	*/
+void	HwCnt1Int( void );
+void
+HwCnt1Int( void )
+{
+	/* ÝvNA */
+	TSR_1 &= (UINT8)~0x01;
+
+	hw_cnt1++;
+}	/* HwCnt1Int	*/
+
+/*
+ *  ISR2JE^ÁZpÝT[rX[`
+ */
+ISR( HwCnt2Int )
+{
+	/* ÝvNA */
+	TSR_2 &= (UINT8)~0x02;
+
+	hw_cnt2++;
+}	/* ISR( HwCnt2Int )	*/
+
+
Index: /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample_config.h
===================================================================
--- /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample_config.h	(revision 4)
+++ /atk1_sh2/trunk/tools/sh2-gnu/cq7144a/sample_config.h	(revision 4)
@@ -0,0 +1,128 @@
+/*
+ *  TOPPERS/OSEK Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      OSEK Kernel
+ * 
+ *  Copyright (C) 2006 by Witz Corporation, JAPAN
+ * 
+ *  ãLì ÒÍCÈºÌ (1)`(4) Ìð©CFree Software Foundation 
+ *  ÉæÁÄö\³êÄ¢é GNU General Public License Ì Version 2 ÉL
+ *  q³êÄ¢éðð½·êÉÀèC{\tgEFAi{\tgEFA
+ *  ðüÏµ½àÌðÜÞDÈº¯¶jðgpE¡»EüÏEÄzziÈºC
+ *  pÆÄÔj·é±Æð³Åø·éD
+ *  (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
+ *       \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
+ *      XR[hÉÜÜêÄ¢é±ÆD
+ *  (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«é`ÅÄzz·éêÉÍCÄzzÉº¤hL
+gip
+ *      Ò}j
+AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
+ *      Ì³ÛØKèðfÚ·é±ÆD
+ *  (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJ­Ég
+ *      pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
+ *      ÆD
+ *    (a) ÄzzÉº¤hL
+gipÒ}j
+AÈÇjÉCãLÌ
+ *        ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
+ *    (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
+ *        ñ·é±ÆD
+ *  (4) {\tgEFAÌpÉæè¼ÚIÜ½ÍÔÚIÉ¶¶é¢©Èé¹
+ *      Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
+ * 
+ *  {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
+ *  æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄC»ÌKpÂ\«à
+ *  ÜßÄC¢©ÈéÛØàsíÈ¢DÜ½C{\tgEFAÌpÉæè¼
+ *  ÚIÜ½ÍÔÚIÉ¶¶½¢©Èé¹QÉÖµÄàC»ÌÓCðíÈ¢D
+ * 
+ */
+
+/*
+ *	Tvü¯^[QbgË¶W
+[iCQ7144Apj
+ */
+
+#if !defined( _SAMPLE_CONFIG_H_ )
+#define _SAMPLE_CONFIG_H_
+
+
+#include	"kernel.h"
+
+
+/*
+ *  SignalCounterÀspÝxè`
+ */
+#define CFG_INTLVL_COUNTER	(UINT8)( 0x03 )
+
+/*
+ *  ISR1EISR2JE^Ýxè`
+ */
+#define CFG_INTLVL_HW_CNT1	(UINT8)( 0x05 )
+#define CFG_INTLVL_HW_CNT2	(UINT8)( 0x02 )
+
+/*
+ *  ISR1EISR2JE^^C}ÌRyAli1msj
+ *
+ *  CQ7144A ÅÍ MTU `l1,2 ð WFlWX^A,BÅg¤D
+ *  WX^ÌlÍ Ýèl -1 Æ·éi}j
+AQÆjD
+ */
+#define	CFG_HW_CNT1		(UINT16)( 374 )
+#define	CFG_HW_CNT2		(UINT16)( 374 )
+
+#if !defined( _MACRO_ONLY )
+
+/*
+ *  AvP[V[hp
+ */
+/*
+ *  AvP[V[hèpÌîñæ¾Övg^Cvé¾
+ */
+extern UINT8	GetAppModeInfo( void );
+
+
+/*
+ *  TvJE^\[Xp
+ */
+/*
+ *  SignalCounterÀspÝú»Övg^Cvé¾
+ */
+extern void	InitCounterInt( void );
+
+/*
+ *  SignalCounterÀspÝâ~Övg^Cvé¾
+ */
+extern void	TermCounterInt( void );
+
+/*
+ *  SignalCounterÀspÝN®Övg^Cvé¾
+ */
+extern void	ActCounterInt( void );
+
+
+/*
+ *  ISR1EISR2Ò®mFp
+ */
+/*
+ *  ISR1EISR2JE^ú»Övg^Cvé¾
+ */
+extern void	InitHwCntInt( void );
+
+/*
+ *  ISR1EISR2JE^â~Övg^Cvé¾
+ */
+extern void	TermHwCntInt( void );
+
+/*
+ *  ISR1EISR2JE^æ¾Övg^Cvé¾
+ */
+extern void	GetHwCnt( UINT8 *isr1_cnt, UINT8 *isr2_cnt );
+
+
+#endif /* _MACRO_ONLY */
+
+
+#endif /* _SAMPLE_CONFIG_H_ */
+
+
