Index: asp3_wo_tecs/trunk/MANIFEST
===================================================================
--- asp3_wo_tecs/trunk/MANIFEST	(revision 305)
+++ asp3_wo_tecs/trunk/MANIFEST	(revision 306)
@@ -2,5 +2,5 @@
 VERSION 3.0.0
 
-configure
+configure.rb
 MANIFEST
 README.txt
@@ -10,4 +10,5 @@
 doc/design.txt
 doc/extension.txt
+doc/migration.txt
 doc/porting.txt
 doc/user.txt
@@ -26,49 +27,49 @@
 kernel/alarm.c
 kernel/alarm.h
-kernel/alarm.tf
+kernel/alarm.trb
 kernel/allfunc.h
 kernel/check.h
 kernel/cyclic.c
 kernel/cyclic.h
-kernel/cyclic.tf
+kernel/cyclic.trb
 kernel/dataqueue.c
 kernel/dataqueue.h
-kernel/dataqueue.tf
+kernel/dataqueue.trb
 kernel/eventflag.c
 kernel/eventflag.h
-kernel/eventflag.tf
+kernel/eventflag.trb
 kernel/exception.c
 kernel/exception.h
-kernel/exception.tf
-kernel/genoffset.tf
+kernel/exception.trb
+kernel/genoffset.trb
 kernel/interrupt.c
 kernel/interrupt.h
-kernel/interrupt.tf
-kernel/kernel.tf
-kernel/kernel_api.csv
-kernel/kernel_check.tf
-kernel/kernel_def.csv
+kernel/interrupt.trb
+kernel/kernel.trb
+kernel/kernel_api.def
+kernel/kernel_check.trb
 kernel/kernel_impl.h
 kernel/kernel_int.h
 kernel/kernel_rename.def
 kernel/kernel_rename.h
+kernel/kernel_sym.def
 kernel/kernel_unrename.h
 kernel/mempfix.c
 kernel/mempfix.h
-kernel/mempfix.tf
+kernel/mempfix.trb
 kernel/mutex.c
 kernel/mutex.h
-kernel/mutex.tf
+kernel/mutex.trb
 kernel/pridataq.c
 kernel/pridataq.h
-kernel/pridataq.tf
+kernel/pridataq.trb
 kernel/semaphore.c
 kernel/semaphore.h
-kernel/semaphore.tf
+kernel/semaphore.trb
 kernel/startup.c
 kernel/sys_manage.c
 kernel/task.c
 kernel/task.h
-kernel/task.tf
+kernel/task.trb
 kernel/task_manage.c
 kernel/task_refer.c
@@ -83,19 +84,50 @@
 kernel/wait.h
 
-syssvc/banner.c
-syssvc/banner.cfg
-syssvc/banner.h
-syssvc/histogram.c
+tecs_kernel/init_tecs.c
+tecs_kernel/kernel.cdl
+tecs_kernel/tAlarmNotifier.c
+tecs_kernel/tAlarmNotifier_inline.h
+tecs_kernel/tCpuExceptionHandler.c
+tecs_kernel/tCyclicNotifier.c
+tecs_kernel/tCyclicNotifier_inline.h
+tecs_kernel/tDataqueue_inline.h
+tecs_kernel/tEventflag_inline.h
+tecs_kernel/tFixedSizeMemoryPool_inline.h
+tecs_kernel/tISR.c
+tecs_kernel/tInitializeRoutine.c
+tecs_kernel/tInterruptHandler.c
+tecs_kernel/tInterruptRequest_inline.h
+tecs_kernel/tKernel_inline.h
+tecs_kernel/tMutex_inline.h
+tecs_kernel/tPriorityDataqueue_inline.h
+tecs_kernel/tSemaphore_inline.h
+tecs_kernel/tTask.c
+tecs_kernel/tTask_inline.h
+tecs_kernel/tTerminateRoutine.c
+tecs_kernel/tTimeEventHandler.c
+tecs_kernel/tecs_kernel.h
+
 syssvc/histogram.h
-syssvc/logtask.c
-syssvc/logtask.cfg
-syssvc/logtask.h
-syssvc/serial.c
-syssvc/serial.cfg
 syssvc/serial.h
-syssvc/syslog.c
-syssvc/syslog.cfg
 syssvc/syslog.h
-syssvc/test_svc.c
+syssvc/tHistogram.c
+syssvc/tHistogram.cdl
+syssvc/tHistogram.h
+syssvc/tHistogramAdapter.c
+syssvc/tHistogramAdapter.cdl
+syssvc/tBanner.cdl
+syssvc/tBannerMain.c
+syssvc/tLogTask.cdl
+syssvc/tLogTaskMain.c
+syssvc/tSerialAdapter.c
+syssvc/tSerialAdapter.cdl
+syssvc/tSerialPort.cdl
+syssvc/tSerialPortMain.c
+syssvc/tSysLog.c
+syssvc/tSysLog.cdl
+syssvc/tSysLogAdapter.c
+syssvc/tSysLogAdapter.cdl
+syssvc/tTestService.c
+syssvc/tTestService.cdl
 syssvc/test_svc.h
 
@@ -107,20 +139,24 @@
 arch/gcc/tool_stddef.h
 
-arch/logtrace/trace_config.h
-arch/logtrace/trace_config.c
-arch/logtrace/trace_config.cfg
-arch/logtrace/trace_dump.c
+arch/tracelog/trace_log.h
+arch/tracelog/tTraceLog.c
+arch/tracelog/tTraceLog.cdl
 
-utils/applyrename
-utils/genrename
-utils/gentest
-utils/makerelease
-utils/move-if-change
+utils/applyrename.rb
+utils/genrename.rb
+utils/gentest.rb
+utils/makerelease.rb
 
 sample/Makefile
 sample/sample1.c
+sample/sample1.cdl
 sample/sample1.cfg
 sample/sample1.h
+sample/tSample2.c
+sample/tSample2.cdl
+sample/tSample2.cfg
+sample/tSample2.h
 
+INCLUDE cfg/MANIFEST
 INCLUDE test/MANIFEST
 INCLUDE extension/MANIFEST
Index: asp3_wo_tecs/trunk/README.txt
===================================================================
--- asp3_wo_tecs/trunk/README.txt	(revision 305)
+++ asp3_wo_tecs/trunk/README.txt	(revision 306)
@@ -1,4 +1,4 @@
 
-	TOPPERS/ASP3 Kernelï¼Release 3.0.0ï¼
+	TOPPERS/ASP3 Kernelï¼Release 3.1ï¼
 		Toyohashi Open Platform for Embedded Real-Time Systems/
 		Advanced Standard Profile Kernel
Index: asp3_wo_tecs/trunk/arch/arm_gcc/MANIFEST
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/MANIFEST	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/MANIFEST	(revision 306)
@@ -1,8 +1,9 @@
 PACKAGE asp3_arch_arm_gcc
-VERSION 3.0.0
+VERSION 3.1.0
 
 MANIFEST
 
 doc/arm_design.txt
+doc/arm_user.txt
 doc/gic_design.txt
 
@@ -11,13 +12,12 @@
 common/arm.h
 common/arm_insn.h
-common/core.tf
 common/core_asm.inc
 common/core_cfg1_out.h
-common/core_check.tf
-common/core_def.csv
+common/core_check.trb
 common/core_kernel.h
+common/core_kernel.trb
 common/core_kernel_impl.c
 common/core_kernel_impl.h
-common/core_offset.tf
+common/core_offset.trb
 common/core_rename.def
 common/core_rename.h
@@ -25,4 +25,6 @@
 common/core_stddef.h
 common/core_support.S
+common/core_sym.def
+common/core_syssvc.h
 common/core_test.h
 common/core_unrename.h
@@ -30,9 +32,15 @@
 common/gic_kernel_impl.h
 common/gic_support.S
+common/pl310.c
+common/pl310.h
 common/sp804.h
 common/start.S
-common/uart_pl011.c
+common/tUartPL011.c
+common/tUartPL011.cdl
 common/uart_pl011.h
 
 INCLUDE mpcore/MANIFEST
+INCLUDE rza1/MANIFEST
+
 INCLUDE ../../target/ct11mpcore_gcc/MANIFEST
+INCLUDE ../../target/gr_peach_gcc/MANIFEST
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/Makefile.core
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/Makefile.core	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/Makefile.core	(revision 306)
@@ -2,5 +2,5 @@
 #		Makefileã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
 #
-#  $Id: Makefile.core 484 2016-01-03 15:13:38Z ertl-hiro $
+#  $Id: Makefile.core 572 2016-02-01 14:40:09Z ertl-hiro $
 #
 
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/arm.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/arm.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/arm.h	(revision 306)
@@ -52,5 +52,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: arm.h 523 2016-01-14 11:01:04Z ertl-hiro $
+ *  $Id: arm.h 694 2016-03-23 13:17:48Z ertl-hiro $
  */
 
@@ -127,4 +127,5 @@
 #define CP15_SCTLR_VECTOR		UINT_C(0x00002000)
 #define CP15_SCTLR_ICACHE		UINT_C(0x00001000)
+#define CP15_SCTLR_BP			UINT_C(0x00000800)
 #define CP15_SCTLR_DCACHE		UINT_C(0x00000004)
 #define CP15_SCTLR_MMU			UINT_C(0x00000001)
@@ -308,4 +309,30 @@
 
 /*
+ *  åå²äºæ¸¬ãã¤ãã¼ãã«
+ */
+Inline void
+arm_enable_bp(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	reg |= CP15_SCTLR_BP;
+	CP15_WRITE_SCTLR(reg);
+}
+
+/*
+ *  åå²äºæ¸¬ããã£ã¹ã¨ã¼ãã«
+ */
+Inline void
+arm_disable_bp(void)
+{
+	uint32_t	reg;
+
+	CP15_READ_SCTLR(reg);
+	reg &= ~CP15_SCTLR_BP;
+	CP15_WRITE_SCTLR(reg);
+}
+
+/*
  *  ãã­ã»ããµçªå·ã®åå¾
  *
@@ -413,4 +440,15 @@
 
 /*
+ *  åå²äºæ¸¬ã®ç¡å¹å
+ */
+Inline void
+arm_invalidate_bp(void)
+{
+	CP15_INVALIDATE_BP();
+	data_sync_barrier();
+	inst_sync_barrier();
+}
+
+/*
  *  TLBã®ç¡å¹å
  */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/arm_insn.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/arm_insn.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/arm_insn.h	(revision 306)
@@ -52,5 +52,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: arm_insn.h 547 2016-01-16 06:26:08Z ertl-hiro $
+ *  $Id: arm_insn.h 694 2016-03-23 13:17:48Z ertl-hiro $
  */
 
@@ -245,4 +245,8 @@
 #define CP15_INVALIDATE_ICACHE() \
 								Asm("mcr p15, 0, %0, c7, c5, 0"::"r"(0))
+
+/* åå²äºæ¸¬å
+¨ä½ã®ç¡å¹å */
+#define CP15_INVALIDATE_BP()	Asm("mcr p15, 0, %0, c7, c5, 6"::"r"(0))
 
 /* ãã¼ã¿ã­ã£ãã·ã¥å
@@ -435,3 +439,13 @@
 }
 
+/*
+ *  CP15ã®ã»ã­ã¥ãªãã£æ¡å¼µã¬ã¸ã¹ã¿æä½ãã¯ã­ï¼ARMv7ã®ã¿ï¼
+ */
+#if __TARGET_ARCH_ARM == 7
+
+/* ãã¯ã¿ãã¼ã¹ã¢ãã¬ã¹ã¬ã¸ã¹ã¿ */
+#define CP15_READ_VBAR(reg)		Asm("mrc p15, 0, %0, c12, c0, 0":"=r"(reg))
+#define CP15_WRITE_VBAR(reg)	Asm("mcr p15, 0, %0, c12, c0, 0"::"r"(reg))
+
+#endif /* __TARGET_ARCH_ARM == 7 */
 #endif /* TOPPERS_ARM_INSN_H */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_asm.inc
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_asm.inc	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_asm.inc	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2011-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2011-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: core_asm.inc 349 2015-07-25 05:25:27Z ertl-hiro $
+ *  $Id: core_asm.inc 714 2016-03-31 05:52:19Z ertl-hiro $
  */
 
@@ -82,3 +82,45 @@
 #define BSS_END			__end_bss
 
+/*
+ *  ãã¼ã¿ã¡ã¢ãªããªã¢
+ */
+	.macro	asm_data_memory_barrier reg1
+#ifdef ASM_DATA_MEMORY_BARRIER
+	ASM_DATA_MEMORY_BARRIER(reg1)
+#elif __TARGET_ARCH_ARM <= 6
+	mov		\reg1, #0
+	mcr		p15, 0, \reg1, c7, c10, 5
+#else /* __TARGET_ARCH_ARM <= 6 */
+	dmb
+#endif
+	.endm
+
+/*
+ *  ãã¼ã¿åæããªã¢
+ */
+	.macro	asm_data_sync_barrier reg1
+#ifdef ASM_DATA_SYNC_BARRIER
+	ASM_DATA_SYNC_BARRIER(reg1)
+#elif __TARGET_ARCH_ARM <= 6
+	mov		\reg1, #0
+	mcr		p15, 0, \reg1, c7, c10, 4
+#else /* __TARGET_ARCH_ARM <= 6 */
+	dsb
+#endif
+	.endm
+
+/*
+ *  å½ä»¤åæããªã¢
+ */
+	.macro	asm_inst_sync_barrier reg1
+#ifdef ASM_INST_SYNC_BARRIER
+	ASM_INST_SYNC_BARRIER(reg1)
+#elif __TARGET_ARCH_ARM <= 6
+	mov		\reg1, #0
+	mcr		p15, 0, \reg1, c7, c5, 4
+#else /* __TARGET_ARCH_ARM <= 6 */
+	isb
+#endif
+	.endm
+
 #endif /* TOPPERS_CORE_ASM_INC */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_check.trb
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_check.trb	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_check.trb	(revision 306)
@@ -3,10 +3,10 @@
 #		ãã¹3ã®çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
 # 
-#  $Id: core_check.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+#  $Id: core_check.trb 730 2016-04-03 02:04:52Z ertl-hiro $
 #
 
-# 
+#
 #  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
-# 
+#
 IncludeTrb("kernel/kernel_check.trb")
 
@@ -27,5 +27,5 @@
     error_wrong_id("E_PAR", params, :inthdr, :inhno, "not aligned")
   end
-  if $CHECK_FUNC_NONNULL == 1 && inthdr == 0
+  if $CHECK_FUNC_NONNULL && inthdr == 0
     error_wrong_id("E_PAR", params, :inthdr, :inhno, "null")
   end
@@ -47,5 +47,5 @@
     error_wrong_id("E_PAR", params, :exchdr, :excno, "not aligned")
   end
-  if $CHECK_FUNC_NONNULL == 1 && exchdr == 0
+  if $CHECK_FUNC_NONNULL && exchdr == 0
     error_wrong_id("E_PAR", params, :exchdr, :excno, "null")
   end
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: core_kernel.h 454 2015-08-16 03:18:46Z ertl-hiro $
+ *  $Id: core_kernel.h 718 2016-04-01 15:05:01Z ertl-hiro $
  */
 
@@ -109,4 +109,5 @@
 	uint32_t	r3;
 	uint32_t	r4;
+	uint32_t	r5;
 	uint32_t	r12;
 	uint32_t	lr;
@@ -125,4 +126,5 @@
 	uint32_t	r3;
 	uint32_t	r4;
+	uint32_t	r5;
 	uint32_t	r12;
 	uint32_t	lr;
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel.trb	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: core_kernel.trb 572 2016-02-01 14:40:09Z ertl-hiro $
+#   $Id: core_kernel.trb 662 2016-02-27 02:33:51Z ertl-hiro $
 # 
 
@@ -96,5 +96,5 @@
 #  å²è¾¼ã¿è¦æ±ã©ã¤ã³è¨­å®ãã¼ãã«
 #
-if $USE_INTCFG_TABLE == 1
+if $USE_INTCFG_TABLE
   $kernelCfgC.comment_header("Interrupt Configuration Table")
 
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel_impl.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_kernel_impl.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: core_kernel_impl.h 546 2016-01-16 06:00:09Z ertl-hiro $
+ *  $Id: core_kernel_impl.h 664 2016-02-29 16:32:29Z ertl-hiro $
  */
 
@@ -79,5 +79,5 @@
 #endif /* __thumb__ */
 #define CHECK_FUNC_NONNULL			/* é¢æ°ã®éNULLãã§ãã¯ */
-#define CHECK_STACK_ALIGN	4		/* ã¹ã¿ãã¯é åã®ã¢ã©ã¤ã³åä½ */
+#define CHECK_STACK_ALIGN	8		/* ã¹ã¿ãã¯é åã®ã¢ã©ã¤ã³åä½ */
 #define CHECK_STACK_NONNULL			/* ã¹ã¿ãã¯é åã®éNULLãã§ãã¯ */
 #define CHECK_MPF_ALIGN		4		/* åºå®é·ã¡ã¢ãªãã¼ã«é åã®ã¢ã©ã¤ã³åä½ */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_rename.def
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_rename.def	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_rename.def	(revision 306)
@@ -42,4 +42,10 @@
 irc_end_exc
 
+# pl310.c
+pl310_initialize
+pl310_disable
+pl310_invalidate_all
+pl310_clean_and_invalidate_all
+
 # target_kernel_impl.c
 arm_tnum_memory_area
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_rename.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_rename.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_rename.h	(revision 306)
@@ -58,4 +58,12 @@
 
 /*
+ *  pl310.c
+ */
+#define pl310_initialize			_kernel_pl310_initialize
+#define pl310_disable				_kernel_pl310_disable
+#define pl310_invalidate_all		_kernel_pl310_invalidate_all
+#define pl310_clean_and_invalidate_all	_kernel_pl310_clean_and_invalidate_all
+
+/*
  *  target_kernel_impl.c
  */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_sil.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_sil.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_sil.h	(revision 306)
@@ -5,5 +5,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -52,5 +52,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: core_sil.h 352 2015-07-25 06:36:42Z ertl-hiro $
+ *  $Id: core_sil.h 714 2016-03-31 05:52:19Z ertl-hiro $
  */
 
@@ -155,15 +155,4 @@
 #define SIL_UNL_INT()	(TOPPERS_set_fiq_irq(TOPPERS_fiq_irq_mask))
 
-/*
- *  å¾®å°æéå¾
-ã¡
- */
-Inline void
-sil_dly_nse(ulong_t dlytim) throw()
-{
-	register uint32_t r0 asm("r0") = (uint32_t) dlytim;
-	Asm("bl _sil_dly_nse" : "=g"(r0) : "0"(r0) : "lr","cc");
-}
-
 #endif /* TOPPERS_MACRO_ONLY */
 #endif /* TOPPERS_CORE_SIL_H */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_support.S
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_support.S	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_support.S	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2004 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: core_support.S 459 2015-08-29 13:03:42Z ertl-hiro $
+ *  $Id: core_support.S 733 2016-04-03 09:10:54Z ertl-hiro $
  */
 
@@ -72,5 +72,6 @@
  *  ä¾å¤ãã¯ã¿
  */
-	ASECTION(vector)
+	ASECTION(.vector)
+	AALIGN(5)
 	AGLOBAL(vector_table)
 ALABEL(vector_table)
@@ -122,5 +123,5 @@
 ã§å¼ã³åºãããï¼
 	 */
-	push	{lr}					/* æ»ãçªå°ãä¿å­ */
+	push	{r12,lr}				/* æ»ãçªå°ãä¿å­ï¼r12ã¯ããã¼ */
 #ifdef TOPPERS_SUPPORT_OVRHDR
 	bl		ovrtimer_stop
@@ -139,5 +140,5 @@
 	bl		ovrtimer_start
 #endif /* TOPPERS_SUPPORT_OVRHDR */
-	pop		{lr}					/* æ»ãçªå°ãå¾©å¸° */
+	pop		{r12,lr}				/* æ»ãçªå°ãå¾©å¸° */
 	bx		lr
 
@@ -325,5 +326,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_IRQ_BIT)
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 
 	/*
@@ -339,5 +340,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_IRQ_BIT)
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 #else /* __TARGET_ARCH_ARM < 6 */
@@ -354,6 +355,13 @@
 	 */
 	cps		#CPSR_SVC_MODE
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 #endif /* __TARGET_ARCH_ARM < 6 */
+
+	/*
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´
+	 */
+	and		r1, sp, #4
+	sub		sp, sp, r1
+	push	{r0,r1}					/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 
 	/*
@@ -378,9 +386,9 @@
 	 *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæããï¼
 	 */
-	mov		r1, sp					/* ãã®æç¹ã®ã¹ã¿ãã¯ãã¤ã³ã¿ãr1ã« */
+	mov		r3, sp					/* ãã®æç¹ã®ã¹ã¿ãã¯ãã¤ã³ã¿ãr3ã« */
 	ldr		r2, =istkpt				/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã« */
 	ldr		sp, [r2]
-	push	{r1}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
-
+	push	{r0,r3}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+									/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 ALABEL(irq_handler_1)
 	/*
@@ -388,7 +396,12 @@
 	 */
 	bl		irc_begin_int
-	cmp		r4, #TNUM_INHNO			/* ã¹ããªã¢ã¹å²è¾¼ã¿ãªã */
-	bhs		irq_handler_2			/*  irq_handler_2ã«åå² */
-
+#if TNUM_INHNO <= 256 || __TARGET_ARCH_ARM <= 6
+	cmp		r4, #TNUM_INHNO			/* TNUM_INHNOã®å¤ã«ãã£ã¦ã¯ã¨ã©ã¼ã«ãªã */
+#else /* TNUM_INHNO <= 256 || __TARGET_ARCH_ARM <= 6 */
+	movw	r3, #TNUM_INHNO
+	cmp		r4, r3			
+#endif /* TNUM_INHNO <= 256 || __TARGET_ARCH_ARM <= 6 */
+	bhs		irq_handler_2			/* ã¹ããªã¢ã¹å²è¾¼ã¿ãªã */
+									/*  irq_handler_2ã«åå² */
 	/*
 	 *  CPUã­ãã¯è§£é¤ç¶æ
@@ -447,5 +460,4 @@
 ALABEL(irq_handler_2)
 	bl		irc_end_int
-#endif /* OMIT_IRQ_HANDLER */
 
 	/*
@@ -462,6 +474,6 @@
 	 *  ã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ãï¼
 	 */
-	pop		{r1}
-	mov   	sp, r1
+	pop		{r0,r3}
+	mov   	sp, r3
 
 	/*
@@ -469,5 +481,4 @@
 è¦ãå¤å®ããï¼
 	 */
-ALABEL(ret_int_1)
 	ldr		r0, =p_runtsk			/* p_runtsk â r0 */
 	ldr		r0, [r0]
@@ -482,5 +493,5 @@
 	tst		r0, r0					/* p_runtskãNULLãªãdispatcher_0ã¸ */
 	beq		dispatcher_0
-	stmfd	sp!, {r5-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+	stmfd	sp!, {r6-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
 	str		sp, [r0,#TCB_sp]		/* ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
 	adr		r1, ret_int_r			/* å®è¡åéçªå°ãä¿å­ */
@@ -492,5 +503,5 @@
 	 *  ã³ã³ãã­ã¹ããå¾©å¸°ããï¼
 	 */
-	ldmfd	sp!, {r5-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+	ldmfd	sp!, {r6-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
 
 #ifdef TOPPERS_SUPPORT_OVRHDR
@@ -516,12 +527,14 @@
 #endif /* TOPPERS_SUPPORT_OVRHDR */
 ALABEL(irq_handler_3)
+	pop		{r0,r1}					/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´ */
+	add		sp, sp, r1
 #if __TARGET_ARCH_ARM < 6
 	ldmfd	sp!, {r0}				/* æ»ãå
 ã®cpsrãspsrã«è¨­å® */
 	msr		spsr_cxsf, r0
-	ldmfd	sp!, {r0-r4,r12,lr,pc}^	/* ã³ã³ãã­ã¹ãã®å¾©å¸° */
+	ldmfd	sp!, {r0-r5,r12,lr,pc}^	/* ã³ã³ãã­ã¹ãã®å¾©å¸° */
 									/* ^ä»ããªã®ã§ï¼spsr â cpsr */
 #else /* __TARGET_ARCH_ARM < 6 */
-	ldmfd	sp!, {r0-r4,r12,lr}
+	ldmfd	sp!, {r0-r5,r12,lr}
 	rfefd	sp!
 #endif /* __TARGET_ARCH_ARM < 6 */
@@ -536,4 +549,5 @@
 	b		irq_handler_3
 #endif /* TOPPERS_SUPPORT_OVRHDR */
+#endif /* OMIT_IRQ_HANDLER */
 
 /*
@@ -560,5 +574,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 
 	/*
@@ -573,5 +587,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 #else /* __TARGET_ARCH_ARM < 6 */
@@ -587,5 +601,5 @@
 	 */
 	cps		#CPSR_SVC_MODE
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 #endif /* __TARGET_ARCH_ARM < 6 */
 	mov		r4, #EXCNO_UNDEF
@@ -609,5 +623,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 
 	/*
@@ -620,5 +634,5 @@
 	 *  æ»ãçªå°ã¨spsrãä¿å­ããï¼
 	 */
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 #else /* __TARGET_ARCH_ARM < 6 */
@@ -634,5 +648,5 @@
 	 */
 	cps		#CPSR_SVC_MODE			/* ä¸è¦ã¨æããã */
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 #endif /* __TARGET_ARCH_ARM < 6 */
 	mov		r4, #EXCNO_SVC
@@ -657,5 +671,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 
 	/*
@@ -670,5 +684,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 #else /* __TARGET_ARCH_ARM < 6 */
@@ -684,5 +698,5 @@
 	 */
 	cps		#CPSR_SVC_MODE
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 #endif /* __TARGET_ARCH_ARM < 6 */
 	mov		r4, #EXCNO_PABORT
@@ -720,5 +734,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 
 	/*
@@ -733,5 +747,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 #else /* __TARGET_ARCH_ARM < 6 */
@@ -747,5 +761,5 @@
 	 */
 	cps		#CPSR_SVC_MODE
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 #endif /* __TARGET_ARCH_ARM < 6 */
 	mov		r4, #EXCNO_DABORT
@@ -766,5 +780,5 @@
 	ldr		sp, =istkpt
 	ldr		sp, [sp]
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 
 	/*
@@ -779,5 +793,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 #else /* __TARGET_ARCH_ARM < 6 */
@@ -786,5 +800,5 @@
 	 *  ã¯ãã¤ã³ã¿ãåæåããï¼
 	 */
-	cpsid	if,#CPSR_SVC_MODE
+	cpsid	if, #CPSR_SVC_MODE
 	ldr		sp, =istkpt
 	ldr		sp, [sp]
@@ -802,5 +816,5 @@
 	 */
 	cps		#CPSR_SVC_MODE
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 #endif /* __TARGET_ARCH_ARM < 6 */
 
@@ -833,5 +847,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 
 	/*
@@ -846,5 +860,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_FIQ_IRQ_BIT)
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 #else /* __TARGET_ARCH_ARM < 6 */
@@ -860,5 +874,5 @@
 	 */
 	cps		#CPSR_SVC_MODE
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 #endif /* __TARGET_ARCH_ARM < 6 */
 	mov		r4, #EXCNO_FIQ
@@ -875,5 +889,5 @@
  * ããã®æç¹ã®ã¬ã¸ã¹ã¿ç¶æ
 ã
- *  r0ï¼CPUä¾å¤ãã³ãã©çªå·
+ *  r4ï¼CPUä¾å¤ãã³ãã©çªå·
  */
 ALABEL(exc_handler_1)
@@ -889,8 +903,15 @@
 	ldr		r3, [r2]
 	push	{r3}					/* ä¾å¤ãã¹ãã«ã¦ã³ããä¿å­ */
-	mov		r12, sp					/* CPUä¾å¤ã®æ
+	mov		r5, sp					/* CPUä¾å¤ã®æ
 å ±ãè¨æ¶ãã¦ããé åã® */
-									/*				å
-é ­çªå°ãr12ã«ä¿å­ */
+									/*				  å
+é ­çªå°ãr5ã«ä¿å­ */
+	/*
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´
+	 */
+	and		r1, sp, #4
+	sub		sp, sp, r1
+	push	{r0,r1}					/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
+
 	/*
 	 *  ã«ã¼ãã«ç®¡çå¤ã®CPUä¾å¤ãå¤å®ãã
@@ -905,5 +926,5 @@
 	 *  ã®ãããããã»ããããã¦ãããªãï¼ããè©²å½ããï¼
 	 */
-	ldr		r1, [r12,#T_EXCINF_cpsr]	/* ä¾å¤ãã¬ã¼ã ããcpsrãåå¾ */
+	ldr		r1, [r5,#T_EXCINF_cpsr]		/* ä¾å¤ãã¬ã¼ã ããcpsrãåå¾ */
 	ands	r1, r1, #CPSR_FIQ_IRQ_BIT
 	bne		nk_exc_handler_1		/* ã«ã¼ãã«ç®¡çå¤ã®CPUä¾å¤ã®å¦çã¸ */
@@ -915,5 +936,5 @@
 	 *  r3ï¼excpt_nest_countã®å¤
 	 *  r4ï¼CPUä¾å¤ãã³ãã©çªå·
-	 *  r12ï¼CPUä¾å¤ã®æ
+	 *  r5ï¼CPUä¾å¤ã®æ
 å ±ãè¨æ¶ãã¦ããé åã®å
 é ­çªå°
@@ -932,7 +953,5 @@
 	 *  ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ããï¼
 	 */
-	push	{r12}
 	bl		ovrtimer_stop
-	pop		{r12}
 #endif /* TOPPERS_SUPPORT_OVRHDR */
 
@@ -943,6 +962,6 @@
 	ldr		r2, =istkpt				/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã« */
 	ldr		sp, [r2]
-	push	{r3}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
-
+	push	{r0,r3}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+									/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 ALABEL(exc_handler_2)
 	/*
@@ -950,5 +969,5 @@
 ã
 	 *  r4ï¼CPUä¾å¤ãã³ãã©çªå·
-	 *  r12ï¼CPUä¾å¤ã®æ
+	 *  r5ï¼CPUä¾å¤ã®æ
 å ±ãè¨æ¶ãã¦ããé åã®å
 é ­çªå°
@@ -982,8 +1001,6 @@
 	 */
 #ifdef LOG_EXC_ENTER
-	push	{r12}
 	mov		r0, r4					/* CPUä¾å¤çªå·ããã©ã¡ã¼ã¿ã«æ¸¡ã */
 	bl		log_exc_enter
-	pop		{r12}
 #endif /* LOG_EXC_ENTER */
 
@@ -993,5 +1010,5 @@
 	ldr		r2, =exc_table			/* CPUä¾å¤ãã³ãã©ãã¼ãã«ã®èª­è¾¼ã¿ */
 	ldr		r3, [r2,r4,lsl #2]		/* CPUä¾å¤ãã³ãã©ã®çªå° â r3 */
-	mov		r0, r12					/* CPUä¾å¤ã®æ
+	mov		r0, r5					/* CPUä¾å¤ã®æ
 å ±ãè¨æ¶ãã¦ããé åã® */
 									/*		å
@@ -1035,30 +1052,88 @@
 	ldr		r3, [r2]
 	subs	r3, r3, #1
-	str		r3, [r2]
+	str		r3, [r2]				/* æ»ãå
+ãéã¿ã¹ã¯ã³ã³ãã­ã¹ããªã */
+	bne		exc_handler_3			/*				exc_handler_3ã«åå² */
 
 	/*
 	 *  ã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ãï¼
 	 */
-	popeq	{r1}					/* æ»ãå
-ãã¿ã¹ã¯ã³ã³ãã­ã¹ããªã */
-	moveq	sp, r1					/*		 ã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ã */
+	pop		{r0,r3}
+	mov		sp, r3
+
+	/*
+	 *  ãã£ã¹ããããå¿
+è¦ãå¤å®ããï¼
+	 */
+	ldr		r0, =p_runtsk			/* p_runtsk â r0 */
+	ldr		r0, [r0]
+	ldr		r1, =p_schedtsk			/* p_schedtsk â r1 */
+	ldr		r1, [r1]
+	teq		r0, r1					/* p_runtskã¨p_schedtskãåããªã */
+	beq		exc_handler_4			/*				  exc_handler_4ã¸ */
+
+	/*
+	 *  ã³ã³ãã­ã¹ããä¿å­ããï¼
+	 */
+	tst		r0, r0					/* p_runtskãNULLãªãdispatcher_0ã¸ */
+	beq		dispatcher_0
+	stmfd	sp!, {r6-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+	str		sp, [r0,#TCB_sp]		/* ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+	adr		r1, ret_exc_r			/* å®è¡åéçªå°ãä¿å­ */
+	str		r1, [r0,#TCB_pc]
+	b		dispatcher				/* r0ã«ã¯p_runtskãæ ¼ç´ããã¦ãã */
+
+ALABEL(ret_exc_r)
+	/*
+	 *  ã³ã³ãã­ã¹ããå¾©å¸°ããï¼
+	 */
+	ldmfd	sp!, {r6-r11}			/* éã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+
+#ifdef TOPPERS_SUPPORT_OVRHDR
+	/*
+	 *  ãªã¼ãã©ã³ã¿ã¤ããåä½éå§ããï¼
+	 */
+	bl		ovrtimer_start
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+
+	/*
+	 *  CPUä¾å¤å¦çããã®ãªã¿ã¼ã³
+	 *
+	 *  CPUä¾å¤å¦çããã®ãªã¿ã¼ã³ã«ããï¼CPUã­ãã¯è§£é¤ç¶æ
+ã«é·ç§»ããã
+	 *  ãã«ããå¿
+è¦ããããï¼ARMã¯CPSRã®ãããã«ãã£ã¦CPUã­ãã¯ç¶æ
+ã
+	 *  è¡¨ãã¦ããããï¼CPSRãå
+ã«æ»ãã¦ãªã¿ã¼ã³ããã°ããï¼
+	 */
+#ifndef TOPPERS_SUPPORT_OVRHDR
+ALABEL(exc_handler_4)
+#endif /* TOPPERS_SUPPORT_OVRHDR */
+ALABEL(exc_handler_3)
+	pop		{r0,r1}					/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®èª¿æ´ */
+	add		sp, sp, r1
 	add		sp, sp, #8				/* ã¹ã¿ãã¯ä¸ã®æ
 å ±ãæ¨ã¦ã */
-	beq		ret_int_1				/* ret_int_1ã«åå² */
-
-	/*
-	 *  CPUä¾å¤å¦çããã®ãªã¿ã¼ã³ï¼irq_handler_3ã¨åãå¦çå
-å®¹ï¼
-	 */
 #if __TARGET_ARCH_ARM < 6
 	ldmfd	sp!, {r0}				/* æ»ãå
 ã®cpsrãspsrã«è¨­å® */
 	msr		spsr_cxsf, r0
-	ldmfd	sp!, {r0-r4,r12,lr,pc}^	/* ã³ã³ãã­ã¹ãã®å¾©å¸° */
+	ldmfd	sp!, {r0-r5,r12,lr,pc}^	/* ã³ã³ãã­ã¹ãã®å¾©å¸° */
 									/* ^ä»ããªã®ã§ï¼spsr â cpsr */
 #else /* __TARGET_ARCH_ARM < 6 */
-	ldmfd	sp!, {r0-r4,r12,lr}
+	ldmfd	sp!, {r0-r5,r12,lr}
 	rfefd	sp!
 #endif /* __TARGET_ARCH_ARM < 6 */
+
+#ifdef TOPPERS_SUPPORT_OVRHDR
+ALABEL(exc_handler_4)
+	/*
+	 *  ãªã¼ãã©ã³ã¿ã¤ããåä½éå§ããï¼
+	 */
+	tst		r0, r0					/* p_runtskãNULLã§ãªãå ´å */
+	blne	ovrtimer_start
+	b		exc_handler_3
+#endif /* TOPPERS_SUPPORT_OVRHDR */
 
 /*
@@ -1074,5 +1149,5 @@
 	 *  r3ï¼excpt_nest_countã®å¤
 	 *  r4ï¼CPUä¾å¤ãã³ãã©çªå·
-	 *  r12ï¼CPUä¾å¤ã®æ
+	 *  r5ï¼CPUä¾å¤ã®æ
 å ±ãè¨æ¶ãã¦ããé åã®å
 é ­çªå°
@@ -1093,6 +1168,6 @@
 	ldr		r2, =istkpt				/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã« */
 	ldr		sp, [r2]
-	push	{r3}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
-
+	push	{r0,r3}					/* åæãåã®ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿å­ */
+									/* r0ã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */
 ALABEL(nk_exc_handler_2)
 	/*
@@ -1109,5 +1184,5 @@
 	ldr		r2, =exc_table			/* CPUä¾å¤ãã³ãã©ãã¼ãã«ã®èª­è¾¼ã¿ */
 	ldr		r3, [r2,r4,lsl #2]		/* CPUä¾å¤ãã³ãã©ã®çªå° â r3 */
-	mov		r0, r12					/* CPUä¾å¤ã®æ
+	mov		r0, r5					/* CPUä¾å¤ã®æ
 å ±ãè¨æ¶ãã¦ããé åã® */
 									/*		å
@@ -1123,44 +1198,14 @@
 	ldr		r3, [r2]
 	subs	r3, r3, #1
-	str		r3, [r2]
+	str		r3, [r2]				/* æ»ãå
+ãéã¿ã¹ã¯ã³ã³ãã­ã¹ããªã */
+	bne		exc_handler_3			/*				exc_handler_3ã«åå² */
 
 	/*
 	 *  ã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ãï¼
 	 */
-	popeq	{r1}					/* æ»ãå
-ãã¿ã¹ã¯ã³ã³ãã­ã¹ããªã */
-	moveq	sp, r1					/*		 ã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ã */
-	add		sp, sp, #8				/* ã¹ã¿ãã¯ä¸ã®æ
-å ±ãæ¨ã¦ã */
-
-	/*
-	 *  CPUä¾å¤å¦çããã®ãªã¿ã¼ã³ï¼irq_handler_3ã¨åãå¦çå
-å®¹ï¼
-	 */
-#if __TARGET_ARCH_ARM < 6
-	ldmfd	sp!, {r0}				/* æ»ãå
-ã®cpsrãspsrã«è¨­å® */
-	msr		spsr_cxsf, r0
-	ldmfd	sp!, {r0-r4,r12,lr,pc}^	/* ã³ã³ãã­ã¹ãã®å¾©å¸° */
-									/* ^ä»ããªã®ã§ï¼spsr â cpsr */
-#else /* __TARGET_ARCH_ARM < 6 */
-	ldmfd	sp!, {r0-r4,r12,lr}
-	rfefd	sp!
-#endif /* __TARGET_ARCH_ARM < 6 */
-
-/*
- *  å¾®å°æéå¾
-ã¡
- */
-	ATEXT
-	AALIGN(2)
-	AGLOBAL(_sil_dly_nse)
-ALABEL(_sil_dly_nse)
-	subs	r0, r0, #SIL_DLY_TIM1
-	bxls	lr
-ALABEL(_sil_dly_nse1)
-	subs	r0, r0, #SIL_DLY_TIM2
-	bhi		_sil_dly_nse1
-	bx		lr
+	pop		{r0,r3}
+	mov		sp, r3
+	b		exc_handler_3
 
 /*
@@ -1186,2 +1231,27 @@
 
 #endif /* __thumb__ */
+
+/*
+ *  å¾®å°æéå¾
+ã¡
+ *
+ *  ã­ã£ãã·ã¥ã©ã¤ã³ã®ã©ã®å ´æã«ãããã®ãã£ã¦å®è¡æéãå¤ããããï¼å¤§
+ *  ããã®åä½ã§ã¢ã©ã¤ã³ãã¦ããï¼
+ */
+	ATEXT
+	AALIGN(8)
+	AGLOBAL(sil_dly_nse)
+ALABEL(sil_dly_nse)
+	mov		r1, #0
+	mcr		p15, 0, r1, c7, c5, 6		/* åå²äºæ¸¬å
+¨ä½ã®ç¡å¹å */
+	asm_inst_sync_barrier r3
+	subs	r0, r0, #SIL_DLY_TIM1
+	bxls	lr
+ALABEL(sil_dly_nse1)
+	mcr		p15, 0, r1, c7, c5, 6		/* åå²äºæ¸¬å
+¨ä½ã®ç¡å¹å */
+	asm_inst_sync_barrier r3
+	subs	r0, r0, #SIL_DLY_TIM2
+	bhi		sil_dly_nse1
+	bx		lr
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_sym.def
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_sym.def	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_sym.def	(revision 306)
@@ -1,4 +1,4 @@
 TARGET_ARCH_ARM,__TARGET_ARCH_ARM
-USE_INTCFG_TABLE,1,,defined(USE_INTCFG_TABLE)
+USE_INTCFG_TABLE,true,bool,defined(USE_INTCFG_TABLE)
 sizeof_TCB,sizeof(TCB)
 offsetof_TCB_p_tinib,"offsetof(TCB,p_tinib)"
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/core_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/core_unrename.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/core_unrename.h	(revision 306)
@@ -59,4 +59,12 @@
 
 /*
+ *  pl310.c
+ */
+#undef pl310_initialize
+#undef pl310_disable
+#undef pl310_invalidate_all
+#undef pl310_clean_and_invalidate_all
+
+/*
  *  target_kernel_impl.c
  */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_kernel_impl.c
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_kernel_impl.c	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_kernel_impl.c	(revision 306)
@@ -1,6 +1,5 @@
 /*
- *  TOPPERS/ASP Kernel
- *      Toyohashi Open Platform for Embedded Real-Time Systems/
- *      Advanced Standard Profile Kernel
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
  *
  *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
@@ -51,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: gic_kernel_impl.c 522 2016-01-14 06:56:53Z ertl-hiro $
+ *  $Id: gic_kernel_impl.c 714 2016-03-31 05:52:19Z ertl-hiro $
  */
 
@@ -138,5 +137,5 @@
 	 *  ãã¹ã¦ã®å²è¾¼ã¿ãã°ã«ã¼ã1ï¼IRQï¼ã«è¨­å®
 	 */
-	for (i = 0; i < GIC_TNUM_INTNO / 32; i++) {
+	for (i = 0; i < (GIC_TNUM_INTNO + 31) / 32; i++) {
 		sil_wrw_mem(GICD_IGROUPR(i), 0xffffffffU);
 	}
@@ -146,5 +145,5 @@
 	 *  ãã¹ã¦ã®å²è¾¼ã¿ãç¦æ­¢
 	 */
-	for (i = 0; i < GIC_TNUM_INTNO / 32; i++) {
+	for (i = 0; i < (GIC_TNUM_INTNO + 31) / 32; i++) {
 		sil_wrw_mem(GICD_ICENABLER(i), 0xffffffffU);
 	}
@@ -153,5 +152,5 @@
 	 *  ãã¹ã¦ã®å²è¾¼ã¿ãã³ãã£ã³ã°ãã¯ãªã¢
 	 */
-	for (i = 0; i < GIC_TNUM_INTNO / 32; i++) {
+	for (i = 0; i < (GIC_TNUM_INTNO + 31) / 32; i++) {
 		sil_wrw_mem(GICD_ICPENDR(i), 0xffffffffU);
 	}
@@ -161,5 +160,5 @@
 åº¦ã«è¨­å®
 	 */
-	for (i = 0; i < GIC_TNUM_INTNO / 4; i++){
+	for (i = 0; i < (GIC_TNUM_INTNO + 3) / 4; i++){
 		sil_wrw_mem(GICD_IPRIORITYR(i), 0xffffffffU);
 	}
@@ -169,5 +168,5 @@
 ±æããªãã§ã©ã«å²è¾¼ã¿ã®ã¿ã¼ã²ããããã­ã»ããµ0ã«è¨­å®
 	 */
-	for (i = GIC_INTNO_SPI0 / 4; i < GIC_TNUM_INTNO / 4; i++) {
+	for (i = GIC_INTNO_SPI0 / 4; i < (GIC_TNUM_INTNO + 3) / 4; i++) {
 		sil_wrw_mem(GICD_ITARGETSR(i), 0x01010101U);
 	}
@@ -176,5 +175,5 @@
 	 *  ãã¹ã¦ã®ããªãã§ã©ã«å²è¾¼ã¿ãã¬ãã«ããªã¬ã«è¨­å®
 	 */
-	for (i = GIC_INTNO_PPI0 / 16; i < GIC_TNUM_INTNO / 16; i++) {
+	for (i = GIC_INTNO_PPI0 / 16; i < (GIC_TNUM_INTNO + 15) / 16; i++) {
 #ifdef GIC_ARM11MPCORE
 		sil_wrw_mem(GICD_ICFGR(i), 0x55555555U);
@@ -198,4 +197,6 @@
 	sil_wrw_mem(GICD_CTLR, GICD_CTLR_DISABLE);
 }
+
+#ifndef OMIT_GIC_INITIALIZE_INTERRUPT
 
 /*
@@ -273,2 +274,4 @@
 	}
 }
+
+#endif /* OMIT_GIC_INITIALIZE_INTERRUPT */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_kernel_impl.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_kernel_impl.h	(revision 306)
@@ -1,6 +1,5 @@
 /*
- *  TOPPERS/ASP Kernel
- *      Toyohashi Open Platform for Embedded Real-Time Systems/
- *      Advanced Standard Profile Kernel
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
  *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
@@ -51,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: gic_kernel_impl.h 535 2016-01-16 00:42:29Z ertl-hiro $
+ *  $Id: gic_kernel_impl.h 714 2016-03-31 05:52:19Z ertl-hiro $
  */
 
@@ -176,18 +175,18 @@
 #define GICD_TYPER			GIC_REG(GICD_BASE, 0x004)
 #define GICD_IIDR			GIC_REG(GICD_BASE, 0x008)
-#define GICD_IGROUPR(n)		GIC_REG(GICD_BASE, 0x080 + n * 4)
-#define GICD_ISENABLER(n)	GIC_REG(GICD_BASE, 0x100 + n * 4)
-#define GICD_ICENABLER(n)	GIC_REG(GICD_BASE, 0x180 + n * 4)
-#define GICD_ISPENDR(n)		GIC_REG(GICD_BASE, 0x200 + n * 4)
-#define GICD_ICPENDR(n)		GIC_REG(GICD_BASE, 0x280 + n * 4)
-#define GICD_ISACTIVER(n)	GIC_REG(GICD_BASE, 0x300 + n * 4)
-#define GICD_ICACTIVER(n)	GIC_REG(GICD_BASE, 0x380 + n * 4)
-#define GICD_IPRIORITYR(n)	GIC_REG(GICD_BASE, 0x400 + n * 4)
-#define GICD_ITARGETSR(n)	GIC_REG(GICD_BASE, 0x800 + n * 4)
-#define GICD_ICFGR(n)		GIC_REG(GICD_BASE, 0xc00 + n * 4)
-#define GICD_NSCAR(n)		GIC_REG(GICD_BASE, 0xe00 + n * 4)
+#define GICD_IGROUPR(n)		GIC_REG(GICD_BASE, 0x080 + (n) * 4)
+#define GICD_ISENABLER(n)	GIC_REG(GICD_BASE, 0x100 + (n) * 4)
+#define GICD_ICENABLER(n)	GIC_REG(GICD_BASE, 0x180 + (n) * 4)
+#define GICD_ISPENDR(n)		GIC_REG(GICD_BASE, 0x200 + (n) * 4)
+#define GICD_ICPENDR(n)		GIC_REG(GICD_BASE, 0x280 + (n) * 4)
+#define GICD_ISACTIVER(n)	GIC_REG(GICD_BASE, 0x300 + (n) * 4)
+#define GICD_ICACTIVER(n)	GIC_REG(GICD_BASE, 0x380 + (n) * 4)
+#define GICD_IPRIORITYR(n)	GIC_REG(GICD_BASE, 0x400 + (n) * 4)
+#define GICD_ITARGETSR(n)	GIC_REG(GICD_BASE, 0x800 + (n) * 4)
+#define GICD_ICFGR(n)		GIC_REG(GICD_BASE, 0xc00 + (n) * 4)
+#define GICD_NSCAR(n)		GIC_REG(GICD_BASE, 0xe00 + (n) * 4)
 #define GICD_SGIR			GIC_REG(GICD_BASE, 0xf00)
-#define GICD_CPENDSGIR(n)	GIC_REG(GICD_BASE, 0xf10 + n * 4)
-#define GICD_SPENDSGIR(n)	GIC_REG(GICD_BASE, 0xf20 + n * 4)
+#define GICD_CPENDSGIR(n)	GIC_REG(GICD_BASE, 0xf10 + (n) * 4)
+#define GICD_SPENDSGIR(n)	GIC_REG(GICD_BASE, 0xf20 + (n) * 4)
 
 /*
@@ -200,7 +199,8 @@
  *  å²è¾¼ã¿ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¬ã¸ã¹ã¿ï¼GICD_ICFGRnï¼ã®è¨­å®å¤
  *
- *  ç¬¬1ãããã¯ï¼ARM11 MPCoreã§ã¯å²è¾¼ã¿ã®éç¥å
-ãã­ã»ããµãè¨­å®ãããã
- *  ã«ä½¿ç¨ããã¦ãããï¼GICv1ããã³GICv2ã§ã¯äºç´ãããã¨ãªã£ã¦ããï¼
+ *  ç¬¬1ãããã¯ï¼ARM11 MPCoreããã³GICã®æ©ãææã®å®è£
+ã§ã¯å²è¾¼ã¿ã®éç¥
+ *  å
+ãã­ã»ããµãè¨­å®ããããã«ä½¿ç¨ããã¦ããï¼
  */
 #define GICD_ICFGRn_LEVEL	UINT_C(0x00)
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_support.S
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_support.S	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/gic_support.S	(revision 306)
@@ -1,6 +1,5 @@
 /*
- *  TOPPERS/ASP Kernel
- *      Toyohashi Open Platform for Embedded Real-Time Systems/
- *      Advanced Standard Profile Kernel
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
@@ -53,5 +52,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: gic_support.S 522 2016-01-14 06:56:53Z ertl-hiro $
+ *  $Id: gic_support.S 718 2016-04-01 15:05:01Z ertl-hiro $
  */
 
@@ -79,5 +78,6 @@
 å ±ï¼å²è¾¼ã¿çºçåã®å²è¾¼ã¿
  *  åªå
-åº¦ãã¹ã¯ï¼ãï¼ã¹ã¿ãã¯ã«ä¿å­ããï¼
+åº¦ãã¹ã¯ï¼ãï¼ã¹ã¿ãã¯ã®å
+é ­ã«ä¿å­ããï¼
  */
 	ATEXT
@@ -104,14 +104,8 @@
 	str		r0, [r1]			/* æ°ããå²è¾¼ã¿åªå
 åº¦ãã¹ã¯ãã»ãããã */
-//	DATA_SYNC_BARRIER			/* å²è¾¼ã¿åªå
+	asm_data_sync_barrier r0	/* å²è¾¼ã¿åªå
 åº¦ãã¹ã¯ãã»ãããããã®ãå¾
 ã¤ */
-#if __TARGET_ARCH_ARM == 6
-	mov		r0, #0
-	mcr		p15, 0, r0, c7, c10, 4
-#elif __TARGET_ARCH_ARM == 7
-	dsb
-#endif /* __TARGET_ARCH_ARM == 7 */
-	push	{r2}				/* irc_end_intã§ç¨ããæ
+	str		r2, [sp]			/* irc_end_intã§ç¨ããæ
 å ±ãä¿å­ */
 
@@ -141,5 +135,5 @@
 ã«æ»ãï¼
 	 */
-	pop		{r2}				/* irc_begin_intã§ä¿å­ããæ
+	ldr		r2, [sp]			/* irc_begin_intã§ä¿å­ããæ
 å ±ãå¾©å¸° */
 	ldr		r1, =GICC_PMR		/* å²è¾¼ã¿åªå
@@ -178,5 +172,6 @@
 å ±ï¼CPUä¾å¤çºçåã®å²è¾¼ã¿åªå
 åº¦ãã¹ã¯ï¼ãï¼ã¹ã¿ã
- *	ã¯ã«ä¿å­ããï¼
+ *	ã¯ã®å
+é ­ã«ä¿å­ããï¼
  */
 	ATEXT
@@ -191,5 +186,5 @@
 åº¦ãåå¾ */
 	ldr		r2, [r1]
-	push	{r2}				/* irc_end_excã§ç¨ããæ
+	str		r2, [sp]			/* irc_end_excã§ç¨ããæ
 å ±ãä¿å­ */
 	bx		lr
@@ -207,5 +202,5 @@
 ã«æ»ãï¼
 	 */
-	pop		{r2}				/* irc_begin_excã§ä¿å­ããæ
+	ldr		r2, [sp]			/* irc_begin_excã§ä¿å­ããæ
 å ±ãå¾©å¸° */
 	ldr		r1, =GICC_PMR		/* å²è¾¼ã¿åªå
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/pl310.c
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/pl310.c	(revision 306)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/pl310.c	(revision 306)
@@ -0,0 +1,185 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2013-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã®æä½ã©ã¤ãã©ãª
+ */
+
+#include "kernel_impl.h"
+#include "pl310.h"
+
+Inline uint32_t
+get_way_mask(void)
+{
+	uint32_t	aux;
+	
+	aux = sil_rew_mem(PL310_AUX_CTRL);
+	if ((aux & PL310_AUX_CTRL_ASSOCIATIVITY) != 0U) {
+		/* 16ã¦ã§ã¤ */
+		return(0x0000ffffU);
+	}
+	else {
+		/* 8ã¦ã§ã¤ */
+		return(0x000000ffU);
+	}
+}
+
+Inline void
+pl310_cache_sync(void)
+{
+	sil_wrw_mem(PL310_CACHE_SYNC, 0);
+}
+
+Inline void
+pl310_inv_all(void)
+{
+	uint32_t	way_mask = get_way_mask();
+
+	/* ãã¹ã¦ã®ã¦ã§ã¤ãç¡å¹åãã */
+	sil_wrw_mem(PL310_INV_WAY, 0xffff);
+	while ((sil_rew_mem(PL310_INV_WAY) & way_mask) != 0U) ;
+	pl310_cache_sync();
+}
+
+Inline void
+pl310_debug_set(uint32_t val)
+{
+	sil_wrw_mem(PL310_DEBUG_CTRL, val);
+}
+
+/*
+ *  PL310ã®åæå
+ */
+void
+pl310_initialize(uint32_t aux_val, uint32_t aux_mask)
+{
+	uint32_t	aux;
+	uint32_t	prefetch;
+	uint32_t	prefetch_val = 0U;
+
+	/* L2ã­ã£ãã·ã¥ããã£ã¹ã¨ã¼ãã«ã®å ´åã®ã¿åæåãè¡ã */
+	if ((sil_rew_mem(PL310_CTRL) & 0x01) == 0U) {
+		/* å
+±æå±æ§ãç¡è¦ãã */
+		aux_val |= PL310_AUX_CTRL_IGNORE_SHARE;
+
+		/* å½ä»¤ããªãã§ãããã¤ãã¼ãã« */
+		aux_val |= PL310_AUX_CTRL_INST_PREFETCH;
+		prefetch_val |= PL310_AUX_CTRL_INST_PREFETCH;
+
+		/* ãã¼ã¿ããªãã§ãããã¤ãã¼ãã« */
+		aux_val |= PL310_AUX_CTRL_DATA_PREFETCH;
+		prefetch_val |= PL310_AUX_CTRL_DATA_PREFETCH;
+
+		/* ããã«ã©ã¤ã³ãã£ã«ãã¤ãã¼ãã« */
+		prefetch_val |= PL310_PREFETCH_CTRL_DLINEFILL;
+		prefetch_val |= PL310_PREFETCH_CTRL_INCR_DLINEFILL;
+                
+		/* è£å©å¶å¾¡ã¬ã¸ã¹ã¿ãè¨­å® */
+		aux = sil_rew_mem(PL310_AUX_CTRL);
+		sil_wrw_mem(PL310_AUX_CTRL, ((aux & aux_mask) | aux_val));
+
+		/* ããªãã§ããå¶å¾¡ã¬ã¸ã¹ã¿ãè¨­å® */
+		prefetch = sil_rew_mem(PL310_PREFETCH_CTRL);
+		sil_wrw_mem(PL310_PREFETCH_CTRL, (prefetch | prefetch_val));
+
+		/* L2ã­ã£ãã·ã¥ã®å
+¨ä½ã®ç¡å¹å */
+		pl310_inv_all();
+        
+		/* ã¯ã­ãã¯ã²ã¼ãã£ã³ã°ã¨ã¹ã¿ã³ãã¤ã¢ã¼ããã¤ãã¼ãã« */
+		sil_wrw_mem(PL310_POWER_CTRL, 0x03);
+        
+		/* L2ã­ã£ãã·ã¥ã®ã¤ãã¼ãã« */
+		sil_wrw_mem(PL310_CTRL, 0x01);
+	}    
+}
+
+/*
+ *  L2ã­ã£ãã·ã¥ã®ãã£ã¹ã¨ã¼ãã«
+ */
+void
+pl310_disable(void)
+{
+	pl310_clean_and_invalidate_all();
+	sil_wrw_mem(PL310_CTRL, 0x00);
+}
+
+/*
+ *  L2ã­ã£ãã·ã¥å
+¨ä½ã®ç¡å¹åï¼æ¸ãæ»ããªãï¼
+ */
+void
+pl310_invalidate_all(void)
+{
+	pl310_debug_set(0x03);
+	pl310_inv_all();
+	pl310_debug_set(0x00);
+}
+
+/*
+ *  L2ã­ã£ãã·ã¥å
+¨ä½ã®ã¯ãªã¼ã³ã¨ç¡å¹å
+ */
+void
+pl310_clean_and_invalidate_all(void)
+{
+	uint32_t	way_mask = get_way_mask();
+
+	pl310_debug_set(0x03);
+	sil_wrw_mem(PL310_CLEAN_INV_WAY, way_mask);
+	while ((sil_rew_mem(PL310_CLEAN_INV_WAY) & way_mask) != 0U) ;
+	pl310_cache_sync();
+	pl310_debug_set(0x00);
+}
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/pl310.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/pl310.h	(revision 306)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/pl310.h	(revision 306)
@@ -0,0 +1,148 @@
+/*
+ *  TOPPERS Software
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ * 
+ *  Copyright (C) 2013-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id$
+ */
+
+/*
+ *		L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã«é¢ããå®ç¾©
+ */
+
+#ifndef TOPPERS_PL310_H
+#define TOPPERS_PL310_H
+
+/*
+ *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
+ */
+#ifndef CAST
+#define CAST(type, val)		((type)(val))
+#endif /* CAST */
+
+/*
+ *  PL310ã®ã¬ã¸ã¹ã¿ã®çªå°ã®å®ç¾©
+ */
+#define PL310_CACHE_ID			CAST(uint32_t *, PL310_BASE + 0x000)
+#define PL310_CACHE_TYPE		CAST(uint32_t *, PL310_BASE + 0x004)
+#define PL310_CTRL				CAST(uint32_t *, PL310_BASE + 0x100)
+#define PL310_AUX_CTRL			CAST(uint32_t *, PL310_BASE + 0x104)
+#define PL310_TAG_RAM_CTRL		CAST(uint32_t *, PL310_BASE + 0x108)
+#define PL310_DATA_RAM_CTRL		CAST(uint32_t *, PL310_BASE + 0x10c)
+#define PL310_EVENT_CNT_CTRL	CAST(uint32_t *, PL310_BASE + 0x200)
+#define PL310_EVENT_CNT1_CFG	CAST(uint32_t *, PL310_BASE + 0x204)
+#define PL310_EVENT_CNT0_CFG	CAST(uint32_t *, PL310_BASE + 0x208)
+#define PL310_EVENT_CNT1		CAST(uint32_t *, PL310_BASE + 0x20c)
+#define PL310_EVENT_CNT0		CAST(uint32_t *, PL310_BASE + 0x210)
+#define PL310_INT_MASK			CAST(uint32_t *, PL310_BASE + 0x214)
+#define PL310_INT_MASK_STAT		CAST(uint32_t *, PL310_BASE + 0x218)
+#define PL310_INT_RAW_STAT		CAST(uint32_t *, PL310_BASE + 0x21c)
+#define PL310_INT_CLEAR			CAST(uint32_t *, PL310_BASE + 0x220)
+#define PL310_CACHE_SYNC		CAST(uint32_t *, PL310_BASE + 0x730)
+#define PL310_INV_PA			CAST(uint32_t *, PL310_BASE + 0x770)
+#define PL310_INV_WAY			CAST(uint32_t *, PL310_BASE + 0x77c)
+#define PL310_CLEAN_PA			CAST(uint32_t *, PL310_BASE + 0x7b0)
+#define PL310_CLEAN_IDX			CAST(uint32_t *, PL310_BASE + 0x7b8)
+#define PL310_CLEAN_WAY			CAST(uint32_t *, PL310_BASE + 0x7bc)
+#define PL310_CLEAN_INV_PA		CAST(uint32_t *, PL310_BASE + 0x7f0)
+#define PL310_CLEAN_INV_IDX		CAST(uint32_t *, PL310_BASE + 0x7f8)
+#define PL310_CLEAN_INV_WAY		CAST(uint32_t *, PL310_BASE + 0x7Fc)
+#define PL310_D_LOCKDOWN0		CAST(uint32_t *, PL310_BASE + 0x900)
+#define PL310_I_LOCKDOWN0		CAST(uint32_t *, PL310_BASE + 0x904)
+#define PL310_DEBUG_CTRL		CAST(uint32_t *, PL310_BASE + 0xf40)
+#define PL310_PREFETCH_CTRL		CAST(uint32_t *, PL310_BASE + 0xf60)
+#define PL310_POWER_CTRL		CAST(uint32_t *, PL310_BASE + 0xf80)
+
+/*
+ *  ã­ã£ãã·ã¥è£å©å¶å¾¡ã¬ã¸ã¹ã¿ï¼PL310_AUX_CTRLï¼ã®è¨­å®å¤
+ */
+#define PL310_AUX_CTRL_ASSOCIATIVITY		0x00010000
+#define PL310_AUX_CTRL_WAY_SIZE_SHIFT		17
+#define PL310_AUX_CTRL_WAY_SIZE_MASK		0x000e0000
+#define PL310_AUX_CTRL_IGNORE_SHARE			0x00400000
+#define PL310_AUX_CTRL_NS_LOCKDOWN			0x04000000
+#define PL310_AUX_CTRL_NS_INT_CTRL			0x08000000
+#define PL310_AUX_CTRL_DATA_PREFETCH		0x10000000
+#define PL310_AUX_CTRL_INST_PREFETCH		0x20000000
+#define PL310_AUX_CTRL_EARLY_BRESP			0x40000000
+
+/*
+ *  ããªãã§ããå¶å¾¡ã¬ã¸ã¹ã¿ï¼PL310_PREFETCH_CTRLï¼ã®è¨­å®å¤
+ */
+#define PL310_PREFETCH_CTRL_INCR_DLINEFILL	0x00800000
+#define PL310_PREFETCH_CTRL_DATA_PREFETCH	0x10000000
+#define PL310_PREFETCH_CTRL_INST_PREFETCH	0x20000000
+#define PL310_PREFETCH_CTRL_DLINEFILL		0x40000000
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  L2ã­ã£ãã·ã¥ã®åæåã¨ã¤ãã¼ãã«
+ */
+extern void pl310_initialize(uint32_t aux_val, uint32_t aux_mask);
+
+/*
+ *  L2ã­ã£ãã·ã¥ã®ãã£ã¹ã¨ã¼ãã«
+ */
+extern void pl310_disable(void);
+
+/*
+ *  L2ã­ã£ãã·ã¥å
+¨ä½ã®ç¡å¹åï¼æ¸ãæ»ããªãï¼
+ */
+extern void pl310_invalidate_all(void);
+
+/*
+ *  L2ã­ã£ãã·ã¥å
+¨ä½ã®ã¯ãªã¼ã³ã¨ç¡å¹å
+ */
+extern void pl310_clean_and_invalidate_all(void);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_PL310_H */
Index: asp3_wo_tecs/trunk/arch/arm_gcc/common/uart_pl011.h
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/common/uart_pl011.h	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/common/uart_pl011.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: uart_pl011.h 359 2015-07-26 10:27:20Z ertl-hiro $
+ *  $Id: uart_pl011.h 509 2016-01-12 06:06:14Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_design.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_design.txt	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_design.txt	(revision 306)
@@ -3,7 +3,60 @@
 		ARMã³ã¢ä¾å­é¨ è¨­è¨ã¡ã¢
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.B.0
-		æçµæ´æ°: 2015å¹´8æ18æ¥
-
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1.0
+		æçµæ´æ°: 2016å¹´5æ14æ¥
+
+----------------------------------------------------------------------
+ TOPPERS/ASP Kernel
+     Toyohashi Open Platform for Embedded Real-Time Systems/
+     Advanced Standard Profile Kernel
+
+ Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
+             Graduate School of Information Science, Nagoya Univ., JAPAN
+ 
+ ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+     æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+     ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+     è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+     ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+     ã¨ï¼
+   (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+       ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+   (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+       å ±åãããã¨ï¼
+ (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+     å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+     ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+     ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+     å
+è²¬ãããã¨ï¼
+ 
+ æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ã®è²¬ä»»ãè² ããªãï¼
+ 
+ $Id: arm_design.txt 751 2016-05-14 15:03:06Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -55,5 +108,8 @@
 ARMv7-Aï¼ARMv7-Rã«æºæ ãããã­ã»ããµã³ã¢ãæã¤ã¿ã¼ã²ããã·ã¹ãã ï¼ãã
 ãï¼ã«å
-±éã«ä½¿ç¨ã§ããé¨åã§ããï¼
+±éã«ä½¿ç¨ã§ããé¨åã§ããï¼ãã ãï¼ããã«è©²å½ãããã¹ã¦ã®ARMã³ã¢
+ã«å¯¾å¿ã§ãã¦ããããã§ã¯ãªãï¼æ°ãããããã«ãã¼ãã£ã³ã°ããéã«ã¯ï¼ã³
+ã¢ä¾å­é¨ã«ä½ããã®ä¿®æ­£ãå¿
+è¦ã«ãªããã¨ãå¤ãã¨æãããï¼
 
 ARMã³ã¢ã®ãã­ã»ããµã³ã¢ç¥ç§°ã"arm"ã¨ããï¼GNUéçºç°å¢åãã®ARMã³ã¢ä¾å­
@@ -284,11 +340,12 @@
 ã®cpsrãspsrã«å¾©å¸° */
 	msr		spsr_cxsf, r0
-	ldmfd	sp!, {r0-r4,r12,lr,pc}^		/* ä¾å¤å¦çããã®å¾©å¸° */
-----------------------------------------
-
-ããã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã«å ãã¦r4ãå¾©å¸°ãã¦ããã®ã¯ï¼ä¾å¤ã®åºå
-¥å£å¦
-çã§ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä»¥å¤ã«ä½¿ããã¬ã¸ã¹ã¿ã¨ãã¦ï¼r4ãç¢ºä¿ããããã§ã
-ãï¼
+	ldmfd	sp!, {r0-r5,r12,lr,pc}^		/* ä¾å¤å¦çããã®å¾©å¸° */
+----------------------------------------
+
+ããã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã«å ãã¦r4ã¨r5ãå¾©å¸°ãã¦ããã®ã¯ï¼ä¾å¤ã®åºå
+¥
+å£å¦çã§ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä»¥å¤ã«ä½¿ããã¬ã¸ã¹ã¿ã¨ãã¦ï¼r4ã¨r5ãç¢ºä¿ãã
+ããã§ããï¼å®éã«ã¯ï¼r4ã ããä½¿ããã°ååã§ãããï¼ã¹ã¿ãã¯ãã¤ã³ã¿ã
+8ãã¤ãå¢çã«ã¢ã©ã¤ã³ããããã«r5ãä¿å­ï¼å¾©å¸°ãã¦ããï¼ï¼
 
 ãã®åºå£ãå®è¡ããæç¹ã§ï¼ã¹ã¿ãã¯ã¯æ¬¡ã®ããã«ãªã£ã¦ããå¿
@@ -310,10 +367,12 @@
 	|       r4       |
 	+----------------+ <- sp+0x18
+	|       r5       |
+	+----------------+ <- sp+0x1c
 	|       r12      |
-	+----------------+ <- sp+0x1c
+	+----------------+ <- sp+0x20
 	|       lr       |
-	+----------------+ <- sp+0x20
+	+----------------+ <- sp+0x24
 	|    æ»ãçªå°    |
-	+----------------+
+	+----------------+ <- sp+0x28
 
 ããã«å¯¾å¿ããä¾å¤ã®å
@@ -325,5 +384,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_IRQ_BIT)
-	stmfd	sp!, {r0-r4,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */	(*1)
+	stmfd	sp!, {r0-r5,r12,lr,pc}		/* pcã¯ã¹ãã¼ã¹ç¢ºä¿ã®ãã */	(*1)
 
 	/*
@@ -339,5 +398,5 @@
 	 */
 	msr		cpsr_c, #(CPSR_SVC_MODE AOR CPSR_IRQ_BIT)
-	str		r2, [sp,#0x1c]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */		(*2)
+	str		r2, [sp,#0x20]			/* æ»ãçªå°ãã¹ã¿ãã¯ã«ä¿å­ */		(*2)
 	push	{r1}					/* spsrãã¹ã¿ãã¯ã«ä¿å­ */
 ----------------------------------------
@@ -346,6 +405,6 @@
 ãï¼ãã®æç¹ã§ä¿å­ããpcã®å¤ã¯ä½¿ããªãï¼(*2)ã§ï¼ç¢ºä¿ããã¹ãã¼ã¹ã«æ»ã
 çªå°ãæ ¼ç´ããï¼æ ¼ç´å
-ã[sp,#0x1c]ã¨ããã®ã¯ï¼ãã®æç¹ã§ã¯spã¯ä¸ã®å³ã®
-ï¼sp+0x04ï¼ãæãã¦ããï¼æ»ãçªå°ã¯ï¼sp+0x20ï¼ã«æ ¼ç´ãããããã§ããï¼
+ã[sp,#0x20]ã¨ããã®ã¯ï¼ãã®æç¹ã§ã¯spã¯ä¸ã®å³ã®
+ï¼sp+0x04ï¼ãæãã¦ããï¼æ»ãçªå°ã¯ï¼sp+0x24ï¼ã«æ ¼ç´ãããããã§ããï¼
 
 ä¾å¤ãåãä»ããã¨Iããããã»ããããããï¼ä¾å¤ã®å
@@ -393,12 +452,13 @@
 
 ----------------------------------------
-	ldmfd	sp!, {r0-r4,r12,lr}
+	ldmfd	sp!, {r0-r5,r12,lr}
 	rfefd	sp!
 ----------------------------------------
 
-ããã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã«å ãã¦r4ãå¾©å¸°ãã¦ããã®ã¯ï¼ä¾å¤ã®åºå
-¥å£å¦
-çã§ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä»¥å¤ã«ä½¿ããã¬ã¸ã¹ã¿ã¨ãã¦ï¼r4ãç¢ºä¿ããããã§ã
-ãï¼
+ããã§ï¼ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã«å ãã¦r4ã¨r5ãå¾©å¸°ãã¦ããã®ã¯ï¼ä¾å¤ã®åºå
+¥
+å£å¦çã§ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä»¥å¤ã«ä½¿ããã¬ã¸ã¹ã¿ã¨ãã¦ï¼r4ã¨r5ãç¢ºä¿ãã
+ããã§ããï¼å®éã«ã¯ï¼r4ã ããä½¿ããã°ååã§ãããï¼ã¹ã¿ãã¯ãã¤ã³ã¿ã
+8ãã¤ãå¢çã«ã¢ã©ã¤ã³ããããã«r5ãä¿å­ï¼å¾©å¸°ãã¦ããï¼ï¼
 
 ãã®åºå£ãå®è¡ããæç¹ã§ï¼ã¹ã¿ãã¯ã¯æ¬¡ã®ããã«ãªã£ã¦ããå¿
@@ -418,12 +478,14 @@
 	|       r4       |
 	+----------------+ <- sp+0x14
+	|       r5       |
+	+----------------+ <- sp+0x18
 	|       r12      |
-	+----------------+ <- sp+0x18
+	+----------------+ <- sp+0x1c
 	|       lr       |
-	+----------------+ <- sp+0x1c
+	+----------------+ <- sp+0x20
 	|    æ»ãçªå°    |
-	+----------------+ <- sp+0x20
+	+----------------+ <- sp+0x24
 	|      cpsr      |
-	+----------------+
+	+----------------+ <- sp+0x28
 
 ããã«å¯¾å¿ããä¾å¤ã®å
@@ -443,5 +505,5 @@
 	 */
 	cps		#CPSR_SVC_MODE
-	stmfd	sp!, {r0-r4,r12,lr}
+	stmfd	sp!, {r0-r5,r12,lr}
 ----------------------------------------
 
@@ -585,11 +647,18 @@
 ä¸­ã§å¿
 è¦ãªæ
-å ±ï¼ä¾ãã°ï¼å²è¾¼ã¿çªå·ï¼ã¯ï¼irc_begin_intã§ã¹ã¿ãã¯ä¸ã«ä¿å­
-ãã¦ããå¿
-è¦ãããï¼ãããå¯è½ã«ããããã«ï¼irc_begin_intãå¼ã³åºããã
-ãï¼irc_end_intãå¿
-ãå¼ã³åºãããããã«ãã¦ããï¼ã¹ããªã¢ã¹å²è¾¼ã¿ã®å ´å
-ã«ãï¼irc_end_intãå¼ã³åºãããã«ãã¦ããï¼
-
+å ±ï¼ä¾ãã°ï¼å²è¾¼ã¿çªå·ï¼ã¯ï¼irc_begin_intã§ã¹ã¿ãã¯ã®å
+é ­ã«
+ä¿å­ãã¦ããå¿
+è¦ãããï¼ããã«ç¨ããããã«ï¼ã¹ã¿ãã¯ã®å
+é ­ã«1ã¯ã¼ãã®ç©º
+ãé åãè¨­ãã¦ããï¼
+
+irc_end_intã§å¿
+è¦ãªæ
+å ±ã1ã¯ã¼ãã§ä¸è¶³ããå ´åã«ã¯ï¼irc_begin_intã§ã¹ã¿ã
+ã¯ã«ç©ã¿ï¼irc_end_intã§ã¹ã¿ãã¯ããåãåºãï¼ãããå¯è½ã«ããããã«ï¼
+irc_begin_intãå¼ã³åºããããï¼irc_end_intãå¿
+ãå¼ã³åºãããããã«ãã¦
+ããï¼ã¹ããªã¢ã¹å²è¾¼ã¿ã®å ´åã«ãï¼irc_end_intãå¼ã³åºãããã«ãã¦ããï¼
 ãµãã«ã¼ãã³ï¼irc_begin_intï¼ã®ä¸­ã§ã¹ã¿ãã¯ã«ç©ã¿å¢ãã®ã¯ï¼ä¸è¬ã«ã¯æ¡ç¨
 ããªããã­ã°ã©ãã³ã°ææ³ã§ãããï¼irc_begin_intããirc_end_intã«æ¸¡ãæ
@@ -894,10 +963,5 @@
 å ±ãè¨æ¶ãã¦ããé åã®å
 é ­çªå°ãç¬¬1ãã©ã¡ã¼ã¿ï¼CPUä¾å¤ãã³ã
-ã©çªå·ãç¬¬2ãã©ã¡ã¼ã¿ã¨ãã¦å¼ã³åºãï¼r12ã«ä¿å­ããã¦ããCPUä¾å¤ã®æ
-å ±ã
-è¨æ¶ãã¦ããé åã®å
-é ­çªå°ãä¿å­ãããããã«ï¼å¿
-è¦ã«å¿ãã¦ï¼ã¹ã¿ãã¯ã«
-ä¿å­ããï¼
+ã©çªå·ãç¬¬2ãã©ã¡ã¼ã¿ã¨ãã¦å¼ã³åºãï¼
 
 ----------------------------------------
@@ -919,7 +983,7 @@
 ã¯ã«æ»ãï¼ãã®å¾ï¼CPUä¾å¤ãçºçããç¶æ³ãå¤æ­ããããã®è¿½å æ
 å ±ãã¹ã¿ã
-ã¯ä¸ããæ¨ã¦ãï¼ä¾å¤ãã¹ãã«ã¦ã³ãã0ã«ãªã£ãå ´åã®å¦çã¯ï¼å²è¾¼ã¿ãã³ã
-ã©ã®åºå£å¦çã¨å
-±éã§ããããï¼ret_int_1ã«åå²ããï¼
+ã¯ä¸ããæ¨ã¦ãï¼ä¾å¤ãã¹ãã«ã¦ã³ãã0ã«ãªã£ãå ´åã®å¦çã¯ï¼è¿½å æ
+å ±ãã¹
+ã¿ãã¯ä¸ããæ¨ã¦ããã¨ä»¥å¤ã¯ï¼å²è¾¼ã¿ãã³ãã©ã®åºå£å¦çã¨åæ§ã§ããï¼
 
 ----------------------------------------
@@ -957,9 +1021,4 @@
 #endif /* TOPPERS_SUPPORT_OVRHDR */
 		}
-----------------------------------------
-
-ä»¥ä¸ã®å¦çã«ã¯ï¼å²è¾¼ã¿ãã³ãã©ã®åºå£å¦çã®ã«ã¼ãã³ãæµç¨ããï¼
-
-----------------------------------------
 		CPUä¾å¤å¦çããã®ãªã¿ã¼ã³å¾ã«ï¼CPUã­ãã¯è§£é¤ç¶æ
 ã«æ»ãããã«æºåãã
@@ -972,6 +1031,4 @@
 ----------------------------------------
 
-ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãå¾©å¸°ããå¾ï¼ä¾å¤ãããªã¿ã¼ã³ããï¼
-
 âã¹ã¿ãã¯ãã¤ã³ã¿ãä¸æ­£ã®å ´åã®å¯¾ç­
 
Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_memo.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_memo.txt	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_memo.txt	(revision 306)
@@ -82,4 +82,5 @@
 	- ç©çã¡ã¢ãªã·ã¹ãã ã¢ã¼ã­ãã¯ãã£ï¼PMSAï¼ã§ã®ã¬ã¸ã¹ã¿
 	- ããã©ã¼ãã³ã¹ã¢ãã¿ã¬ã¸ã¹ã¿
+ã»ãã®ä»ï¼åå¿é²ï¼
 
 âåèæç®
@@ -651,5 +652,5 @@
 ã»ARMv7-Aï¼VMSAï¼ã«ãããã­ã£ãã·ã¥ã»åå²äºæ¸¬ã¡ã³ããã³ã¹æä½
 	- ICIALLIS, ICIALLU, ICIMVAU â¦ å½ä»¤ã­ã£ãã·ã¥ã¨åå²äºæ¸¬ã®ç¡å¹å
-	- BPIALLIS, CPIALL, CPIMVA	â¦ åå²äºæ¸¬ã®ç¡å¹å
+	- BPIALLIS, BPIALL, BPIMVA	â¦ åå²äºæ¸¬ã®ç¡å¹å
 	- DCIMVAC, DCISW			â¦ ãã¼ã¿ï¼çµ±åã­ã£ãã·ã¥ã®ç¡å¹å
 	- DCCMVAC, DCCSW, DCCMVAU	â¦ ãã¼ã¿ï¼çµ±åã­ã£ãã·ã¥ã®ã¯ãªã¼ã³
@@ -1322,3 +1323,12 @@
 âããã©ã¼ãã³ã¹ã¢ãã¿ã¬ã¸ã¹ã¿
 
+âãã®ä»ï¼åå¿é²ï¼
+
+âã¹ã¿ãã¯ã®ã¢ã©ã¤ã³ã¡ã³ã
+
+ARMã¢ã¼ã­ãã¯ãã£åããã­ã·ã¼ã¸ã£ã³ã¼ã«æ¨æºï¼AAPCSï¼ã§ã¯ï¼ãã¹ã¦ã®å¤é¨
+ã¤ã³ã¿ãã§ã¼ã¹ã«ããã¦ï¼ã¹ã¿ãã¯ãã¤ã³ã¿ã8ãã¤ãå¢çã§ã¢ã©ã¤ã³ããå¿
+è¦
+ãããã
+
 ä»¥ä¸
Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_user.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_user.txt	(revision 306)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_user.txt	(revision 306)
@@ -0,0 +1,617 @@
+
+		TOPPERS/ASP3ã«ã¼ãã«
+		ARMä¾å­é¨ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1
+		æçµæ´æ°: 2016å¹´4æ3æ¥
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã®ARMä¾å­é¨ãä½¿ç¨ããããã«å¿
+è¦
+ãªäºé 
+ãèª¬æãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+ TOPPERS/ASP Kernel
+     Toyohashi Open Platform for Embedded Real-Time Systems/
+     Advanced Standard Profile Kernel
+
+ Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
+             Graduate School of Information Science, Nagoya Univ., JAPAN
+ 
+ ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+     æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+     ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+     è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+     ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+     ã¨ï¼
+   (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+       ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+   (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+       å ±åãããã¨ï¼
+ (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+     å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+     ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+     ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+     å
+è²¬ãããã¨ï¼
+ 
+ æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ã®è²¬ä»»ãè² ããªãï¼
+ 
+ $Id: arm_user.txt 752 2016-05-14 15:06:22Z ertl-hiro $
+----------------------------------------------------------------------
+
+âç®æ¬¡
+
+ï¼ï¼ARMä¾å­é¨ã®æ¦è¦
+	1.1 ARMä¾å­é¨ã®ãã£ã¬ã¯ããªæ§æ
+	1.2 ARMã³ã¢ä¾å­é¨
+	1.3 MPCoreãããä¾å­é¨
+	1.4 RZ/A1ãããä¾å­é¨
+	1.5 GICä¾å­é¨
+	1.6 ãã®ä»ã®ä¾å­é¨
+ï¼ï¼ã¿ã¼ã²ããå®ç¾©äºé 
+ã®è¦å®
+	2.1 ãã¼ã¿åã«é¢ããè¦å®
+	2.2 å²è¾¼ã¿å¦çã«é¢ããè¦å®
+		2.2.1 RZ/A1ãããä¾å­é¨ã«ãããå²è¾¼ã¿å¦çã«é¢ããè¦å®
+	2.3 CPUä¾å¤å¦çã«é¢ããè¦å®
+	2.4 ã¿ã¤ãã«é¢ããè¦å®
+		2.4.1 RZ/A1ãããä¾å­é¨ã«ãããã¿ã¤ãã«é¢ããè¦å®
+	2.5 ãã®ä»ã®è¦å®ã»å¶ç´
+	2.6 åççææ©è½æ¡å¼µã®ãµãã¼ãã«é¢ããè¦å®
+ï¼ï¼ä½¿ç¨ä¸ã®æ³¨æã¨ãã³ã
+	3.1 MMUã®è¨­å®
+	3.2 CPUä¾å¤ã®åå ã®è¿½åæ¹æ³
+	3.3 ããã©ã¼ãã³ã¹ã¢ãã¿ã«ããæ§è½è©ä¾¡
+ï¼ï¼ãªãã¡ã¬ã³ã¹
+	4.1 ãã£ã¬ã¯ããªæ§æã»ãã¡ã¤ã«æ§æ
+	4.2 ãã¼ã¸ã§ã³å±¥æ­´
+
+
+ï¼ï¼ARMä¾å­é¨ã®æ¦è¦
+
+ARMä¾å­é¨ã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ä¸­ã§ï¼ARMã³ã¢ãã
+ã³ãããç¨ãããããã«å
+±éã«ä½¿ç¨ã§ããé¨åã§ããï¼
+
+1.1 ARMä¾å­é¨ã®ãã£ã¬ã¯ããªæ§æ
+
+ARMä¾å­é¨ã®ç½®ããã¦ãããã£ã¬ã¯ããªã¯æ¬¡ã®éãï¼
+
+	arch/
+		arm_gcc/common/		ARMã³ã¢ä¾å­é¨ãªã©
+		arm_gcc/mpcore/		MPCoreãããä¾å­é¨
+		arm_gcc/rza1/		RZ/A1ãããä¾å­é¨
+		arm_gcc/doc/		ARMä¾å­é¨ã«é¢ãããã­ã¥ã¡ã³ã
+
+1.2 ARMã³ã¢ä¾å­é¨
+
+ARMã³ã¢ä¾å­é¨ã¯ï¼ARMv4ï¼ARMv5ï¼ARMv6ï¼ARMv7-Aï¼ARMv7-Rã«æºæ ãããã­ã»ã
+ãµã³ã¢ãæã¤ã¿ã¼ã²ããã·ã¹ãã ï¼ãããï¼ã«å
+±éã«ä½¿ç¨ã§ããé¨åã§ããï¼
+
+ã³ã¢ç¥ç§°ç­ã¯æ¬¡ã®éãï¼
+
+	ã³ã¢ç¥ç§°ï¼arm
+	éçºç°å¢ç¥ç§°ï¼gcc
+
+ARMã³ã¢ä¾å­é¨ï¼GNUéçºç°å¢åãï¼ã¯ï¼arch/arm_gcc/commonã«ç½®ããã¦ããï¼
+
+1.3 MPCoreãããä¾å­é¨
+
+MPCoreãããä¾å­é¨ã¯ï¼ARM MPCoreã¢ã¼ã­ãã¯ãã£ã«åºã¥ãããããã«å
+±éã«
+ä½¿ç¨ã§ããé¨åã§ããï¼MPCoreãããä¾å­é¨ã«ã¯ï¼MPCoreãæã¤ã¿ã¤ãã¨ã¦ã©ã
+ãããã°ã®æä½ãï¼SCUï¼ã¹ãã¼ãå¶å¾¡ã¦ãããï¼ã®æä½ãªã©ãå«ã¾ããï¼
+
+ãããç¥ç§°ç­ã¯æ¬¡ã®éãï¼
+
+	ãããç¥ç§°ï¼mpcore
+	éçºç°å¢ç¥ç§°ï¼gcc
+
+MPCoreãããä¾å­é¨ã¯ï¼GICä¾å­é¨ãç¨ãã¦ããï¼ãã®ããï¼ãã®ãã­ã¥ã¡ã³ã
+ä¸­ã§GICä¾å­é¨ã«é¢ãã¦è¨è¿°ããããã¨ã¯ï¼MPCoreãããä¾å­é¨ã«ãé©ç¨ãããï¼
+
+MPCoreãããä¾å­é¨ï¼GNUéçºç°å¢åãï¼ã¯ï¼arch/arm_gcc/mpcoreã«ç½®ããã¦
+ããï¼
+
+1.4 RZ/A1ãããä¾å­é¨
+
+RZ/A1ãããä¾å­é¨ã¯ï¼ARM Cortex-A9ã³ã¢ãæ­è¼ããã«ããµã¹ RZ/Aã·ãªã¼ãºã®
+ãããã«å
+±éã«ä½¿ç¨ã§ããé¨åã§ããï¼RZ/A1ãããä¾å­é¨ã«ã¯ï¼RZ/Aã·ãªã¼ãº
+ã®ããããæã¤OSã¿ã¤ãï¼OSTMï¼ã®æä½ãï¼FIFOå
+èµã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§
+ã³ã¤ã³ã¿ãã§ã¼ã¹ï¼SCIFï¼ã®æä½ãªã©ãå«ã¾ããï¼
+
+ãããç¥ç§°ç­ã¯æ¬¡ã®éãï¼
+
+	ãããç¥ç§°ï¼rza1
+	éçºç°å¢ç¥ç§°ï¼gcc
+
+RZ/A1ãããä¾å­é¨ã¯ï¼GICä¾å­é¨ãç¨ãã¦ããï¼ãã®ããï¼ãã®ãã­ã¥ã¡ã³ã
+ä¸­ã§GICä¾å­é¨ã«é¢ãã¦è¨è¿°ããããã¨ã¯ï¼RZ/A1ãããä¾å­é¨ã«ãé©ç¨ãããï¼
+ãã ãï¼RZ/Aã·ãªã¼ãºã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ã¯ï¼æ¨æºã®GICã«å¯¾ãã¦ç¬èªã®æ¡å¼µ
+ãå ãã¦ããããï¼ããã«å¯¾å¿ããããï¼GICä¾å­é¨ã«æ¡å¼µãå ãã¦ããï¼
+
+RZ/Aã·ãªã¼ãºã¯ï¼ARM Cortex-A9 MPCoreãç¨ãã¦ãããï¼MPCoreãæã¤ã¿ã¤ã
+ã¨ã¦ã©ããããã°ãä½¿ç¨ã§ããªããã¨ï¼ã·ã³ã°ã«ã³ã¢ã§ããSCUã®æä½ãä¸è¦ã§
+ãããã¨ããï¼MPCoreãããä¾å­é¨ã¯ç¨ãã¦ããªãï¼
+
+RZ/A1ãããä¾å­é¨ï¼GNUéçºç°å¢åãï¼ã¯ï¼arch/arm_gcc/rza1ã«ç½®ããã¦ããï¼
+
+1.5 GICä¾å­é¨
+
+GICä¾å­é¨ã¯ï¼ARMã®æ¨æºçãªå²è¾¼ã¿ã³ã³ãã­ã¼ã©ã®1ã¤ã§ããGICï¼ARM
+Generic Interrupt Controllerï¼ãç¨ãããããã«å
+±éã«ä½¿ç¨ã§ããé¨åã§ã
+ãï¼GICä¾å­é¨ï¼GNUéçºç°å¢åãï¼ã¯ï¼arch/arm_gcc/commonã«ç½®ããã¦ããï¼
+
+1.6 ãã®ä»ã®ã¿ã¼ã²ããä¾å­é¨
+
+ä»¥ä¸ã«æããARMã®æ¨æºçãªIPåãã®å®ç¾©ãã¡ã¤ã«ãæä½ã©ã¤ãã©ãªç­ãï¼
+arch/arm_gcc/commonã«ç½®ããã¦ããï¼
+
+ã»ARM L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã«é¢ããå®ç¾©ã¨æä½ã©ã¤ãã©ãª
+ã»ARM Dual-Timer Moduleï¼SP804ï¼ã«é¢ããå®ç¾©ãã¡ã¤ã«
+ã»ARM PrimCell UARTï¼PL011ï¼ç¨ ç°¡æããã¤ã¹ãã©ã¤ã
+
+
+ï¼ï¼ã¿ã¼ã²ããå®ç¾©äºé 
+ã®è¦å®
+
+2.1 ãã¼ã¿åã«é¢ããè¦å®
+
+ã¿ã¼ã²ããä¾å­ã®ãã¼ã¿åã®ãµã¤ãºã¯æ¬¡ã®éãï¼
+
+	int_t			32ããã
+	long_t			32ããã
+
+	char			8ããã
+	int_least8_t	8ããã
+	void *			32ããã
+	intptr_t		32ããã
+	size_t			32ããã
+
+ã¿ã¼ã²ããä¾å­ã®ãã¼ã¿åã®æç¡ã¯æ¬¡ã®éãï¼
+
+	int8_tï¼uint8_t			ãã
+	int64_tï¼uint64_t		ãã
+	int128_tï¼uint128_t		ãªã
+	float32_t				ãã
+	double64_t				ãã
+
+2.2 å²è¾¼ã¿å¦çã«é¢ããè¦å®
+
+ARMã³ã¢ä¾å­é¨ã®æ¨æºã§ã¯ï¼IRQãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ï¼FIQãã«ã¼ãã«ç®¡çå¤
+ã®å²è¾¼ã¿ã¨æ±ãï¼ãã ãï¼SafeGã®ã»ã­ã¥ã¢ã¢ã¼ãã§ASP3ã«ã¼ãã«ãåä½ããã
+å ´åã«ã¯ï¼FIQãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ã¨ãã¦æ±ãï¼ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ã¯
+ãµãã¼ãããªãï¼FIQã«å¯¾ããå²è¾¼ã¿ãã³ãã©ã¯ï¼DEF_INHã§ã¯ãªãï¼DEF_EXCã
+ç¨ãã¦ç»é²ããï¼
+
+å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã¾ãã¯å²è¾¼ã¿ãã³ãã©ãç»é²ãã¦ããªãå²è¾¼ã¿ãçºç
+ããå ´åï¼ããã©ã«ãã®å²è¾¼ã¿ãã³ãã©ãå®è¡ãããï¼ã¿ã¼ã²ããä¾å­é¨ã§å¤
+æ´ãã¦ããªãå ´åï¼ããã©ã«ãã®å²è¾¼ã¿ãã³ãã©ã§ã¯ï¼æªç»é²ã®å²è¾¼ã¿ãç¶ã
+ããã¨ãã·ã¹ãã ã­ã°ã«åºåããï¼
+
+GICä¾å­é¨ã§ã¯ï¼GICã«å¯¾ããå²è¾¼ã¿ã®IDçªå·ãï¼ãã®ã¾ã¾å²è¾¼ã¿çªå·ã¨ãã¦ä½¿
+ç¨ãã¦ããï¼ã¾ãï¼å²è¾¼ã¿ãã³ãã©çªå·ã¯ï¼ããã«å¯¾å¿ããå²è¾¼ã¿çªå·ã¨ä¸è´
+ããã¦ããï¼
+
+GICä¾å­é¨ã§ã¯ï¼TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼çµ±åä»æ§æ¸ã®è¦å®ã«åè´
+ããå²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ããµãã¼ããã¦ããï¼dis_intï¼ena_intããµãã¼ã
+ãã¦ããï¼ã¾ãï¼å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ããªã¬ã¢ã¼ãã®è¨­å®ããµãã¼ããã¦ããï¼
+
+2.2.1 RZ/A1ãããä¾å­é¨ã«ãããå²è¾¼ã¿å¦çã«é¢ããè¦å®
+
+RZ/Aã·ãªã¼ãºã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ã¯ï¼32ã¬ãã«ã®å²è¾¼ã¿åªå
+åº¦ããµãã¼ãã
+ã¦ããï¼ãã®ããï¼å²è¾¼ã¿åªå
+åº¦ã®æå°å¤ï¼æé«å¤ï¼ã¯-31ï¼å²è¾¼ã¿åªå
+åº¦ã®æ
+å¤§å¤ï¼æä½å¤ï¼ã¯-1ã§ããï¼
+
+RZ/Aã·ãªã¼ãºã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ããµãã¼ãããå²è¾¼ã¿ã®ç¨®é¡ã¨ï¼ãã®å²è¾¼
+ã¿çªå·ã®ç¯å²ã¯æ¬¡ã®éãï¼åå¥ã®å²è¾¼ã¿ã«ã¤ãã¦ã¯ï¼ãããã®ããã¥ã¢ã«ãå
+ç
+§ãããã¨ï¼ï¼
+
+	ã½ããã¦ã§ã¢å²è¾¼ã¿			0ã15
+	CPUããã®å²è¾¼ã¿				16ã19
+	IRQå²è¾¼ã¿					32ã39
+	å
+èµå¨è¾ºã¢ã¸ã¥ã¼ã«å²è¾¼ã¿	40ã415
+	ç«¯å­å²è¾¼ã¿					416ã537ï¼RZ/A1Lã®å ´åï¼
+								416ã586ï¼RZ/A1Hï¼RZ/A1Mã®å ´åï¼
+
+ãã®å
+ï¼IRQå²è¾¼ã¿ã«ã¤ãã¦ã¯ï¼GICã®æåã«å²è¾¼ã¿å
+¥åå¶å¾¡åè·¯ãå
+¥ã£ã¦ããï¼
+ãã®å¶å¾¡ã¬ã¸ã¹ã¿ã§ï¼ã¬ãã«ããªã¬ï¼ãã¸ãã£ãã¨ãã¸ããªã¬ï¼ãã¬ãã£ãã¨ã
+ã¸ããªã¬ï¼ä¸¡ã¨ãã¸ããªã¬ã®ãããã«ããããè¨­å®ãããã¨ãã§ããï¼ããã§ï¼
+IRQå²è¾¼ã¿ã«å¯¾ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®ï¼CFG_INTï¼ã§ã¯ï¼ä»¥ä¸ã®ã¿ã¼
+ã²ããå®ç¾©ã®å²è¾¼ã¿è¦æ±ã©ã¤ã³å±æ§ãæå®ãããã¨ãã§ããï¼
+
+	TA_NEGEDGE		0x04U		ãã¬ãã£ãã¨ãã¸ããªã¬
+	TA_POSEDGE		0x08U		ãã¸ãã£ãã¨ãã¸ããªã¬
+	TA_BOTHEDGE		0x0cU		ä¸¡ã¨ãã¸ããªã¬
+
+IRQå²è¾¼ã¿ã«å¯¾ãã¦TA_EDGEãæå®ããå ´åï¼ããä»¥å¤ã®å²è¾¼ã¿ã«å¯¾ãã¦ä¸ã®3ã¤
+ã®å±æ§ãæå®ããå ´åã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãã¨ã©ã¼ãæ¤åºããï¼
+
+ã¾ãï¼IRQå²è¾¼ã¿ãã¨ãã¸ããªã¬ã§ä½¿ç¨ããå ´åã«ï¼ã«ã¼ãã«ã¯ï¼ããªã¬ããå²
+è¾¼ã¿è¦æ±ãã¯ãªã¢ããªãï¼ã«ã¼ãã«ã®æ¨æºçãªæ¯èãã¨ç°ãªãï¼ï¼ããã«ä»£ã
+ã¦ï¼ããªã¬ããå²è¾¼ã¿è¦æ±ãã¯ãªã¢ããããã®ä»¥ä¸ã®é¢æ°ãç¨æãã¦ããï¼
+
+(2-2-1-1) void rza1_clear_irq(INTNO intno)
+
+intnoã§æå®ããIRQå²è¾¼ã¿è¦æ±ãã¯ãªã¢ããï¼intnoã«æå®ã§ããå¤ã¯ï¼
+INTNO_IRQ0ãINTNO_IRQ7ã®ç¯å²ã§ããï¼
+
+CPUããã®å²è¾¼ã¿ã¨å
+èµå¨è¾ºã¢ã¸ã¥ã¼ã«å²è¾¼ã¿ã¯ï¼ã¬ãã«ããªã¬ã§ä½¿ç¨ãããã¨ã
+ã¸ããªã¬ã§ä½¿ç¨ããããï¼ãããã§æ±ºãããã¦ããï¼ãããã§ã®æå®ã¨ç°ãªã
+è¨­å®ãããå ´åã®åä½ã¯ä¿è¨¼ãããªãï¼ç°ãªãè¨­å®ããã¦ãï¼ã¨ã©ã¼ã«ã¯ãªã
+ãªãï¼ï¼ãããã§ã®æå®ã«ã¤ãã¦ã¯ï¼ãããã®ããã¥ã¢ã«ãåç
+§ãããã¨ï¼
+
+2.3 CPUä¾å¤å¦çã«é¢ããè¦å®
+
+CPUä¾å¤ãã³ãã©çªå·ã¯ï¼ä»¥ä¸ã®ããã«å²ãå½ã¦ã¦ããï¼
+
+	EXCNO_UNDEF		0		æªå®ç¾©å½ä»¤
+	EXCNO_SVC		1		ã¹ã¼ããã¤ã¶ã³ã¼ã«
+	EXCNO_PABORT	2		ããªãã§ããã¢ãã¼ã
+	EXCNO_DABORT	3		ãã¼ã¿ã¢ãã¼ã
+	EXCNO_IRQ		4		IRQå²è¾¼ã¿
+	EXCNO_FIQ		5		FIQå²è¾¼ã¿
+
+ãã®å
+ï¼EXCNO_IRQã«å¯¾ãã¦ã¯ï¼DEF_EXCã«ããCPUä¾å¤ãã³ãã©ãç»é²ãããã¨
+ãã§ããªãï¼
+
+ARMã§ã¯ï¼CPUä¾å¤ãã³ãã©ãããªã¿ã¼ã³ããå ´åã«ï¼æ»ãå
+ã®ãã­ã°ã©ã ã«ã¦
+ã³ã¿ã®è£æ­£ãå¿
+è¦ã«ãªãï¼è£æ­£éã¯ï¼ä¾å¤ã®ç¨®é¡ãï¼ä¾å¤ã®åå ã«ãªã£ãå½ä»¤
+ãåå®è¡ããããã®æ¬¡ã®å½ä»¤ããå®è¡ãããã«ãã£ã¦ï¼ä»¥ä¸ã®éãã¨ãªãï¼
+
+ä¾å¤ã®ç¨®é¡				æ»ãçªå°								è£æ­£é
+----------------------------------------------------------------------
+æªå®ç¾©å½ä»¤				æªå®ç¾©å½ä»¤ã®çªå°						â4/2(*)
+						æªå®ç¾©å½ä»¤ã®æ¬¡ã®å½ä»¤ã®çªå°				Â±0
+ã¹ã¼ããã¤ã¶ã³ã¼ã«		SVCã®æ¬¡ã®å½ä»¤ã®çªå°						Â±0
+ããªãã§ããã¢ãã¼ã	ã¢ãã¼ããããå½ä»¤ã®çªå°				â4
+						ã¢ãã¼ããããå½ä»¤ã®æ¬¡ã®å½ä»¤ã®çªå°		Â±0
+ãã¼ã¿ã¢ãã¼ã			ã¢ãã¼ããçæããå½ä»¤ã®çªå°			â8
+						ã¢ãã¼ããçæããå½ä»¤ã®æ¬¡ã®å½ä»¤ã®çªå°	â4
+FIQå²è¾¼ã¿				æ¬¡ã«å®è¡ãã¹ãçªå°						â4
+----------------------------------------------------------------------
+(*) ARMã¢ã¼ãã§ã¯4ï¼Thumbã¢ã¼ãã§ã¯2
+
+CPUä¾å¤ãã³ãã©å
+ã§æ»ãçªå°ãè£æ­£ããå ´åï¼ä»¥ä¸ã®ãããªã³ã¼ããå®è¡ãã
+ã°ããï¼ä»¥ä¸ã®ä¾ã¯ï¼è£æ­£éã-4ã®å ´åï¼ï¼
+
+	((T_EXCINF *) p_excinf)->pc -= 4U
+
+CPUä¾å¤ãã³ãã©ãç»é²ãã¦ããªãCPUä¾å¤ãçºçããå ´åï¼ããã©ã«ãã®CPUä¾
+å¤ãã³ãã©ãå®è¡ãããï¼ã¿ã¼ã²ããä¾å­é¨ã§å¤æ´ãã¦ããªãå ´åï¼ããã©ã«
+ãã®CPUä¾å¤ãã³ãã©ã§ã¯ï¼çºçããCPUä¾å¤ã®ç¨®é¡ã¨ï¼CPUä¾å¤ã®çºçç¶æ³ãã·
+ã¹ãã ã­ã°ã«åºåããï¼è©³ããã¯ï¼ã3.2 CPUä¾å¤ã®åå ã®è¿½åæ¹æ³ãã®ç¯ãå
+ç
+§ãããã¨ï¼
+
+2.4 ã¿ã¤ãã«é¢ããè¦å®
+
+MPCoreãããä¾å­é¨ã§ã¯ï¼ã³ã¢æ¯ã«æã¤ãã©ã¤ãã¼ãã¿ã¤ãã¨ãã©ã¤ãã¼ã
+ã¦ã©ããããã°ãç¨ãã¦ï¼é«åè§£è½ã¿ã¤ããå®ç¾ãã¦ããï¼ã¿ã¼ã²ããä¾å­é¨
+ã§å¤æ´ãã¦ããªãå ´åï¼é«åè§£è½ã¿ã¤ãã®å¨æã¯2^32ï¼TCYC_HRTCNTã¯å®ç¾©ããª
+ãï¼ï¼ã«ã¦ã³ãã¢ããã®é²ã¿å¹
+ï¼TSTEP_HRTCNTï¼ã¯1ã§ããï¼
+
+2.4.1 RZ/A1ãããä¾å­é¨ã«ãããã¿ã¤ãã«é¢ããè¦å®
+
+RZ/A1ãããä¾å­é¨ã§ã¯ï¼RZ/Aã·ãªã¼ãºãæã¤2ãã£ã³ãã«ã®OSã¿ã¤ãã®å
+ã®1ã¤
+ï¼OSã¿ã¤ã0ï¼ãç¨ãã¦é«åè§£è½ã¿ã¤ããï¼ãã1ã¤ï¼OSã¿ã¤ã1ï¼ãç¨ãã¦ãªã¼
+ãã©ã³ã¿ã¤ããå®ç¾ãã¦ããï¼
+
+ç¾å¨ã®å®è£
+ã§ã¯ï¼OSã¿ã¤ãã«ä¾çµ¦ãããã¯ã­ãã¯ã33.33â¦MHzï¼CPUã®ã¯ã­ãã¯
+ã400MHzï¼ã®å ´åã®ã¿ã«å¯¾å¿ãã¦ããï¼ãã®å ´åï¼é«åè§£è½ã¿ã¤ãã®å¨æ
+ï¼TCYC_HRTCNTï¼ã¯128,849,019ï¼2^32Ã·33.33â¦ãä¸¸ããå¤ï¼ï¼ã«ã¦ã³ãã¢ãã
+ã®é²ã¿å¹
+ï¼TSTEP_HRTCNTï¼ã¯1ã§ããï¼ã¾ãï¼ãªã¼ãã©ã³ãã³ãã©ã®æ®ããã­ã»ã
+ãµæéã«æå®ã§ããæå¤§å¤ï¼TMAX_OVRTIMï¼ã¯128,849,017ã§ããï¼
+
+2.5 ãã®ä»ã®è¦å®ã»å¶ç´
+
+ã¿ã¹ã¯ã¨éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã¨ãµã¤ãºã¯ï¼8ã®å
+æ°ã§ãªããã°ãªããªãï¼åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
+é ­çªå°ã¯ï¼4ã®åæ°ã§ãªã
+ãã°ãªããªãï¼
+
+å²è¾¼ã¿ãã³ãã©ã®å
+é ­çªå°ï¼DEF_INHã®inthdrï¼ã¨CPUä¾å¤ãã³ãã©ã®å
+é ­çªå°
+ï¼DEF_EXCã®exchdrï¼ããã­ã°ã©ã ã®éå§çªå°ã¨ãã¦æ­£ãããªãå ´åã®ã¨ã©ã¼ã¯ï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ãã£ã¦æ¤åºãããï¼
+
+ããã«å¯¾ãã¦ï¼å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å
+é ­çªå°ï¼CRE_ISRã®isrï¼ï¼åæå
+ã«ã¼ãã³ã®å
+é ­çªå°ï¼ATT_INIã®inirtnï¼ï¼çµäºå¦çã«ã¼ãã³ã®å
+é ­çªå°
+ï¼ATT_TERã®terrtnï¼ããã­ã°ã©ã ã®éå§çªå°ã¨ãã¦æ­£ãããªãå ´åã®ã¨ã©ã¼ã¯ï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ãã£ã¦æ¤åºãããªãï¼
+
+2.6 åççææ©è½æ¡å¼µã®ãµãã¼ãã«é¢ããè¦å®
+
+åççææ©è½æ¡å¼µããã±ã¼ã¸ããµãã¼ããã¦ããï¼
+
+åçã¡ã¢ãªç®¡çã¯ï¼ãªã¼ãã³ã½ã¼ã¹ã®ã¡ã¢ãªå²ä»ãã©ã¤ãã©ãªã§ããTLSFãç¨
+ããæ¹æ³ãæ¨æºã«ãã¦ããï¼ãã®ããï¼åççææ©è½æ¡å¼µãä½¿ç¨ããå ´åã«ã¯ï¼
+TLSFã®ããã±ã¼ã¸ã«å«ã¾ããtlsf.hã¨tlsf.cãï¼ã«ã¼ãã«ããã«ããããã£ã¬
+ã¯ããªãï¼vpathã§æå®ããããã£ã¬ã¯ããªã«ç½®ãã¦ããå¿
+è¦ãããï¼ã¾ãï¼
+Makefileã®KERNEL_COBJSã®å®ç¾©ã«ï¼ä»¥ä¸ã®ããã«tlsf.oãè¿½å ããå¿
+è¦ãããï¼
+
+----------------------------------------
+KERNEL_COBJS := $(KERNEL_COBJS) tlsf.o
+----------------------------------------
+
+ãªãï¼TLSFï¼åä½ç¢ºèªã¯ï¼Version 2.4.6ï¼ã¯ï¼ä»¥ä¸ã®ã¦ã§ããµã¤ããããã¦ã³
+ã­ã¼ããããã¨ãã§ããï¼
+
+	http://www.gii.upv.es/tlsf/
+
+
+ï¼ï¼ä½¿ç¨ä¸ã®æ³¨æã¨ãã³ã
+
+3.1 MMUã®è¨­å®
+
+MMUãæã¤ãããã§ã¯ï¼MMUãä½¿ç¨ããªãã¨ã­ã£ãã·ã¥ãä½¿ç¨ãããã¨ãã§ããª
+ãï¼ããã§ï¼ARMã³ã¢ä¾å­é¨ã§ã¯ï¼æå¹ãªã¢ãã¬ã¹ã«å¯¾ãã¦ï¼è«çã¢ãã¬ã¹ã¨ç©
+çã¢ãã¬ã¹ãä¸è´ãããããªå¤æãã¼ãã«ãæºåãï¼ãããä½¿ç¨ããããã«è¨­
+å®ããï¼
+
+æå¹ãªã¢ãã¬ã¹ã®ç¯å²ã¨ï¼åã¢ãã¬ã¹ç¯å²ã«ãããMMUã¸ã®è¨­å®å±æ§ï¼è¨±å¯ãã
+ã¢ã¯ã»ã¹ã®ç¨®é¡ï¼ã­ã£ãã·ã¥ã®è¨­å®ç­ï¼ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ããï¼
+
+MPCoreã¨RZ/Aã·ãªã¼ãºã¯MMUãæã¤ããï¼MPCoreãããä¾å­é¨ãRZ/A1ãããä¾
+å­é¨ãä½¿ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®è¨­å®ã¨ãªãï¼
+
+3.2 CPUä¾å¤ã®åå ã®è¿½åæ¹æ³
+
+CPUä¾å¤ãã³ãã©ãç»é²ãã¦ããªãCPUä¾å¤ãçºçããã¨ï¼ããã©ã«ãã®CPUä¾å¤
+ãã³ãã©ï¼default_exc_handlerï¼ãå®è¡ããããSUPPORT_XLOG_SYSãå®ç¾©ãã¦
+ããå ´åï¼ã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ãã¦ãããã¨ãå¤ãï¼ï¼ããã©ã«ãã®CPUä¾
+å¤ãã³ãã©ã¯ï¼çºçããCPUä¾å¤ã®ç¨®é¡ã¨ï¼CPUä¾å¤ã®çºçç¶æ³ãã·ã¹ãã ã­ã°
+ã«åºåãããä»¥ä¸ã§ã¯ï¼CPUä¾å¤ã®ç¨®é¡æ¯ã«ï¼CPUä¾å¤ã®åå ãè¿½åããæ¹æ³ã«
+ã¤ãã¦èª¬æããã
+
+(1) æªå®ç¾©å½ä»¤ä¾å¤
+
+ã·ã¹ãã ã­ã°ã«åºåããããã­ã°ã©ã ã«ã¦ã³ã¿ï¼pcï¼ã®å¤ã¯ï¼æªå®ç¾©å½ä»¤ã®æ¬¡
+ã®å½ä»¤ã®çªå°ã§ããããã®æåã«ããæªå®ç¾©å½ä»¤ãå®è¡ãããã¨ãï¼CPUä¾å¤ã®
+åå ã§ããã
+
+(2) ã¹ã¼ããã¤ã¶ã³ã¼ã«ï¼SVCï¼ä¾å¤
+
+ã·ã¹ãã ã­ã°ã«åºåããããã­ã°ã©ã ã«ã¦ã³ã¿ï¼pcï¼ã®å¤ã¯ï¼svcå½ä»¤ã®æ¬¡ã®å½
+ä»¤ã®çªå°ã§ããããã®æåã«ããsvcå½ä»¤ãå®è¡ãããã¨ãï¼CPUä¾å¤ã®åå ã§
+ããã
+
+(3) ããªãã§ããã¢ãã¼ã
+
+ã·ã¹ãã ã­ã°ã«åºåããããã­ã°ã©ã ã«ã¦ã³ã¿ï¼pcï¼ã®å¤ã¯ï¼(ã¢ãã¼ãããã
+å½ä»¤ãã§ããã®çªå°+4)ã§ããã
+
+ããªãã§ããã¢ãã¼ãã¯ï¼ä¸æ­£ãªçªå°ã¸ã®åå²ã«ãã£ã¦èµ·ããã®ãä¸è¬çã§ã
+ããï¼ãã®å ´åï¼ãã­ã°ã©ã ã«ã¦ã³ã¿ã®å¤ã¯ï¼(åå²å
+ã®çªå°+4)ã¨ãªããCPUä¾
+å¤ã®çºçåå ã¯åå²å
+ã®å½ä»¤ã§ãããï¼ã·ã¹ãã ã­ã°ã«åºåãããæ
+å ±ããå
+å²å
+ãç¥ãæ¹æ³ã¯ãªãããã ãï¼é¢æ°å¼åºãã«ããåå²ã®å ´åã«ã¯ï¼ãªã³ã¯ã¬
+ã¸ã¹ã¿ï¼lrï¼ã«æ»ãçªå°ãä¿å­ãããããï¼ãªã³ã¯ã¬ã¸ã¹ã¿ãæãå½ä»¤ã®æå
+ã®åå²å½ä»¤ãï¼CPUä¾å¤ã®åå ã¨ãããã¨ã«ãªãã
+
+ããªãã§ããã¢ãã¼ãçºçã®è©³ããç¶æ³ã¯ï¼ARMv7ã§ã¯ï¼CP15ã®
+IFSRï¼Instruction Fault Status Registerï¼ãIFARï¼Instruction Fault
+Address Registerï¼ãèª­ã¿åºããã¨ãå¿
+è¦ã§ããã
+
+(4) ãã¼ã¿ã¢ãã¼ã
+
+ã·ã¹ãã ã­ã°ã«åºåããããã­ã°ã©ã ã«ã¦ã³ã¿ï¼pcï¼ã®å¤ã¯ï¼(ãã¼ã¿ã¢ãã¼ã
+ãèµ·ãããå½ä»¤çªå°+8)ã§ããã(ãã­ã°ã©ã ã«ã¦ã³ã¿ã®å¤-8)ã®çªå°ã«ããå½ä»¤
+ãå®è¡ãããã¨ãï¼CPUä¾å¤ã®åå ã§ããã
+
+ç¹æ®ãªç¶æ³ã¨ãã¦ï¼CPUä¾å¤ãã«ã¼ãã«å
+ï¼dabort_handlerå
+ã§ãããã¨ãä¸è¬
+çï¼ã§çºçãï¼ã·ã¹ãã ã­ã°ã«åºåãããnest_countãç°å¸¸ãªå¤ï¼INT32_MINè¿
+è¾ºã®å¤ï¼ã«ãªã£ã¦ããå ´åããããããã¯ï¼ã¹ã¿ãã¯ãã¤ã³ã¿ãä¸æ­£ãªå¤ã«ãªã£
+ãç¶æ
+ã§CPUä¾å¤ãçºçãï¼ã«ã¼ãã«å
+ã§å¿
+è¦ãªæ
+å ±ãã¹ã¿ãã¯ã«ä¿å­ãããã¨
+ãã¦ååº¦CPUä¾å¤ãçºçããç¶æ³ã§ããããã®å ´åï¼CPUä¾å¤ãèµ·ãã£ãç¶æ³ã
+ä¿å­ããã¦ããªãããï¼CPUä¾å¤ã®åå ã®è¿½åã¯é£ããã
+
+ãã¼ã¿ã¢ãã¼ãçºçã®è©³ããç¶æ³ã¯ï¼CP15ã®DFSRï¼Data Fault Status
+Registerï¼ãDFARï¼Data Fault Address Registerï¼ARMv6ä»¥åã¯FARã®åç§°ï¼
+ARMv6ããåã¯IFARã¨çµ±åããã¦ããï¼ãèª­ã¿åºããã¨ãå¿
+è¦ã§ããã
+
+(5) ã¢ãã¼ãçºçã®ç¶æ³
+
+ARMv7ã§ã¯ï¼ä»¥ä¸ã®ã¬ã¸ã¹ã¿ãç¨æããã¦ããã
+
+	DFSRï¼Instruction Fault Status Registerï¼	cp15 c5 0 c0 0
+	DFARï¼Instruction Fault Address Registerï¼	cp15 c6 0 c0 0
+	IFSRï¼Instruction Fault Status Registerï¼	cp15 c5 0 c0 1
+	IFARï¼Instruction Fault Address Registerï¼	cp15 c6 0 c0 2
+
+ARMv6ã¯ï¼ARMv6ã®æã¤4ã¤ã®ã¬ã¸ã¹ã¿å
+ï¼IFARã¯ãªãã·ã§ã³ã§ãããã¾ãï¼
+DFARã¯FARï¼Fault Address Registerï¼ã¨å¼ã°ãã¦ããã
+
+ARMv5ä»¥åã¯ï¼ä»¥ä¸ã®ã¬ã¸ã¹ã¿ãç¨æããã¦ããã
+
+	FSRï¼Fault Status Registerï¼	cp15 c5 0 c0 0
+	FARï¼Fault Address Registerï¼	cp15 c6 0 c0 0
+
+3.3 ããã©ã¼ãã³ã¹ã¢ãã¿ã«ããæ§è½è©ä¾¡
+
+ARMv7ã«æºæ ããããã©ã¼ãã³ã¹ã¢ãã¿ãæã¤ã¿ã¼ã²ããã·ã¹ãã ã§ã¯ï¼
+USE_ARM_PM_HISTãå®ç¾©ãã¦ã³ã³ãã¤ã«ãããã¨ã§ï¼å®è¡æéåå¸éè¨ãµã¼ãã¹
+ã«ããã¦ï¼ããã©ã¼ãã³ã¹ã¢ãã¿ãç¨ãã¦å®è¡æéãè¨æ¸¬ããï¼å®è¡æéã®è¨
+æ¸¬åä½ã¯ï¼0.1ãã¤ã¯ã­ç§ã¨ãã¦ããï¼
+
+
+ï¼ï¼ãªãã¡ã¬ã³ã¹
+
+4.1 ãã£ã¬ã¯ããªæ§æã»ãã¡ã¤ã«æ§æ
+
+	arm_gcc/
+		MANIFEST				åå¥ããã±ã¼ã¸ã®ãã¡ã¤ã«ãªã¹ã
+
+	arm_gcc/common/
+		Makefile.core			Makefileã®ã³ã¢ä¾å­é¨
+		arm.c					ã³ã¢ã®ãã¼ãã¦ã§ã¢è³æºã®æä½
+		arm.h					ã³ã¢ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+		arm_insn.h				ã³ã¢ç¬èªã®å½ä»¤ã®å®è¡
+		core_asm.inc			ã¢ã»ã³ãã©è¨è¿°ã®ããã®ãã¯ã­
+		core_cfg1_out.h			cfg1_out.cã®ãªã³ã¯ã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+		core_check.trb			kernel_check.trbã®ã³ã¢ä¾å­é¨
+		core_kernel.h			kernel.hã®ã³ã¢ä¾å­é¨
+		core_kernel.trb			kernel.trbã®ã³ã¢ä¾å­é¨
+		core_kernel_impl.c		ã«ã¼ãã«å®è£
+ã®ã³ã¢ä¾å­é¨é¢é£ã®å®ç¾©
+		core_kernel_impl.h		ã«ã¼ãã«å®è£
+ã®ã³ã¢ä¾å­é¨
+		core_offset.trb			genoffset.trbã®ã³ã¢ä¾å­é¨
+		core_rename.def			ã³ã¢ä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã å®ç¾©
+		core_rename.h			ã³ã¢ä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã 
+		core_sil.h				sil.hã®ã³ã¢ä¾å­é¨
+		core_stddef.h			t_stddef.hã®ã³ã¢ä¾å­é¨
+		core_support.S			ã«ã¼ãã«å®è£
+ã®ã³ã¢ä¾å­é¨ï¼ã¢ã»ã³ããªè¨èª
+								ã§è¨è¿°ããé¨åï¼
+ 		core_sym.def			kernel_sym.defã®ã³ã¢ä¾å­é¨
+		core_syssvc.h			ã·ã¹ãã ãµã¼ãã¹ã®ã³ã¢ä¾å­å®ç¾©
+		core_test.h				ãã¹ããã­ã°ã©ã ã®ã³ã¢ä¾å­å®ç¾©
+		core_unrename.h			ã³ã¢ä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã è§£é¤
+		gic_kernel_impl.c		ã«ã¼ãã«å®è£
+ã®GICä¾å­é¨é¢é£ã®å®ç¾©
+		gic_kernel_impl.h		ã«ã¼ãã«å®è£
+ã®GICä¾å­é¨
+		gic_support.S			ã«ã¼ãã«å®è£
+ã®GICä¾å­é¨é¢é£ï¼ã¢ã»ã³ããªè¨
+								èªã§è¨è¿°ããé¨åï¼
+		pl310.c					L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã®æä½ã©ã¤
+								ãã©ãª
+		pl310.h					L2ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ï¼PL310ï¼ã«é¢ããå®ç¾©
+		sp804.h					ARM Dual-Timer Moduleï¼SP804ï¼ã«é¢ããå®ç¾©
+		start.S					ã«ã¼ãã«ç¨ã®ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ï¼ARMç¨ï¼
+		tUartPL011.c			ARM PrimCell UARTï¼PL011ï¼ç¨ ç°¡æSIOãã©ã¤ã
+		tUartPL011.cdl			ARM PrimCell UARTï¼PL011ï¼ç¨ ç°¡æSIOãã©ã¤
+								ãã®ã³ã³ãã¼ãã³ãè¨è¿°
+		uart_pl011.h			ARM PrimCell UARTï¼PL011ï¼ã«é¢ããå®ç¾©
+
+	arm_gcc/mpcore/
+		MANIFEST				MPCoreä¾å­é¨ã®ãã¡ã¤ã«ãªã¹ã
+		Makefile.chip			Makefileã®ãããä¾å­é¨
+		chip_kernel.h			kernel.hã®ãããä¾å­é¨
+		chip_kernel_impl.c		ã«ã¼ãã«å®è£
+ã®ãããä¾å­é¨é¢é£ã®å®ç¾©
+		chip_kernel_impl.h		ã«ã¼ãã«å®è£
+ã®ãããä¾å­é¨
+		chip_rename.def			ãããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã å®ç¾©
+		chip_rename.h			ãããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã 
+		chip_stddef.h			t_stddef.hã®ãããä¾å­é¨
+		chip_timer.c			ã¿ã¤ããã©ã¤ã
+		chip_timer.cfg			ã¿ã¤ããã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+		chip_timer.h			ã¿ã¤ããã©ã¤ããä½¿ç¨ããããã®å®ç¾©
+		chip_unrename.h			ãããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã è§£é¤
+		mpcore.h				ãããã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+
+	arm_gcc/rza1/
+		MANIFEST				RZ/A1ä¾å­é¨ã®ãã¡ã¤ã«ãªã¹ã
+		Makefile.chip			Makefileã®ãããä¾å­é¨
+		chip_kernel.h			kernel.hã®ãããä¾å­é¨
+		chip_kernel.trb			kernel.trbã®ãããä¾å­é¨
+		chip_kernel_impl.c		ã«ã¼ãã«å®è£
+ã®ãããä¾å­é¨é¢é£ã®å®ç¾©
+		chip_kernel_impl.h		ã«ã¼ãã«å®è£
+ã®ãããä¾å­é¨
+		chip_rename.def			ãããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã å®ç¾©
+		chip_rename.h			ãããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã 
+		chip_stddef.h			t_stddef.hã®ãããä¾å­é¨
+		chip_sym.def			kernel_sym.defã®ãããä¾å­é¨
+		chip_timer.c			ã¿ã¤ããã©ã¤ã
+		chip_timer.cfg			ã¿ã¤ããã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+		chip_timer.h			ã¿ã¤ããã©ã¤ããä½¿ç¨ããããã®å®ç¾©
+		chip_unrename.h			ãããä¾å­é¨ã®å
+é¨è­å¥åã®ãªãã¼ã è§£é¤
+		rza1.h					ãããã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+		scif.h					ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ã«é¢ããå®ç¾©
+		tSCIF.c					ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ç¨ ç°¡æSIOãã©ã¤ã
+		tSCIF.cdl				ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ç¨ ç°¡æSIOãã©ã¤ã
+								ã®ã³ã³ãã¼ãã³ãè¨è¿°
+
+	arm_gcc/doc/
+		arm_design.txt			ARMã³ã¢ä¾å­é¨ è¨­è¨ã¡ã¢
+		arm_user.txt			ARMä¾å­é¨ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+		gic_design.txt			GICä¾å­é¨ è¨­è¨ã¡ã¢
+
+4.2 ãã¼ã¸ã§ã³å±¥æ­´
+
+	2015å¹´8æ5æ¥	Release	3.B.0		æåã®ãªãªã¼ã¹
+	2016å¹´2æ8æ¥	Release	3.0.0		æåã®ä¸è¬å
+¬é
+	2016å¹´5æ15æ¥	Release	3.1.0		RZ/A1ã®ãµãã¼ããè¿½å 
+
+ä»¥ä¸
Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_vmsa_memo.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_vmsa_memo.txt	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/arm_vmsa_memo.txt	(revision 306)
@@ -5,5 +5,5 @@
 		ä½æè
 : é«ç°åºç« ï¼åå¤å±å¤§å­¦ï¼
-		æçµæ´æ°: 2015å¹´8æ6æ¥
+		æçµæ´æ°: 2016å¹´1æ16æ¥
 
 âã¡ã¢ã®ä½ç½®ã¥ã
@@ -382,5 +382,17 @@
 ±æï¼1ï¼ãéå
 ±æï¼0ï¼ã
+ã»ããã[0]
+	ãã¼ã¸ãã¼ãã«ã¦ã©ã¼ã¯ãã­ã£ãã·ã¥ã§ããï¼1ï¼ãã§ããªãï¼0ï¼ã
 ã»ä»ã®ãããã¯æªä½¿ç¨
+
+ã»ARMv5ä»¥åã¯ï¼ããã[4:0]ã¯ãµãã¼ããã¦ãããï¼0ã«ãã¹ãï¼ä»¥ä¸ã®è¨è¿°ã
+ãå¤æ­ï¼ï¼
+
+åèæç®[1]ã®B4.7.1ç¯ãã
+--------------------
+Prior to VMSAv6, a single TTBR existed. Only bits[31:14] of the
+Translation Table Base Register are significant, and bits[13:0] should
+be zero.
+--------------------
 
 âTTBR1ï¼Translation Table Base Register 1ï¼â¦ (0, c2, c0, 1)
Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/gic_design.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/gic_design.txt	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/gic_design.txt	(revision 306)
@@ -3,7 +3,60 @@
 		GICï¼ARM Generic Interrupt Controllerï¼ä¾å­é¨ è¨­è¨ã¡ã¢
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.B.0
-		æçµæ´æ°: 2015å¹´7æ24æ¥
-
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.0.0
+		æçµæ´æ°: 2016å¹´1æ16æ¥
+
+----------------------------------------------------------------------
+ TOPPERS/ASP Kernel
+     Toyohashi Open Platform for Embedded Real-Time Systems/
+     Advanced Standard Profile Kernel
+
+ Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
+             Graduate School of Information Science, Nagoya Univ., JAPAN
+ 
+ ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+     æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+     ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+     è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+     ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+     ã¨ï¼
+   (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+       ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+   (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+       å ±åãããã¨ï¼
+ (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+     å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+     ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+     ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+     å
+è²¬ãããã¨ï¼
+ 
+ æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ã®è²¬ä»»ãè² ããªãï¼
+ 
+ $Id: gic_design.txt 533 2016-01-15 23:29:33Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -14,7 +67,13 @@
 	- GICä¾å­é¨ãæ§æãããã¡ã¤ã«
 ã»ãããä¾å­ã®ãã©ã¡ã¼ã¿
+	- ã¢ããªã±ã¼ã·ã§ã³ããåç
+§ã§ãããã©ã¡ã¼ã¿
+	- ã«ã¼ãã«å
+é¨ã§ä½¿ç¨ãããã©ã¡ã¼ã¿
 ã»GICã«ãããå²è¾¼ã¿ãã³ãã©ããã³CPUä¾å¤ãã³ãã©ã®åºå
 ¥å£å¦ç
 	- GICã«ãããå²è¾¼ã¿ãã³ãã©ã®åºå
+¥å£å¦ç
+	- GICã«ãããCPUä¾å¤ãã³ãã©ã®åºå
 ¥å£å¦ç
 
@@ -43,16 +102,34 @@
 GICä¾å­é¨ã¯ï¼æ¬¡ã®3ã¤ã®ãã¡ã¤ã«ã§æ§æãããï¼
 
-gic_kernel_impl.h
-gic_kernel_impl.c
-gic_support.S
+  arch/arm_gcc/common/
+	gic_kernel_impl.h	ã«ã¼ãã«ã®å²è¾¼ã¿GICä¾å­é¨ã®ããããã¡ã¤ã«
+	gic_kernel_impl.c	ã«ã¼ãã«ã®å²è¾¼ã¿GICä¾å­é¨
+	gic_support.S		ã«ã¼ãã«ã®å²è¾¼ã¿GICä¾å­é¨ã®ã¢ã»ã³ããªè¨èªé¨
 
 âãããä¾å­ã®ãã©ã¡ã¼ã¿
 
-TMIN_INTPRI
-TMAX_INTPRI
-
-ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ããããã¡ã¤ã«ããgic_kernel_impl.hãã¤ã³ã¯
-ã«ã¼ãããåã«ï¼å¿
-è¦ã«å¿ãã¦ï¼ä»¥ä¸ã®å®æ°ããã¯ã­å®ç¾©ãã¦ããï¼
+âã¢ããªã±ã¼ã·ã§ã³ããåç
+§ã§ãããã©ã¡ã¼ã¿
+
+target_kernel.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ã§ï¼ä»¥ä¸ã®
+å®æ°ããã¯ã­å®ç¾©ãã¦ããï¼
+
+(1) TMIN_INTPRI			å²è¾¼ã¿åªå
+åº¦ã®æå°å¤ï¼æé«å¤ï¼
+(2) TMAX_INTPRI			å²è¾¼ã¿åªå
+åº¦ã®æå¤§å¤ï¼æä½å¤ï¼
+
+TMAX_INTPRIã¯ï¼-1ã«å®ç¾©ããï¼TMAX_INTPRIã¯ï¼ã¿ã¼ã²ãããããã®GICã§ãµãã¼
+ãããå²è¾¼ã¿åªå
+åº¦ã®æ®µæ°ã«ããï¼-15ï¼-31ï¼-63ï¼-127ï¼-255ã®ããããã«å®
+ç¾©ããï¼
+
+âã«ã¼ãã«å
+é¨ã§ä½¿ç¨ãããã©ã¡ã¼ã¿
+
+target_kernel_impl.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ãã
+gic_kernel_impl.hãã¤ã³ã¯ã«ã¼ãããåã«ï¼å¿
+è¦ã«å¿ãã¦ï¼ä»¥ä¸ã®å®æ°ããã¯
+ã­å®ç¾©ãã¦ããï¼
 
 (1) GIC_TNUM_INTNO		å²è¾¼ã¿ã®æ°
@@ -62,22 +139,15 @@
 Peripheral Interruptï¼ã®åè¨æ°ï¼
 
-(2) GIC_PRI_LEVEL		å²è¾¼ã¿åªå
-åº¦ã®æ®µæ°
-
-ã¿ã¼ã²ãããããã®GICããµãã¼ãããå²è¾¼ã¿åªå
-åº¦ã®æ®µæ°ï¼16ï¼32ï¼64ï¼128ï¼
-256ã®ããããï¼
-
-(3) GICC_BASE			CPUã¤ã³ã¿ãã§ã¼ã¹ã®ãã¼ã¹ã¢ãã¬ã¹
-(4) GICD_BASE			ãã£ã¹ããªãã¥ã¼ã¿ã®ãã¼ã¹ã¢ãã¬ã¹
+(2) GICC_BASE			CPUã¤ã³ã¿ãã§ã¼ã¹ã®ãã¼ã¹ã¢ãã¬ã¹
+(3) GICD_BASE			ãã£ã¹ããªãã¥ã¼ã¿ã®ãã¼ã¹ã¢ãã¬ã¹
 
 GICã®CPUã¤ã³ã¿ãã§ã¼ã¹ããã³ãã£ã¹ããªãã¥ã¼ã¿ã®ãã¼ã¹ã¢ãã¬ã¹ï¼
 
-(5) TOPPERS_SAFEG_SECURE	ã»ã­ã¥ã¢ã¢ã¼ãï¼ãªãã·ã§ã³ï¼
+(4) TOPPERS_SAFEG_SECURE	ã»ã­ã¥ã¢ã¢ã¼ãï¼ãªãã·ã§ã³ï¼
 
 ã»ã­ã¥ã¢ã¢ã¼ãã§ã«ã¼ãã«ãåä½ããï¼FIQãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ã¨æ±ãå ´å
 ã«ï¼ãã®ã·ã³ãã«ããã¯ã­å®ç¾©ããï¼
 
-(6) GIC_ARM11MOCORE		ARM11 MPCoreã¸ã®å¯¾å¿ï¼ãªãã·ã§ã³ï¼
+(5) GIC_ARM11MPCORE		ARM11 MPCoreã¸ã®å¯¾å¿ï¼ãªãã·ã§ã³ï¼
 
 ARM11 MPCoreã®Distributed Interrupt Controllerã®å ´åã«ã¯ï¼ãã®ã·ã³ãã«
@@ -284,5 +354,40 @@
 ¥å£å¦ç
 
-
+GICã«ãããCPUä¾å¤ãã³ãã©ã®å
+¥å£å¦çï¼irc_begin_excï¼ã§ã¯ï¼CPUä¾å¤çºç
+åã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã¹ã¿ãã¯ã«ä¿å­ãï¼CPUä¾å¤ãã³ãã©ã®å
+¥å£å¦ç
+ï¼irc_end_excï¼ã§å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå
+ã«æ»ãï¼
+
+----------------------------------------
+ALABEL(irc_begin_exc)
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãä¿å­ããï¼
+	 */
+	ldr		r1, =GICC_PMR		/* ç¾å¨ã®å²è¾¼ã¿åªå
+åº¦ãåå¾ */
+	ldr		r2, [r1]
+	push	{r2}				/* irc_end_excã§ç¨ããæ
+å ±ãä¿å­ */
+	bx		lr
+----------------------------------------
+ALABEL(irc_end_exc)
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå
+ã«æ»ãï¼
+	 */
+	pop		{r2}				/* irc_begin_excã§ä¿å­ããæ
+å ±ãå¾©å¸° */
+	ldr		r1, =GICC_PMR		/* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå
+ã«æ»ã */
+	str		r2, [r1]
+	bx		lr
+----------------------------------------
 
 ä»¥ä¸
Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/gic_memo.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/gic_memo.txt	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/gic_memo.txt	(revision 306)
@@ -5,5 +5,5 @@
 		ä½æè
 : é«ç°åºç« ï¼åå¤å±å¤§å­¦ï¼
-		æçµæ´æ°: 2015å¹´7æ25æ¥
+		æçµæ´æ°: 2016å¹´3æ24æ¥
 
 âã¡ã¢ã®ä½ç½®ã¥ã
@@ -340,8 +340,14 @@
 	- åå²è¾¼ã¿ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã2ãããã§è¨­å®
 	- ã¬ãã«ããªã¬ãã¨ãã¸ããªã¬ããè¨­å®
+			ä¸ä½ãããã0ï¼ã¬ãã«ããªã¬
+			ä¸ä½ãããã1ï¼ã¨ãã¸ããªã¬
 	- GICv1ããåã®ä¸é¨ã®å®è£
 ã§ã¯ï¼N-Nã¢ãã«ã1-Nã¢ãã«ããããã§è¨­å®
-			0ï¼N-Nã¢ãã«
-			1ï¼1-Nã¢ãã«
+			ä¸ä½ãããã0ï¼N-Nã¢ãã«
+			ä¸ä½ãããã1ï¼1-Nã¢ãã«
+	- GICv1ä»¥éã§ã¯ï¼ä¸ä½ããããã©ã®ããã«è¨­å®ãã¹ããï¼
+			æç®[1]ã«ã¯æè¨ããªã
+			æç®[2]ã«ããã¨ï¼1ã«ãã¹ãã¨ãèª­ãã
+	â GIC_ARM11MPCOREãå®ç¾©ããã¦ããã°1ï¼ããã§ãªããã°0ã«åæåããï¼
 
 å²è¾¼ã¿ãã³ã»ã­ã¥ã¢ã¢ã¯ã»ã¹å¶å¾¡ã¬ã¸ã¹ã¿ï¼GICD_NSCARnï¼0xe00ã0xefc â¦ ãªãã·ã§ã³
Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/mpcore_memo.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/mpcore_memo.txt	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/mpcore_memo.txt	(revision 306)
@@ -5,5 +5,5 @@
 		ä½æè
 : é«ç°åºç« ï¼åå¤å±å¤§å­¦ï¼
-		æçµæ´æ°: 2015å¹´8æ9æ¥
+		æçµæ´æ°: 2016å¹´1æ16æ¥
 
 âã¡ã¢ã®ä½ç½®ã¥ã
@@ -22,4 +22,6 @@
 
 ã»åèæç®
+ã»MPCoreã¨ã¯ï¼
+ã»SCUï¼Snoop Control Unitï¼
 ã»ARM CT11MPcore with RealView Emulation Baseboard
 	- ç¨èªã®æ´ç
@@ -53,4 +55,50 @@
 HBI-0159, HBI-0175, HBI-0176
 DUI0351E_realview_platform_baseboard_for_arm11_mpcore_ug.pdf
+
+âMPCoreã¨ã¯ï¼
+
+MPCoreã¨ã¯ï¼ARMã³ã¢ã1ã4åã¨ï¼SCUï¼Snoop Control Unitï¼ãªã©ï¼ãã«ãã³
+ã¢ã·ã¹ãã ã«å¿
+è¦ãªå¨è¾ºåè·¯ãå«ããã­ã»ããµã¢ã¼ã­ãã¯ãã£ã®åç§°ã¨æãã
+ãï¼
+
+åèæç®[1]ã«ããã¨ï¼ARM11 MPCoreã¨ã¯ï¼1ã4åã®MP11 CPUï¼ã³ã¢ï¼ãè¼ãï¼
+SCUï¼DICï¼Distributed Interrupt Controllerï¼ï¼ã³ã¢æ¯ã®ãã©ã¤ãã¼ãã¿ã¤
+ãã¨ãã©ã¤ãã¼ãã¦ã©ããããã°ï¼AXIã¤ã³ã¿ãã§ã¼ã¹ãªã©ãå«ããã­ã»ããµã®
+åç§°ã§ããï¼MP11 CPUã¨ã¯ï¼ARM11ãæ¡å¼µããã³ã¢ã®ãã¨ã¨æãããï¼
+
+åèæç®[2]ã«ããã¨ï¼Cortex-A9 MPCoreã¨ã¯ï¼1ã4åã®Cortex-A9ãã­ã»ããµ
+ï¼ã³ã¢ï¼ãè¼ãï¼SCUï¼GICï¼Generic Interrupt Controllerï¼ï¼ãã©ã¤ãã¼ã
+ããªãã§ã©ã«ï¼ã°ã­ã¼ãã«ã¿ã¤ãï¼ã³ã¢æ¯ã®ãã©ã¤ãã¼ãã¿ã¤ãã¨ã¦ã©ãããã
+ã°ï¼ï¼AXIã¤ã³ã¿ãã§ã¼ã¹ï¼ãªãã·ã§ã³ï¼ãªã©ãå«ããã­ã»ããµã®åç§°ã§ããï¼
+
+ä»¥ä¸ããï¼MPCoreãããä¾å­é¨ã«ã¯ï¼SCUï¼GICï¼ã¾ãã¯DICï¼ï¼ãã©ã¤ãã¼ãã
+ãªãã§ã©ã«ãæ±ãã³ã¼ããå«ããã®ãå¦¥å½ã¨èããããï¼ãã ãï¼GICï¼ããã³
+DICï¼ã«ã¤ãã¦ã¯ï¼å¥ã®ARMãã­ã»ããµã«ãå
+±éã§ä½¿ãããããï¼ARMã³ã¢ä¾å­é¨
+ã«å«ããï¼
+
+âSCUï¼Snoop Control Unitï¼
+
+SCUã¯ï¼åã³ã¢ãæã¤L1ã­ã£ãã·ã¥ã®ã³ãã¼ã¬ã³ã¹ãä¿ã¤ããã®åè·¯ã§ããï¼
+ARM11 MPCoreã§ã¯ï¼SCUãããã©ã¼ãã³ã¹ã¢ãã¿ã®æ©è½ãæã£ã¦ãããï¼
+Cortex-Aã·ãªã¼ãºã§ã¯ï¼ããã©ã¼ãã³ã¹ã¢ãã¿ã¯ç¬ç«ããæ©è½ã¨ãã¦ç¨æãã
+ã¦ããï¼SCUã¯ããã©ã¼ãã³ã¹ã¢ãã¿ã®æ©è½ãæããªãï¼
+
+ä»¥ä¸ã§ã¯ï¼SCUã®å¶å¾¡ã¬ã¸ã¹ã¿ã«ã¤ãã¦ã¾ã¨ããï¼
+
+SCUå¶å¾¡ã¬ã¸ã¹ã¿ï¼MPCORE_SCU_CTRLï¼â¦ 32ããã
+ï¼ARM11 MPCoreã¨Cortex-A9 MPCoreã§ï¼ãããé
+ç½®ãç°ãªãï¼
+
+SCUã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¬ã¸ã¹ã¿ï¼MPCORE_SCU_CONFIGï¼â¦ 32ããã
+
+SCU CPUãã¯ã¼ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ï¼MPCORE_SCU_CPUSTATï¼â¦ 32ããã
+ï¼ARM11 MPCoreã¨Cortex-A9 MPCoreã§ï¼ãããé
+ç½®ãç°ãªãï¼
+
+SCUå
+¨ç¡å¹åã¬ã¸ã¹ã¿ï¼MPCORE_SCU_INVALLï¼â¦ 32ããã
+	- ãã®ã¬ã¸ã¹ã¿ã«æ¸ãè¾¼ããã¨ã§ï¼ã¿ã°ã¡ã¢ãªãç¡å¹åã§ããï¼
 
 âARM CT11MPcore with RealView Emulation Baseboard
@@ -133,5 +181,5 @@
 	- ä»¥ä¸ã®ã¬ã¸ã¹ã¿ã®ã¢ãã¬ã¹ãæ±ºãã
 		+ ARM11 MPCoreã®ã¬ã¸ã¹ã¿
-			Snoop Control Unitï¼SCUï¼ã®å¶å¾¡ã¬ã¸ã¹ã¿
+			SCUã®å¶å¾¡ã¬ã¸ã¹ã¿
 		+ L220ã­ã£ãã·ã¥ã³ã³ãã­ã¼ã©ã®ã¬ã¸ã¹ã¿
 		+ ARM11 MPCoreãã¹ããããã®ã¬ã¸ã¹ã¿
@@ -167,6 +215,6 @@
 èµã¿ã¤ãï¼[1] 9.2ç¯ï¼
 
-ARM11 MPCoreã¯ï¼ã³ã¢æ¯ã«ï¼ã¿ã¤ãã¨ã¦ã©ããããã°ãæã¤ï¼ã¦ã©ããããã°
-ã¯ï¼ã¿ã¤ãã¨ãã¦ä½¿ç¨ãããã¨ãã§ããï¼
+ARM11 MPCoreã¯ï¼ã³ã¢æ¯ã«ï¼ãã©ã¤ãã¼ãã¿ã¤ãã¨ãã©ã¤ãã¼ãã¦ã©ãããã
+ã°ãæã¤ï¼ã¦ã©ããããã°ã¯ï¼ã¿ã¤ãã¨ãã¦ä½¿ç¨ãããã¨ãã§ããï¼
 
 âã¿ã¤ã
Index: asp3_wo_tecs/trunk/arch/arm_gcc/doc/rza1_memo.txt
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_gcc/doc/rza1_memo.txt	(revision 306)
+++ asp3_wo_tecs/trunk/arch/arm_gcc/doc/rza1_memo.txt	(revision 306)
@@ -0,0 +1,284 @@
+
+		TOPPERSãã­ã¸ã§ã¯ã è¨­è¨ã¡ã¢
+		ã«ããµã¹ RZ/Aããã³GR-PEACHã«é¢ããã¡ã¢
+
+		ä½æè
+: é«ç°åºç« ï¼åå¤å±å¤§å­¦ï¼
+		æçµæ´æ°: 2016å¹´3æ21æ¥
+
+âã¡ã¢ã®ä½ç½®ã¥ã
+
+ãã®ã¡ã¢ã¯ï¼ã«ããµã¹ RZ/Aã¨ï¼ãããç¨ãããã¼ãã§ããGR-PEACHã«é¢ãã¦ï¼
+TOPPERSã«ã¼ãã«ããã¼ãã£ã³ã°ããã«ããã£ã¦å¿
+è¦ã¨ãªãäºé 
+ãã¾ã¨ãããã®
+ã§ããï¼
+
+âç®æ¬¡
+
+ã»åèæç®
+ã»RZ/Aã¨ã¯ï¼
+ã»RZ/A1ãããä¾å­é¨
+
+âåèæç®
+
+[1] RZ/A1Hã°ã«ã¼ãï¼RZ/A1Mã°ã«ã¼ã ã¦ã¼ã¶ã¼ãºããã¥ã¢ã« ãã¼ãã¦ã§ã¢ç·¨
+Rev.2.00 2015.05
+r01uh0403jj0200_rz_a1h.pdf
+
+[2] RZ/A1Lã°ã«ã¼ã ã¦ã¼ã¶ã¼ãºããã¥ã¢ã« ãã¼ãã¦ã§ã¢ç·¨
+Rev.2.00 2015.05
+r01uh0437jj0200_rz_a1l.pdf
+
+âRZ/Aã·ãªã¼ãºã¨ã¯ï¼
+
+RZ/Aã·ãªã¼ãºã¨ã¯ï¼ARM Cortex-A9ã³ã¢ãæ­è¼ããã«ããµã¹ã®ä¸é£ã®ãã¤ã³ã³ã®
+ç·ç§°ã§ï¼ç¾æç¹ã§ä»¥ä¸ã®4ã¤ã®ããããããï¼
+
+ã»RZ/A1L
+ã»RZ/A1LU
+ã»RZ/A1M
+ã»RZ/A1H
+
+ãããã¯ããããï¼åä½å¨æ³¢æ°400MHzã®ARM Cortex-A9ã³ã¢ã1ã¤æ­è¼ãã¦ãã
+ãï¼æ­è¼ããRAMå®¹éãå¨è¾ºããã¤ã¹ã«éããããï¼
+
+âRZ/A1ãããä¾å­é¨
+
+TOPPERS/ASP3ã«ã¼ãã«ã§ã¯ï¼ä¸ã®4ã¤ã®ããããRZ/A1ã¨ç·ç§°ãï¼ä»å¾ï¼RZ/A2x
+ãåºã¦ããã¨æ³åãï¼RZ/A1ã¨ç§°ãã¦ããï¼ï¼ãã®å
+±éé¨ãarch/arm_gcc/rza1
+ãã£ã¬ã¯ããªã«ç½®ããã¨ã«ããï¼ãã ãï¼ç¾æç¹ã§4ã¤ã®ããããã¹ã¦ã«å¯¾å¿ã§
+ãã¦ããããã§ã¯ãªãï¼
+
+âã³ã¢
+
+ã»ARM Cortex-A9 MPCore Ã 1ã³ã¢ï¼Revision: r3p0ï¼
+	å½ä»¤ã­ã£ãã·ã¥ï¼32KB
+	ãã¼ã¿ã­ã£ãã·ã¥ï¼32KB
+	TLBã¨ã³ããªï¼128
+	Jazelleï¼ã¡ãã£ã¢ãã­ã»ãã·ã³ã°ã¨ã³ã¸ã³ï¼FPUï¼PTMã¤ã³ã¿ãã§ã¼ã¹
+	å
+èµã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ã¯ä½¿ç¨ããªã
+	ãã©ã¤ãã¼ãã¡ã¢ãªé åã®ãã¼ã¹ã¢ãã¬ã¹ï¼0xf0000000
+
+ã»å
+èµã®ã¿ã¤ãã¯å®è£
+ããã¦ããæ¨¡æ§ã ãï¼å²è¾¼ã¿ãããããã¨ãã§ããªã
+
+âå²è¾¼ã¿ã³ã³ãã­ã¼ã©
+
+ã»ã³ã¢å¤ã«å²è¾¼ã¿ã³ã³ãã­ã¼ã©ãæ­è¼
+ã»ARM PrimeCell Generic Interrupt Controllerï¼PL390ï¼
+	- ARM GICã¢ã¼ã­ãã¯ãã£ä»æ§ ãã¼ã¸ã§ã³1ã«å¯¾å¿
+ã»å²è¾¼ã¿åªå
+é ä½ï¼32ã¬ãã«è¨­å®å¯è½
+
+ã»ã¬ã¸ã¹ã¿ã®çªå°
+|	0xfcfef800		ICR0	å²è¾¼ã¿ã³ã³ãã­ã¼ã«ã¬ã¸ã¹ã¿0
+|	0xfcfef802		ICR1	å²è¾¼ã¿ã³ã³ãã­ã¼ã«ã¬ã¸ã¹ã¿1
+|	0xfcfef804		IRQRR	IRQå²è¾¼ã¿è¦æ±ã¬ã¸ã¹ã¿
+
+	0xe8201000		ICDDCR	åé
+å¨å¶å¾¡ã¬ã¸ã¹ã¿
+							â ãã£ã¹ããªãã¥ã¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ï¼GICD_CTLRï¼
+	â¦â¦
+	â» å²è¾¼ã¿ã¢ã¯ãã£ãã»ããã¬ã¸ã¹ã¿ã¯ï¼å²è¾¼ã¿ã¢ã¯ãã£ããããã¬ã¸ã¹ã¿
+	â» å²è¾¼ã¿ã¢ã¯ãã£ãã¯ãªã¢ã¬ã¸ã¹ã¿ã¯ç¡ã
+|	0xe8201d00		ppi_status		PPIã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿
+|	0xe8201d04		spi_status0		SPIã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿0
+|	â¦â¦
+|	0xe8201d44		spi_status16	SPIã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿16
+	0xe8201f00		ICDSGIR			ã½ããã¦ã§ã¢çæå²è¾¼ã¿ã¬ã¸ã¹ã¿
+
+	0xe8202000		ICCICR	CPUã¤ã³ã¿ãã§ã¼ã¹å¶å¾¡ã¬ã¸ã¹ã¿
+							â CPUã¤ã³ã¿ãã§ã¼ã¹å¶å¾¡ã¬ã¸ã¹ã¿ï¼GICC_CTLRï¼
+	â¦â¦
+
+ãå²è¾¼ã¿ã³ã³ãã­ã¼ã«ã¬ã¸ã¹ã¿0ï¼ICR0ï¼
+	- NMIå
+¥åã¬ãã«ã®èª­ã¿åºã
+	- NMIã¨ãã¸ã»ã¬ã¯ãã®è¨­å®ï¼èª­ã¿åºã
+	- NMIå²è¾¼ã¿è¦æ±ã®èª­ã¿åºãï¼ã¯ãªã¢
+
+ãå²è¾¼ã¿ã³ã³ãã­ã¼ã«ã¬ã¸ã¹ã¿1ï¼ICR1ï¼
+	- IRQ7ãIRQ0ã«å¯¾ãã¦ï¼ã­ã¼ã¬ãã«ï¼ç«ã¡ä¸ããã¨ãã¸ï¼ç«ã¡ä¸ããã¨ã
+	  ã¸ï¼ä¸¡ã¨ãã¸ã®è¨­å®ï¼èª­ã¿åºã
+	â IRQå²è¾¼ã¿ããªã¬è¨­å®ã¯ãã®ã¬ã¸ã¹ã¿ã§è¡ãï¼GICå´ã¯ã¬ãã«ã«è¨­å®ãã
+
+ãIRQå²è¾¼ã¿è¦æ±ã¬ã¸ã¹ã¿ï¼IRQRRï¼
+	- IRQ7ãIRQ0ã®å²è¾¼ã¿è¦æ±ã®èª­ã¿åºãï¼ã¯ãªã¢
+
+ã»å²è¾¼ã¿è¦å ã¨å²è¾¼ã¿ID
+	- NMIå²è¾¼ã¿ â¦ CPUã«FIQã§éç¥
+	- IRQå²è¾¼ã¿
+	- å
+èµå¨è¾ºã¢ã¸ã¥ã¼ã«å²è¾¼ã¿
+	- ç«¯å­å²è¾¼ã¿
+
+ã»IRQå²è¾¼ã¿ã¨å
+èµå¨è¾ºã¢ã¸ã¥ã¼ã«å²è¾¼ã¿ã«å¯¾ãã¦ï¼å²è¾¼ã¿ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
+ãã³ã¬ã¸ã¹ã¿ï¼GICD_ICFGRnï¼ãæå®ãããå¤ã«åæåããï¼
+	â gic_kernel_impl.cã«ããã¯ãå
+¥ãããã¨ãå¿
+è¦
+	â ä¸æ¬ãã¦åæåããªãã¦ãæ­£ããåãã¦ãã
+
+âã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹
+
+ã»RZ/A1ã¯ï¼FIFOå
+èµã·ãªã¢ã«ã³ãã¥ãã±ã¼ã·ã§ã³ã¤ã³ã¿ãã§ã¼ã¹ãæã¤
+	RZ/A1Hï¼8ãã¼ã
+	RZ/A1Lï¼5ãã¼ã
+
+ã»ãã¼ãæ¯ã®ã¬ã¸ã¹ã¿
+	SCSMR		ã·ãªã¢ã«ã¢ã¼ãã¬ã¸ã¹ã¿		ãªãã»ããï¼0x00	16ããã
+	SCBRR		ãããã¬ã¼ãã¬ã¸ã¹ã¿		ãªãã»ããï¼0x04	8ããã
+	SCSCR		ã·ãªã¢ã«ã³ã³ãã­ã¼ã«ã¬ã¸ã¹ã¿ ãªãã»ããï¼0x08	16ããã
+	SCFTDR		éä¿¡FIFOãã¼ã¿ã¬ã¸ã¹ã¿		ãªãã»ããï¼0x0C	8ããã
+	SCFSR		ã·ãªã¢ã«ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿	ãªãã»ããï¼0x10	16ããã
+	SCFRDR		åä¿¡FIFOãã¼ã¿ã¬ã¸ã¹ã¿		ãªãã»ããï¼0x14	8ããã
+	SCFCR		FIFOã³ã³ãã­ã¼ã«ã¬ã¸ã¹ã¿	ãªãã»ããï¼0x18	16ããã
+	SCFDR		FIFOãã¼ã¿ã«ã¦ã³ãã¬ã¸ã¹ã¿	ãªãã»ããï¼0x1C 	16ããã
+	SCSPTR		ã·ãªã¢ã«ãã¼ãã¬ã¸ã¹ã¿		ãªãã»ããï¼0x20	16ããã
+	SCLSR		ã©ã¤ã³ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿	ãªãã»ããï¼0x24	16ããã
+	SCEMR		ã·ãªã¢ã«æ¡å¼µã¢ã¼ãã¬ã¸ã¹ã¿	ãªãã»ããï¼0x28	16ããã
+
+âOSã¿ã¤ã
+
+ã»2ãã£ã³ãã«ã®OSã¿ã¤ããæã¤
+	- 32ãããã¿ã¤ã
+ã»2ã¤ã®åä½ã¢ã¼ã
+ã»P0Ïã§é§å
+	- P0Ïã¯33.33MHzï¼æå¤§ï¼
+	- ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ã«ã¯33.33MHzã¨è¡¨è¨ããã¦ãããï¼400MHzã®12å
+	  å¨ãªã®ã§ï¼å®éã«ã¯ï¼33.333333â¦MHzã¨æããã
+
+ã»ã¤ã³ã¿ã¼ãã«ã¿ã¤ãã¢ã¼ã
+	- ä¸å®ééã§å²è¾¼ã¿ãçºçãããå ´åã«ä½¿ç¨
+	- æå®å¤ãã0ã¾ã§ãã¦ã³ã«ã¦ã³ãï¼å¨æã¯ï¼æå®å¤+1ï¼
+	- 0ããæå®å¤ã«æ»ãæã«å²è¾¼ã¿ãçºç
+
+	- æå®å¤ãå¤æ´ããã¨ï¼æ¬¡ã«æ»ãæã«åæ 
+	- ããã«æå®å¤ãåæ ããããã¨ãå¯è½
+
+	- ã«ã¦ã³ãéå§æã«å²è¾¼ã¿ãçºçãããæ©è½ãããï¼ä½¿éãä¸æï¼
+	- 0ã«ãªã£ãå¾ã«ã«ã¦ã³ããæ­¢ããã¢ã¼ãã¯ãªãï¼ã¯ã³ã·ã§ããã¯ã§ããªãï¼
+
+ã»ããªã¼ã©ã³ãã³ã°ã³ã³ãã¢ã¢ã¼ã
+	- 0x00000000ãã0xffffffffã¾ã§ã«ã¦ã³ãã¢ãã
+	- æå®å¤ã«ãªã£ããï¼å²è¾¼ã¿ãçºç
+
+	- æå®å¤ã®è¨­å®æã«ï¼æå®å¤ãéãã¦ããå ´åã®å¯¾ç­ãèª²é¡
+		â èª­ã¿è¾¼ãã§ï¼æå®å¤ãéãã¦ãããï¼GICãæä½ãã¦å²è¾¼ã¿è¦æ±ãåºã
+
+ã»ãã£ãã«æ¯ã®ã¬ã¸ã¹ã¿
+	OSTMnCMP	ã³ã³ãã¢ã¬ã¸ã¹ã¿			ãªãã»ããï¼0x00	RW 32ããã
+				âãæå®å¤ããè¨­å®
+	OSTMnCNT	ã«ã¦ã³ãã¬ã¸ã¹ã¿			ãªãã»ããï¼0x04	R 32ããã
+	OSTMnTE		ã«ã¦ã³ãã¤ãã¼ãã«ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿	0x10	R 8ããã
+	OSTMnTS		ã«ã¦ã³ãéå§ããªã¬ã¬ã¸ã¹ã¿	ãªãã»ããï¼0x14	W 8ããã
+	OSTMnTT		ã«ã¦ã³ãåæ­¢ããªã¬ã¬ã¸ã¹ã¿	ãªãã»ããï¼0x18	W 8ããã
+	OSTMnCTL	å¶å¾¡ã¬ã¸ã¹ã¿				ãªãã»ããï¼0x20	RW 8ããã
+				â åä½ã¢ã¼ãã¨ã«ã¦ã³ãéå§æã®å²è¾¼ã¿ã®æç¡ãè¨­å®
+
+ã»33.33â¦MHzã®ã¯ã­ãã¯ã§ãã¾ããããï¼
+	- ã¿ã¤ããå·¡åããå¨æãæ±ãã
+		2^32(= 4,294,967,296)/33.33â¦
+		= 2^32(= 4,294,967,296)*3/100
+		= 128,849,018.88Î¼sï¼ç´2åï¼
+		â ããã 128,849,019Î¼s ã¨ä¸¸ããã®ã¯è¨±å®¹ç¯å²
+			ãã®èª¤å·®ã¯ï¼æ°´æ¶çºæ¯å­ã®ç²¾åº¦ãããå°ãã
+	
+	- ã«ã¦ã³ã¿å¤ * 3 / 100 ãÎ¼såä½ã®æå»ã¨ããã¨
+
+		ã«ã¦ã³ã¿å¤					Î¼såä½æå»ï¼ã«ã¦ã³ã¿å¤ * 3 / 100ï¼
+		0ã33 [34]						0
+		34ã66 [33]						1
+		67ã99 [33]						2
+		100ã133 [34]					3
+		â¦								â¦
+		4294967200ã4294967233 [34]		128,849,016
+		4294967234ã4294967266 [33]		128,849,017
+		4294967267ã4294967295 [29]		128,849,018
+		â æå¾ã ãééã29ã«ãªã
+		â ãã¤ï¼long longã§ã®è¨ç®ãå¿
+è¦
+
+	- (x / 4 + x / 4000000000) * 3 / 25 ãÎ¼såä½ã®æå»ã¨ããã¨
+											where x = ã«ã¦ã³ã¿å¤
+		ã«ã¦ã³ã¿å¤					Î¼såä½æå»ï¼ã«ã¦ã³ã¿å¤ * 3 / 100ï¼
+		0ã35 [36]						0
+		36ã67 [32]						1
+		68ã99 [32]						2
+		100ã135 [36]					3
+		136ã167 [32]					4
+		168ã199 [32]					5
+		â¦								â¦
+		3999999900ã3999999935 [36]		119999997
+		3999999936ã3999999967 [32]		119999998
+		3999999968ã3999999999 [32]		119999999
+		4000000000ã4000000031 [32]		120000000 â¦ ããã32ã«ãªã
+		4000000032ã4000000063 [32]		120000001
+		4000000064ã4000000095 [32]		120000002
+		â¦								â¦
+		4294967196ã4294967231 [36]		128849016
+		4294967232ã4294967263 [32]		128849017
+		4294967264ã4294967295 [32]		128849018 â¦ æå¾ã32ãç¶­æããã
+		â» 32ã¨36ã®éã§ã°ãã¤ãã®ã¯ï¼4ã§å²ã£ã¦ããã®ã§ãããããªã
+
+	- y = (x - z * 999999999) * 3 / 100 + z * 30000000 ãÎ¼såä½ã®æå»ã¨ããã¨
+							where x = ã«ã¦ã³ã¿å¤, z = x / 1000000000
+		ãã¹ã¦ã®ééã33ã34ã®ããããã«è½ã¡çã
+
+----------------------------------------------------------------------
+#!/usr/bin/env ruby
+# -*- coding: utf-8 -*-
+
+def calc(x)
+#  y = (x / 4 + x / 4000000000) * 3 / 25
+  z = x / 1000000000
+  y = (x - z * 999999999) * 3 / 100 + z * 30000000
+  return(y)
+end
+
+xx = yy = -1
+0.upto(200).each do |x|
+  y = calc(x)
+  if (y != yy)
+    if yy >= 0
+      puts(sprintf("%d - %d [%d] ... %d", xx, x-1, x - xx, yy))
+    end
+    yy = y
+    xx = x
+  end
+end
+
+xx = yy = -1
+3999999800.upto(4000000200).each do |x|
+  y = calc(x)
+  if (y != yy)
+    if yy >= 0
+      puts(sprintf("%d - %d [%d] ... %d", xx, x-1, x - xx, yy))
+    end
+    yy = y
+    xx = x
+  end
+end
+
+xl = xx = yy = -1
+4294967100.upto(4294967295).each do |x|
+  y = calc(x)
+  if (y != yy)
+    if yy >= 0
+      puts(sprintf("%d - %d [%d] ... %d", xx, x-1, x - xx, yy))
+    end
+    yy = y
+    xx = x
+  end
+  xl = x
+end
+puts(sprintf("%d - %d [%d] ... %d", xx, xl, xl + 1 - xx, yy))
+----------------------------------------------------------------------
+
+ä»¥ä¸
Index: asp3_wo_tecs/trunk/arch/arm_m_gcc/common/Makefile.core
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_m_gcc/common/Makefile.core	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_m_gcc/common/Makefile.core	(revision 306)
@@ -95,5 +95,5 @@
 
 #
-#  ãªãã»ãããã¡ã¤ã«çæã®ããã®å®ç¾©(ToDo)
+#  ãªãã»ãããã¡ã¤ã«çæã®ããã®å®ç¾©
 #
 TARGET_OFFSET_TRB = $(COREDIR)/core_offset.trb
Index: asp3_wo_tecs/trunk/arch/arm_m_gcc/common/core_check.trb
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_m_gcc/common/core_check.trb	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_m_gcc/common/core_check.trb	(revision 306)
@@ -1,13 +1,13 @@
 # ======================================================================
-# 
+#
 #   TOPPERS/ASP Kernel
 #       Toyohashi Open Platform for Embedded Real-Time Systems/
 #       Advanced Standard Profile Kernel
-#  
+#
 #   Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
 #                               Toyohashi Univ. of Technology, JAPAN
 #   Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
 #               Graduate School of Information Science, Nagoya Univ., JAPAN
-#  
+#
 #   ä¸è¨èä½æ¨©è
 ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
@@ -46,5 +46,5 @@
 #       å
 è²¬ãããã¨ï¼
-#  
+#
 #   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
 ã
@@ -53,19 +53,17 @@
 #   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
 #   ã®è²¬ä»»ãè² ããªãï¼
-# 
+#
 #   @(#) $Id: core_check.tf 301 2015-01-07 04:57:01Z ertl-ishikawa $
 #
 # =====================================================================
 
-# 
+#
 # 		ãã¹3ã®ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãï¼ARM-Mç¨ï¼
-# 
+#
 
-# 
+#
 #  ãã¹4ã®ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãï¼ARM-Mç¨ï¼
-#  
-def GetStackTskinictxb(key, params)
-    tinib = SYMBOL("_kernel_tinib_table")
-    tinib += $sizeof_TINIB * (key - 1)
+#
+def GetStackTskinictxb(key, params, tinib)
     bottom = PEEK(tinib + $offsetof_TINIB_TSKINICTXB_stk_bottom, $sizeof_void_ptr)
     size = PEEK(tinib + $offsetof_TINIB_TSKINICTXB_stksz, $sizeof_size_t)
@@ -73,6 +71,6 @@
 end
 
-# 
+#
 #  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
-# 
+#
 IncludeTrb("kernel/kernel_check.trb")
Index: asp3_wo_tecs/trunk/arch/arm_m_gcc/common/core_kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/arch/arm_m_gcc/common/core_kernel.trb	(revision 305)
+++ asp3_wo_tecs/trunk/arch/arm_m_gcc/common/core_kernel.trb	(revision 306)
@@ -1,13 +1,13 @@
 # ======================================================================
-# 
+#
 #   TOPPERS/ASP Kernel
 #       Toyohashi Open Platform for Embedded Real-Time Systems/
 #       Advanced Standard Profile Kernel
-#  
+#
 #   Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
 #                               Toyohashi Univ. of Technology, JAPAN
 #   Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
 #               Graduate School of Information Science, Nagoya Univ., JAPAN
-#  
+#
 #   ä¸è¨èä½æ¨©è
 ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
@@ -46,5 +46,5 @@
 #       å
 è²¬ãããã¨ï¼
-#  
+#
 #   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
 ã
@@ -53,38 +53,38 @@
 #   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
 #   ã®è²¬ä»»ãè² ããªãï¼
-# 
+#
 #   @(#) $Id: core.tf 322 2015-04-30 13:23:48Z ertl-ishikawa $
 #
 # =====================================================================
 
-# 
+#
 #     ãã¹2ã®ã¢ã¼ã­ãã¯ãã£ä¾å­ãã³ãã¬ã¼ãï¼ARM-Mç¨ï¼
-# 
-
-# 
+#
+
+#
 #  æå¹ãªå²è¾¼ã¿çªå·ï¼å²è¾¼ã¿ãã³ãã©çªå·
-# 
-$INTNO_VALID = Array(15..$TMAX_INTNO.val)
+#
+$INTNO_VALID = Array(15..$TMAX_INTNO)
 $INHNO_VALID = $INTNO_VALID
 
-# 
+#
 #  æå¹ãªCPUä¾å¤çªå·
 #  7,8ã¯ã¨ãã¥ã¬ã¼ããããä¾å¤
-# 
+#
 $EXCNO_VALID = [ 2,3,4,5,6,7,8,11,12,14 ]
 
-# 
+#
 #  CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·
-# 
+#
 $INTNO_CREISR_VALID = $INTNO_VALID
 $INHNO_CREISR_VALID = $INHNO_VALID
 
-# 
+#
 #  DEF_INTï¼DEF_EXCã§ä½¿ç¨ã§ããå²è¾¼ã¿ãã³ãã©çªå·ï¼CPUä¾å¤ãã³ãã©çªå·
-# 
+#
 $INHNO_DEFINH_VALID = $INHNO_VALID
 $EXCNO_DEFEXC_VALID = $EXCNO_VALID
 
-# 
+#
 #  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨å²è¾¼ã¿åªå
 åº¦
@@ -96,14 +96,14 @@
 #  ãã®ããï¼ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ã§ã®ã¿æå®å¯è½ï¼
 $INTNO_CFGINT_VALID = $INTNO_VALID
-$INTPRI_CFGINT_VALID = Array(-(1 << $TBITW_IPRI.val)..-2)
-
-# 
+$INTPRI_CFGINT_VALID = Array(-(1 << $TBITW_IPRI)..-2)
+
+#
 #  kernel/kernel.tf ã®ã¿ã¼ã²ããä¾å­é¨
-# 
-
-# 
+#
+
+#
 #  TSKINICTXBã®åæåæ
 å ±ãçæ
-# 
+#
 def GenerateTskinictxb(key, params)
    return("{" \
@@ -114,7 +114,7 @@
 end
 
-# 
+#
 #  æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
-# 
+#
 IncludeTrb("kernel/kernel.trb")
 
@@ -124,7 +124,7 @@
  */
 
-/* 
+/*
  *  ãã¯ã¿ã¼ãã¼ãã«
- */ 
+ */
 __attribute__ ((section(".vector")))
 const FP _kernel_vector_table[] = {
@@ -143,5 +143,5 @@
 $INTNO_VALID.each { |inhno|
     #if $cfgData[:DEF_INH][inhno]) && ((INH.INHATR[inhno] & TA_NONKERNEL) != 0)$
-    inh = $cfgData[:DEF_INH].select { |k,v| 
+    inh = $cfgData[:DEF_INH].select { |k,v|
         (v[:inhno] == inhno) && (v[:inhatr] & $TA_NONKERNEL)
     }
@@ -158,5 +158,5 @@
 $kernelCfgC.add("const FP _kernel_exc_tbl[] = {")
 Array(0..14).each { |excno|
-    exc = $cfgData[:DEF_EXC].select { |k,v| 
+    exc = $cfgData[:DEF_EXC].select { |k,v|
         (v[:excno] == excno)
     }
@@ -170,5 +170,5 @@
 }
 $INTNO_VALID.each { |inhno|
-    inh = $cfgData[:DEF_INH].select { |k,v| 
+    inh = $cfgData[:DEF_INH].select { |k,v|
         (v[:inhno] == inhno)
     }
@@ -183,7 +183,7 @@
 $kernelCfgC.add2("};")
 
-# 
+#
 #  _kernel_bitpat_cfgintã®çæ
-# 
+#
 
 bitpat_cfgint_num = 0
@@ -199,5 +199,5 @@
 Array(0..(bitpat_cfgint_num-1)).each { |num|
     Array((num*32)..((num*32)+31)).each { |inhno|
-        inh = $cfgData[:DEF_INH].select { |k,v| 
+        inh = $cfgData[:DEF_INH].select { |k,v|
             (v[:inhno] == inhno)
         }
@@ -210,9 +210,9 @@
 $kernelCfgC.add2("};")
 
-# 
+#
 #  å²è¾¼ã¿åªå
 åº¦ãã¼ãã«ï¼å
 é¨è¡¨ç¾ï¼
-# 
+#
 $kernelCfgC.add("const uint32_t _kernel_int_iipm_tbl[] = {")
 Array(0..14).each { |excno|
@@ -220,5 +220,5 @@
 }
 $INTNO_VALID.each { |intno|
-    int = $cfgData[:CFG_INT].select { |k,v| 
+    int = $cfgData[:CFG_INT].select { |k,v|
         (v[:intno] == intno)
     }
Index: asp3_wo_tecs/trunk/cfg/GenFile.rb
===================================================================
--- asp3_wo_tecs/trunk/cfg/GenFile.rb	(revision 306)
+++ asp3_wo_tecs/trunk/cfg/GenFile.rb	(revision 306)
@@ -0,0 +1,123 @@
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Configurator by Ruby
+#
+#  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2016 by APTJ Co., Ltd., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: GenFile.rb 111 2016-03-16 23:50:27Z ertl-hiro $
+#
+
+#
+#		ãã¡ã¤ã«ä½æã¯ã©ã¹
+#
+
+#
+# ãã¡ã¤ã«ã«æ¸ããã¨ããå
+å®¹ãå¤æ°ã«èç©ãï¼ãã­ã°ã©ã ã®çµäºæï¼output
+# ã¡ã½ãããå¼ã°ããæï¼ã«ãã¡ã¤ã«ã«åºåããï¼æ¢ã«ãã¡ã¤ã«ãå­å¨ãï¼å·®
+# åããªãå ´åã¯åºåããªãï¼ã¿ã¤ã ã¹ã¿ã³ããæ´æ°ããªãï¼ï¼
+#
+class GenFile
+  @@fileDataHash = {}
+
+  def initialize(fileName)
+    @selfFileName = fileName
+    if !@@fileDataHash.has_key?(fileName)
+      @@fileDataHash[@selfFileName] = ""
+    end
+  end
+
+  # ãã¡ã¤ã«ãã¼ã¿ã®æ«å°¾ã«æå­åãè¿½å ãã
+  def append(code = "")
+    @@fileDataHash[@selfFileName] << code
+  end
+
+  # ãã¡ã¤ã«ãã¼ã¿ã«1è¡è¿½å ãã
+  def add(code = "")
+    @@fileDataHash[@selfFileName] << code << "\n"
+  end
+
+  # ãã¡ã¤ã«ãã¼ã¿ã«1è¡è¿½å ãã(æ¹è¡2å)
+  def add2(code = "")
+    add(code + "\n")
+  end
+
+  # ã³ã¡ã³ãããããè¿½å ãã
+  def comment_header(comment)
+    add("/*")
+    comment.split("\n").each do |sLine|
+      add(" *  " + sLine)
+    end
+    add2(" */")
+  end
+
+  # ãã¡ã¤ã«ãã¼ã¿ãè¡¨ç¤ºãã
+  def print()
+    puts(@@fileDataHash[@selfFileName])
+  end
+
+  # å
+¨ãã¡ã¤ã«ãåºåãã
+  def self.output()
+    @@fileDataHash.each do |fileName, fileData|
+      # æ¢ã«ãã¡ã¤ã«ãå­å¨ãï¼å·®åããªãå ´åã¯åºåããªã
+      #ï¼ã¿ã¤ã ã¹ã¿ã³ããæ´æ°ããªãï¼
+      if File.exist?(fileName)
+        if fileData == File.read(fileName)
+          next
+        end
+      end
+      File.open(fileName, "w") do |file|
+        puts("[#{File.basename($0)}] Generated #{fileName}")
+        file.puts(fileData)
+      end
+    end
+  end
+end
Index: asp3_wo_tecs/trunk/cfg/MANIFEST
===================================================================
--- asp3_wo_tecs/trunk/cfg/MANIFEST	(revision 305)
+++ asp3_wo_tecs/trunk/cfg/MANIFEST	(revision 306)
@@ -3,6 +3,6 @@
 pass1.rb
 pass2.rb
+GenFile.rb
+SRecord.rb
 
-common/GenFile.rb
-common/StrVal.rb
-common/SRecord.rb
+doc/cfg_user.txt
Index: asp3_wo_tecs/trunk/cfg/SRecord.rb
===================================================================
--- asp3_wo_tecs/trunk/cfg/SRecord.rb	(revision 306)
+++ asp3_wo_tecs/trunk/cfg/SRecord.rb	(revision 306)
@@ -0,0 +1,190 @@
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS Configurator by Ruby
+#
+#  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: SRecord.rb 107 2016-03-14 03:29:58Z ertl-hiro $
+#
+
+#
+#		Sã¬ã³ã¼ããã¡ã¤ã«å¦çã¯ã©ã¹
+#
+
+#
+# Sã¬ã³ã¼ããã¡ã¤ã«ãå¤æ°ã«èª­ã¿è¾¼ã¿ï¼è¦æ±ãããçªå°ã®ãã¼ã¿ãè¿ãï¼
+#
+# @sRecDataã¯ï¼å
+é ­çªå°ãã­ã¼ã¨ãï¼ããããã®ãã¼ã¿ï¼ãã­ãµãã³ãå½¢å¼ï¼
+# ãå¤ã¨ãã­ãã¯ãæ ¼ç´ãããããã·ã¥ã§ããï¼é£ç¶ãããã­ãã¯ã¯ï¼1ã¤ã®ã
+# ã­ãã¯ã«ã¾ã¨ãã¦æ ¼ç´ãããã®ã¨ããï¼ããããªãã¨ï¼ãã¼ã¿ã®ååºãããµã¼
+# ããé¢åã«ãªãï¼ï¼
+#
+class SRecord
+  def initialize(fileName)
+    @sRecData = {}
+    File.open(fileName) do |file|
+      prevAddress = 0
+      prevData = ""
+      file.each do |line|
+        # ãã¼ã¿ã¬ã³ã¼ãã«ããåå²
+        case line.slice(0, 2)
+        when "S1"
+          # ãã¼ã¿é·ï¼ã¢ãã¬ã¹å[2byte]+ãã§ãã¯ãµã å1byteãæ¸ç®ï¼
+          length = line.slice(2, 2).hex - 2 - 1
+
+          # ã¢ãã¬ã¹ï¼4æå­=2byteï¼
+          address = line.slice(4, 4).hex
+
+          # ãã¼ã¿ï¼ãã®æç¹ã§ã¯æå­åã§åã£ã¦ããï¼
+          data = line.slice(8, length * 2)
+        when "S2"
+          # ãã¼ã¿é·ï¼ã¢ãã¬ã¹å[3byte]+ãã§ãã¯ãµã å1byteãæ¸ç®ï¼
+          length = line.slice(2, 2).hex - 3 - 1
+
+          # ã¢ãã¬ã¹ï¼6æå­=3byteï¼
+          address = line.slice(4, 6).hex
+
+          # ãã¼ã¿ï¼ãã®æç¹ã§ã¯æå­åã§åã£ã¦ããï¼
+          data = line.slice(10, length * 2)
+        when "S3"
+          # ãã¼ã¿é·ï¼ã¢ãã¬ã¹å[4byte]+ãã§ãã¯ãµã å1byteãæ¸ç®ï¼
+          length = line.slice(2, 2).hex - 4 - 1
+
+          # ã¢ãã¬ã¹ï¼8æå­=4byteï¼
+          address = line.slice(4, 8).hex
+
+          # ãã¼ã¿ï¼ãã®æç¹ã§ã¯æå­åã§åã£ã¦ããï¼
+          data = line.slice(12, length * 2)
+        else
+          address = nil
+        end
+
+        if !address.nil?
+          # ãã¼ã¿ãæ ¼ç´ãã
+          if address == prevAddress + prevData.size / 2
+            prevData << data
+          else
+            set_data(prevAddress, prevData) if prevData.size > 0
+            prevAddress = address
+            prevData = data
+          end
+        end
+      end
+      set_data(prevAddress, prevData) if prevData.size > 0
+    end
+  end
+
+  # ãã¼ã¿åå¾
+  def get_data(address, size)
+    endAddress = address + size
+    @sRecData.each do |block, blockData|
+      if (block <= address && endAddress <= block + blockData.size / 2)
+        offset = (address - block) * 2
+        return(blockData[offset, size * 2])
+      end
+    end
+    return(nil)
+  end
+
+  # ãã¼ã¿æ¸è¾¼ã¿
+  def set_data(address, data)
+    endAddress = address + data.size / 2
+    @sRecData.each do |block, blockData|
+      nEndBlock = block + blockData.size / 2
+
+      if nEndBlock < address || endAddress < block
+        # éãªãããªã
+      elsif address < block
+        # æ°è¦ãã¼ã¿ã®æ¹ãå
+é ­çªå°ãå°ãã
+        # ããã§ã¯ endAddress >= block ãæç«ãã¦ãã
+        offset = (endAddress - block) * 2
+        data << blockData[offset..-1]
+        @sRecData.delete(block)
+      else
+        # ç»é²æ¸ã¿ãã¼ã¿ã®æ¹ãå
+é ­çªå°ãå°ãããåã
+        offset = (address - block) * 2
+        address = block
+        blockData[offset, data.size] = data
+        data = blockData
+        @sRecData.delete(block)
+      end
+    end
+    @sRecData[address] = data
+  end
+
+  # å¤ã¨ãã¦ã®ãã¼ã¿åå¾
+  def get_value(address, size, signed)
+    targetData = get_data(address, size)
+    if targetData.nil?
+      return(nil)
+    else
+      if $endianLittle
+        # ãªãã«ã¨ã³ãã£ã¢ã³ã®å ´åï¼ãã¤ããªã¼ãã¼ãéã«ãã
+        reverseData = ""
+        # å¾ããã2æå­ãã¤æãåºãï¼ä¸¦ã³æ¿ãã
+        while targetData.size > 0
+          reverseData << targetData[-2, 2]
+          targetData.slice!(-2, 2)
+        end
+        returnData = reverseData.hex
+      else
+        returnData = targetData.hex
+      end
+
+      # è² ã®æ°ã®å¦ç
+      if signed && (returnData & (1 << (size * 8 - 1))) != 0
+        returnData -= (1 << (size * 8))
+      end
+      return(returnData)
+    end
+  end
+end
Index: asp3_wo_tecs/trunk/cfg/cfg.rb
===================================================================
--- asp3_wo_tecs/trunk/cfg/cfg.rb	(revision 305)
+++ asp3_wo_tecs/trunk/cfg/cfg.rb	(revision 306)
@@ -52,8 +52,8 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 #
-#  $Id: cfg.rb 32 2016-01-31 14:45:59Z ertl-hiro $
-#
-
-if ($0 == __FILE__)
+#  $Id: cfg.rb 111 2016-03-16 23:50:27Z ertl-hiro $
+#
+
+if $0 == __FILE__
   TOOL_ROOT = File.expand_path(File.dirname(__FILE__)) + "/"
   $LOAD_PATH.unshift(TOOL_ROOT)
@@ -64,7 +64,6 @@
 require "optparse"
 require "pstore"
-require "common/GenFile.rb"
-require "common/StrVal.rb"
-require "common/SRecord.rb"
+require "GenFile.rb"
+require "SRecord.rb"
 
 #
@@ -73,5 +72,5 @@
 # å
 ±é
-VERSION = "1.0.0"
+VERSION = "1.2.1"
 
 # cfg1_outé¢ä¿
@@ -84,7 +83,11 @@
 CFG1_OUT_SYMS      = "cfg1_out.syms"
 CFG1_OUT_TIMESTAMP = "cfg1_out.timestamp"
+CFG1_OUT_TARGET_H  = "target_cfg1_out.h"
 
 # cfg2_outé¢ä¿
 CFG2_OUT_DB        = "cfg2_out.db"
+
+# cfg3_outé¢ä¿
+CFG3_OUT_DB        = "cfg3_out.db"
 
 #
@@ -116,15 +119,51 @@
 
 # ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®æ§æè§£ææã®ã¨ã©ã¼
-$no_parse_error = 0
+$noParseError = 0
 def parse_error(cfgFile, message)
   error(message, "#{cfgFile.getFileName()}:#{cfgFile.getLineNo}:")
-  if ($no_parse_error += 1) >= 10
-    error_exit("too many errors emitted, stopping now")
-  end
+  if ($noParseError += 1) >= 10
+    abort("too many errors emitted, stopping now")
+  end
+end
+
+# ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®æ§æè§£ææã®è­¦å
+def parse_warning(cfgFile, message)
+  warning(message, "#{cfgFile.getFileName()}:#{cfgFile.getLineNo}:")
+end
+
+#
+#  éçAPIå¦çæã®ã¨ã©ã¼ï¼è­¦åè¡¨ç¤ºé¢æ°
+#
+# éçAPIå¦çæã®ã¨ã©ã¼ï¼è­¦åãç­ãè¨è¿°ã§ããããã«ï¼ã¡ãã»ã¼ã¸ä¸­ã®%ã¾
+# ãã¯%%ã§å§ã¾ãè¨è¿°ãä»¥ä¸ã®ããã«å±éããï¼
+#	%label â #{params[:label]}
+#	%%label â label `#{params[:label]}'
+#
+# ã¨ã©ã¼ï¼è­¦åã¡ãã»ã¼ã¸ã®å±é
+def expand_message(message, params)
+  result = message.dup
+  while /%%(\w+)\b/ =~ result
+    param = $1
+    paramVal = params[param.to_sym].to_s
+    result.sub!(/%%#{param}\b/, "#{param} `#{paramVal}'")
+  end
+  while /%(\w+)\b/ =~ result
+    param = $1
+    paramVal = params[param.to_sym].to_s
+    result.sub!(/%#{param}\b/, paramVal)
+  end
+  return(result)
 end
 
 # éçAPIå¦çæã®ã¨ã©ã¼
 def error_api(params, message)
-  error(message, "#{params[:_file_]}:#{params[:_line_]}:")
+  error(expand_message(message, params), \
+			"#{params[:_file_]}:#{params[:_line_]}:")
+end
+
+# éçAPIå¦çæã®è­¦å
+def warning_api(params, message)
+  warning(expand_message(message, params), \
+			"#{params[:_file_]}:#{params[:_line_]}:")
 end
 
@@ -134,40 +173,37 @@
 end
 
-# éçAPIå¦çæã®è­¦å
-def warning_api(params, message)
-  warning(message, "#{params[:_file_]}:#{params[:_line_]}:")
+# éçAPIå¦çæã®è­¦åï¼ã¨ã©ã¼ã³ã¼ãä»ãï¼
+def warning_ercd(errorCode, params, message)
+  warning_api(params, "#{errorCode}: #{message}")
 end
 
 # ãã©ã¡ã¼ã¿ã®ã¨ã©ã¼
 def error_wrong(errorCode, params, symbol, wrong)
-  error_ercd(errorCode, params, "#{symbol.to_s} `#{params[symbol]}'" \
-									" is #{wrong} in #{params[:apiname]}")
+  error_ercd(errorCode, params, "%%#{symbol} is #{wrong} in %apiname")
 end
 
 def error_wrong_id(errorCode, params, symbol, objid, wrong)
-  error_ercd(errorCode, params, "#{symbol.to_s} `#{params[symbol]}'" \
-				" is #{wrong} in #{params[:apiname]} of #{params[objid]}")
+  error_ercd(errorCode, params, "%%#{symbol} is #{wrong} " \
+	             					"in %apiname of %#{objid}")
 end
 
 def error_wrong_sym(errorCode, params, symbol, symbol2, wrong)
-  error_ercd(errorCode, params, "#{symbol.to_s} `#{params[symbol]}'" \
-								" is #{wrong} in #{params[:apiname]}" \
-								" of #{symbol2.to_s} `#{params[symbol2]}'")
+  error_ercd(errorCode, params, "%%#{symbol} is #{wrong} " \
+									"in %apiname of %%#{symbol2}")
 end
 
 # ãã©ã¡ã¼ã¿ä¸æ­£ã®ã¨ã©ã¼
 def error_illegal(errorCode, params, symbol)
-  error_ercd(errorCode, params, "illegal #{symbol.to_s} `#{params[symbol]}'" \
-													" in #{params[:apiname]}")
+  error_ercd(errorCode, params, "illegal %%#{symbol} in %apiname")
 end
 
 def error_illegal_id(errorCode, params, symbol, objid)
-  error_ercd(errorCode, params, "illegal #{symbol.to_s} `#{params[symbol]}'" \
-								" in #{params[:apiname]} of #{params[objid]}")
+  error_ercd(errorCode, params, "illegal %%#{symbol} " \
+	             					"in %apiname of %#{objid}")
 end
 
 def error_illegal_sym(errorCode, params, symbol, symbol2)
-  error_ercd(errorCode, params, "illegal #{symbol.to_s} `#{params[symbol]}'" \
-			" in #{params[:apiname]} of #{symbol2.to_s} `#{params[symbol2]}'")
+  error_ercd(errorCode, params, "illegal %%#{symbol} " \
+									"in %apiname of %%#{symbol2}")
 end
 
@@ -263,4 +299,82 @@
 
 #
+#  NumStrã¯ã©ã¹ï¼æ°å¤ã«æå­åãä»å ãããã®ï¼ã®å®ç¾©
+#
+class NumStr
+  def initialize(val, str = val.to_s)
+    @val = val
+    @str = str
+  end
+
+  # æ°å¤æ
+å ±ãè¿ã
+  def val
+    return @val
+  end
+  alias_method :to_i, :val
+
+  # æå­åæ
+å ±ãè¿ã
+  def str
+    return @str
+  end
+  alias_method :to_s, :str
+
+  # æ¯è¼ã¯æ°å¤æ
+å ±ã§è¡ã
+  def ==(other)
+    @val == other
+  end
+  def !=(other)
+    @val != other
+  end
+  def <=>(other)
+    @val <=> other
+  end
+
+  # ããã·ã¥ã®ã­ã¼ã¨ãã¦ä½¿ãæã®æ¯è¼ãæ°å¤æ
+å ±ã§è¡ã
+  def eql?(other)
+    @val == other.val
+  end
+
+  # ããã·ã¥å¤ã®å®ç¾©ãä¸æ¸ããã
+  def hash
+    return @val.hash
+  end
+
+  # æ°å¤ã¯ã©ã¹ã¨æ¼ç®ã§ããããã«ãã
+  def coerce(other)
+    if other.kind_of?(Numeric)
+      return other, @val
+    else
+      raise
+    end
+  end
+
+  # äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åã®ä½æ
+  def quote
+    str.quote
+  end
+
+  # äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åã®å±é
+  def unquote
+    str.unquote
+  end
+
+  # ppæã®è¡¨ç¤º
+  def pretty_print(q)
+    q.text("[#{@val}(=0x#{@val.to_s(16)}),")
+    @str.pretty_print(q)
+    q.text("]")
+  end
+
+  # æªå®ç¾©ã®ã¡ã½ããã¯@valã«éã
+  def method_missing(*method)
+    @val.send(*method)
+  end
+end
+
+#
 #  ã·ã³ãã«ãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿
 #
@@ -281,5 +395,5 @@
 
     # 3åã«ãªã£ã¦ããªãè¡ã¯é¤å¤
-    if (fields.size == 3)
+    if fields.size == 3
       symbolAddress[fields[2]] = fields[0].hex
     end
@@ -295,8 +409,7 @@
   $symbolValueTable.each do |symbolName, symbolData|
     if symbolData.has_key?(:VALUE)
-        eval("$#{symbolName} = " \
-				"StrVal.new(\"#{symbolName}\", #{symbolData[:VALUE]})")
+      eval("$#{symbolName} = #{symbolData[:VALUE]}")
     end
- end
+  end
 end
 
@@ -314,6 +427,6 @@
   else
     # åã¤ã³ã¯ã«ã¼ããã¹ãããã¡ã¤ã«å­å¨ãã§ãã¯
-    $includePaths.each do |includePath|
-      path = includePath + "/" + fileName
+    $includeDirectories.each do |includeDirectory|
+      path = includeDirectory + "/" + fileName
       # è¦ã¤ãã£ããç¸å¯¾ãã¹ãè¿ã
       if File.exist?(path)
@@ -353,5 +466,58 @@
     $cfgData = db[:cfgData]
     $asmLabel = db[:asmLabel]
-    $bLittleEndian = db[:bLittleEndian]
+    $endianLittle = db[:endianLittle]
+    $cfg2Data = db[:cfg2Data]
+  end
+  $cfg3Data = {}
+
+  #
+  #  å¤åå¾ã·ã³ãã«ãã°ã­ã¼ãã«å¤æ°ã¨ãã¦å®ç¾©ãã
+  #
+  DefineSymbolValue()
+
+  #
+  #  çæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼ãå®è¡ãã
+  #
+  $trbFileNames.each do |trbFileName|
+    IncludeTrb(trbFileName)
+  end
+
+  #
+  #  ãã¹4ã«å¼ãæ¸¡ãæ
+å ±ããã¡ã¤ã«ã«çæ
+  #
+  if $omitOutputDb.nil?
+    db = PStore.new(CFG3_OUT_DB)
+    db.transaction do
+      db[:apiDefinition] = $apiDefinition
+      db[:symbolValueTable] = $symbolValueTable
+      db[:cfgFileInfo] = $cfgFileInfo
+      db[:includeFiles] = $includeFiles
+      db[:cfgData] = $cfgData
+      db[:asmLabel] = $asmLabel
+      db[:endianLittle] = $endianLittle
+      db[:cfg3Data] = $cfg3Data
+    end
+  end
+end
+
+#
+#  ãã¹4ã®å¦ç
+#
+def Pass4
+  #
+  #  ãã¹3ããå¼ãæ¸¡ãããæ
+å ±ããã¡ã¤ã«ããèª­ã¿è¾¼ã
+  #
+  db = PStore.new(CFG3_OUT_DB)
+  db.transaction(true) do
+    $apiDefinition = db[:apiDefinition]
+    $symbolValueTable = db[:symbolValueTable]
+    $cfgFileInfo = db[:cfgFileInfo]
+    $includeFiles = db[:includeFiles]
+    $cfgData = db[:cfgData]
+    $asmLabel = db[:asmLabel]
+    $endianLittle = db[:endianLittle]
+    $cfg3Data = db[:cfg3Data] || db[:cfg2Data]
   end
 
@@ -380,14 +546,14 @@
 end
 
-def BCOPY(startIData, startData, size)
+def BCOPY(fromAddress, toAddress, size)
   if !$romImage.nil?
-    copyData = $romImage.get_data(startIData, size)
-    $romImage.set_data(startData, copyData)
-  end
-end
-
-def PEEK(address, size)
+    copyData = $romImage.get_data(fromAddress, size)
+    $romImage.set_data(toAddress, copyData)
+  end
+end
+
+def PEEK(address, size, signed=false)
   if !$romImage.nil?
-    return $romImage.get_value(address, size, false)
+    return $romImage.get_value(address, size, signed)
   else
     return nil
@@ -400,5 +566,5 @@
 $kernel = nil
 $pass = nil
-$includePaths = []
+$includeDirectories = []
 $trbFileNames = []
 $apiTableFileNames = []
@@ -413,72 +579,64 @@
 #  ãªãã·ã§ã³ã®å¦ç
 #
-opt = OptionParser.new(banner="Usage: cfg.rb [options] CONFIG-FILE", 40)
-opt.version = VERSION
-opt.on("-k KERNEL", "--kernel KERNEL", "kernel profile name") do |val|
-  $kernel = val
-end
-opt.on("-p NUM", "--pass NUM", "processing pass number") do |val|
-  $pass = val
-end
-opt.on("-I PATH", "--include-path PATH", "include directory path") do |val|
-  $includePaths.push(val)
-end
-opt.on("-T TRB-FILE", "--trb-file TRB-FILE",
-								"generation script (trb file)") do |val|
-  $trbFileNames.push(val)
-end
-opt.on("--api-table API-TABLE-FILE", "static API table file") do |val|
-  $apiTableFileNames.push(val)
-end
-opt.on("--symval-table SYMVAL-TABLE-FILE", "symbol-value table file") do |val|
-  $symvalTableFileNames.push(val)
-end
-opt.on("--rom-image SREC-FILE", "rom image file (s-record)") do |val|
-  $romImageFileName = val
-end
-opt.on("--rom-symbol SYMS-FILE", "rom symbol table file (nm)") do |val|
-  $romSymbolFileName = val
-end
-opt.on("--id-input-file ID-FILE", "ID input file") do |val|
-  $idInputFileName = val
-end
-opt.on("--id-output-file ID-FILE", "ID output file") do |val|
-  $idOutputFileName = val
-end
-opt.on("--external-id", "generate object ID variables") do
-  $USE_EXTERNAL_ID = true
-end
-opt.on("-M [DEPEND-FILE]", "--print-dependencies [DEPEND-FILE]",
-										"dependency file") do |val|
-  $dependencyFileName = val.nil? ? "" : val
-end
-opt.on("-O", "--omit-output-db", "omit DB file output") do
-  $omitOutputDb = true
-end
-opt.on("-v", "--version", "show version number") do
-  abort(opt.ver)
-end
-opt.on("-h", "--help", "show help (this)") do
-  abort(opt.help)
-end
-
-begin
-  $configFileNames = opt.parse(ARGV)
-rescue OptionParser::ParseError
-  abort(opt.help)
-end
+OptionParser.new(banner="Usage: cfg.rb [options] CONFIG-FILE", 40) do |opt|
+  opt.version = VERSION
+  opt.on("-k KERNEL", "--kernel KERNEL", "kernel profile name") do |val|
+    $kernel = val
+  end
+  opt.on("-p NUM", "--pass NUM", "processing pass number") do |val|
+    $pass = val
+  end
+  opt.on("-I DIRECTORY", "--include-directory DIRECTORY",
+										 "include directory") do |val|
+    $includeDirectories.push(val)
+  end
+  opt.on("-T TRB-FILE", "--trb-file TRB-FILE",
+         "generation script (trb file)") do |val|
+    $trbFileNames.push(val)
+  end
+  opt.on("--api-table API-TABLE-FILE", "static API table file") do |val|
+    $apiTableFileNames.push(val)
+  end
+  opt.on("--symval-table SYMVAL-TABLE-FILE", "symbol-value table file") do |val|
+    $symvalTableFileNames.push(val)
+  end
+  opt.on("--rom-image SREC-FILE", "rom image file (s-record)") do |val|
+    $romImageFileName = val
+  end
+  opt.on("--rom-symbol SYMS-FILE", "rom symbol table file (nm)") do |val|
+    $romSymbolFileName = val
+  end
+  opt.on("--id-input-file ID-FILE", "ID input file") do |val|
+    $idInputFileName = val
+  end
+  opt.on("--id-output-file ID-FILE", "ID output file") do |val|
+    $idOutputFileName = val
+  end
+  opt.on("-M [DEPEND-FILE]", "--print-dependencies [DEPEND-FILE]",
+         "dependency file") do |val|
+    $dependencyFileName = val.nil? ? "" : val
+  end
+  opt.on("-O", "--omit-output-db", "omit DB file output") do
+    $omitOutputDb = true
+  end
+  opt.on("-v", "--version", "show version number") do
+    abort(opt.ver)
+  end
+  opt.on("-h", "--help", "show help (this)") do
+    abort(opt.help)
+  end
+  opt.parse!(ARGV)
+end
+$configFileNames = ARGV
 
 #
 #  ãªãã·ã§ã³ã®ãã§ãã¯
 #
-# ä¾å­é¢ä¿åºåã¢ã¼ã
 if $pass.nil?
   # ãã¹ã®æå®ã¯å¿
 é 
-  STDERR.puts("`--pass' option is mandatory")
-  abort(opt.help)
-elsif /^[123]$/ !~ $pass
-  STDERR.puts("pass number `#{$pass}' is not valid")
-  abort(opt.help)
+  abort("`--pass' option is mandatory")
+elsif /^[1234]$/ !~ $pass
+  abort("pass number `#{$pass}' is not valid")
 end
 
@@ -486,6 +644,5 @@
 é 
 if ($pass == "1" && $apiTableFileNames.empty?)
-  STDERR.puts("`--api-table' option must be specified in pass 1")
-  abort(opt.help)
+  abort("`--api-table' option must be specified in pass 1")
 end
 
@@ -493,6 +650,35 @@
 é 
 if ($pass != "1" && $trbFileNames.empty?)
-  STDERR.puts("`--trb-file' must be specified except in pass 1")
-  abort(opt.help)
+  abort("`--trb-file' must be specified except in pass 1")
+end
+
+#
+#  ã«ã¼ãã«ãªãã·ã§ã³ã®å¦ç
+#
+case $kernel
+when /^hrp/
+	$supportDomain = true
+when /^fmp/
+	$supportClass = true
+end
+
+#
+#  IDçªå·å
+¥åãã¡ã¤ã«ã®åãè¾¼ã¿
+#
+$inputObjid = {}
+if !$idInputFileName.nil?
+  begin
+    idInputFile = File.open($idInputFileName)
+  rescue Errno::ENOENT, Errno::EACCES => ex
+    abort(ex.message)
+  end
+
+  idInputFile.each do |line|
+    ( objName, objidNumber ) = line.split(/\s+/)
+    $inputObjid[objName] = objidNumber.to_i
+  end
+
+  idInputFile.close
 end
 
@@ -531,4 +717,6 @@
 when "3"
   Pass3()
+when "4"
+  Pass4()
 else
   error_exit("invalid pass: #{$pass}")
Index: asp3_wo_tecs/trunk/cfg/doc/cfg_user.txt
===================================================================
--- asp3_wo_tecs/trunk/cfg/doc/cfg_user.txt	(revision 306)
+++ asp3_wo_tecs/trunk/cfg/doc/cfg_user.txt	(revision 306)
@@ -0,0 +1,905 @@
+
+		TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«åã Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿
+		ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 1.2.1
+		æçµæ´æ°: 2016å¹´3æ17æ¥
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«åãRubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿
+ãä½¿ç¨ããããã«å¿
+è¦ãªäºé 
+ãèª¬æãããã®ã§ããï¼Rubyã«ã¤ãã¦ã®ç¥è­ãã
+ããã¨ãåæã«è¨è¿°ãã¦ããï¼
+
+----------------------------------------------------------------------
+ TOPPERS Configurator by Ruby
+
+ Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+ Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+             Graduate School of Information Science, Nagoya Univ., JAPAN
+
+ ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+     æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+     ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+     è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+     ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+     ã¨ï¼
+   (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+       ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+   (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+       å ±åãããã¨ï¼
+ (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+     å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+     ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+     ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+     å
+è²¬ãããã¨ï¼
+ 
+ æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ã®è²¬ä»»ãè² ããªãï¼
+ 
+ $Id: cfg_user.txt 128 2016-05-14 14:49:32Z ertl-hiro $
+----------------------------------------------------------------------
+
+âç®æ¬¡
+
+ï¼ï¼Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®æ¦è¦
+	1.1 ä½ç½®ä»ãã¨æ¦è¦
+	1.2 ãã¹1ã®å¦çã®æ¦è¦
+	1.3 ãã¹2ã®å¦çã®æ¦è¦
+	1.4 ãã¹3ã®å¦çã®æ¦è¦
+	1.5 ãã¹4ã®å¦çã®æ¦è¦
+ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®èµ·å
+ï¼ï¼éçAPIãã¼ãã«
+	3.1 éçAPIãã¼ãã«ã®ææ³
+	3.2 éçAPIãã¼ãã«ã®è¨è¿°ä¾
+ï¼ï¼å¤åå¾ã·ã³ãã«ãã¼ãã«
+	4.1 å¤åå¾ã·ã³ãã«ãã¼ãã«ã®ææ³
+	4.2 å¤åå¾ã·ã³ãã«ãã¼ãã«ã®è¨è¿°ä¾
+ï¼ï¼çæã¹ã¯ãªãã
+	5.1 NumStrã¯ã©ã¹
+	5.2 ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ããçæã¹ã¯ãªããã«æ¸¡ãããå¤æ°
+	5.3 çæã¹ã¯ãªããããã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«æ¸¡ãå¤æ°
+	5.4 ãã¹éã§å¼ãæ¸¡ãå¤æ°
+	5.5 ã¨ã©ã¼åºåé¢æ°
+	5.6 GenFileã¯ã©ã¹
+	5.7 ãã®ä»ã®ã©ã¤ãã©ãª
+ï¼ï¼ãã®ä»
+	6.1 ãªãã¸ã§ã¯ãIDã®æå®
+	6.2 ã·ã¹ãã ãµã¼ãã¹ã¸ã®å¯¾å¿ï¼ãã¹2ã«ãããå¦çãã§ã¼ãºï¼
+ï¼ï¼ãã¼ã¸ã§ã³å±¥æ­´
+
+
+ï¼ï¼Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®æ¦è¦
+
+1.1 ä½ç½®ä»ãã¨æ¦è¦
+
+TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«åã Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼ä»¥ä¸ï¼åã«ã³ã³ãã£
+ã®ã¥ã¬ã¼ã¿ã¨ããï¼ã¯ï¼ã¦ã¼ã¶ãè¨è¿°ããã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡
+ã¤ã«ããï¼ã«ã¼ãã«ãã·ã¹ãã ãµã¼ãã¹ã®æ§æã»åæåæ
+å ±ãå«ããã¡ã¤ã«ãª
+ã©ãçæãããã¼ã«ã§ããï¼TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ã«ãããã·ã¹ãã ã³ã³ãã£
+ã®ã¥ã¬ã¼ã·ã§ã³æé ã«ã¤ãã¦ã¯ï¼ãTOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼çµ±åä»
+æ§æ¸ãã®ã2.12 ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³æé ãã®ç¯ãåç
+§ãããã¨ï¼
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ã«å±ããåç¨®ã®ã«ã¼ãã«ãã
+ã®ä¸ã§åä½ããã·ã¹ãã ãµã¼ãã¹ã«é©ç¨ã§ããããã«ï¼åã«ã¼ãã«ï¼ã·ã¹ãã 
+ãµã¼ãã¹ã§å
+±éã«å©ç¨ã§ããã³ã³ãã£ã®ã¥ã¬ã¼ã¿æ¬ä½ã¨ï¼ã«ã¼ãã«ï¼ã·ã¹ãã 
+ãµã¼ãã¹æ¯ã®è¨­å®ãã¡ã¤ã«ã§æ§æãããï¼çæãã¹ãã«ã¼ãã«ãã·ã¹ãã ãµã¼
+ãã¹ã®æ§æã»åæåæ
+å ±ãï¼ã¿ã¼ã²ããã·ã¹ãã ã«ãã£ã¦ç°ãªãå ´åã«ã¯ï¼ã¿ã¼
+ã²ããæ¯ã®è¨­å®ãã¡ã¤ã«ãç¨æããï¼ãã®ããã¥ã¢ã«ã§ã¯ï¼ã«ã¼ãã«ï¼ã¿ã¼ã²ã
+ãæ¯ã®è¨­å®ãã¡ã¤ã«ã®è¨è¿°æ¹æ³ã«ã¤ãã¦èª¬æããï¼
+
+ãTOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼çµ±åä»æ§æ¸ãã®ã2.12.5 ã³ã³ãã£ã®ã¥
+ã¬ã¼ã¿ã®å¦çã¢ãã«ãã®ç¯ã«èª¬æãããéãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼3ã¤ãªã
+ãã¯4ã¤ã®ãã¹ã«ããå¦çãè¡ãï¼ä»¥ä¸ã§ã¯ï¼åãã¹ã®å¦çæ¦è¦ãèª¬æããï¼
+
+1.2 ãã¹1ã®å¦çã®æ¦è¦
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹1ã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ãè§£
+éãï¼ããã«å«ã¾ããéçAPIã®æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ã®å¤ãªã©ãCã³ã³ãã¤ã©
+ãç¨ãã¦æ±ããããã«ï¼ãã©ã¡ã¼ã¿è¨ç®ç¨Cè¨èªãã¡ã¤ã«ï¼cfg1_out.cï¼ãçæ
+ããï¼ã¾ãï¼ãã¹2ã«å¼ãæ¸¡ãæ
+å ±ãï¼ãã¹1ãã¼ã¿ãã¡ã¤ã«ï¼cfg1_out.dbï¼ã«
+åºåããï¼
+
+ãã¹1ã¯ï¼éçAPIãã¼ãã«ï¼xxx_api.defï¼ã¨å¤åå¾ã·ã³ãã«ãã¼ãã«
+ï¼xxx_sym.defï¼ã®2ã¤ã®è¨­å®ãã¡ã¤ã«ãç¨ããï¼éçAPIãã¼ãã«ã«ã¯ï¼éç
+APIã®ä¸è¦§ã¨ï¼åéçAPIã®ãã©ã¡ã¼ã¿ã«é¢ããæ
+å ±ãè¨è¿°ããï¼å¤åå¾ã·ã³ã
+ã«ãã¼ãã«ã«ã¯ï¼éçAPIã®æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ä»¥å¤ã§ï¼ãã©ã¡ã¼ã¿è¨ç®ç¨C
+è¨èªãã¡ã¤ã«ã«åºåãã¦å¤ãæ±ãããã·ã³ãã«ï¼ä¸è¬ã«ã¯å¼ï¼ãè¨è¿°ããï¼é
+çAPIãã¼ãã«ã®è¨è¿°æ¹æ³ã¯ï¼ç« ã§ï¼å¤åå¾ã·ã³ãã«ãã¼ãã«ã®è¨è¿°æ¹æ³ã¯ï¼ç« 
+ã§èª¬æããï¼
+
+ãã¹1ãçæãããã©ã¡ã¼ã¿è¨ç®ç¨Cè¨èªãã¡ã¤ã«ã¯ï¼Cã³ã³ãã¤ã©ããã³é¢é£ãã¼
+ã«ãç¨ãã¦ã³ã³ãã¤ã«ãï¼ã­ã¼ãã¢ã¸ã¥ã¼ã«ãçæããï¼ã¾ãï¼ãããSã¬ã³ã¼
+ããã©ã¼ãããã®å½¢ã«å¤æããSã¬ã³ã¼ããã¡ã¤ã«ï¼cfg1_out.srecï¼ã¨ï¼ãã®
+ä¸­ã®åã·ã³ãã«ã¨ã¢ãã¬ã¹ã®å¯¾å¿è¡¨ãå«ãã·ã³ãã«ãã¡ã¤ã«ï¼cfg1_out.symsï¼
+ãçæããï¼
+
+1.3 ãã¹2ã®å¦çã®æ¦è¦
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã¯ï¼ãã¹1ã§çæãããã­ã¼ãã¢ã¸ã¥ã¼ã«ã®Sã¬ã³ã¼
+ããã¡ã¤ã«ï¼cfg1_out.srecï¼ã¨ã·ã³ãã«ãã¡ã¤ã«ï¼cfg1_out.symsï¼ããï¼éç
+APIã®æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ã®å¤ã¨ï¼å¤åå¾ã·ã³ãã«ãã¼ãã«ã«è¨è¿°ããã·ã³ã
+ã«ï¼ä¸è¬ã«ã¯å¼ï¼ã®å¤ãåãåºãï¼ã¾ãï¼ãã¹1ãã¼ã¿ãã¡ã¤ã«ï¼cfg1_out.dbï¼
+ãèª­ã¿ï¼ãã¹1ããã®æ
+å ±ãåãåãï¼
+
+ãã¹2ã§ã¯ï¼ãããã®æ
+å ±ããï¼ã«ã¼ãã«ï¼ã·ã¹ãã ãµã¼ãã¹ã®æ§æã»åæåãã¡
+ã¤ã«ï¼ã«ã¼ãã«ã®å ´åã¯ï¼kernel_cfg.cï¼ã¨æ§æã»åæåããããã¡ã¤ã«ï¼ã«ã¼
+ãã«ã®å ´åã¯ï¼kernel_cfg.hï¼ãçæããï¼ã¾ãï¼ãã¹3ã«å¼ãæ¸¡ãæ
+å ±ãï¼ã
+ã¹2ãã¼ã¿ãã¡ã¤ã«ï¼cfg2_out.dbï¼ã«åºåããï¼ã«ã¼ãã«ï¼ã·ã¹ãã ãµã¼ãã¹ï¼
+ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼ãã®ä»ã®ãã¡ã¤ã«ãçæããå ´åãããï¼å
+·ä½çã«ã¯ï¼
+ä¿è­·æ©è½å¯¾å¿ã«ã¼ãã«ã§ã¯ï¼ä»®ã®ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ï¼kernel_mem2.cï¼
+ã¨ä»®ã®ãªã³ã«ã¹ã¯ãªããï¼èªåã¡ã¢ãªé
+ç½®ã®å ´åã®ã¿ï¼ãçæããï¼
+
+ãã¹2ã«ããããã¡ã¤ã«çæã®æ¹æ³ã¯ï¼ãã¹2ã®è¨­å®ãã¡ã¤ã«ã§ããçæã¹ã¯ãª
+ããï¼ã«ã¼ãã«ã§ããã°ï¼target_kernel.trbï¼ã«è¨è¿°ããï¼çæã¹ã¯ãªããã®
+è¨è¿°æ¹æ³ã¯ï¼ç« ã§èª¬æããï¼
+
+ãã¹2ã§çæããããã¡ã¤ã«ãï¼ä»ã®ã½ã¼ã¹ãã¡ã¤ã«ã¨ãããã¦ã³ã³ãã¤ã«ãï¼
+ã¢ããªã±ã¼ã·ã§ã³ã®ã­ã¼ãã¢ã¸ã¥ã¼ã«ãçæããï¼ã¾ãï¼ãããSã¬ã³ã¼ããã©ã¼
+ãããã®å½¢ã«å¤æããSã¬ã³ã¼ããã¡ã¤ã«ï¼ASP3ã«ã¼ãã«ã®å ´åã¯ï¼asp.srecï¼
+ã¨ï¼ãã®ä¸­ã®åã·ã³ãã«ã¨ã¢ãã¬ã¹ã®å¯¾å¿è¡¨ãå«ãã·ã³ãã«ãã¡ã¤ã«ï¼ASP3ã«ã¼
+ãã«ã®å ´åã¯ï¼asp.symsï¼ãçæããï¼
+
+1.4 ãã¹3ã®å¦çã®æ¦è¦
+
+ä¿è­·æ©è½å¯¾å¿ã§ãªãã«ã¼ãã«ã®å ´åãï¼ä¿è­·æ©è½å¯¾å¿ã«ã¼ãã«ã§æåã¡ã¢ãªé
+
+ç½®ã®å ´åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã§ã¯ï¼ãã¹2ã§çæãããã­ã¼ãã¢
+ã¸ã¥ã¼ã«ã®Sã¬ã³ã¼ããã¡ã¤ã«ã¨ã·ã³ãã«ãã¡ã¤ã«ããï¼éçAPIã®ãã©ã¡ã¼ã¿
+ã®å¤ãªã©ãåãåºãï¼å¦¥å½æ§ã®ãã§ãã¯ãè¡ãï¼
+
+ãã¹3ã«ãããå¦¥å½æ§ãã§ãã¯ã®æ¹æ³ã¯ï¼ãã¹3ã®è¨­å®ãã¡ã¤ã«ã§ããçæã¹ã¯
+ãªããï¼ã«ã¼ãã«ã§ããã°ï¼target_check.trbï¼ã«è¨è¿°ããï¼çæã¹ã¯ãªãã
+ã®è¨è¿°æ¹æ³ã¯ï¼ç« ã§èª¬æããï¼
+
+ä¿è­·æ©è½å¯¾å¿ã«ã¼ãã«ã§èªåã¡ã¢ãªé
+ç½®ã®å ´åã«ã¯ï¼ãã¹3ã¯æé©åã®ããã®ã
+ã¹ã§ï¼ãªãã·ã§ã³ã§ããï¼
+
+ãã¹3ãä½¿ç¨ããå ´åï¼ãã¹2ã§çæãããã­ã¼ãã¢ã¸ã¥ã¼ã«ã®Sã¬ã³ã¼ããã¡ã¤
+ã«ã¨ã·ã³ãã«ãã¡ã¤ã«ããï¼éçAPIã®ãã©ã¡ã¼ã¿ã®å¤ãã¡ã¢ãªãªãã¸ã§ã¯ãã
+é
+ç½®ãããçªå°ããµã¤ãºãªã©ãåãåºãï¼ä»®ã®ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«
+ï¼kernel_mem3.cï¼ãçæããï¼ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼ä»®ã®ãªã³ã«ã¹ã¯ãªãã
+ãçæããï¼ã¾ãï¼ãã¹4ã«å¼ãæ¸¡ãæ
+å ±ãï¼ãã¹3ãã¼ã¿ãã¡ã¤ã«
+ï¼cfg3_out.dbï¼ã«åºåããï¼
+
+1.5 ãã¹4ã®å¦çã®æ¦è¦
+
+ä¿è­·æ©è½å¯¾å¿ã«ã¼ãã«ã§èªåã¡ã¢ãªé
+ç½®ã®å ´åã«ã¯ï¼ãã¹4ã«ããã¦ï¼ãã¹3ã§
+çæãããã­ã¼ãã¢ã¸ã¥ã¼ã«ã®Sã¬ã³ã¼ããã¡ã¤ã«ã¨ã·ã³ãã«ãã¡ã¤ã«ï¼ãã¹3
+ãçãå ´åã«ã¯ï¼ãã¹2ã®çæç©ãä½¿ãï¼ããï¼ã¡ã¢ãªãªãã¸ã§ã¯ããé
+ç½®ãã
+ãçªå°ããµã¤ãºãªã©ãåãåºãï¼ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ï¼kernel_mem.cï¼
+ãçæããï¼ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼ãªã³ã«ã¹ã¯ãªãããçæããï¼
+
+
+ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®èµ·å
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«åï¼ãã¹1ã§
+ã®ã¿æå¹ï¼ããã©ã¡ã¼ã¿ã«åãï¼ä»¥ä¸ã®ãªãã·ã§ã³ãæã¤ï¼
+
+	-kï¼»--kernelï¼½<ã«ã¼ãã«å>
+		ã«ã¼ãã«ã®åç§°ãæå®ããï¼
+
+	-pï¼»--passï¼½<ãã¹çªå·>
+		ãã¹çªå·ãæå®ããï¼1ã4ã®ããããï¼
+
+	-Iï¼»--include-directoryï¼½<ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ããªå>
+		INCLUDEãã£ã¬ã¯ãã£ãã«ããã¤ã³ã¯ã«ã¼ãããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
+		ã³ãã¡ã¤ã«ãæ¢ããã£ã¬ã¯ããªåãæå®ããï¼çæã¹ã¯ãªããï¼trbãã¡
+		ã¤ã«ï¼ãæ¢ãå ´åã«ãç¨ããï¼
+
+	-Tï¼»--trb-fileï¼½<çæã¹ã¯ãªããå>
+		çæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼ã®åç§°ãæå®ããï¼ãã¹2ä»¥éã§æå¹ï¼
+		ãã¹2ã«ããã¦å¦çãã§ã¼ãºã®æ©è½ï¼6.2ç¯åç
+§ï¼ãç¨ããå ´åã«ã¯ï¼
+		<çæã¹ã¯ãªããå>ã¨ãã¦ï¼ãã¡ã¤ã«åã«":"ã¨å¦çãã§ã¼ãºåãä»å 
+		ãããã®ï¼éä¸­ã«ç©ºç½ãå
+¥ãã¦ã¯ãªããªãï¼ãæå®ããï¼
+
+	--api-table <éçAPIãã¼ãã«ãã¡ã¤ã«å>
+		éçAPIãã¼ãã«ã®ãã¡ã¤ã«åãæå®ããï¼ãã¹1ã§ã®ã¿æå¹ï¼
+		ãã¹2ã«ããã¦å¦çãã§ã¼ãºã®æ©è½ï¼6.2ç¯åç
+§ï¼ãç¨ããå ´åã«ã¯ï¼
+		<éçAPIãã¼ãã«ãã¡ã¤ã«å>ã¨ãã¦ï¼ãã¡ã¤ã«åã«":"ã¨å¦çãã§ã¼
+		ãºåãä»å ãããã®ï¼éä¸­ã«ç©ºç½ãå
+¥ãã¦ã¯ãªããªãï¼ãæå®ããï¼
+
+	--symval-table <å¤åå¾ã·ã³ãã«ãã¼ãã«ãã¡ã¤ã«å>
+		å¤åå¾ã·ã³ãã«ãã¼ãã«ã®ãã¡ã¤ã«åãæå®ããï¼ãã¹1ã§ã®ã¿æå¹ï¼
+
+	-rï¼»--rom-imageï¼½<ã­ã¼ãã¢ã¸ã¥ã¼ã«ã®Sã¬ã³ã¼ããã¡ã¤ã«å>
+		ã­ã¼ãã¢ã¸ã¥ã¼ã«ãSã¬ã³ã¼ããã©ã¼ãããã®å½¢ã«å¤æãããã¡ã¤ã«ã®
+		åç§°ãæå®ããï¼çæã¹ã¯ãªããã®ããã®BCOPYé¢æ°ã¨PEEKé¢æ°ã¯ï¼ã
+		ã®ãªãã·ã§ã³ã§æå®ããSã¬ã³ã¼ããã¡ã¤ã«ãæä½å¯¾è±¡ã¨ããï¼ãã¹2
+		ä»¥éã§æå¹ï¼
+
+	-s [--rom-symbol] <ã­ã¼ãã¢ã¸ã¥ã¼ã«ã®ã·ã³ãã«ãã¡ã¤ã«å>
+		ã­ã¼ãã¢ã¸ã¥ã¼ã«ä¸­ã®åã·ã³ãã«ã¨ã¢ãã¬ã¹ã®å¯¾å¿è¡¨ãå«ãã·ã³ãã«
+		ãã¡ã¤ã«ã®åç§°ãæå®ããï¼çæã¹ã¯ãªããã®ããã®SYMBOLé¢æ°ã¯ï¼
+		ãã®ãªãã·ã§ã³ã§æå®ããã·ã³ãã«ãã¡ã¤ã«ãæä½å¯¾è±¡ã¨ããï¼ãã¹
+		2ä»¥éã§æå¹ï¼
+
+	--id-output-file <IDçªå·åºåãã¡ã¤ã«å>
+		ãªãã¸ã§ã¯ãã®IDçªå·ã®å²ä»ãçµæãï¼æå®ããååã®ãã¡ã¤ã«ã«æ¸
+		ãåºãï¼ãã¹2ã§ã®ã¿æå¹ï¼
+
+	--id-input-file <IDçªå·å
+¥åãã¡ã¤ã«å>
+		ãªãã¸ã§ã¯ãã®IDçªå·ã®å²ä»ããï¼æå®ããååã®ãã¡ã¤ã«ããåã
+		è¾¼ãï¼ãã¹1ã¨ãã¹2ã§æå¹ï¼ãã¹1ã§ã¯ãã¡ã¤ã³ã®IDçªå·ï¼ãã¹2ã§ã¯
+		ãã®ä»ã®ãªãã¸ã§ã¯ãã®IDçªå·ãç¨ããï¼
+
+	-Mï¼»--print-dependenciesï¼½<ä¾å­é¢ä¿ãã¡ã¤ã«å>
+		ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ä¾å­é¢ä¿ãåºåããï¼ã
+		ã¹1ã§ã®ã¿æå¹ï¼GCCã®-Mãªãã·ã§ã³ã¨ç°ãªãï¼-Mãªãã·ã§ã³ãä»ãã
+		å ´åãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯éå¸¸ã®å¦çãè¡ãï¼ä¾å­é¢ä¿ãåºåã
+		ãã ãã¨ããä½¿ãæ¹ã¯ã§ããªãï¼ï¼ä¾å­é¢ä¿ãã¡ã¤ã«åãæå®ããªã
+		å ´åï¼æ¨æºåºåã«åºåããï¼
+
+	-O [--omit-output-db]
+		æ¬¡ã®ãã¹ã«æ
+å ±ãå¼ãæ¸¡ãããã®ãã¼ã¿ãã¡ã¤ã«ãä½æããªãï¼
+
+	-vï¼»--versionï¼½
+		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¼ã¸ã§ã³ãè¡¨ç¤ºããï¼
+
+	-h [--help]
+		ãªãã·ã§ã³ã®ãªã¹ãã¨èª¬æãè¡¨ç¤ºããï¼
+
+
+ï¼ï¼éçAPIãã¼ãã«
+
+éçAPIãã¼ãã«ã¯ï¼éçAPIã®ä¸è¦§ã¨ï¼åéçAPIã®ãã©ã¡ã¼ã¿ã«é¢ããæ
+å ±ã
+è¨è¿°ãããã¡ã¤ã«ã§ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹1ã§ç¨ããï¼
+
+3.1 éçAPIãã¼ãã«ã®ææ³
+
+éçAPIãã¼ãã«ã®åè¡ã«ã¯ï¼éçAPIåã«ç¶ãã¦ï¼ãã©ã¡ã¼ã¿ãªã¹ããè¨è¿°ã
+ãï¼éçAPIåã¨åãã©ã¡ã¼ã¿ã¯ï¼ç©ºç½æå­ã§åºåãï¼
+
+éçAPIåãï¼ä»¥ä¸ã®å½¢å¼ã§è¨è¿°ããã¨ï¼æ´¾çéçAPIã¯ï¼å
+éçAPIã¨ãã©ã¡ã¼
+ã¿ãªã¹ããç°ãªãã ãã®åãéçAPIã§ããã¨æ±ãããï¼
+
+	<æ´¾çéçAPIå>[<å
+éçAPIå>]
+
+ãã©ã¡ã¼ã¿ãªã¹ãã«ã¯ï¼éçAPIã®åãã©ã¡ã¼ã¿ã®æå­åè¨è¿°ãåæããï¼ã¾ãï¼
+"{"ããã³"}"ããã©ã¡ã¼ã¿ã¨åæ§ã«æ±ãï¼ãã©ã¡ã¼ã¿ãªã¹ãã«åæããï¼"{"ã
+ãã³"}"ã¯ï¼éçAPIã®æ§æè§£æã®ããã«å¿
+è¦ã¨ãªãï¼
+
+åãã©ã¡ã¼ã¿ã®æå­åè¨è¿°ã¯ï¼ãã©ã¡ã¼ã¿ã®ç¨®å¥ãè¡¨ãæå­ã«ç¶ãã¦ï¼ãã©ã¡ã¼
+ã¿åãè¨è¿°ããï¼å¿
+è¦ãªå ´åã«ã¯ï¼ããã«ç¶ãã¦ï¼ãã©ã¡ã¼ã¿ã®å±æ§ãè¡¨ãæ
+å­åï¼ã¾ãã¯æå­ï¼ãè¨è¿°ããï¼
+
+ãã©ã¡ã¼ã¿ã®ç¨®å¥ãè¡¨ãæå­ã¯æ¬¡ã®éãï¼
+
+	#		ãªãã¸ã§ã¯ãè­å¥åï¼å®ç¾©ï¼
+	%		ãªãã¸ã§ã¯ãè­å¥åï¼åç
+§ï¼
+	.		ç¬¦å·ç¡ãæ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
+	+		ç¬¦å·ä»ãæ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
+	&		ä¸è¬å®æ°å¼ãã©ã¡ã¼ã¿
+	$		æå­åãã©ã¡ã¼ã¿
+
+ãã©ã¡ã¼ã¿ã®å±æ§ãè¡¨ãæå­åï¼ã¾ãã¯æå­ï¼ã¯æ¬¡ã®éãï¼
+
+	*		ã­ã¼ãã©ã¡ã¼ã¿
+	?		ãªãã·ã§ã³ãã©ã¡ã¼ã¿ï¼ãã©ã¡ã¼ã¿ãç¡ãã¦ãè¯ãï¼
+	...		ãªã¹ããã©ã¡ã¼ã¿ï¼ãã©ã¡ã¼ã¿ãè¤æ°ï¼0åä»¥ä¸ï¼ãã£ã¦ãè¯ãï¼
+
+ã­ã¼ãã©ã¡ã¼ã¿ï¼*å±æ§ï¼ã¨ã¯ï¼ãã®éçAPIã«é¢ãããã©ã¡ã¼ã¿æ
+å ±ãã³ã³ãã£
+ã®ã¥ã¬ã¼ã·ã§ã³ãã¼ã¿ï¼$cfgDataï¼ã«æ ¼ç´ããéã«ï¼ãã®ãã©ã¡ã¼ã¿ãããã·ã¥
+ã®ã­ã¼ã¨ãã¦ä½¿ç¨ãããã¨ãç¤ºãï¼ãã©ã¡ã¼ã¿ãªã¹ãä¸­ã®0ã¾ãã¯1ã¤ã®ãã©ã¡ã¼
+ã¿ãï¼ã­ã¼ãã©ã¡ã¼ã¿ã«æå®ããï¼è¤æ°ã®ãã©ã¡ã¼ã¿ãã­ã¼ãã©ã¡ã¼ã¿ã«æå®
+ããå ´åï¼ãã®ä¸­ã§æå¾ã®ãã©ã¡ã¼ã¿ãã­ã¼ãã©ã¡ã¼ã¿ã¨ãã¦ä½¿ãããï¼ï¼è©³
+ããã¯ï¼ã5.2.2 ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¼ã¿ãã®ç¯ãåç
+§ãããã¨ï¼
+
+ãã©ã¡ã¼ã¿ãªã¹ãã«è¨è¿°ãã"{"ã«"?"ãä»å ããã¨ï¼ã¤ã¾ãï¼"{?"ã¨è¨è¿°ãã
+ã¨ï¼ï¼"{?"ã¨"}"ã§å²ã¾ãããã©ã¡ã¼ã¿ç¾¤ããªãã·ã§ã³ã§ããï¼ç¡ãã¦ãè¯ãï¼
+ãã¨ãç¤ºãï¼
+
+3.2 éçAPIãã¼ãã«ã®è¨è¿°ä¾
+
+----------------------------------------
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+CFG_INT .intno* { .intatr +intpri }
+DEF_ICS { .istksz &istk }
+ATT_MEM { .mematr &base .size } {? .acptn1 .acptn2 .acptn3 .acptn4 }
+ATT_PMA[ATT_MEM] { .mematr &base .size .paddr } {? .acptn1 .acptn2 .acptn3 .acptn4 }
+----------------------------------------
+
+ãã®è¨è¿°ã§ï¼ATT_PMAã®æ
+å ±ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¼ã¿ï¼$cfgDataï¼ã«
+æ ¼ç´ããéã«ï¼ATT_MEMã®æ
+å ±ã«çµ±åãããï¼
+
+
+ï¼ï¼å¤åå¾ã·ã³ãã«ãã¼ãã«
+
+4.1 å¤åå¾ã·ã³ãã«ãã¼ãã«ã®ææ³
+
+å¤åå¾ã·ã³ãã«ãã¼ãã«ã®åè¡ã®ææ³ã¨ï¼åãã©ã¡ã¼ã¿ã®æå³ã¯æ¬¡ã®éãï¼
+
+----------------------------------------
+<å¤æ°å>, <å¼>, <å¼ã®å>, <æ¡ä»¶>, <æ¡ä»¶ãæç«ããªãæã®å¼>
+----------------------------------------
+
+<å¤æ°å>
+	å¤ãåå¾ããå¤æ°ã®ååï¼ã°ã­ã¼ãã«å¤æ°ã§ãããã¨ãç¤ºã$ã¯è¨è¿°ããªãï¼
+	ãè¨è¿°ããï¼<å¤æ°å>ã®è¨è¿°ã¯çç¥ãããã¨ãã§ããªãï¼
+
+<å¼>
+	å¤ãè¡¨ãå¼ãè¨è¿°ããï¼<å¼>ã®è¨è¿°ãçç¥ããå ´åã«ã¯ï¼<å¤æ°å>ã®è¨è¿°
+	ãå¼ã¨ãã¦ä½¿ãããï¼å¼ã®ä¸­ã«","ãå«ãå ´åã«ã¯ï¼å¼å
+¨ä½ã"ã§å²ãï¼
+
+<å¼ã®å>
+	å¤ãçå½å¤ã§åå¾ãããå ´åã¯"bool"ï¼ç¬¦å·ä»ãæ´æ°å¤ã§åå¾ãããå ´å
+	ã«ã¯"signed"ï¼ç¬¦å·ç¡ãæ´æ°å¤ã§åå¾ãããå ´åã«ã¯"unsigned"ãè¨è¿°ã
+	ãï¼è¨è¿°ãçç¥ããå ´åã«ã¯ï¼ç¬¦å·ç¡ãæ´æ°å¤ã¨æ±ãããï¼
+
+<æ¡ä»¶>
+	å¤ãåå¾ããæ¡ä»¶ãè¨è¿°ããï¼<æ¡ä»¶>ä¸­ã§ã¯ï¼ããã·ã³ãã«ããã¯ã­å®ç¾©
+	ããã¦ãããã©ãããå¤å¥ããããã«ï¼defined(<ã·ã³ãã«>)ãä½¿ç¨ããã
+	ã¨ãã§ããï¼
+
+<æ¡ä»¶ãæç«ããªãæã®å¼>
+	<æ¡ä»¶>ãæç«ããªãã£ãå ´åã«ï¼å¤æ°ã«è¨­å®ããå¤ãè¡¨ãå¼ãè¨è¿°ããï¼
+	è¨è¿°ãçç¥ããã¨ï¼<æ¡ä»¶>ãæç«ããªãã£ãå ´åã«ï¼å¤æ°ã«ã¯å¤ãè¨­å®ã
+	ããªãï¼å¤æ°ãåç
+§ããã¨nilã¨ãªãï¼ï¼
+
+4.2 å¤åå¾ã·ã³ãã«ãã¼ãã«ã®è¨è¿°ä¾
+
+å¤åå¾ã·ã³ãã«ãã¼ãã«ã®è¨è¿°ä¾ã¨ï¼åè¨è¿°ã®æå³ã¯æ¬¡ã®éãï¼
+
+(è¨è¿°ä¾1) åç´ãªå®æ°å¤ã®åå¾
+
+----------------------------------------
+TA_ACT
+----------------------------------------
+
+å¤æ°$TA_ACTã«ï¼TA_ACTã®å¤ãåå¾ããï¼
+
+(è¨è¿°ä¾2) å¼ã®å¤ã®åå¾
+
+----------------------------------------
+sizeof_uint_t,sizeof(uint_t)
+----------------------------------------
+
+å¤æ°$sizeof_uint_tã«ï¼sizeof(uint_t)ã®å¤ãåå¾ããï¼
+
+(è¨è¿°ä¾3) ç¬¦å·ã®æå®
+
+----------------------------------------
+TMAX_TPRI,,signed
+----------------------------------------
+
+å¤æ°$TMAX_TPRIã«ï¼TMAX_TPRIã®å¤ãç¬¦å·ä»ãã§åå¾ããï¼
+
+(è¨è¿°ä¾4) å¤ãåå¾ããæ¡ä»¶ã®è¨è¿°
+
+----------------------------------------
+SIL_ENDIAN_BIG,1,,defined(SIL_ENDIAN_BIG)
+----------------------------------------
+
+SIL_ENDIAN_BIGããã¯ã­å®ç¾©ããã¦ããå ´åï¼å¤æ°$SIL_ENDIAN_BIGã«1ãè¨­å®
+ããï¼å®ç¾©ããã¦ããªãã£ãå ´åï¼å¤æ°$SIL_ENDIAN_BIGã¯å®ç¾©ãããªãï¼åç
+§
+ããã¨nilã¨ãªãï¼ï¼
+
+(è¨è¿°ä¾5) æ¡ä»¶ãæç«ããªãæã®å¼ã®è¨è¿°
+
+----------------------------------------
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+----------------------------------------
+
+TARGET_TSKATRããã¯ã­å®ç¾©ããã¦ããå ´åï¼å¤æ°$TARGET_TSKATRã«
+TARGET_TSKATRã®å¤ãåå¾ããï¼å®ç¾©ããã¦ããªãã£ãå ´åï¼å¤æ°
+$TARGET_TSKATRã¯0ã¨ããï¼
+
+
+ï¼ï¼çæã¹ã¯ãªãã
+
+ãã®ç« ã§ã¯ï¼çæã¹ã¯ãªãããè¨è¿°ããã«ããã£ã¦å¿
+è¦ãªäºé 
+ãèª¬æããï¼
+
+5.1 NumStrã¯ã©ã¹
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼éçAPIã®æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ãè©ä¾¡ãï¼å¤ãæ±ããï¼
+çæã¹ã¯ãªããã§æ¡ä»¶åå²ãã¨ã©ã¼ãã§ãã¯ãè¡ãéã«ã¯ï¼æ±ããå¤ãåç
+§ã
+ããï¼ä¸æ¹ï¼ãã©ã¡ã¼ã¿ãkernel_cfg.cãªã©ã®ãã¡ã¤ã«ã«åºåããéã«ã¯ï¼ã
+ã©ã¡ã¼ã¿ãè©ä¾¡ãã¦æ±ããå¤ã§ã¯ãªãï¼å
+ã«ãªã£ãæå­åãåºåããæ¹ãå¯èª­
+æ§ãé«ãï¼ã¤ã¾ãï¼åãã©ã¡ã¼ã¿ã«å¯¾ãã¦ï¼å¤ã¨æå­åã®ä¸¡æ¹ãä¿æãããï¼
+
+ãããå®ç¾ããããã«ï¼å¤ã¨æå­åã®çµãç®¡çããNumStrã¯ã©ã¹ãç¨æãã¦ã
+ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼éçAPIã®åãã©ã¡ã¼ã¿ã«å¯¾ãã¦ï¼ä¸ããæå­åã¨
+ãããè©ä¾¡ãã¦æ±ããå¤ããï¼NumStrã¯ã©ã¹ã®ãªãã¸ã§ã¯ããçæããï¼
+
+NumStrã¯ã©ã¹ã¯ï¼ããªã³ããããªã©æå­åã«å¤æããå ´åä»¥å¤ã¯ï¼æ°å¤ã¨ãã¦
+æ±ããã¨ãã§ããï¼å
+·ä½çã«ã¯ï¼ååæ¼ç®ãªã©ã®æ°å¤ã«å¯¾ããã¡ã½ããã«ã¤ã
+ã¦ã¯ï¼NumStrãªãã¸ã§ã¯ãã®å¤ã«å¯¾ãã¦é©ç¨ãããï¼ããªã³ããããªã©æå­å
+ã«å¤æããå ´åã«ã¯ï¼NumStrãªãã¸ã§ã¯ãã®æå­åãç¨ããããï¼
+
+5.2 ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ããçæã¹ã¯ãªããã«æ¸¡ãããå¤æ°
+
+ãã®ç¯ã§ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿æ¬ä½ãå®ç¾©ãï¼çæã¹ã¯ãªããã«æ¸¡ãããå¤
+æ°ã«ã¤ãã¦èª¬æããï¼
+
+5.2.1 å¤åå¾ã·ã³ãã«
+
+å¤ãæ±ãããã·ã³ãã«ï¼ä¸è¬ã«ã¯å¼ï¼ã¨ãã¦ï¼å¤åå¾ã·ã³ãã«ãã¼ãã«ã«è¨è¿°
+ããã·ã³ãã«ã«å¯¾å¿ããå¤æ°ï¼
+
+5.2.2 ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¼ã¿ï¼$cfgDataï¼
+
+ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«è¨è¿°ããï¼æ¡ä»¶ãã£ã¬ã¯ãã£ãã«
+ãã£ã¦é¤å¤ãããªãã£ãéçAPIã¨ãã®ãã©ã¡ã¼ã¿ã¯ï¼$cfgDataã«æ ¼ç´ãã¦çæ
+ã¹ã¯ãªããã«æ¸¡ãããï¼$cfgDataã¯ï¼3éã®ããã·ã¥ï¼ããã·ã¥ã®ããã·ã¥ã®ãã
+ã·ã¥ï¼ã§ï¼å
+·ä½çãªæ§é ã¯ä»¥ä¸ã®éãã§ããï¼
+
+$cfgDataã¯ï¼éçAPIåãã·ã³ãã«åãããã®ï¼ä¾ãã°ï¼éçAPIåãCRE_SEMã§
+ããã°ï¼:CRE_SEMï¼ãã­ã¼ã¨ãï¼åä¸ç¨®é¡ã®ãã¹ã¦ã®éçAPIï¼ä¾ãã°ï¼ã·ã¹ã
+ã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ä¸­ã«CRE_SEMã5ã¤ããã°ï¼ãã®ãã¹ã¦ï¼ã®
+æ
+å ±ãå¤ã¨ããããã·ã¥ã§ããï¼
+
+åä¸ç¨®é¡ã®ãã¹ã¦ã®éçAPIã®æ
+å ±ã¯ï¼åã
+ã®éçAPIã®è­å¥çªå·ãã­ã¼ã¨ãï¼
+ãã©ã¡ã¼ã¿æ
+å ±ãå¤ã¨ããããã·ã¥ã§ããï¼ããã·ã¥ã®ã­ã¼ã¨ãªãéçAPIã®è­
+å¥çªå·ã«ã¯ï¼éçAPIãã¼ãã«ä¸­ã§ã­ã¼ãã©ã¡ã¼ã¿ã«æå®ãããã©ã¡ã¼ã¿ã®å¤ã
+ä½¿ãããï¼ã­ã¼ãã©ã¡ã¼ã¿ããªãã¸ã§ã¯ãè­å¥åã§ããå ´åï¼ãã®IDçªå·ãã­ã¼
+ã¨ãªãï¼ã¾ãï¼æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ã§ããå ´åã«ã¯ï¼ãã®å¤ãã­ã¼ã¨ãªãï¼
+ã­ã¼ãã©ã¡ã¼ã¿ãæå®ããã¦ããªãå ´åã«ã¯ï¼åä¸ç¨®é¡ã®éçAPIã®ä¸­ã§ã®åºç¾
+é åºï¼1ããéå§ï¼ãã­ã¼ã¨ãªãï¼åãã­ã¼ãæã£ãéçAPIãè¤æ°è¨è¿°ããã¦
+ããå ´åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿æ¬ä½ã§ã¨ã©ã¼ãæ¤åºããï¼ãã®ããã·ã¥ã¯ï¼
+ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ä¸­ã§ã®éçAPIã®åºç¾é ã«æ ¼ç´ããã¦
+ããï¼
+
+ãã©ã¡ã¼ã¿æ
+å ±ã¯ï¼ãã©ã¡ã¼ã¿åãã·ã³ãã«åãããã®ï¼ä¾ãã°ï¼ãã©ã¡ã¼ã¿
+åãisemcntã§ããã°ï¼:isemcntï¼ãã­ã¼ã¨ãï¼ãã©ã¡ã¼ã¿å¤ãå¤ã¨ããããã·ã¥
+ã§ããï¼ãã©ã¡ã¼ã¿å¤ã¯ï¼ãªãã¸ã§ã¯ãè­å¥åãæ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ã®å ´å
+ã«ã¯NumStrã¯ã©ã¹ã®ãªãã¸ã§ã¯ãï¼ä¸è¬å®æ°å¼ãã©ã¡ã¼ã¿ãæå­åãã©ã¡ã¼ã¿
+ã®å ´åã¯æå­åï¼Stringã¯ã©ã¹ã®ãªãã¸ã§ã¯ãï¼ã§è¡¨ãï¼ãã©ã¡ã¼ã¿ããªã¹ã
+ãã©ã¡ã¼ã¿ã§ããå ´åã«ã¯ï¼åãã©ã¡ã¼ã¿ãNumStrã¯ã©ã¹ã®ãªãã¸ã§ã¯ãã¾ã
+ã¯æå­åã§è¡¨ãããã®ã®é
+åãå¤ã¨ããï¼
+
+éçAPIããã¡ã¤ã³ã®å²ã¿ã«å«ã¾ãã¦ããå ´åã«ã¯ï¼:domainãã­ã¼ã¨ãã¦ï¼ã
+ã¡ã¤ã³IDã®æ°å¤ãå¤ã¨ããããã·ã¥ã¨ã³ããªãï¼ãã©ã¡ã¼ã¿æ
+å ±ã«è¿½å ããï¼
+ã¾ãï¼ã¯ã©ã¹ã®å²ã¿ã«å«ã¾ãã¦ããå ´åã«ã¯ï¼:classãã­ã¼ã¨ãã¦ï¼ã¯ã©ã¹ID
+ãNumStrã¯ã©ã¹ã®ãªãã¸ã§ã¯ãã¨ããããã·ã¥ã¨ã³ããªãï¼ãã©ã¡ã¼ã¿æ
+å ±ã«
+è¿½å ããï¼
+
+ããã«ï¼ãã®éçAPIã«é¢ããã¨ã©ã¼ã¡ãã»ã¼ã¸åºåã®ããã«ï¼ãã©ã¡ã¼ã¿æ
+å ±
+ã«ã¯ï¼:apinameãã­ã¼ã¨ãã¦éçAPIåãï¼:_file_ã¨:_line_ãã­ã¼ã¨ãã¦ï¼ã
+ãããï¼ãã®éçAPIãè¨è¿°ããã¦ãããã¡ã¤ã«åã¨è¡çªå·ãæ ¼ç´ãã¦ããï¼
+
+$cfgDataã®ä¾ã¨ãã¦ï¼éçAPIãã¼ãã«ãã3.2 éçAPIãã¼ãã«ã®è¨è¿°ä¾ãã®
+ç¯ã«æããä¾ã®éãã§ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®å
+å®¹ãï¼
+
+----------------------------------------
+CRE_SEM(SEM1, { TA_TPRI, 0, 1 });
+CFG_INT(INTNO1, { TA_NULL, INTPRI1 });
+DEF_ICS { I_STACK_SIZE, i_stack }
+----------------------------------------
+
+ã§ããæï¼$cfgDataã¯æ¬¡ã®å
+å®¹ã¨ãªãï¼TA_TPRIã¯1ï¼INTNO1ã¯10ï¼TA_NULLã¯0ï¼
+INTPRI1ã¯-2ï¼I_STACK_SIZEã¯4196ã«å®ç¾©ããã¦ãããã¨ãä»®å®ãã¦ããï¼ï¼
+
+----------------------------------------
+{:CRE_SEM=>
+  {1=>
+    {:semid=>NumStr(1,"SEM1"),
+     :sematr=>NumStr(1,"TA_TPRI"),
+     :isemcnt=>NumStr(0,"0"),
+     :maxsem=>NumStr(1,"1"),
+     :apiname=>"CRE_SEM",
+     :_file_=>"sample.cfg",
+     :_line_=>1}},
+ :CFG_INT=>
+  {10=>
+    {:intno=>NumStr(10,"INTNO1"),
+     :intatr=>NumStr(0,"TA_NULL"),
+     :intpri=>NumStr(-2,"INTPRI1"),
+     :apiname=>"CFG_INT",
+     :_file_=>"sample.cfg",
+     :_line_=>2}},
+ :DEF_ICS=>
+  {1=>
+    {:istksz=>NumStr(4196,"I_STACK_SIZE"),
+     :istk=>"i_stack",
+     :apiname=>"DEF_ICS",
+     :_file_=>"sample.cfg",
+     :_line_=>3}}}
+----------------------------------------
+
+åä¸ç¨®é¡ã®ãã¹ã¦ã®éçAPIã«å¯¾ãã¦å¦çãè¡ãããå ´åã«ã¯ï¼æ¬¡ã®ããã«ã«ã¼
+ããä½ãã¨ããï¼CRE_SEMã®ä¾ï¼ï¼
+
+----------------------------------------
+$cfgData[:CRE_SEM].each do |key, params|
+	<åã
+ã®éçAPIã«å¯¾ããå¦ç>
+end
+----------------------------------------
+
+ããã§ï¼åä¸ç¨®é¡ã®éçAPIã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ä¸­ã§
+ã®åºç¾é åºã§æ ¼ç´ããã¦ããããï¼ä¸ã®ã«ã¼ãå
+ã®å¦çã¯ï¼éçAPIã®åºç¾é ã§
+è¡ãããï¼
+
+ä¸æ¹ï¼6.1ç¯ã§ç¤ºãããã«IDçªå·ã®å²ä»ããæåã§è¡ã£ãå ´åï¼éçAPIã®åºç¾
+é ã¯ï¼IDçªå·é ã«ä¸è´ãã¦ããã¨ã¯éããªãï¼ãã®ããï¼ãªãã¸ã§ã¯ãã®åæ
+åãã­ãã¯ãçæããå ´åãªã©ï¼IDçªå·é ã«å¦çããããå ´åã«ã¯ï¼ããã·ã¥
+ãã½ã¼ãããå¿
+è¦ãããï¼å
+·ä½çã«ã¯ï¼æ¬¡ã®ããã«ã«ã¼ããä½ãã¨ãã
+ï¼CRE_SEMã®ä¾ï¼ï¼
+
+----------------------------------------
+$cfgData[:CRE_SEM].sort.each do |key, params|
+	<åã
+ã®éçAPIã«å¯¾ããå¦ç>
+end
+----------------------------------------
+
+ãã®ã«ã¼ãã®ä¸­ã§ã¯ï¼éçAPIã®ãã©ã¡ã¼ã¿ã®å¤ã¨æå­åã¯ï¼NumStrã¯ã©ã¹ã®ãª
+ãã¸ã§ã¯ãã¨ãã¦ï¼params[:maxcnt]ã®å½¢ã§åãåºããã¨ãã§ããï¼CRE_SEMã®
+maxcntãã©ã¡ã¼ã¿ã®ä¾ï¼ï¼
+
+5.2.3 ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã®ãªã¹ãï¼$includeFilesï¼
+
+ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«è¨è¿°ãããCè¨èªããªãã­ã»ããµã®
+ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼ã§æå®ãããã¡ã¤ã«åã®ãªã¹ãã¯ï¼
+$includeFilesã«æ ¼ç´ãã¦çæã¹ã¯ãªããã«æ¸¡ãããï¼$includeFilesã¯ï¼
+#includeã®å¾ã«è¨è¿°ãããæå­åï¼""ã<>ãå«ãæå­åï¼ãè¦ç´ ã¨ããé
+åã§
+ããï¼
+
+5.2.4 ãã®ä»ã®å¤æ°
+
+(5-2-4-1) $asmLabel
+
+ã³ã³ãã¤ã©ãCè¨èªã®è­å¥åããã¢ã»ã³ãã©ã®ã©ãã«ãä½ãéã«ï¼å
+é ­ã«"_"ã
+ä»ãå ´åã«ã¯ï¼$asmLabelã¯"_"ã«è¨­å®ãããï¼ããã§ãªãå ´åã«ã¯ï¼""ã«è¨­å®
+ãããï¼
+
+(5-2-4-2) $endianLittle
+
+$endianLittleã¯ï¼ã¿ã¼ã²ãããã­ã»ããµããªãã«ã¨ã³ãã£ã¢ã³ã®å ´åã«ã¯
+trueï¼ããã°ã¨ã³ãã£ã¢ã³ã®å ´åã«ã¯falseã«è¨­å®ãããï¼
+
+5.3 çæã¹ã¯ãªããããã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«æ¸¡ãå¤æ°
+
+ãã®ç¯ã§ã¯ï¼çæã¹ã¯ãªãããå®ç¾©ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿æ¬ä½ã«æ¸¡ãããå¤
+æ°ã«ã¤ãã¦èª¬æããï¼
+
+(5-3-1) ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«åï¼$timeStampFileNameï¼
+
+çæã¹ã¯ãªããã«ããã¦$timeStampFileNameã«ãã¡ã¤ã«åãè¨­å®ããã¨ï¼ã³ã³
+ãã£ã®ã¥ã¬ã¼ã¿æ¬ä½ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®æ­£å¸¸çµäºæã«ï¼è¨­å®ãããã¡ã¤
+ã«åã§å
+å®¹ã®ç©ºã®ãã¡ã¤ã«ãä½ãããï¼
+
+5.4 ãã¹éã§å¼ãæ¸¡ãå¤æ°
+
+ãã®ç¯ã§ã¯ï¼ç°ãªããã¹ã®çæã¹ã¯ãªããéã§ãã¼ã¿ãåãæ¸¡ãããæã«ç¨ã
+ãå¤æ°ã«ã¤ãã¦èª¬æããï¼
+
+(5-4-1) ãã¹2ãããã¹3ã«å¼ãæ¸¡ããã¼ã¿ï¼$cfg2Dataï¼
+
+ãã¹2ã®çæã¹ã¯ãªãããããã¹3ã®çæã¹ã¯ãªããã«ãã¼ã¿ãå¼ãæ¸¡ãããå ´
+åã«ã¯ï¼å¼ãæ¸¡ããããã¼ã¿ã$cfg2Dataï¼ããã·ã¥ï¼ã«è¨­å®ããï¼
+
+(5-4-2) ãã¹3ãããã¹4ã«å¼ãæ¸¡ããã¼ã¿ï¼$cfg3Dataï¼
+
+ãã¹3ã®çæã¹ã¯ãªãããããã¹4ã®çæã¹ã¯ãªããã«ãã¼ã¿ãå¼ãæ¸¡ãããå ´
+åã«ã¯ï¼å¼ãæ¸¡ããããã¼ã¿ã$cfg3Dataï¼ããã·ã¥ï¼ã«è¨­å®ããï¼
+
+5.5 ã¨ã©ã¼åºåé¢æ°
+
+ãã®ç¯ã§ã¯ï¼çæã¹ã¯ãªããä¸­ã§ã¨ã©ã¼ãæ¤åºããå ´åã«å¼ã³åºãã¹ãã¨ã©ã¼
+åºåé¢æ°ã«ã¤ãã¦èª¬æããï¼
+
+(5-5-1) error_exit(message, location="")
+(5-5-2) error(message, location="")
+(5-5-3) warning(message, location="")
+
+messageã¨locationããä½æããã¨ã©ã¼ã¡ãã»ã¼ã¸ãåºåããï¼error_exitã¯ï¼
+ã¡ãã»ã¼ã¸ã®åºåå¾ã«ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¦çãä¸­æ­ããï¼errorã¯ï¼ã¡ãã»ã¼
+ã¸ã®åºåå¾ãå¦çãç¶ç¶ãï¼ãã¡ã¤ã«ã®çæå¦çåã«ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¦
+çãä¸­æ­ããï¼warningã¯ï¼ãã®ã¾ã¾å¦çãç¶ç¶ããï¼locationãçç¥ããå ´å
+ã«ã¯ï¼ã¨ã©ã¼çºçç®æã¯åºåãããªãï¼
+
+(5-5-4) def error_api(params, message)
+(5-5-5) def warning_api(params, message)
+
+paramsã«éçAPIã®ãã©ã¡ã¼ã¿æ
+å ±ãæ¸¡ãã¨ï¼éçAPIãè¨è¿°ããã¦ãããã¡ã¤
+ã«åã¨è¡çªå·ã¨ï¼messageã«æ¸¡ããã¡ãã»ã¼ã¸ãåºåããï¼
+
+(5-5-6) def error_ercd(errorCode, params, message)
+
+errorCodeã«ã¨ã©ã¼ã³ã¼ãã®æå­åï¼paramsã«éçAPIã®ãã©ã¡ã¼ã¿æ
+å ±ãæ¸¡ã
+ã¨ï¼éçAPIãè¨è¿°ããã¦ãããã¡ã¤ã«åã¨è¡çªå·ã¨ï¼ã¨ã©ã¼ã³ã¼ãï¼message
+ã«æ¸¡ããã¡ãã»ã¼ã¸ãåºåããï¼
+
+(5-5-7) def error_wrong(errorCode, params, symbol, wrong)
+(5-5-8) def error_wrong_id(errorCode, params, symbol, objid, wrong)
+(5-5-9) def error_wrong_sym(errorCode, params, symbol, symbol2, wrong)
+
+ãã©ã¡ã¼ã¿ã«é¢ããã¨ã©ã¼ã¡ãã»ã¼ã¸ãåºåããï¼errorCodeã«ã¨ã©ã¼ã³ã¼ãã®
+æå­åï¼paramsã«éçAPIã®ãã©ã¡ã¼ã¿æ
+å ±ï¼symbolã«ã¨ã©ã¼ãèµ·ããããã©ã¡ã¼
+ã¿åãã·ã³ãã«åãããã®ï¼wrongã«ã¨ã©ã¼ã®çç±ãæ¸¡ãï¼
+
+ã¨ã©ã¼ãèµ·ãããéçAPIãè­å¥ããããã«ï¼ãªãã¸ã§ã¯ãIDãåºåãããå ´å
+ã«ã¯ï¼error_wrong_idãç¨ãï¼objidã«ãªãã¸ã§ã¯ãIDãè¡¨ããã©ã¡ã¼ã¿åãã·
+ã³ãã«åãããã®ãæ¸¡ãï¼ãªãã¸ã§ã¯ãçªå·ãåºåãããå ´åã«ã¯ï¼
+error_wrong_symãç¨ãï¼symbol2ã«ãªãã¸ã§ã¯ãçªå·ãè¡¨ããã©ã¡ã¼ã¿åãã·
+ã³ãã«åãããã®ãæ¸¡ãï¼
+
+(5-5-10) def error_illegal(errorCode, params, symbol)
+(5-5-11) def error_illegal_id(errorCode, params, symbol, objid)
+(5-5-12) def error_illegal_sym(errorCode, params, symbol, symbol2)
+
+ä¸æ­£ãã©ã¡ã¼ã¿ã®ã¨ã©ã¼ã¡ãã»ã¼ã¸ãåºåããï¼errorCodeã«ã¨ã©ã¼ã³ã¼ãã®æ
+å­åï¼paramsã«éçAPIã®ãã©ã¡ã¼ã¿æ
+å ±ï¼symbolã«ä¸æ­£ãªãã©ã¡ã¼ã¿åãã·ã³
+ãã«åãããã®ãæ¸¡ãï¼
+
+ã¨ã©ã¼ãèµ·ãããéçAPIãè­å¥ããããã«ï¼ãªãã¸ã§ã¯ãIDãåºåãããå ´å
+ã«ã¯ï¼error_illegal_idãç¨ãï¼objidã«ãªãã¸ã§ã¯ãIDãè¡¨ããã©ã¡ã¼ã¿åã
+ã·ã³ãã«åãããã®ãæ¸¡ãï¼ãªãã¸ã§ã¯ãçªå·ãåºåãããå ´åã«ã¯ï¼
+error_illegal_symãç¨ãï¼symbol2ã«ãªãã¸ã§ã¯ãçªå·ãè¡¨ããã©ã¡ã¼ã¿åã
+ã·ã³ãã«åãããã®ãæ¸¡ãï¼
+
+5.6 GenFileã¯ã©ã¹
+
+GenFileã¯ã©ã¹ã¯ï¼çæã¹ã¯ãªããã«ãã£ã¦ãã¡ã¤ã«ãä½æããããã«ç¨ããã¯
+ã©ã¹ã§ããï¼çæã¹ã¯ãªããã«ããã¦GenFileã¯ã©ã¹ãç¨ãã¦ä½æãããã¡ã¤ã«
+ã¯ï¼ããã«ã¯ãã¡ã¤ã«ã«æ¸ãåºãããï¼çæã¹ã¯ãªããã«ãã£ã¦ã¨ã©ã¼ãå ±å
+ãããªãã£ãå ´åã«ã®ã¿ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿æ¬ä½ããã¡ã¤ã«ã«æ¸ãåºãï¼
+
+GenFileã¯ã©ã¹ãç¨ãã¦ãã¡ã¤ã«ãä½æããå ´åï¼åä¸ãã¡ã¤ã«åã®ãã¡ã¤ã«ã
+ãã§ã«å­å¨ãï¼æ°ããä½æãããã¡ã¤ã«ãããã¨åãå
+å®¹ã§ããã°ï¼ãã¡ã¤ã«
+ãæ¸ãåºããªãï¼ãã®ããï¼ã¿ã¤ã ã¹ã¿ã³ããæ´æ°ãããªãï¼ï¼
+
+GenFileã¯ã©ã¹ã®ä¸»ãªã¡ã½ããã¯ï¼ä»¥ä¸ã®éãã§ããï¼
+
+(5-6-1) new(<ãã¡ã¤ã«å>)
+
+æ°ãããã¡ã¤ã«ãä½æããï¼åä¸ã®ãã¡ã¤ã«åã®ãã¡ã¤ã«ãä½ææ¸ã¿ã®å ´åã«
+ã¯ï¼ä½ææ¸ã¿ã®ãã¡ã¤ã«ã®å
+å®¹ã«ï¼ããä»¥éã®å
+å®¹ãè¿½å ããï¼
+
+(5-6-2) add(<æå­å>)
+(5-6-3) add2(<æå­å>)
+(5-6-4) append(<æå­å>)
+
+ãã¡ã¤ã«ã«æå­åãæ¸ãåºãï¼è¿½è¨ããï¼ï¼æå­åãæ¸ãåºããå¾ã«ï¼addã¯æ¹
+è¡1ã¤ãï¼add2ã¯æ¹è¡2ã¤ãæ¸ãåºãï¼
+
+(5-6-5) comment_header(<æå­å>)
+
+ãã¡ã¤ã«ã«ã³ã¡ã³ãããããæ¸ãåºãï¼è¿½è¨ããï¼ï¼
+
+5.7 ãã®ä»ã®ã©ã¤ãã©ãª
+
+5.7.1 IncludeTrb(<çæã¹ã¯ãªããå>)
+
+æå®ããçæã¹ã¯ãªãããå¦çããï¼çæã¹ã¯ãªããã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿
+ã«å¯¾ãã--include-directoryãªãã·ã§ã³ã§æå®ãããã£ã¬ã¯ããªããæ¢ãï¼
+
+5.7.2 Stringã¯ã©ã¹ã®æ¡å¼µ
+
+Stringã¯ã©ã¹ã«æ¬¡ã®2ã¤ã®ã¡ã½ãããè¿½å ãã¦ããï¼ã¾ãï¼NumStrã¯ã©ã¹ããã
+ãã®ã¡ã½ãããæã¤ï¼
+
+(5-7-2-1) quote
+
+äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åãè¿ãï¼
+
+(5-7-2-2) unquote
+
+äºéå¼ç¨ç¬¦ã§å²ã¾ããæå­åãå±éããæå­åãè¿ãï¼æå­åãäºéå¼ç¨ç¬¦ã§
+å²ã¾ãã¦ããªãå ´åã«ã¯ï¼æå­åããã®ã¾ã¾è¿ãï¼
+
+5.7.3 ã­ã¼ãã¢ã¸ã¥ã¼ã«æä½ã©ã¤ãã©ãª
+
+--rom-imageãªãã·ã§ã³ã¨--rom-symbolãªãã·ã§ã³ã§æå®ããã­ã¼ãã¢ã¸ã¥ã¼ã«
+ãæä½ããããã®ã©ã¤ãã©ãªé¢æ°ãç¨æãã¦ããï¼
+
+(5-7-3-1) SYMBOL(<ã·ã³ãã«>)
+
+--rom-symbolãªãã·ã§ã³ã§æå®ããã·ã³ãã«ãã¡ã¤ã«ããï¼æå®ããã·ã³ãã«
+ã®ã¢ãã¬ã¹ãè¿ãï¼ã·ã³ãã«ãã¡ã¤ã«ä¸­ã«æå®ããã·ã³ãã«ããªãå ´åã«ã¯
+nilãè¿ãï¼
+
+(5-7-3-2) BCOPY(<ã³ãã¼å
+å
+é ­ã¢ãã¬ã¹>, <ã³ãã¼å
+å
+é ­ã¢ãã¬ã¹>, <ãµã¤ãº>)
+
+--rom-imageãªãã·ã§ã³ã§æå®ããSã¬ã³ã¼ããã¡ã¤ã«ä¸­ã§ï¼æå®ãããã©ã¡ã¼
+ã¿ã«å¾ã£ã¦ãã¼ã¿ãã³ãã¼ããï¼ãã¼ã¿ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ã¡ã¢ãªä¸­ã§
+ã³ãã¼ããã ãã§ï¼Sã¬ã³ã¼ããã¡ã¤ã«ãæ¸ãæããããã§ã¯ãªãï¼
+
+(5-7-3-3) PEEK(<å
+é ­ã¢ãã¬ã¹>, <ãµã¤ãº>[, <ç¬¦å·ä»ããã©ã°>])
+
+--rom-imageãªãã·ã§ã³ã§æå®ããSã¬ã³ã¼ããã¡ã¤ã«ããï¼æå®ããå
+é ­ã¢ã
+ã¬ã¹ããã³ãµã¤ãºã§ãã¼ã¿ãåãåºãï¼å¤ã«å¤æãã¦è¿ãï¼<ç¬¦å·ä»ããã©ã°>
+ãçç¥ãããfalseã«ããå ´åã«ã¯ç¬¦å·ãªãã®å¤ã«ï¼<ç¬¦å·ä»ããã©ã°>ãtrueã«
+ããå ´åã«ã¯ç¬¦å·ä»ãã®å¤ã«å¤æããï¼Sã¬ã³ã¼ããã¡ã¤ã«ã«æå®ããå
+é ­ã¢ã
+ã¬ã¹ããã³ãµã¤ãºã®ãã¼ã¿ãå«ã¾ãã¦ããªãå ´åã«ã¯nilãè¿ãï¼
+
+
+ï¼ï¼ãã®ä»
+
+6.1 ãªãã¸ã§ã¯ãIDã®æå®
+
+TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ã§ã¯ï¼ãªãã¸ã§ã¯ãã®IDçªå·ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿
+ãå²ãä»ããæ¹æ³ãåºæ¬ã¨ãªã£ã¦ãããï¼IDçªå·ã®å²ä»ããæåã§è¨­å®ããã
+å ´åã®ããã«ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼IDçªå·ã®å²ä»ãããã¡ã¤ã«ããåãè¾¼
+ãæ©è½ãæã£ã¦ããï¼
+
+å
+·ä½çã«ã¯ï¼IDçªå·ã®å²ä»ããè¨è¿°ãããã¡ã¤ã«ãç¨æãï¼ã³ã³ãã£ã®ã¥ã¬ã¼
+ã¿ã®ãã¹2ã«å¯¾ãã--id-input-fileãªãã·ã§ã³ã«ããæå®ãããã¨ã§ï¼ã³ã³ãã£
+ã®ã¥ã¬ã¼ã¿ã¯ããã«å¾ã£ã¦ãªãã¸ã§ã¯ãã«IDçªå·ãå²ãä»ããï¼ãã ãï¼
+TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ã§ã¯ï¼IDçªå·ãé£ç¶ãã¦ããªããã°ãªããªãã¨ããå¶
+ç´ãããããï¼ãã®å¶ç´ãæºãããªãå²ä»ãããããã¨ããå ´åã«ã¯ï¼ã³ã³ãã£
+ã®ã¥ã¬ã¼ã¿æ¬ä½ãã¨ã©ã¼ãå ±åããï¼
+
+ã¾ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã«å¯¾ãã--id-output-fileãªãã·ã§ã³ãç¨ã
+ããã¨ã§ï¼å²ä»ãçµæããã¡ã¤ã«ã«æ¸ãåºããã¨ãã§ããï¼ååã®ã³ã³ãã£ã®ã¥
+ã¬ã¼ã·ã§ã³æã«ãã¡ã¤ã«ã«æ¸ãåºããå²ä»ãçµæãï¼æ¬¡åã®ã³ã³ãã£ã®ã¥ã¬ã¼
+ã·ã§ã³æã«èª­ã¿è¾¼ããã¨ã§ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ä¿®æ­£
+ã«ããIDçªå·ã®å²ä»ããå¤åãããªããã¨ãã§ããï¼
+
+6.2 ã·ã¹ãã ãµã¼ãã¹ã¸ã®å¯¾å¿ï¼ãã¹2ã«ãããå¦çãã§ã¼ãºï¼
+
+TCP/IPããã«ã¦ã§ã¢ãªã©ã®ã·ã¹ãã ãµã¼ãã¹ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã«å¯¾å¿
+ããããã«ï¼ãã¹2ã«ãããå¦çãã§ã¼ãºã®æ©è½ãè¨­ãã¦ããï¼
+
+ã·ã¹ãã ãµã¼ãã¹ã«ãã£ã¦ã¯ï¼ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³å
+å®¹ã«å¿ãã¦ï¼ã«ã¼
+ãã«ãªãã¸ã§ã¯ãã®ç»é²ãå¿
+è¦ã«ãªãå ´åãããï¼ä¾ãã°ï¼TCP/IPã®éä¿¡ç«¯ç¹
+ãçæãããã¨ã«ï¼ã»ããã©ãçæãããå ´åãèããããï¼ãã®ãããªå ´åï¼
+ã¾ãã·ã¹ãã ãµã¼ãã¹ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³å¦çãè¡ãï¼ãã®ä¸­ã§ã«ã¼ã
+ã«ãªãã¸ã§ã¯ãã®ç»é²æ
+å ±ãçæããå¾ã§ï¼ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
+ã³å¦çãè¡ãããï¼ãããå¯è½ã«ããããã«è¨­ããæ©è½ãï¼ãã¹2ã«ãããå¦ç
+ãã§ã¼ãºã®æ©è½ã§ããï¼
+
+å¦çãã§ã¼ãºã®æ©è½ãç¨ããå ´åã«ã¯ï¼éçAPIãã¼ãã«ãã¡ã¤ã«ã¨çæã¹ã¯ãª
+ããããã§ã¼ãºæ¯ã«ä½æããï¼ã¾ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãªãã·ã§ã³ã§ãã
+ãã®ãã¡ã¤ã«ãæå®ããéã«ï¼ãã¡ã¤ã«åã«":"ã¨å¦çãã§ã¼ãºåãä»å ããã
+ã®ãæå®ããï¼
+
+ä¾ãã°ï¼TCP/IPããã«ã¦ã§ã¢ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ï¼å¦çãã§ã¼ãºåã
+tcpipã¨ããï¼ã¨ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ï¼å¦çãã§ã¼ãºåã
+kernelã¨ããï¼ããã®é åºã§è¡ãå ´åï¼ãã¹1ã«æ¸¡ããªãã·ã§ã³ãï¼
+
+	--api-table tinet_api.def:tcpip --api-table kernel_api.def:kernel
+
+ã®ããã«ãï¼ãã¹2ã«æ¸¡ããªãã·ã§ã³ãï¼
+
+	-T tinet.trb:tcpip -T target_kernel.trb:kernel
+
+ã®ããã«ããï¼-Tãªãã·ã§ã³ã®æå®é åºã¯ï¼å¦çãã§ã¼ãºã®å¦çé åºã«ä¸è´ã
+ããï¼
+
+ã·ã¹ãã ãµã¼ãã¹ã®çæã¹ã¯ãªããããã«ã¼ãã«ãªãã¸ã§ã¯ããç»é²ããå ´å
+ã«ã¯ï¼éçAPIã®æ
+å ±ãæ ¼ç´ããããã·ã¥ã§ãã$cfgFileInfoã«ï¼ã«ã¼ãã«ãªã
+ã¸ã§å®åãçæããéçAPIã®æ
+å ±ãè¿½å ããï¼ä¾ãã°ï¼ã»ããã©ãè¿½å ç»é²ã
+ããå ´åã«ã¯ï¼æ¬¡ã®ãããªå¦çãè¡ãï¼
+
+----------------------------------------
+cfgInfo = { APINAME: "CRE_SEM" }
+cfgInfo["semid"] = "SEM1_FOR_SYSSVC1"
+cfgInfo["sematr"] = NumStr.new($TA_TPRI, "TA_TPRI")
+cfgInfo["isemcnt"] = 1
+cfgInfo["maxsem"] = 1
+$cfgFileInfo.push(cfgInfo)
+----------------------------------------
+
+ä¸ã®å¦çã§cfgInfoã«ç»é²ããæ
+å ±ã¯ï¼ãªãã¸ã§ã¯ãè­å¥åã«ã¤ãã¦ã¯æå­å
+ï¼ä¸ã®ä¾ã§ã¯"semid"ï¼ï¼æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ã«ã¤ãã¦ã¯æ°å¤ï¼ä¸ã®ä¾ã§ã¯
+"isemcnt"ã¨"maxsem"ï¼ã¾ãã¯NumStrã¯ã©ã¹ã®ãªãã¸ã§ã¯ãï¼ä¸ã®ä¾ã§ã¯
+"sematr"ï¼ï¼ä¸è¬å®æ°å¼ãã©ã¡ã¼ã¿ã¨æå­åãã©ã¡ã¼ã¿ã«ã¤ãã¦ã¯æå­åã¨ã
+ãï¼æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ãNumStrã¯ã©ã¹ã®ãªãã¸ã§ã¯ãã§ä¸ããå ´åã«ã¯ï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ä¸­ã«æå­åã§åºåãããï¼
+
+ãªãï¼ãã®æ¹æ³ã§éçAPIã®æ
+å ±ãç»é²ã§ããã®ã¯ï¼å¾ç¶ã®å¦çãã§ã¼ãºã§å¦ç
+ãããéçAPIã®ã¿ã§ããï¼
+
+ã¾ãï¼è¿½å ç»é²ããæ
+å ±ãæ­£ãããªãå ´åã®ã¨ã©ã¼ã¡ãã»ã¼ã¸ã¯ï¼ã¨ã©ã¼ã®çº
+çç®æãè¡¨ç¤ºãããªããªã©ä¸è¦ªåã§ããããï¼æ³¨æãããã¨ï¼Rubyãã¨ã©ã¼ã
+èµ·ããå¯è½æ§ãããï¼ï¼
+
+
+ï¼ï¼ãã¼ã¸ã§ã³å±¥æ­´
+
+	2016å¹´2æ8æ¥	Release	1.0.0		æåã®ä¸è¬å
+¬é
+	2016å¹´2æ14æ¥	Release	1.1.0		ãã¡ã¤ã³ã¨ã¯ã©ã¹ããµãã¼ã
+	2016å¹´3æ14æ¥	Release	1.2.0		æ§ã
+ãªæ¹è¯ï¼HRP3ã«ã¼ãã«ã«å¯¾å¿
+	2016å¹´5æ15æ¥	Release	1.2.1		ASP3 R3.1.0ã«åæ¢±ãã¦ãªãªã¼ã¹
+
+ä»¥ä¸
Index: asp3_wo_tecs/trunk/cfg/pass1.rb
===================================================================
--- asp3_wo_tecs/trunk/cfg/pass1.rb	(revision 305)
+++ asp3_wo_tecs/trunk/cfg/pass1.rb	(revision 306)
@@ -51,5 +51,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 #
-#  $Id: pass1.rb 32 2016-01-31 14:45:59Z ertl-hiro $
+#  $Id: pass1.rb 126 2016-05-03 06:53:08Z ertl-hiro $
 #
 
@@ -62,19 +62,19 @@
 #
 $symbolValueTable = {
-  "CHAR_BIT" => { :EXPR => "CHAR_BIT" },
-  "SCHAR_MAX" => { :EXPR => "SCHAR_MAX", :SIGNED => true },
-  "SCHAR_MIN" => { :EXPR => "SCHAR_MIN", :SIGNED => true },
-  "UCHAR_MAX" => { :EXPR => "UCHAR_MAX" },
-  "CHAR_MAX" => { :EXPR => "CHAR_MAX", :SIGNED => true },
-  "CHAR_MIN" => { :EXPR => "CHAR_MIN", :SIGNED => true },
-  "SHRT_MAX" => { :EXPR => "SHRT_MAX", :SIGNED => true },
-  "SHRT_MIN" => { :EXPR => "SHRT_MIN", :SIGNED => true },
-  "USHRT_MAX" => { :EXPR => "USHRT_MAX" },
-  "INT_MAX" => { :EXPR => "INT_MAX", :SIGNED => true },
-  "INT_MIN" => { :EXPR => "INT_MIN", :SIGNED => true },
-  "UINT_MAX" => { :EXPR => "UINT_MAX" },
-  "LONG_MAX" => { :EXPR => "LONG_MAX", :SIGNED => true },
-  "LONG_MIN" => { :EXPR => "LONG_MIN", :SIGNED => true },
-  "ULONG_MAX" => { :EXPR => "ULONG_MAX" }
+  "CHAR_BIT"  => { EXPR: "CHAR_BIT" },
+  "SCHAR_MAX" => { EXPR: "SCHAR_MAX", SIGNED: true },
+  "SCHAR_MIN" => { EXPR: "SCHAR_MIN", SIGNED: true },
+  "UCHAR_MAX" => { EXPR: "UCHAR_MAX" },
+  "CHAR_MAX"  => { EXPR: "CHAR_MAX",  SIGNED: true },
+  "CHAR_MIN"  => { EXPR: "CHAR_MIN",  SIGNED: true },
+  "SHRT_MAX"  => { EXPR: "SHRT_MAX",  SIGNED: true },
+  "SHRT_MIN"  => { EXPR: "SHRT_MIN",  SIGNED: true },
+  "USHRT_MAX" => { EXPR: "USHRT_MAX" },
+  "INT_MAX"   => { EXPR: "INT_MAX",   SIGNED: true },
+  "INT_MIN"   => { EXPR: "INT_MIN",   SIGNED: true },
+  "UINT_MAX"  => { EXPR: "UINT_MAX" },
+  "LONG_MAX"  => { EXPR: "LONG_MAX",  SIGNED: true },
+  "LONG_MIN"  => { EXPR: "LONG_MIN",  SIGNED: true },
+  "ULONG_MAX" => { EXPR: "ULONG_MAX" }
 }
 
@@ -90,4 +90,9 @@
 def ReadApiTableFile
   $apiTableFileNames.each do |apiTableFileName|
+    if /^(.+):(\w+)$/ =~ apiTableFileName
+      apiTableFileName = $1
+      apiPhase = $2.to_sym
+    end
+
     if !File.exist?(apiTableFileName)
       error_exit("`#{apiTableFileName}' not found")
@@ -99,7 +104,17 @@
       next if /^#/ =~ line			# ã³ã¡ã³ããã¹ã­ãã
 
-      fields = line.split(/\s+/)
-      staticApi = fields.shift
-      apiDef = { :API => staticApi }
+      fields = line.split(/\s+/)	# ãã£ã¼ã«ãã«åè§£
+
+      apiName = fields.shift		# APIåã®åãåºã
+      if /^(.+)\[(.+)\]$/ =~ apiName
+        apiName = $1
+        apiDef = { APINAME: apiName, API: $2 }
+      else
+        apiDef = { APINAME: apiName, API: apiName }
+      end
+      if !apiPhase.nil?
+        apiDef[:PHASE] = apiPhase
+      end
+
       apiParams = []
       fields.each do |param|
@@ -118,6 +133,7 @@
             apiParam[:ID_REF] = true
           when "."					# ç¬¦å·ç¡ãæ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
-            apiParam[:UNSIGNED] = true
+            apiParam[:EXPTYPE] = "unsigned_t"
           when "+"					# ç¬¦å·ä»ãæ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
+            apiParam[:EXPTYPE] = "signed_t"
             apiParam[:SIGNED] = true
           when "&"					# ä¸è¬æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
@@ -138,6 +154,11 @@
           end
         
-        when /^([{}])$/				# {ã¨}
-          apiParam = { :BRACE => $1 }
+        when "{"					# {
+          apiParam = { :BRACE => "{" }
+        when "{?"					# {?
+          apiParam = { :BRACE => "{", :OPTBRACE => true }
+
+        when "}"					# }
+          apiParam = { :BRACE => "}" }
 
         else
@@ -147,5 +168,5 @@
       end
       apiDef[:PARAM] = apiParams
-      $apiDefinition[staticApi] = apiDef
+      $apiDefinition[apiName] = apiDef
     end
     apiFile.close
@@ -174,5 +195,5 @@
 
       # å¼
-      if record[1].nil? || record[1] == ""
+      if record[1].nil? || record[1].empty?
         symbol[:EXPR] = variable
       else
@@ -180,14 +201,25 @@
       end
 
-      # ç¬¦å·ãã©ã°
-      if !(record[2].nil? || record[2] == "" || /^[uU]/ =~ record[2])
-        symbol[:SIGNED] = true
+      # å¼ã®å
+      if !record[2].nil? && !record[2].empty?
+        case record[2]
+        when /^[bB]/				# çå½å¤
+          symbol[:BOOL] = true
+        when /^[uU]/				# ç¬¦å·ç¡ãæ´æ°å¤
+          # ä½ãè¨­å®ããªã
+        else						# ç¬¦å·ä»ãæ´æ°å¤
+          symbol[:SIGNED] = true
+        end
       end
 
       # ã³ã³ãã¤ã«æ¡ä»¶
-      symbol[:CONDITION] = record[3]
-
-      # ã³ã³ãã¤ã«æ¡ä»¶ãæºããããªãæã®ããã©ã«ãå¤
-      symbol[:DEFAULT] = record[4]
+      if !record[3].nil? && !record[3].empty?
+        symbol[:CONDITION] = record[3]
+      end
+
+      # æ¡ä»¶ãæç«ããªãæã®å¼
+      if !record[4].nil? && !record[4].empty?
+        symbol[:ELSE_EXPR] = record[4]
+      end
 
       $symbolValueTable[variable] = symbol
@@ -218,5 +250,5 @@
   def getNextLine(withinApi)
     line = @cfgFile.gets
-    return nil if line.nil?
+    return(nil) if line.nil?
     @lineNo += 1
 
@@ -265,4 +297,7 @@
 class CfgParser
   @@lastApiIndex = 0
+  @@currentDomain = nil
+  @@currentClass = nil
+  @@nestDC = []
 
   def initialize
@@ -324,4 +359,27 @@
 
   #
+  #  æ¹è¡ã¨ç©ºç½æå­ãèª­ã¿é£ã°ã
+  #
+  def skipSpace(cfgFile, withinApi)
+    loop do
+      return if @line.nil?						# ãã¡ã¤ã«æ«ã§ããã°ãªã¿ã¼ã³
+      @line.lstrip!								# å
+é ­ã®ç©ºç½ãåé¤
+      return if @line != ""						# ç©ºè¡ã§ãªããã°ãªã¿ã¼ã³
+      @line = cfgFile.getNextLine(withinApi)	# æ¬¡ã®è¡ãèª­ã
+    end
+  end
+
+  #
+  #  æ¬¡ã®æå­ã¾ã§èª­ã¿é£ã°ã
+  #
+  def skipToToken(cfgFile, withinApi=true)
+    skipSpace(cfgFile, withinApi)
+    if @line.nil?							# ãã¡ã¤ã«æ«ã§ããã°ã¨ã©ã¼çµäº
+      error_exit("unexpexced end-of-file")
+    end
+  end
+
+  #
   #  ãã©ã¡ã¼ã¿ã1ã¤èª­ã
   #
@@ -334,17 +392,8 @@
     param = ""								# èª­ãã æå­å
     parenLevel = 0							# æ¬å¼§ã®ãã¹ãã¬ãã«
-  
     skipComma = @skipComma
     @skipComma = false
 
-    @line.lstrip!							# å
-é ­ã®ç©ºç½ãåé¤
-    while @line == ""						# ç©ºè¡ãèª­ã¿é£ã°ã
-      @line = cfgFile.getNextLine(true)
-      return nil if @line.nil?				# ãã¡ã¤ã«æ«ã§ããã°ãªã¿ã¼ã³
-      @line.lstrip!							# å
-é ­ã®ç©ºç½ãåé¤
-    end
-
+    skipToToken(cfgFile)					# æ¬¡ã®æå­ã¾ã§èª­ã¿é£ã°ã
     begin
       if parenLevel == 0
@@ -356,9 +405,9 @@
             return(parseParam(cfgFile))		# åå¸°å¼ã³åºã
           else
-            return(param)
+            return(param.strip)
           end
         when /^(\s*{)(.*)$/					# {
           if param != ""
-            return(param)
+            return(param.strip)
           else
             @line = $2
@@ -371,5 +420,5 @@
         when /^(\s*([)}]))(.*)$/			# }ã)
           if param != ""
-            return(param)
+            return(param.strip)
           else
             @line = $3
@@ -387,5 +436,5 @@
           @line = $2
         else								# è¡æ«
-          param += "\n"
+          param += " "
           @line = cfgFile.getNextLine(true)
         end
@@ -412,70 +461,137 @@
           @line = $2
         else								# è¡æ«
-          param += "\n"
+          param += " "
           @line = cfgFile.getNextLine(true)
         end
       end
     end while (@line)
-    return(param)
-  end
-
-  def parseApi(cfgFile)
+    return(param.strip)
+  end
+
+  def getParam(apiParam, param, cfgFile)
+    if param == ""
+      if !apiParam.has_key?(:OPTIONAL)
+        parse_error(cfgFile, "unexpected `,'")
+      end
+      return(param)
+    end
+
+    if apiParam.has_key?(:ID_DEF) || apiParam.has_key?(:ID_REF)
+      if (/^[A-Za-z_]\w*$/ !~ param)
+        parse_error(cfgFile, "`#{param}' is illegal object ID")
+      end
+      return(param)
+    end
+
+    if apiParam.has_key?(:STRING)
+      return(param.unquote)
+    else
+      return(param)
+    end
+  end
+
+  def parseApi(cfgFile, apiName)
     # éçAPIã®èª­ã¿è¾¼ã¿
     staticApi = {}
-    if (/^([A-Z_]+)\s*\((.*)$/ =~ @line)
-      apiName = $1
-      @line = $2
-
-      if $apiDefinition.has_key?(apiName)
-        staticApi[:API] = apiName
-        staticApi[:_FILE_] = cfgFile.getFileName
-        staticApi[:_LINE_] = cfgFile.getLineNo
-		apiDef = $apiDefinition[apiName]
-        param = parseParam(cfgFile)
-
-        apiDef[:PARAM].each do |apiParam|
-          if param.nil?						# ãã¡ã¤ã«æ«ã§ããã°ãªã¿ã¼ã³
-            error_exit("unexpexced end-of-file")
-            return(staticApi)
-          end
+    tooFewParams = false
+    skipUntilBrace = 0
+
+    skipToToken(cfgFile)					# æ¬¡ã®æå­ã¾ã§èª­ã¿é£ã°ã
+    if (/^\((.*)$/ =~ @line)
+      @line = $1
+
+      staticApi[:APINAME] = apiName
+      staticApi[:_FILE_] = cfgFile.getFileName
+      staticApi[:_LINE_] = cfgFile.getLineNo
+      apiDef = $apiDefinition[apiName]
+      param = parseParam(cfgFile)
+
+      apiDef[:PARAM].each do |apiParam|
+        return(staticApi) if param.nil?		# ãã¡ã¤ã«æ«ã§ããã°ãªã¿ã¼ã³
+
+        if skipUntilBrace > 0
+          # APIå®ç¾©ã}ã¾ã§ã¹ã­ããä¸­
           if apiParam.has_key?(:BRACE)
-            if param != apiParam[:BRACE]
-              parse_error(cfgFile, "'#{apiParam[:BRACE]}' expected")
+            case apiParam[:BRACE]
+            when "{"
+              skipUntilBrace += 1
+            when "}"
+              skipUntilBrace -= 1
+            end
+          end
+        elsif apiParam.has_key?(:OPTIONAL)
+          if /^([{})])$/ !~ param
+            store_param = getParam(apiParam, param, cfgFile)
+            if store_param != ""
+              staticApi[apiParam[:NAME]] = store_param
             end
             param = parseParam(cfgFile)
-          elsif apiParam.has_key?(:LIST)
-            staticApi[apiParam[:NAME]] = []
-            while /^([{})])$/ !~ param
-              if apiParam.has_key?(:STRING)
-                staticApi[apiParam[:NAME]].push(param.unquote)
-              else
-                staticApi[apiParam[:NAME]].push(param)
-              end
+          end
+        elsif apiParam.has_key?(:LIST)
+          staticApi[apiParam[:NAME]] = []
+          while /^([{})])$/ !~ param
+            staticApi[apiParam[:NAME]].push(getParam(apiParam, param, cfgFile))
+            param = parseParam(cfgFile)
+            break if param.nil?				# ãã¡ã¤ã«æ«ã®å ´å
+          end
+        elsif apiParam.has_key?(:OPTBRACE)
+          if param == apiParam[:BRACE]
+            param = parseParam(cfgFile)
+            break if param.nil?				# ãã¡ã¤ã«æ«ã®å ´å
+          else
+            if param == ""
               param = parseParam(cfgFile)
+              break if param.nil?			# ãã¡ã¤ã«æ«ã®å ´å
+            elsif /^([})])$/ !~ param
+              parse_error(cfgFile, "`{...}' expected before #{param}")
             end
-          elsif /^([{}])$/ =~ param
-            if !apiParam.has_key?(:OPTIONAL)
-              parse_error(cfgFile, "#{$1} unexpected")
-            end
-          else
-            if apiParam.has_key?(:STRING)
-              staticApi[apiParam[:NAME]] = param.unquote
-            else
-              staticApi[apiParam[:NAME]] = param
-            end
+            skipUntilBrace += 1          	# APIå®ç¾©ã}ã¾ã§ã¹ã­ãã
+          end
+        elsif !apiParam.has_key?(:BRACE)
+          if /^([{})])$/ !~ param
+            staticApi[apiParam[:NAME]] = getParam(apiParam, param, cfgFile)
             param = parseParam(cfgFile)
-          end
-        end
-        if param != ")"
-          parse_error(cfgFile, "')' expected")
-        end
-      else
-        parse_error(cfgFile, "unknown static API: #{apiName}")
+          elsif !tooFewParams
+            parse_error(cfgFile, "too few parameters before `#{$1}'")
+            tooFewParams = true
+          end
+        elsif param == apiParam[:BRACE]
+          param = parseParam(cfgFile)
+          tooFewParams = false
+        else
+          parse_error(cfgFile, "`#{apiParam[:BRACE]}' expected before #{param}")
+          # )ããã¡ã¤ã«æ«ã¾ã§èª­ã¿é£ã°ã
+          loop do
+            param = parseParam(cfgFile)
+            break if (param.nil? || param == ")")
+          end
+          break
+        end
+      end
+
+      # æå¾
+ããããã©ã¡ã¼ã¿ããã¹ã¦èª­ãã å¾ã®å¦ç
+      if param != ")"
+        begin
+          param = parseParam(cfgFile)
+          return(staticApi) if param.nil?	# ãã¡ã¤ã«æ«ã§ããã°ãªã¿ã¼ã³
+        end while param != ")"
+        parse_error(cfgFile, "too many parameters before `)'")
       end
     else
-        parse_error(cfgFile, "syntax error: #{@line}")
-    end
-    @line = ""
+      parse_error(cfgFile, "syntax error: #{@line}")
+      @line = ""
+    end
     return(staticApi)
+  end
+
+  def parseOpenBrace(cfgFile)
+    # {ã®èª­ã¿è¾¼ã¿
+    skipToToken(cfgFile)					# æ¬¡ã®æå­ã¾ã§èª­ã¿é£ã°ã
+    if (/^\{(.*)$/ =~ @line)
+      @line = $1
+    else
+      parse_error(cfgFile, "`{' expected before #{@line}")
+    end
   end
 
@@ -483,12 +599,8 @@
     cfgFiles = [ ConfigFile.new(cfgFileName) ]
     @line = ""
-    begin
+    loop do
       cfgFile = cfgFiles.last
-      while @line == ""									# ç©ºè¡ãèª­ã¿é£ã°ã
-        @line = cfgFile.getNextLine(false)
-        @line.sub!(/^[\s;]*/, "") unless @line.nil?		# å
-é ­ã®ç©ºç½ã¨";"ãåé¤
-      end
-
+
+      skipSpace(cfgFile, false)				# æ¹è¡ã¨ç©ºç½æå­ãèª­ã¿é£ã°ã
       if @line.nil?
         # ãã¡ã¤ã«æ«ã®å¦ç
@@ -497,11 +609,11 @@
           break								# ãã¼ã¹å¦ççµäº
         else
-          @line = ""
-          next								# å
+          @line = ""						# å
 ã®ãã¡ã¤ã«ã«æ»ã£ã¦ç¶ãã
         end
-      end
-
-      if /^#/ =~ @line
+      elsif /^;(.*)$/ =~ @line
+        # ;ã¯èª­ã¿é£ã°ã
+        @line = $1
+      elsif /^#/ =~ @line
         # ããªãã­ã»ããµãã£ã¬ã¯ãã£ããèª­ã
         case @line
@@ -509,5 +621,5 @@
           $includeFiles.push($1.strip)
         when /^#(ifdef|ifndef|if|endif|else|elif)\b/
-          directive = {:DIRECTIVE => @line.strip}
+          directive = { :DIRECTIVE => @line.strip }
           $cfgFileInfo.push(directive)
         else
@@ -515,25 +627,108 @@
         end
         @line = ""
+      elsif (/^([A-Z_][A-Z0-9_]*)\b(.*)$/ =~ @line)
+        apiName = $1
+        @line = $2
+
+        case apiName
+        when "KERNEL_DOMAIN"
+          if $supportDomain.nil?
+            parse_warning(cfgFile, "`KERNEL_DOMAIN' is not supported")
+          end
+          if !@@currentDomain.nil?
+            parse_error(cfgFile, "`DOMAIN' must not be nested")
+          end
+          @@currentDomain = "TDOM_KERNEL"
+          parseOpenBrace(cfgFile)
+          @@nestDC.push("domain")
+        when "DOMAIN"
+          if $supportDomain.nil?
+            parse_warning(cfgFile, "`DOMAIN' is not supported")
+          end
+          if !@@currentDomain.nil?
+            parse_error(cfgFile, "`DOMAIN' must not be nested")
+          end
+          domid = parseParam(cfgFile).sub(/^\((.+)\)$/m, "\\1").strip
+          if (/^[A-Za-z_]\w*$/ !~ domid)
+            parse_error(cfgFile, "`#{domid}' is illegal domain ID")
+          else
+            if !$domainId.has_key?(domid)
+              if $inputObjid.has_key?(domid)
+                # IDçªå·å
+¥åãã¡ã¤ã«ã«å®ç¾©ããã¦ããå ´å
+                $domainId[domid] = $inputObjid[domid]
+                if $domainId[domid] > 32
+                  error_exit("domain ID for `#{domid}' is too large")
+                end
+              else
+                $domainId[domid] = nil
+              end
+            end
+            @@currentDomain = domid
+          end
+          parseOpenBrace(cfgFile)
+          @@nestDC.push("domain")
+        when "CLASS"
+          if $supportClass.nil?
+            parse_warning(cfgFile, "`CLASS' is not supported")
+          end
+          if !@@currentClass.nil?
+            parse_error(cfgFile, "`CLASS' must not be nested")
+          end
+          @@currentClass = parseParam(cfgFile).sub(/^\((.+)\)$/m, "\\1").strip
+          @@classFile = cfgFile.getFileName
+          @@classLine = cfgFile.getLineNo
+          parseOpenBrace(cfgFile)
+          @@nestDC.push("class")
+        else
+          if $apiDefinition.has_key?(apiName)
+            # éçAPIã1ã¤èª­ã
+            staticApi = parseApi(cfgFile, apiName)
+            if staticApi.empty?
+              # ãã¡ã¤ã«æ«ãææ³ã¨ã©ã¼
+            elsif (staticApi[:APINAME] == "INCLUDE")
+              # INCLUDEã®å¦ç
+              includeFilePath = SearchFilePath(staticApi[:file])
+              if includeFilePath.nil?
+                parse_error(cfgFile, "`#{staticApi[:file]}' not found")
+              else
+                $dependencyFiles.push(includeFilePath)
+                cfgFiles.push(ConfigFile.new(includeFilePath))
+              end
+            else
+              # éçAPIã®å¦ç
+              if !@@currentDomain.nil?
+                staticApi[:DOMAIN] = @@currentDomain
+              end
+              if !@@currentClass.nil?
+                staticApi[:CLASS] = @@currentClass
+                staticApi[:CLASS_FILE_] = @@classFile
+                staticApi[:CLASS_LINE_] = @@classLine
+              end
+              staticApi[:INDEX] = (@@lastApiIndex += 1)
+              $cfgFileInfo.push(staticApi)
+            end
+          else
+            parse_error(cfgFile, "unknown static API: #{apiName}")
+          end
+        end
+      elsif (/^\}(.*)$/ =~ @line)
+        # }ã®å¦ç
+        if @@nestDC.size > 0
+          case @@nestDC.pop
+          when "domain"
+            @@currentDomain = nil
+          when "class"
+            @@currentClass = nil
+          end
+        else
+          error_exit("unexpected `}'")
+        end
+        @line = $1
       else
-        # éçAPIã1ã¤èª­ã
-        staticApi = parseApi(cfgFile)
-        if staticApi.empty?
-          # ææ³ã¨ã©ã¼
-        elsif (staticApi[:API] == "INCLUDE")
-          # INCLUDEã®å¦ç
-          includeFilePath = SearchFilePath(staticApi[:file])
-          if includeFilePath.nil?
-            parse_error(cfgFile, "`#{staticApi["file"]}' not found")
-          else
-            $dependencyFiles.push(includeFilePath)
-            cfgFiles.push(ConfigFile.new(includeFilePath))
-          end
-        else
-          # éçAPIã®å¦ç
-          staticApi[:INDEX] = (@@lastApiIndex += 1)
-          $cfgFileInfo.push(staticApi)
-        end
-      end
-    end while true
+        parse_error(cfgFile, "syntax error: #{@line}")
+        @line = ""
+      end
+    end
   end
 end
@@ -542,8 +737,40 @@
 #  cfg1_out.cã®çæ
 #
-def GenerateCfg1OutC
-  cfg1Out = GenFile.new(CFG1_OUT_C)
-
-  cfg1Out.append(<<EOS)
+module Cfg1OutC
+  #
+  #  éçAPIã®ãã¡ã¤ã«åã¨è¡çªå·ã®åºå
+  #
+  def self.OutLineNumber(cfgInfo)
+    @cfg1Out.add("#line #{cfgInfo[:_LINE_]} \"#{cfgInfo[:_FILE_]}\"")
+  end
+
+  #
+  #  ã¯ã©ã¹è¨è¿°ã®ãã¡ã¤ã«åã¨è¡çªå·ã®åºå
+  #
+  def self.OutClassLineNumber(cfgInfo)
+    @cfg1Out.add("#line #{cfgInfo[:CLASS_LINE_]} \"#{cfgInfo[:CLASS_FILE_]}\"")
+  end
+
+  #
+  #  ãã©ã¡ã¼ã¿ã«é¢ããå®ç¾©ã®åºå
+  #
+  def self.OutParamDef(param, index, apiParam, cfgInfo)
+    if apiParam.has_key?(:ID_DEF)
+      @cfg1Out.add("#define #{param}\t(<>)")
+    elsif apiParam.has_key?(:EXPTYPE)
+      OutLineNumber(cfgInfo)
+      @cfg1Out.add("const #{apiParam[:EXPTYPE]} #{CFG1_PREFIX}valueof_" \
+								"#{apiParam[:NAME]}_#{index} = " \
+								"(#{apiParam[:EXPTYPE]})(#{param});")
+    end
+  end
+
+  #
+  #  cfg1_out.cã®çæï¼ã¡ã¤ã³ã®å¦çï¼
+  #
+  def self.Generate
+    @cfg1Out = GenFile.new(CFG1_OUT_C)
+
+    @cfg1Out.append(<<EOS)
 /* #{CFG1_OUT_C} */
 #define TOPPERS_CFG1_OUT
@@ -551,10 +778,10 @@
 EOS
 
-  # ã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«
-  $includeFiles.each do |file|
-    cfg1Out.add("#include #{file}")
-  end
-
-  cfg1Out.append(<<EOS)
+    # ã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«
+    $includeFiles.each do |file|
+      @cfg1Out.add("#include #{file}")
+    end
+
+    @cfg1Out.add(<<EOS)
 
 #ifdef INT64_MAX
@@ -566,53 +793,74 @@
 #endif
 
-#include "target_cfg1_out.h"
+#include "#{CFG1_OUT_TARGET_H}"
 #include <limits.h>
 
 const uint32_t #{CFG1_MAGIC_NUM} = 0x12345678;
 const uint32_t #{CFG1_SIZEOF_SIGNED} = sizeof(signed_t);
-
 EOS
 
-  # å¤åå¾ã·ã³ãã«ã®å¦ç
-  $symbolValueTable.each do |symbolName, symbolData|
-    type = symbolData.has_key?(:SIGNED) ? "signed_t" : "unsigned_t"
-    if !symbolData[:CONDITION].nil?
-      cfg1Out.add("#if #{symbolData[:CONDITION]}")
-    end
-    cfg1Out.add("const #{type} #{CFG1_PREFIX}#{symbolName} = " \
-							"(#{type})(#{symbolData[:EXPR]});")
-    if !symbolData[:DEFAULT].nil?
-      cfg1Out.add("#else")
-      cfg1Out.add("const #{type} #{CFG1_PREFIX}#{symbolName} = " \
-							"(#{type})(#{symbolData[:DEFAULT]});")
-    end
-    if !symbolData[:CONDITION].nil?
-      cfg1Out.add("#endif")
-    end
-  end
-
-  # éçAPIï¼ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã®å¦ç
-  $cfgFileInfo.each do |cfgInfo|
-    if cfgInfo.has_key?(:DIRECTIVE)
-      cfg1Out.add2(cfgInfo[:DIRECTIVE])
-    else
-      apiDef = $apiDefinition[cfgInfo[:API]]
-      apiIndex = cfgInfo[:INDEX]
-      cfg1Out.add("#line #{cfgInfo[:_LINE_]} \"#{cfgInfo[:_FILE_]}\"")
-      cfg1Out.add("const unsigned_t #{CFG1_PREFIX}static_api_" \
+    # å¤åå¾ã·ã³ãã«ã®å¦ç
+    $symbolValueTable.each do |symbolName, symbolData|
+      if symbolData.has_key?(:BOOL) || symbolData.has_key?(:SIGNED)
+        type = "signed_t"
+      else
+        type = "unsigned_t"
+      end
+      if symbolData.has_key?(:CONDITION)
+        @cfg1Out.add("#if #{symbolData[:CONDITION]}")
+      end
+      @cfg1Out.add("const #{type} #{CFG1_PREFIX}#{symbolName} = " \
+								"(#{type})(#{symbolData[:EXPR]});")
+      if symbolData.has_key?(:ELSE_EXPR)
+        @cfg1Out.add("#else")
+        @cfg1Out.add("const #{type} #{CFG1_PREFIX}#{symbolName} = " \
+								"(#{type})(#{symbolData[:ELSE_EXPR]});")
+      end
+      if symbolData.has_key?(:CONDITION)
+        @cfg1Out.add("#endif")
+      end
+    end
+    @cfg1Out.add
+
+    # ãã¡ã¤ã³IDã®å®ç¾©ã®çæ
+    $domainId.each do |domainName, domainVal|
+      if domainVal > 0
+        @cfg1Out.add("#define #{domainName} #{domainVal}")
+      end
+    end
+    @cfg1Out.add
+
+    # éçAPIï¼ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã®å¦ç
+    $cfgFileInfo.each do |cfgInfo|
+      if cfgInfo.has_key?(:DIRECTIVE)
+        @cfg1Out.add2(cfgInfo[:DIRECTIVE])
+      else
+        apiDef = $apiDefinition[cfgInfo[:APINAME]]
+        apiIndex = cfgInfo[:INDEX]
+        OutLineNumber(cfgInfo)
+        @cfg1Out.add("const unsigned_t #{CFG1_PREFIX}static_api_" \
 										"#{apiIndex} = #{apiIndex};")
-      apiDef[:PARAM].each do |apiParam|
-        if apiParam.has_key?(:ID_DEF)
-          cfg1Out.add("#define #{cfgInfo[apiParam[:NAME]]}\t(<>)")
-        elsif (apiParam.has_key?(:SIGNED) || apiParam.has_key?(:UNSIGNED)) \
-										&& !cfgInfo[apiParam[:NAME]].nil?
-          type = apiParam.has_key?(:SIGNED) ? "signed_t" : "unsigned_t"
-          cfg1Out.add("#line #{cfgInfo[:_LINE_]} \"#{cfgInfo[:_FILE_]}\"")
-          cfg1Out.add("const #{type} #{CFG1_PREFIX}valueof_" \
-							"#{apiParam[:NAME]}_#{apiIndex} = " \
-							"(#{type})(#{cfgInfo[apiParam[:NAME]]});")
-        end
-      end
-      cfg1Out.add
+        apiDef[:PARAM].each do |apiParam|
+          next unless apiParam.has_key?(:NAME)
+          paramName = apiParam[:NAME]
+          next unless cfgInfo.has_key?(paramName)	# ãã©ã¡ã¼ã¿ããªãå ´å
+          paramData = cfgInfo[paramName]
+
+          if apiParam.has_key?(:LIST)
+            paramData.each.with_index(1) do |param, index|
+              OutParamDef(param, "#{apiIndex}_#{index}", apiParam, cfgInfo)
+            end
+          else
+            OutParamDef(paramData, "#{apiIndex}", apiParam, cfgInfo)
+          end
+        end
+        if cfgInfo.has_key?(:CLASS)
+          # ã¯ã©ã¹IDã®åå¾ã®ããã®å¦ç
+          OutClassLineNumber(cfgInfo)
+          @cfg1Out.add("const signed_t #{CFG1_PREFIX}valueof_CLASS_" \
+                      "#{apiIndex} = (signed_t)(#{cfgInfo[:CLASS]});")
+        end
+        @cfg1Out.add
+      end
     end
   end
@@ -644,4 +892,5 @@
   $dependencyFiles = $configFileNames.dup
   $includeFiles = []
+  $domainId = { "TDOM_KERNEL" => -1, "TDOM_NONE" => -2 }
   $configFileNames.each do |configFileName|
     CfgParser.new.parseFile(configFileName)
@@ -650,7 +899,24 @@
 
   #
+  #  ãã¡ã¤ã³IDã®å²å½ã¦å¦ç
+  #
+  nextDomainId = 1
+  $domainId.each do |domainName, domainVal|
+    if domainVal.nil?
+      while $domainId.has_value?(nextDomainId)
+        nextDomainId += 1
+      end
+      $domainId[domainName] = nextDomainId
+      if nextDomainId > 32
+        error_exit("too large number of user domains")
+      end
+      nextDomainId += 1
+    end
+  end
+
+  #
   #  cfg1_out.cã®çæ
   #
-  GenerateCfg1OutC()
+  Cfg1OutC::Generate()
 
   #
@@ -668,5 +934,5 @@
     end
 
-    depFile.print("#{CFG1_OUT_C} #{CFG1_OUT_DB}:")
+    depFile.print("#{CFG1_OUT_TIMESTAMP}:")
     $dependencyFiles.each do |fileName|
       depFile.print(" #{fileName}")
@@ -690,4 +956,5 @@
       db[:cfgFileInfo] = $cfgFileInfo
       db[:includeFiles] = $includeFiles
+      db[:domainId] = $domainId
     end
   end
Index: asp3_wo_tecs/trunk/cfg/pass2.rb
===================================================================
--- asp3_wo_tecs/trunk/cfg/pass2.rb	(revision 305)
+++ asp3_wo_tecs/trunk/cfg/pass2.rb	(revision 306)
@@ -51,5 +51,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 #
-#  $Id: pass2.rb 32 2016-01-31 14:45:59Z ertl-hiro $
+#  $Id: pass2.rb 105 2016-03-12 07:55:48Z ertl-hiro $
 #
 
@@ -61,204 +61,301 @@
 #  ãã¹1ã®çæç©ã®èª­ã¿è¾¼ã¿
 #
-def ReadCfg1Out
-  # cfg1_out.symsã®èª­ã¿è¾¼ã¿
-  symbolAddress = ReadSymbolFile(CFG1_OUT_SYMS)
-
-  # cfg1_out.srecã®èª­ã¿è¾¼ã¿
-  begin
-    cfg1SRec = SRecord.new(CFG1_OUT_SREC)
-  rescue Errno::ENOENT, Errno::EACCES => ex
-    abort(ex.message)
-  end
-
-  # ãã¸ãã¯ãã³ãã¼ã®åå¾
-  if symbolAddress.has_key?(CFG1_MAGIC_NUM)
-    $asmLabel = ""
-    cfg1_prefix = CFG1_PREFIX
-  elsif symbolAddress.has_key?("_" + CFG1_MAGIC_NUM)
-    $asmLabel = "_"
-    cfg1_prefix = "_" + CFG1_PREFIX
-  else
-    error_exit("`#{CFG1_MAGIC_NUM}' is not found in `#{CFG1_OUT_SYMS}'")
-  end
-
-  magicNumberData = cfg1SRec.get_data(symbolAddress \
-							[$asmLabel + CFG1_MAGIC_NUM], 4)
-  if (magicNumberData == "12345678")
-    $bLittleEndian = false
-  elsif (magicNumberData == "78563412")
-    $bLittleEndian = true
-  else
-    error_exit("`#{CFG1_MAGIC_NUM}' is invalid in `#{CFG1_OUT_SREC}'")
-  end
-
-  # åºå®åºåããå¤æ°ã®åå¾
-  $sizeOfSigned = cfg1SRec.get_value(symbolAddress \
-							[$asmLabel + CFG1_SIZEOF_SIGNED], 4, false)
-
-  # å¤åå¾ã·ã³ãã«ã®åå¾
-  $symbolValueTable.each do |symbolName, symbolData|
-    symbol = cfg1_prefix + symbolName
-    if symbolAddress.has_key?(symbol)
-      value = cfg1SRec.get_value(symbolAddress[symbol], \
-							$sizeOfSigned, symbolData.has_key?(:SIGNED))
-      if !value.nil?
-        symbolData[:VALUE] = value
-      end
-    end
-  end
-
-  #
-  #  IDçªå·å
-¥åãã¡ã¤ã«ã®åãè¾¼ã¿
-  #
-  $inputObjid = {}
-  if !$idInputFileName.nil?
+module Cfg1Out
+  #
+  #  Sã¬ã³ã¼ããã¡ã¤ã«ããã·ã³ãã«ã®å¤ãåãåºã
+  #
+  def self.GetSymbolValue(symbol, size, signed)
+    if @symbolAddress.has_key?(symbol)
+      return(@cfg1SRec.get_value(@symbolAddress[symbol], size, signed))
+    else
+      return(nil)
+    end
+  end
+
+  #
+  #  ãã¹1ã®çæç©ã®èª­ã¿è¾¼ã¿ï¼ã¡ã¤ã³ã®å¦çï¼
+  #
+  def self.Read
+    # cfg1_out.symsã®èª­ã¿è¾¼ã¿
+    @symbolAddress = ReadSymbolFile(CFG1_OUT_SYMS)
+
+    # cfg1_out.srecã®èª­ã¿è¾¼ã¿
     begin
-      idInputFile = File.open($idInputFileName)
+      @cfg1SRec = SRecord.new(CFG1_OUT_SREC)
     rescue Errno::ENOENT, Errno::EACCES => ex
       abort(ex.message)
     end
 
-    idInputFile.each do |line|
-      ( objidName, objidNumber ) = line.split(/\s+/)
-      $inputObjid[objidName] = objidNumber.to_i
-    end
-
-    idInputFile.close
-  end
-
-  #
-  #  ããã·ã¥ã®åæå
-  #
-  $cfgData = {}
-  objidValue = {}
-  $apiDefinition.each do |apiName, apiDef|
-    if apiDef.has_key?(:API)
-      $cfgData[apiDef[:API].to_sym] = {}
-    end
-    apiDef[:PARAM].each do |apiParam|
-      if apiParam.has_key?(:NAME) && apiParam.has_key?(:ID_DEF)
-        objidValue[apiParam[:NAME]] = {}
-      end
-    end
-  end
-
-  #
-  #  ãªãã¸ã§ã¯ãIDã®å²ãå½ã¦
-  #
-  # IDçªå·å²ãå½ã¦ã®åå¦ç
-  $cfgFileInfo.each do |cfgInfo|
-    # ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã¨æ¶ããéçAPIã¯èª­ã¿é£ã°ã
-    next if (cfgInfo.has_key?(:DIRECTIVE) || !symbolAddress.has_key?( \
-							"#{cfg1_prefix}static_api_#{cfgInfo[:INDEX]}"))
-
-    apiDef = $apiDefinition[cfgInfo[:API]]
-    apiDef[:PARAM].each do |apiParam|
-      if apiParam.has_key?(:NAME) && apiParam.has_key?(:ID_DEF)
-        objidName = apiParam[:NAME]
-        objidData = cfgInfo[objidName]
-        if $inputObjid.has_key?(objidData)
-          objidValue[objidName][objidData] = $inputObjid[objidData]
+    # ãã¸ãã¯ãã³ãã¼ã®åå¾
+    if @symbolAddress.has_key?(CFG1_MAGIC_NUM)
+      $asmLabel = ""
+      $cfg1_prefix = CFG1_PREFIX
+    elsif @symbolAddress.has_key?("_" + CFG1_MAGIC_NUM)
+      $asmLabel = "_"
+      $cfg1_prefix = "_" + CFG1_PREFIX
+    else
+      error_exit("`#{CFG1_MAGIC_NUM}' is not found in `#{CFG1_OUT_SYMS}'")
+    end
+
+    magicNumberData = @cfg1SRec.get_data(@symbolAddress \
+							[$asmLabel + CFG1_MAGIC_NUM], 4)
+    if (magicNumberData == "12345678")
+      $endianLittle = false
+    elsif (magicNumberData == "78563412")
+      $endianLittle = true
+    else
+      error_exit("`#{CFG1_MAGIC_NUM}' is invalid in `#{CFG1_OUT_SREC}'")
+    end
+
+    # åºå®åºåããå¤æ°ã®åå¾
+    $sizeOfSigned = GetSymbolValue($asmLabel + CFG1_SIZEOF_SIGNED, 4, false)
+
+    # å¤åå¾ã·ã³ãã«ã®åå¾
+    $symbolValueTable.each do |symbolName, symbolData|
+      symbol = $cfg1_prefix + symbolName
+      if symbolData.has_key?(:BOOL)
+        value = GetSymbolValue(symbol, $sizeOfSigned, true)
+        if !value.nil?
+          # Cè¨èªã®çå½å¤ãRubyã®çå½å¤ã«å¤æãã¦åãè¾¼ã
+          symbolData[:VALUE] = (value != 0)
+        end
+      else
+        value = GetSymbolValue(symbol, $sizeOfSigned, \
+										symbolData.has_key?(:SIGNED))
+        if !value.nil?
+          symbolData[:VALUE] = value
+        end
+      end
+    end
+
+    #
+    #  ããã·ã¥ã®åæå
+    #
+    $cfgData = {}
+    @objidValues = {}
+    $apiDefinition.each do |apiName, apiDef|
+      if apiDef.has_key?(:API)
+        if !$cfgData.has_key?(apiDef[:API].to_sym)
+          $cfgData[apiDef[:API].to_sym] = {}
+        end
+      end
+      apiDef[:PARAM].each do |apiParam|
+        if apiParam.has_key?(:NAME) && apiParam.has_key?(:ID_DEF)
+          @objidValues[apiParam[:NAME]] = {}
+        end
+      end
+    end
+
+    #
+    #  ãã¡ã¤ã³çæãã¼ã¿ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¼ã¿ï¼$cfgDataï¼ã«æ ¼ç´
+    #
+    $cfgData[:CRE_DOM] = {}
+    $domainId.each do |domainName, domainVal|
+      domid = NumStr.new(domainVal, domainName)
+      $cfgData[:CRE_DOM][domainVal] = { :domid => domid }
+    end
+
+    ReadPhase(nil)
+  end
+
+  #
+  #  ãã©ã¡ã¼ã¿ã®å¤ãåãåºã
+  #
+  def self.GetParamValue(paramName, param, apiIndex, index, apiParam, cfgInfo)
+    if apiParam.has_key?(:ID_DEF)				# ãªãã¸ã§ã¯ãè­å¥åï¼å®ç¾©ï¼
+      value = @objidValues[paramName][param]
+    elsif apiParam.has_key?(:ID_REF)			# ãªãã¸ã§ã¯ãè­å¥åï¼åç
+§ï¼
+      if @objidValues[paramName].has_key?(param)
+        value = @objidValues[paramName][param]
+      else
+        error("#{apiDef.has_key?(:KEYPAR) ? "E_NOEXS" : "E_ID"}: " \
+					"`#{param}' in #{cfgInfo[:APINAME]} is not defined", \
+					"#{cfgInfo[:_FILE_]}:#{cfgInfo[:_LINE_]}:")
+        value = nil
+      end
+    elsif apiParam.has_key?(:EXPTYPE)			# æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿
+      if apiIndex.nil?
+        if param.is_a?(NumStr)
+          return(param)
         else
-          objidValue[objidName][objidData] = nil
-        end
-      end
-    end
-  end
-
-  # IDçªå·ã®å²ãå½ã¦å¦ç
-  objidValue.each do |objidName, objidList|
-    # æªä½¿ç¨ã®IDçªå·ã®ãªã¹ãï¼ä½¿ç¨ãããã®ããæ¶ãã¦ããï¼
-    unusedObjidList = (1.upto(objidList.keys.size)).to_a
-
-    # å²ãå½ã¦æ¸ã¿ã®IDçªå·ã®å¦ç
-    objidList.each do |objidData, objidNumber|
-      if $inputObjid.has_key?(objidData)
-        objidIndex = unusedObjidList.index($inputObjid[objidData])
-        if objidIndex.nil?
-          # IDçªå·å
+          return(NumStr.new(param))
+        end
+      else
+        symbol = "#{$cfg1_prefix}valueof_#{paramName}_#{apiIndex}#{index}"
+        value = GetSymbolValue(symbol, $sizeOfSigned, \
+									apiParam.has_key?(:SIGNED))
+      end
+    else										# ä¸è¬å®æ°å¼ï¼æå­åãã©ã¡ã¼ã¿
+      return(param)
+    end
+    return(NumStr.new(value, param))
+  end
+
+  #
+  #  æå®ãããã§ã¼ãºã®ããã®ãã¹1ã®çæç©ã®èª­ã¿è¾¼ã¿
+  #
+  def self.ReadPhase(phase)
+    #
+    #  ãªãã¸ã§ã¯ãIDã®å²å½ã¦
+    #
+    # å²ãå½ã¦ããªãã¸ã§ã¯ãIDã¯ï¼@objidValuesã«ä¿æããï¼@objidValuesã¯ï¼
+    # 2éã®ããã·ã¥ï¼ããã·ã¥ã®ããã·ã¥ï¼ã§ããï¼
+    #
+    # å
+·ä½çã«ã¯ï¼@objidValuesã¯ï¼ãªãã¸ã§ã¯ãIDã®ãã©ã¡ã¼ã¿åï¼ä¾ãã°ï¼ã»
+    # ããã©IDã§ããã°"semid"ï¼ãããä¿æããå¤æ°åã¯ï¼objidParamNameã¨ã
+    # ãï¼ãã­ã¼ã¨ãï¼ãã®ãªãã¸ã§ã¯ãIDã®å²å½ã¦è¡¨ï¼ãããä¿æããå¤æ°å
+    # ã¯ï¼objidListã¨ããï¼ãå¤ã¨ããããã·ã¥ã§ããï¼ãªãã¸ã§ã¯ãIDã®å²å½
+    # ã¦è¡¨ã¯ï¼ãªãã¸ã§ã¯ãåï¼ãããä¿æããå¤æ°åã¯ï¼objNameã¨ããï¼ãã­ã¼
+    # ã¨ãï¼ãã®IDçªå·ï¼ãããä¿æããå¤æ°åã¯ï¼objidNumberã¨ããï¼ãå¤ã¨
+    # ããããã·ã¥ã§ããï¼
+    #
+    # ä¾ãã°ï¼ã»ããã©SEM1ã®IDçªå·ã1ã®å ´åã«ã¯ï¼æ¬¡ã®ããã«è¨­å®ãããï¼
+    #   @objidValues["semid"]["SEM1"] == 1
+    #
+
+    # IDçªå·å²ãå½ã¦ã®åå¦ç
+    objidParamNameList = []
+    $cfgFileInfo.each do |cfgInfo|
+      # ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã¯èª­ã¿é£ã°ã
+      next if cfgInfo.has_key?(:DIRECTIVE)
+
+      apiDef = $apiDefinition[cfgInfo[:APINAME]]
+      # ç°ãªããã§ã¼ãºã®éçAPIã¯èª­ã¿é£ã°ã
+      next if apiDef[:PHASE] != phase
+
+      apiIndex = cfgInfo[:INDEX]
+      if !apiIndex.nil?
+        # ã·ã³ãã«ãã¡ã¤ã«ã«éçAPIã®ã¤ã³ããã¯ã¹ãå­å¨ããªããã°èª­ã¿é£
+        # ã°ãï¼ifdefç­ã§æ¶ããéçAPIï¼
+        symbol = "#{$cfg1_prefix}static_api_#{apiIndex}"
+        next unless @symbolAddress.has_key?(symbol)
+      end
+
+      apiDef[:PARAM].each do |apiParam|
+        if apiParam.has_key?(:NAME) && apiParam.has_key?(:ID_DEF)
+          objidParamName = apiParam[:NAME]
+          objName = cfgInfo[objidParamName]
+          if $inputObjid.has_key?(objName)
+            # IDçªå·å
+¥åãã¡ã¤ã«ã«å®ç¾©ããã¦ããå ´å
+            @objidValues[objidParamName][objName] = $inputObjid[objName]
+          else
+            @objidValues[objidParamName][objName] = nil
+          end
+          objidParamNameList.push(objidParamName)
+        end
+      end
+    end
+
+    # IDçªå·ã®å²å½ã¦å¦ç
+    objidParamNameList.each do |objidParamName|
+      objidList = @objidValues[objidParamName]
+
+      # æªä½¿ç¨ã®IDçªå·ã®ãªã¹ãï¼ä½¿ç¨ãããã®ããæ¶ãã¦ããï¼
+      unusedObjidList = (1.upto(objidList.keys.size)).to_a
+
+      # å²ãå½ã¦æ¸ã¿ã®IDçªå·ã®å¦ç
+      objidList.each do |objName, objidNumber|
+        if $inputObjid.has_key?(objName)
+          objidIndex = unusedObjidList.index($inputObjid[objName])
+          if objidIndex.nil?
+            # IDçªå·å
 ¥åãã¡ã¤ã«ã§æå®ãããå¤ãä¸æ­£
-          error_exit("value of `#{objidData}' in ID input file is illegal")
+            error_exit("value of `#{objName}' in ID input file is illegal")
+          else
+            # æªä½¿ç¨ã®IDçªå·ã®ãªã¹ãããåé¤
+            unusedObjidList.delete_at(objidIndex)
+          end
+        end
+      end
+
+      # IDçªå·ã®å²å½ã¦
+      objidList.each do |objName, objidNumber|
+        if objidList[objName].nil?
+          # ä»¥ä¸ã§ï¼@objidValuesãæ¸ãæãã¦ãã
+          objidList[objName] = unusedObjidList.shift
+        end
+      end
+    end
+
+    #
+    #  éçAPIãã¼ã¿ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¼ã¿ï¼$cfgDataï¼ã«æ ¼ç´
+    #
+    $cfgFileInfo.each do |cfgInfo|
+      # ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã¯èª­ã¿é£ã°ã
+      next if cfgInfo.has_key?(:DIRECTIVE)
+
+      apiDef = $apiDefinition[cfgInfo[:APINAME]]
+      # ç°ãªããã§ã¼ãºã®éçAPIã¯èª­ã¿é£ã°ã
+      next if apiDef[:PHASE] != phase
+
+      apiSym = apiDef[:API].to_sym
+      apiIndex = cfgInfo[:INDEX]
+      if !apiIndex.nil?
+        # ã·ã³ãã«ãã¡ã¤ã«ã«éçAPIã®ã¤ã³ããã¯ã¹ãå­å¨ããªããã°èª­ã¿é£
+        # ã°ãï¼ifdefç­ã§æ¶ããéçAPIï¼
+        symbol = "#{$cfg1_prefix}static_api_#{apiIndex}"
+        next unless @symbolAddress.has_key?(symbol)
+      end
+
+      # ãã©ã¡ã¼ã¿ã®å¤ãããã·ã¥å½¢å¼ã«æ ¼ç´
+      params = {}
+      apiDef[:PARAM].each do |apiParam|
+        next unless apiParam.has_key?(:NAME)
+        paramName = apiParam[:NAME]
+        next unless cfgInfo.has_key?(paramName)		# ãã©ã¡ã¼ã¿ããªãå ´å
+        paramData = cfgInfo[paramName]
+
+        if apiParam.has_key?(:LIST)
+          params[paramName.to_sym] = []
+          paramData.each.with_index(1) do |param, index|
+            params[paramName.to_sym].push(GetParamValue(paramName, param, \
+								apiIndex, "_#{index}", apiParam, cfgInfo))
+          end
         else
-          # æªä½¿ç¨ã®IDçªå·ã®ãªã¹ãããåé¤
-          unusedObjidList.delete_at(objidIndex)
-        end
-      end
-    end
-
-    # IDçªå·ã®å²ãå½ã¦
-    objidList.each do |objidData, objidNumber|
-      if objidList[objidData].nil?
-        # ä»¥ä¸ã§ï¼objidValueãæ¸ãæãã¦ãã
-        objidList[objidData] = unusedObjidList.shift
-      end
-    end
-  end
-
-  #
-  #  éçAPIãã¼ã¿ãããã·ã¥å½¢å¼ã¸å¤æ
-  #
-  $cfgFileInfo.each do |cfgInfo|
-    # ããªãã­ã»ããµãã£ã¬ã¯ãã£ãã¯èª­ã¿é£ã°ã
-    next if cfgInfo.has_key?(:DIRECTIVE)
-
-    apiDef = $apiDefinition[cfgInfo[:API]]
-    apiSym = apiDef[:API].to_sym
-    apiIndex = cfgInfo[:INDEX]
-
-    # ã·ã³ãã«ãã¡ã¤ã«ã«éçAPIã®ã¤ã³ããã¯ã¹ãå­å¨ããªããã°èª­ã¿é£ã°ã
-    #ï¼ifdefç­ã§æ¶ããéçAPIï¼
-    next unless symbolAddress.has_key?("#{cfg1_prefix}static_api_#{apiIndex}")
-
-    # ãã©ã¡ã¼ã¿ã®å¤ãããã·ã¥å½¢å¼ã«æ ¼ç´
-    params = {}
-    apiDef[:PARAM].each do |apiParam|
-      if apiParam.has_key?(:NAME)
-        paramName = apiParam[:NAME]
-        if cfgInfo.has_key?(paramName)
-          paramData = cfgInfo[paramName]
-          value = nil
-          if apiParam.has_key?(:ID_DEF)			# ãªãã¸ã§ã¯ãè­å¥åï¼å®ç¾©ï¼
-            value = objidValue[paramName][paramData]
-          elsif apiParam.has_key?(:ID_REF)		# ãªãã¸ã§ã¯ãè­å¥åï¼åç
-§ï¼
-            if objidValue[paramName].has_key?(paramData)
-              value = objidValue[paramName][paramData]
-            else
-              error("E_OBJ: `#{paramData}' in #{cfgInfo[:API]} is not defined",
+          params[paramName.to_sym] = GetParamValue(paramName, paramData, \
+										apiIndex, "", apiParam, cfgInfo)
+        end
+      end
+
+      # ãã¡ã¤ã³IDãè¿½å 
+      if cfgInfo.has_key?(:DOMAIN)
+        domainName = cfgInfo[:DOMAIN]
+        params[:domain] = $domainId[domainName]
+      end
+
+      # ã¯ã©ã¹IDãè¿½å 
+      if cfgInfo.has_key?(:CLASS)
+        if apiIndex.nil?
+          params[:class] = cfgInfo[:CLASS]
+        else
+          symbol = "#{$cfg1_prefix}valueof_CLASS_#{apiIndex}"
+          value = GetSymbolValue(symbol, $sizeOfSigned, true)
+          params[:class] = NumStr.new(value, cfgInfo[:CLASS])
+        end
+      end
+
+      # APIåï¼ãã¡ã¤ã«åï¼è¡çªå·ãè¿½å 
+      params[:apiname] = cfgInfo[:APINAME]
+      params[:_file_] = cfgInfo[:_FILE_]
+      params[:_line_] = cfgInfo[:_LINE_]
+
+      # ç»é²ã­ã¼ãæ±ºå®ãã
+      if apiDef.has_key?(:KEYPAR)
+        keyParam = params[apiDef[:KEYPAR].to_sym]
+        key = keyParam.val
+        if $cfgData[apiSym].has_key?(key)
+          # ç»é²ã­ã¼ã®éè¤
+          error("E_OBJ: #{apiDef[:KEYPAR]} `#{keyParam}' " \
+								"is duplicated in #{cfgInfo[:APINAME]}",
 								"#{cfgInfo[:_FILE_]}:#{cfgInfo[:_LINE_]}:")
-            end
-          elsif apiParam.has_key?(:SIGNED) || apiParam.has_key?(:UNSIGNED)
-            symbol = "#{cfg1_prefix}valueof_#{paramName}_#{apiIndex}"
-            if (symbolAddress.has_key?(symbol))
-              value = cfg1SRec.get_value(symbolAddress[symbol], \
-							$sizeOfSigned, apiParam.has_key?(:SIGNED))
-            end
-          end
-          params[paramName.to_sym] = StrVal.new(paramData, value)
-        end
-      end
-    end
-
-	# ç»é²ã­ã¼ãæ±ºå®ãã
-    if apiDef.has_key?(:KEYPAR)
-      keyParam = params[apiDef[:KEYPAR].to_sym]
-      key = keyParam.val
-      if $cfgData[apiSym].has_key?(key)
-		# ç»é²ã­ã¼ã®éè¤
-        error("E_OBJ: #{apiDef[:KEYPAR]} `#{keyParam}'" \
-								" is duplicaed in #{cfgInfo[:API]}",
-								"#{cfgInfo[:_FILE_]}:#{cfgInfo[:_LINE_]}:")
-      end
-    else
-      key = $cfgData[apiSym].count + 1
-    end
-
-    # APIåï¼ãã¡ã¤ã«åï¼è¡çªå·ãè¿½å 
-    params[:apiname] = cfgInfo[:API]
-    params[:_file_] = cfgInfo[:_FILE_]
-    params[:_line_] = cfgInfo[:_LINE_]
-    $cfgData[apiSym][key] = params
+        end
+      else
+        key = $cfgData[apiSym].count + 1
+      end
+      $cfgData[apiSym][key] = params
+    end
   end
 
@@ -266,9 +363,9 @@
   #  IDçªå·åºåãã¡ã¤ã«ã®çæ
   #
-  if !$idOutputFileName.nil?
-    idOutputFile = GenFile.new($idOutputFileName)
-    objidValue.each do |objidName, objidList|
-      objidList.each do |objidData, objidNumber|
-        idOutputFile.add("#{objidData} #{objidNumber}")
+  def self.OutputId(fileName)
+    idOutputFile = GenFile.new(fileName)
+    @objidValues.each do |objidParamName, objidList|
+      objidList.each do |objName, objidNumber|
+        idOutputFile.add("#{objName} #{objidNumber}")
       end
     end
@@ -290,10 +387,12 @@
     $cfgFileInfo = db[:cfgFileInfo]
     $includeFiles = db[:includeFiles]
-  end
+    $domainId = db[:domainId]
+  end
+  $cfg2Data = {}
 
   #
   #  ãã¹1ã®çæç©ãèª­ã¿è¾¼ã
   #
-  ReadCfg1Out()
+  Cfg1Out.Read()
   abort if $errorFlag					# ã¨ã©ã¼çºçæã¯abortãã
 
@@ -307,5 +406,16 @@
   #
   $trbFileNames.each do |trbFileName|
+    if /^(.+):(\w+)$/ =~ trbFileName
+      trbFileName = $1
+      Cfg1Out.ReadPhase($2.to_sym)
+    end
     IncludeTrb(trbFileName)
+  end
+
+  #
+  #  IDçªå·åºåãã¡ã¤ã«ã®çæ
+  #
+  if !$idOutputFileName.nil?
+    Cfg1Out.OutputId($idOutputFileName)
   end
 
@@ -323,5 +433,6 @@
       db[:cfgData] = $cfgData
       db[:asmLabel] = $asmLabel
-      db[:bLittleEndian] = $bLittleEndian
+      db[:endianLittle] = $endianLittle
+      db[:cfg2Data] = $cfg2Data
     end
   end
Index: asp3_wo_tecs/trunk/configure.rb
===================================================================
--- asp3_wo_tecs/trunk/configure.rb	(revision 305)
+++ asp3_wo_tecs/trunk/configure.rb	(revision 306)
@@ -54,5 +54,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: configure.rb 585 2016-02-05 10:58:56Z ertl-hiro $
+#  $Id: configure.rb 626 2016-02-12 13:46:32Z ertl-hiro $
 # 
 
@@ -227,16 +227,10 @@
   $appldirs.push("\$(SRCDIR)/sample")
 end
-if $applname.nil?
-  $applname = "sample1"
-end
+$applname ||= "sample1"
 if $option_t.nil?
   $applobjs.unshift($applname + ".o")
 end
-if $cfgfile.nil?
-  $cfgfile = $applname + ".cfg"
-end
-if $cdlfile.nil?
-  $cdlfile = $applname + ".cdl"
-end
+$cfgfile ||= $applname + ".cfg"
+$cdlfile ||= $applname + ".cdl"
 if $srcdir.nil?
   # ã½ã¼ã¹ãã£ã¬ã¯ããªåãåãåºã
@@ -252,13 +246,7 @@
   $srcabsdir = Shell.new.cwd + "/" + $srcdir
 end
-if $tempmakefile.nil?
-  $tempmakefile = $srcdir + "/sample/Makefile"
-end
-if $cfg.nil?
-  $cfg = $ruby + " \$(SRCDIR)/cfg/cfg.rb"
-end
-if $tecsgen.nil?
-  $tecsgen = $ruby + " \$(SRCDIR)/tecsgen/tecsgen.rb"
-end
+$tempmakefile ||= $srcdir + "/sample/Makefile"
+$cfg ||= $ruby + " \$(SRCDIR)/cfg/cfg.rb"
+$tecsgen ||= $ruby + " \$(SRCDIR)/tecsgen/tecsgen.rb"
 
 #
Index: asp3_wo_tecs/trunk/doc/asp_spec.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/asp_spec.txt	(revision 305)
+++ asp3_wo_tecs/trunk/doc/asp_spec.txt	(revision 306)
@@ -2,6 +2,6 @@
 		TOPPERS/ASP3ã«ã¼ãã«ã®ä»æ§æ¦è¦
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.0
-		æçµæ´æ°: 2016å¹´1æ10æ¥
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1
+		æçµæ´æ°: 2016å¹´4æ3æ¥
 
 ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ï¼TOPPERS/ASPã«ã¼ãã« Release
@@ -67,5 +67,5 @@
  ã®è²¬ä»»ãè² ããªãï¼
  
- $Id: asp_spec.txt 493 2016-01-10 07:17:13Z ertl-hiro $
+ $Id: asp_spec.txt 747 2016-05-13 08:18:21Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -130,5 +130,6 @@
 	(4-14) ã·ã¹ãã æå»ã®è¨­å®æ©è½ã®ãã©ã¡ã¼ã¿ã®å¤æ´
 	(4-15) å¨æãã³ãã©ã®ä»æ§å¤æ´
-	(4-16) ã¢ããªã±ã¼ã·ã§ã³åãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã®æ§æ
+	(4-16) éçAPIã®ãã©ã¡ã¼ã¿ã®çç¥
+	(4-17) ã¢ããªã±ã¼ã·ã§ã³åãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã®æ§æ
 ã»ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³å¦çã®è¦ç´ã
 ã»æ¡å¼µããã±ã¼ã¸ã®ãµãã¼ã
@@ -153,5 +154,5 @@
 
 [6] TOPPERSãã­ã¸ã§ã¯ã: TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼çµ±åä»æ§æ¸ï¼
-	Release 3.B.0ï¼æçµæ´æ°: 2015å¹´6æ29æ¥ï¼
+	Release 3.0.0ï¼æçµæ´æ°: 2016å¹´2æ7æ¥ï¼
 
 âãã®ãã­ã¥ã¡ã³ãã®èª­ã¿æ¹
@@ -820,5 +821,17 @@
 èµ·åä½ç¸ã§æå®ããç¸å¯¾æéå¾ã¨ãã¦ããï¼
 
-(4-16) ã¢ããªã±ã¼ã·ã§ã³åãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã®æ§æ
+(4-16) éçAPIã®ãã©ã¡ã¼ã¿ã®çç¥
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼éçAPIã®ãã©ã¡ã¼ã¿ã®ä¸­ã§ï¼NULLãæå®ããã¨èªåå²ä»ã
+ã«ãªãã¡ã¢ãªé åã®å
+é ­çªå°ã¨ï¼NULLããæå®ã§ããªãç®¡çé åã®å
+é ­çªå°ã¯ï¼
+è¨è¿°ãçç¥ã§ãããã®ã¨ããï¼ã¾ãï¼åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ä»¥å¤ã®ãã¥ã¼
+ããã¯ã¹ãçæããCRE_MTXã§ï¼ä¸éåªå
+åº¦ï¼ceilpriï¼ã®è¨è¿°ãçç¥ã§ããã
+ã®ã¨ããï¼
+
+(4-17) ã¢ããªã±ã¼ã·ã§ã³åãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã®æ§æ
 
 ã«ã¼ãã«ãå¼ã³åºãã¢ããªã±ã¼ã·ã§ã³ããã¯kernel.hãï¼SILãå¼ã³åºãã¢ããª
Index: asp3_wo_tecs/trunk/doc/configurator.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/configurator.txt	(revision 305)
+++ asp3_wo_tecs/trunk/doc/configurator.txt	(revision 306)
@@ -3,6 +3,6 @@
 		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ä»æ§
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.0.0
-		æçµæ´æ°: 2015å¹´8æ8æ¥
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1.0
+		æçµæ´æ°: 2016å¹´2æ5æ¥
 
 ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãæ¨æºçã«
@@ -17,5 +17,5 @@
      Advanced Standard Profile Kernel
 
- Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
              Graduate School of Information Science, Nagoya Univ., JAPAN
  
@@ -64,5 +64,5 @@
  ã®è²¬ä»»ãè² ããªãï¼
  
- $Id: configurator.txt 431 2015-08-08 12:05:02Z ertl-hiro $
+ $Id: configurator.txt 724 2016-04-02 21:36:23Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -93,4 +93,19 @@
 		4.5.10 ã¢ã©ã¼ã éç¥ã«é¢ããå®ç¾©
 	4.6 éç¥ãã³ãã©ã®çæ
+		4.6.1 å¤æ°ã®è¨­å®ã«ããã¤ãã³ãéç¥
+		4.6.2 å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããã¤ãã³ãã®éç¥
+		4.6.3 ã¿ã¹ã¯ã®èµ·åã«ããã¤ãã³ãéç¥
+		4.6.4 ã¿ã¹ã¯ã®èµ·åºã«ããã¤ãã³ãéç¥
+		4.6.5 ã»ããã©ã®è¿å´ã«ããã¤ãã³ãéç¥
+		4.6.6 ã¤ãã³ããã©ã°ã®ã»ããã«ããã¤ãã³ãéç¥
+		4.6.7 ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¤ãã³ãéç¥
+		4.6.8 å¤æ°ã®è¨­å®ã«ããã¨ã©ã¼éç¥
+		4.6.9 å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼éç¥
+		4.6.10 ã¿ã¹ã¯ã®èµ·åã«ããã¨ã©ã¼éç¥
+		4.6.11 ã¿ã¹ã¯ã®èµ·åºã«ããã¨ã©ã¼éç¥
+		4.6.12 ã»ããã©ã®è¿å´ã«ããã¨ã©ã¼éç¥
+		4.6.13 ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼éç¥
+		4.6.14 ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼éç¥
+		4.6.15 ã¨ã©ã¼æ¡ä»¶
 	4.7 å²è¾¼ã¿ã«é¢ããå®ç¾©
 		4.7.1 å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ããå®ç¾©
@@ -248,8 +263,9 @@
 4.4 ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°ã®å®ç¾©
 
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«å¯¾ãããªãã·ã§ã³æå®ï¼--external-idï¼ã«ããï¼ã³ã³ãã£
-ã®ã¥ã¬ã¼ã¿ãIDçªå·ãå²ãä»ãããªãã¸ã§ã¯ãã®ååã®æ«å°¾ã«"_id"ãä»å ãã
-ååã®å¤æ°ãçæããï¼å¤æ°ã¯ï¼constå±æ§ãä»å ããIDåã®å¤æ°ã¨ãï¼å²ãä»
-ããIDçªå·ãå¤ã¨ããï¼ä¾ãã°ï¼æ¬¡ã®ãããªè¨è¿°ãçæããï¼
+USE_EXTERNAL_IDãå®ç¾©ããã¦ããå ´åï¼cfg1_out.cãã³ã³ãã¤ã«ããéã®ã³ã³
+ãã¤ã«ãªãã·ã§ã³ã«ããå®ç¾©ãããã¨ãæ³å®ï¼ã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãID
+çªå·ãå²ãä»ãããªãã¸ã§ã¯ãã®ååã®æ«å°¾ã«"_id"ãä»å ããååã®å¤æ°ãç
+æããï¼å¤æ°ã¯ï¼constå±æ§ãä»å ããIDåã®å¤æ°ã¨ãï¼å²ãä»ããIDçªå·ãå¤
+ã¨ããï¼ä¾ãã°ï¼æ¬¡ã®ãããªè¨è¿°ãçæããï¼
 
 const ID TASK1_id = 1;
@@ -763,5 +779,5 @@
 ã»(0 < cyctim && cyctim <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2397ï¼½
 ã»(0 <= cycphs && cycphs <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2399ï¼½
-ã»ãã®ä»ï¼éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼ï¼4.6.13ç¯ï¼ãåç
+ã»ãã®ä»ï¼éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼ï¼4.6.15ç¯ï¼ãåç
 §
 
@@ -772,5 +788,5 @@
 	- ã¿ã¼ã²ããä¾å­ã®å¤ï¼CHECK_FUNC_ALIGNï¼ã®åæ°ã§ãªãå ´å
 	- NULLã®å ´åï¼ã¿ã¼ã²ããä¾å­ï¼CHECK_FUNC_NONNULLï¼
-ã»ãã®ä»ï¼éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼ï¼4.6.13ç¯ï¼ãåç
+ã»ãã®ä»ï¼éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼ï¼4.6.15ç¯ï¼ãåç
 §
 
@@ -827,5 +843,5 @@
 ã»almatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2491ï¼½
 ãï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-ã»ãã®ä»ï¼éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼ï¼4.6.13ç¯ï¼ãåç
+ã»ãã®ä»ï¼éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼ï¼4.6.15ç¯ï¼ãåç
 §
 
@@ -836,5 +852,5 @@
 	- ã¿ã¼ã²ããä¾å­ã®å¤ï¼CHECK_FUNC_ALIGNï¼ã®åæ°ã§ãªãå ´å
 	- NULLã®å ´åï¼ã¿ã¼ã²ããä¾å­ï¼CHECK_FUNC_NONNULLï¼
-ã»ãã®ä»ï¼éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼ï¼4.6.13ç¯ï¼ãåç
+ã»ãã®ä»ï¼éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼ï¼4.6.15ç¯ï¼ãåç
 §
 
@@ -885,5 +901,5 @@
 4.6.1 å¤æ°ã®è¨­å®ã«ããã¤ãã³ãéç¥
 
-nfymode1ãTNFY_SETVERï¼å¤æ°ã®è¨­å®ã«ããã¤ãã³ãéç¥ï¼ã®å ´åã«ã¯ï¼ç¶ã2
+nfymode1ãTNFY_SETVARï¼å¤æ°ã®è¨­å®ã«ããã¤ãã³ãéç¥ï¼ã®å ´åã«ã¯ï¼ç¶ã2
 ã¤ã®ãã©ã¡ã¼ã¿ï¼å¤æ°ã®çªå°ã¨è¨­å®ããå¤ï¼ã®æå®ã«å¾ã£ã¦å¤æ°ãè¨­å®ããã
 ã®ã¨ããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã§ã®ã¨ã©ã¼ãã§ãã¯ãå¯è½ã«ããããã«ï¼
@@ -905,5 +921,29 @@
 ãã£ã®ã¥ã¬ã¼ã¿ã¯ã¨ã©ã¼ãå ±åããï¼
 
-4.6.2 ã¿ã¹ã¯ã®èµ·åã«ããã¤ãã³ãéç¥
+4.6.2 å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããã¤ãã³ãã®éç¥
+
+nfymode1ãTNFY_INCVARï¼å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããã¤ãã³ãéç¥ï¼ã®å ´åã«
+ã¯ï¼ç¶ã1ã¤ã®ãã©ã¡ã¼ã¿ï¼å¤æ°ã®çªå°ï¼ã®æå®ã«å¾ã£ã¦å¤æ°ãã¤ã³ã¯ãªã¡ã³ã
+ãããã®ã¨ããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã§ã®ã¨ã©ã¼ãã§ãã¯ãå¯è½ã«ãã
+ããã«ï¼å¤æ°ã®çªå°ã¯ï¼exinfã¨ãã¦éç¥ãã³ãã©ã«æ¸¡ãï¼
+
+å
+·ä½çã«ã¯ï¼ï¼ã¤ãã³ãã®éç¥å¦çï¼ã«ã¯ï¼æ¬¡ã®ã³ã¼ããçæããï¼
+
+	loc_cpu();
+	*((intptr_t *) exinf) += 1;
+	unl_cpu();
+
+å¨æï¼ã¢ã©ã¼ã éç¥åæåãã­ãã¯ã«ç»é²ããnfyhdrã¨exinfã¯ï¼æ¬¡ã®éãã¨ã
+ãï¼
+
+	nfyhdr		_kernel_nfyhdr_<cycid ã¾ãã¯ almid>
+	exinf		ï¼å¤æ°ã®çªå°ï¼
+
+ãªãï¼å¤æ°ã®è¨­å®ã«ããã¤ãã³ãéç¥ã®å ´åï¼ã¨ã©ã¼ãæ¤åºããããã¨ã¯ãªã
+ããï¼ã¨ã©ã¼ã®éç¥ã¯æå³ããªãï¼ã¨ã©ã¼ã®éç¥ãæå®ããã¦ããå ´åï¼ã³ã³
+ãã£ã®ã¥ã¬ã¼ã¿ã¯ã¨ã©ã¼ãå ±åããï¼
+
+4.6.3 ã¿ã¹ã¯ã®èµ·åã«ããã¤ãã³ãéç¥
 
 nfymode1ãTNFY_ACTTSKï¼ã¿ã¹ã¯ã®èµ·åã«ããã¤ãã³ãéç¥ï¼ã®å ´åã«ã¯ï¼ç¶ã
@@ -923,5 +963,5 @@
 	exinf		ï¼ã¿ã¹ã¯IDï¼
 
-4.6.3 ã¿ã¹ã¯ã®èµ·åºã«ããã¤ãã³ãéç¥
+4.6.4 ã¿ã¹ã¯ã®èµ·åºã«ããã¤ãã³ãéç¥
 
 nfymode1ãTNFY_WUPTSKï¼ã¿ã¹ã¯ã®èµ·åºã«ããã¤ãã³ãéç¥ï¼ã®å ´åã«ã¯ï¼ç¶ã
@@ -941,5 +981,5 @@
 	exinf		ï¼ã¿ã¹ã¯IDï¼
 
-4.6.4 ã»ããã©ã®è¿å´ã«ããã¤ãã³ãéç¥
+4.6.5 ã»ããã©ã®è¿å´ã«ããã¤ãã³ãéç¥
 
 nfymode1ãTNFY_SIGSEMï¼ã»ããã©ã®è¿å´ã«ããã¤ãã³ãéç¥ï¼ã®å ´åã«ã¯ï¼ç¶
@@ -959,5 +999,5 @@
 	exinf		ï¼ã»ããã©IDï¼
 
-4.6.5 ã¤ãã³ããã©ã°ã®ã»ããã«ããã¤ãã³ãéç¥
+4.6.6 ã¤ãã³ããã©ã°ã®ã»ããã«ããã¤ãã³ãéç¥
 
 nfymode1ãTNFY_SETFLGï¼ã¤ãã³ããã©ã°ã®ã»ããã«ããã¤ãã³ãéç¥ï¼ã®å ´å
@@ -978,5 +1018,5 @@
 	exinf		ï¼ã¤ãã³ããã©ã°IDï¼
 
-4.6.6 ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¤ãã³ãéç¥
+4.6.7 ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¤ãã³ãéç¥
 
 nfymode1ãTNFY_SNDDTQï¼ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¤ãã³ãéç¥ï¼ã®å ´åã«
@@ -996,7 +1036,7 @@
 	exinf		ï¼ãã¼ã¿ã­ã¥ã¼IDï¼
 
-4.6.7 å¤æ°ã®è¨­å®ã«ããã¨ã©ã¼éç¥
-
-nfymode2ãTENFY_SETVERï¼å¤æ°ã®è¨­å®ã«ããã¨ã©ã¼éç¥ï¼ã®å ´åã«ã¯ï¼ç¶ã1ã¤
+4.6.8 å¤æ°ã®è¨­å®ã«ããã¨ã©ã¼éç¥
+
+nfymode2ãTENFY_SETVARï¼å¤æ°ã®è¨­å®ã«ããã¨ã©ã¼éç¥ï¼ã®å ´åã«ã¯ï¼ç¶ã1ã¤
 ã®ãã©ã¡ã¼ã¿ï¼å¤æ°ã®çªå°ï¼ã®æå®ã«å¾ã£ã¦ï¼ã¨ã©ã¼ã³ã¼ããå¤æ°ã«è¨­å®ãã
 ãã®ã¨ããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã§ã®ã¨ã©ã¼ãã§ãã¯ãå¯è½ã«ãããã
@@ -1015,5 +1055,25 @@
 													= (intptr_t) ercd;
 
-4.6.8 ã¿ã¹ã¯ã®èµ·åã«ããã¨ã©ã¼éç¥
+4.6.9 å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼éç¥
+
+nfymode2ãTENFY_INCVARï¼å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãè¨­å®ã«ããã¨ã©ã¼éç¥ï¼ã®å ´
+åã«ã¯ï¼ç¶ã1ã¤ã®ãã©ã¡ã¼ã¿ï¼å¤æ°ã®çªå°ï¼ã®æå®ã«å¾ã£ã¦å¤æ°ãã¤ã³ã¯ãªã¡
+ã³ããããã®ã¨ããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã§ã®ã¨ã©ã¼ãã§ãã¯ãå¯è½ã«
+ããããã«ï¼å¤æ°ã®çªå°ã¯ï¼ã°ã­ã¼ãã«å¤æ°ãéãã¦ã¦éç¥ãã³ãã©ã«æ¸¡ãï¼
+
+å
+·ä½çã«ã¯ï¼éç¥ãã³ãã©ã®å®ç¾©ã«å
+ç«ã¡ï¼æ¬¡ã®ã³ã¼ããçæããï¼
+
+	intptr_t *const _kernel_nfyhdr_<cycid ã¾ãã¯ almid>_p_evar
+										= (intptr_t *)(ï¼å¤æ°ã®çªå°ï¼);
+
+ã¾ãï¼ï¼ã¨ã©ã¼ã®éç¥å¦çï¼ã«ã¯ï¼æ¬¡ã®ã³ã¼ããçæããï¼
+
+	loc_cpu();
+	*((intptr_t *) _kernel_nfyhdr_<cycid ã¾ãã¯ almid>_p_evar) += 1;
+	unl_cpu();
+
+4.6.10 ã¿ã¹ã¯ã®èµ·åã«ããã¨ã©ã¼éç¥
 
 nfymode2ãTENFY_ACTTSKï¼ã¿ã¹ã¯ã®èµ·åã«ããã¨ã©ã¼éç¥ï¼ã®å ´åã«ã¯ï¼ç¶ã
@@ -1033,5 +1093,5 @@
 	act_tsk(_kernel_nfyhdr_<cycid ã¾ãã¯ almid>_etskid);
 
-4.6.9 ã¿ã¹ã¯ã®èµ·åºã«ããã¨ã©ã¼éç¥
+4.6.11 ã¿ã¹ã¯ã®èµ·åºã«ããã¨ã©ã¼éç¥
 
 nfymode2ãTENFY_WUPTSKï¼ã¿ã¹ã¯ã®èµ·åºã«ããã¨ã©ã¼éç¥ï¼ã®å ´åã«ã¯ï¼ç¶ã
@@ -1051,5 +1111,5 @@
 	wup_tsk(_kernel_nfyhdr_<cycid ã¾ãã¯ almid>_ptskid);
 
-4.6.10 ã»ããã©ã®è¿å´ã«ããã¨ã©ã¼éç¥
+4.6.12 ã»ããã©ã®è¿å´ã«ããã¨ã©ã¼éç¥
 
 nfymode2ãTENFY_SIGSEMï¼ã»ããã©ã®è¿å´ã«ããã¨ã©ã¼éç¥ï¼ã®å ´åã«ã¯ï¼ç¶
@@ -1069,5 +1129,5 @@
 	sig_sem(_kernel_nfyhdr_<cycid ã¾ãã¯ almid>_esemid);
 
-4.6.11 ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼éç¥
+4.6.13 ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼éç¥
 
 nfymode2ãTENFY_SETFIGï¼ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼éç¥ï¼ã®å ´å
@@ -1089,5 +1149,5 @@
 										ï¼ã»ããããããããã¿ã¼ã³ï¼);
 
-4.6.12 ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼éç¥
+4.6.14 ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼éç¥
 
 nfymode2ãTENFY_SNDDTQï¼ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼éç¥ï¼ã®å ´åã«
@@ -1108,5 +1168,5 @@
 	snd_dtq(_kernel_nfyhdr_<cycid ã¾ãã¯ almid>_edtqid, (intptr_t) ercd);
 
-4.6.13 ã¨ã©ã¼æ¡ä»¶
+4.6.15 ã¨ã©ã¼æ¡ä»¶
 
 éç¥ãã³ãã©ã®çæã«é¢ããã¨ã©ã¼æ¡ä»¶ã¯æ¬¡ã®éãã§ããï¼
Index: asp3_wo_tecs/trunk/doc/design.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/design.txt	(revision 305)
+++ asp3_wo_tecs/trunk/doc/design.txt	(revision 306)
@@ -3,6 +3,6 @@
 		è¨­è¨ã¡ã¢
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.B.0
-		æçµæ´æ°: 2016å¹´1æ3æ¥
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1.0
+		æçµæ´æ°: 2016å¹´1æ31æ¥
 
 ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã®è¨­è¨ã¡ã¢ã§ããï¼ä½æéä¸­ã®ã
@@ -62,5 +62,5 @@
  ã®è²¬ä»»ãè² ããªãï¼
  
- $Id: design.txt 480 2016-01-03 07:37:12Z ertl-hiro $
+ $Id: design.txt 724 2016-04-02 21:36:23Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -1347,15 +1347,54 @@
 æ´ããã¦ãï¼kernel_cfg.hã®å
 å®¹ã¯æ´æ°ãããªãå ´åãå¤ãï¼ãã®ãããªå ´åï¼
-åã³ã³ãã¤ã«ã¯ä¸è¦ãªã¯ãã§ããï¼
-
-ãã®åé¡ãè§£æ±ºããä¸è¬çãªææ³ã¨ãã¦ï¼move-if-changeã¹ã¯ãªãããä½¿ãï¼
-kernel_cfg.hã®å
-å®¹ãå¤ãã£ãå ´åã®ã¿ï¼ãã®ã¿ã¤ã ã¹ã¿ã³ããæ´æ°ããæ¹æ³
-ãããï¼ãã®å ´åï¼kernel_cfg.hãçæããã¿ã¼ã²ããã¯ï¼ã¿ã¤ã ã¹ã¿ã³ããã¡
-ã¤ã«ã«ãï¼çæå¾ã«ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ãtouchããå¿
-è¦ãããï¼ãã®ãã
-ã«ããªãã¨ï¼kernel_cfg.hã¯ï¼å¤æ´ãããããããã¡ã¤ã«ã«ä¾å­ããããï¼æ¬¡
-åä»¥éã®makeã§ãå¿
-ãkernel_cfg.hã®çææé ãå®è¡ããã¦ãã¾ãï¼ï¼
+åã³ã³ãã¤ã«ã¯ä¸è¦ãªã¯ãã§ããï¼åãåé¡ã¯ï¼TECSã¸ã§ãã¬ã¼ã¿ãçæãã
+ãã¡ã¤ã«ãoffset.hã§ãçºçããï¼ä»¥ä¸ã§ã¯ï¼ãã®åé¡ãè§£æ±ºããæ¹æ³ã«ã¤ã
+ã¦æ¤è¨ããï¼
+
+ã¾ãï¼ãã®ã±ã¼ã¹ãä¸è¬åãï¼TOOL-1ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼ãFILE-Aï¼ã·ã¹
+ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼ããFILE-Bï¼kernel_cfg.hï¼ãçæãï¼
+TOOL-2ï¼ã³ã³ãã¤ã©ï¼ãFILE-Bï¼kernel_cfg.hï¼ããFILE-Cï¼ãªãã¸ã§ã¯ããã¡
+ã¤ã«ï¼ãçæããç¶æ³ãèããï¼ãã®ç¶æ³ãç´ ç´ã«ã«ã¼ã«è¨è¿°ããã¨ï¼æ¬¡ã®ã
+ãã«ãªãï¼
+
+FILE-B: FILE-A
+	TOOL-1 < FILE-A > FILE-B
+
+FILE-C: FILE-B
+	TOOL-2 < FILE-B > FILE-C
+
+ããã§ï¼FILE-Aãæ´æ°ããã¦ãFILE-Bã®å
+å®¹ãå¤ããã¨ã¯éããªããã®ã¨ãï¼
+FILE-Bã®å
+å®¹ãå¤ãããªãã£ãå ´åã«ï¼TOOL-2ã«ããFILE-Cã®åçæãé¿ãã
+æ¹ç­ãæ¤è¨ããï¼
+
+ãã®ããã«ï¼ã¾ãï¼TOOL-1ã¯ï¼FILE-Bã®å
+å®¹ãå¤ãããªãå ´åã«ã¯ï¼FILE-Bã®
+æçµæ´æ°æå»ãæ´æ°ããªããã®ã¨ããï¼ããã«ããï¼FILE-Bã®å
+å®¹ãå¤ãããª
+ãã£ãå ´åã«ï¼TOOL-2ãå®è¡ããããã¨ã¯ãªããªããï¼FILE-BãFILE-Aããã
+å¤ãç¶æ
+ã¨ãªãããï¼makeããåº¦ã«ï¼ã ãã«ï¼TOOL-1ãåä½ãã¦ãã¾ãï¼
+
+ãããè§£æ±ºããããã«ï¼TOOL-1ãæå¾ã«å®è¡ãããæå»ãä¿æããããã®ã¿ã¤
+ã ã¹ã¿ã³ããã¡ã¤ã«ãä½¿ãæ¹æ³ãç¥ããã¦ããï¼å
+·ä½çã«ã¯ï¼FILE-Bã®ã¿ã¤ã 
+ã¹ã¿ã³ããã¡ã¤ã«ãTIMESTAMP-Bã¨ãï¼æ¬¡ã®ããã«ã«ã¼ã«ãè¨è¿°ããï¼
+
+FILE-B: TIMESTAMP-B ;
+
+TIMESTAMP-B: FILE-A
+	TOOL-1 < FILE-A > FILE-B
+	touch TIMESTAMP-B
+
+ãã®ã«ã¼ã«ã§ã¯ï¼FILE-BãFILE-Aãããå¤ãç¶æ
+ã«ãªã£ã¦ãï¼makeãä¸åº¦å®è¡
+ãããã¨ã§TIMESTAMP-Bã¯FILE-Aããæ°ãããªãããï¼ä»¥éã®makeã®åº¦ã«å®è¡ã
+ããã®ã¯ãFILE-B: TIMESTAMP-Bãã«å¯¾ããã³ãã³ãï¼ä¸ã®è¨è¿°ã§ã¯ç©ºã®ã³ãã³
+ãï¼ã®ã¿ã¨ãªãï¼ããã§ã ãããªãããï¼
+
+ããã§ï¼ãFILE-B: TIMESTAMP-Bãã®å¾ã®ã;ãã¯ç©ºã®ã³ãã³ããè¡¨ããã®ã§ã
+ããï¼ããããªãã¨æ­£ããåä½ããªãå ´åãããï¼ãã®åå ã¯ããã£ã¦ããª
+ãï¼ï¼
 
 ãã ãï¼ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ãtouchããæ¹æ³ã«ã¯ï¼éå»ã«ï¼Windowsã¨
@@ -1365,21 +1404,27 @@
 	http://dev.toppers.jp/trac/asp/ticket/286
 
-ãã®åé¡ãåé¿ããããã«ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ãã£ã¦ã¿ã¤ã ã¹ã¿ã³ããã¡
-ã¤ã«ãçæããæ¹æ³ãã¨ãï¼
-
-ããã¨åãåé¡ã¯ï¼offset.hã«ãå­å¨ããããï¼åæ§ã«å¯¾å¦ããï¼
-
-ãªãï¼kernel_cfg.cã«åãæ¹æ³ãé©ç¨ãã¦ããããï¼åå®è¡ãé²ããå¯è½æ§ã
-ããå¦çãkernel_cfg.cã®ã³ã³ãã¤ã«ã ãã§ï¼ãããåå®è¡ãå¿
-è¦ãªå ´åãå¤
-ãããï¼ã¡ãªãããå°ããã¨èãã¦é©ç¨ããªããã¨ã«ããï¼
-
-ãªãï¼ASPã«ã¼ãã«ã«ãããå¯¾å¿ã¯ï¼move-if-changeãç¨ãã¦ããªãã£ãããã«ï¼
-ãã¾ãæå³ããªãã£ãï¼ããã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãå
-å®¹ãæ´æ°ããã¦ããª
-ããã¡ã¤ã«ã®ã¿ã¤ãã¹ã¿ã³ããæ¸ãæããªããã¨ãæ³å®ãã¦ããããã§ãã
-ï¼ãã®æ³å®ä¸ã§ãï¼"touch -r"ãç¨ããå¯¾å¿ã¯ä¸é©åã ã£ãï¼ï¼ã³ã³ãã£ã®ã¥
-ã¬ã¼ã¿ããã®ããã«æ¹é ãããã¨ãé£ãããªããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ãã£
-ã¦ã¿ã¤ã ã¹ã¿ã³ããçæããæ¹æ³ã¯ä½¿ããªããªãï¼
+ãã®åé¡ãåé¿ããããã«ã¯ï¼TOOL-1ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼ãã¿ã¤ã ã¹ã¿ã³
+ããã¡ã¤ã«ãçæããã°ããï¼ã¾ãã¯ï¼TOOL-1ã®å®è¡ã«ããï¼å¿
+ãæçµæ´æ°æ
+å»ãæ´æ°ããããã¡ã¤ã«ãããå ´åã«ã¯ï¼ãã®ãã¡ã¤ã«ãã¿ã¤ã ã¹ã¿ã³ããã¡
+ã¤ã«ä»£ããã«ä½¿ã£ã¦ãè¯ãï¼
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼TOOL-1ã«ç¸å½ãããã¼ã«ã¨ãã¦ï¼TECSã¸ã§ãã¬ã¼ã¿ã¨ã³ã³
+ãã£ã®ã¥ã¬ã¼ã¿ãããï¼ãã®2ã¤ã®ãã¼ã«ã¯ï¼åºåãã¡ã¤ã«ã®å
+å®¹ãå¤ãããªã
+å ´åã«ã¯ï¼åºåãã¡ã¤ã«ã®æçµæ´æ°æå»ãæ´æ°ããªãããã«å®è£
+ããï¼
+
+TECSã¸ã§ãã¬ã¼ã¿ã¨ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®åãã¹ã«å¯¾å¿ããã¿ã¤ã ã¹ã¿ã³ããã¡
+ã¤ã«ã¯ä»¥ä¸ã®éãã¨ããï¼
+
+	TECSã¸ã§ãã¬ã¼ã¿					gen/tecsgen.timestamp
+	ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹1			cfg1_out.timestamp
+	ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2			kernel_cfg.timestamp
+	ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3			check.timestamp
+	ãªãã»ãããã¡ã¤ã«çæã®ããã®		offset.timestamp
+	ãããã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹
+
+ãªãï¼ASP1ã«ã¼ãã«ã«ãããå¯¾å¿ã¯ä¸ååã§ããï¼æ­£ããæ©è½ãã¦ããªãã£ãï¼
 
 ä»¥ä¸
Index: asp3_wo_tecs/trunk/doc/extension.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/extension.txt	(revision 305)
+++ asp3_wo_tecs/trunk/doc/extension.txt	(revision 306)
@@ -3,6 +3,6 @@
 		æ©è½æ¡å¼µã»ãã¥ã¼ãã³ã°ã¬ã¤ã
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.B.0
-		æçµæ´æ°: 2015å¹´8æ21æ¥
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1
+		æçµæ´æ°: 2016å¹´3æ31æ¥
 
 ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASPã«ã¼ãã«3ãï¼æ©è½æ¡å¼µã»ãã¥ã¼ãã³ã°ãã
@@ -14,5 +14,5 @@
      Advanced Standard Profile Kernel
 
- Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
              Graduate School of Information Science, Nagoya Univ., JAPAN
  
@@ -61,5 +61,5 @@
  ã®è²¬ä»»ãè² ããªãï¼
  
- $Id: extension.txt 458 2015-08-21 14:59:09Z ertl-hiro $
+ $Id: extension.txt 716 2016-03-31 06:16:23Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -211,4 +211,25 @@
 ç¨ã§ãããã©ãããå¤å¥ãããã¨ãã§ããï¼
 
+ã¡ãã»ã¼ã¸ãããã¡æ©è½æ¡å¼µããã±ã¼ã¸ã§ã¯ï¼ã¡ãã»ã¼ã¸ãããã¡ã«å¯¾ããé
+ä¿¡å¾
+ã¡ç¶æ
+ã®ã¿ã¹ã¯ãè¤æ°å¾
+ã¡è§£é¤ãããå ´åãããï¼ãã®å ´åï¼ãµã¼ãã¹ã³ã¼
+ã«ã®å®è¡æéããã³ã«ã¼ãã«å
+ã§ã®å²è¾¼ã¿ç¦æ­¢æéãï¼å¾
+ã¡è§£é¤ãããã¿ã¹ã¯
+ã®æ°ã®æ°ã®ãªã¼ãã§é·ããªãã®ã§æ³¨æãå¿
+è¦ã§ããï¼ã¡ãã»ã¼ã¸ãããã¡ã«å¯¾
+ããéä¿¡å¾
+ã¡ç¶æ
+ã®ã¿ã¹ã¯ãè¤æ°å¾
+ã¡è§£é¤ãããã®ã¯ï¼ã¡ãã»ã¼ã¸ãããã¡ç®¡
+çé åã«æ ¼ç´ãããã¡ãã»ã¼ã¸ãåä¿¡ãããçµæï¼ç®¡çé åã«ç©ºãé åãçã
+ãå ´åã«å ãã¦ï¼éä¿¡å¾
+ã¡è¡åã®å
+é ­ã«ã¤ãªããã¦ããã¿ã¹ã¯ã®å¼·å¶çµäºãå¾
+
+ã¡è§£é¤ã®å ´åã«ãçããï¼
+
 ã¡ãã»ã¼ã¸ãããã¡æ©è½æ¡å¼µããã±ã¼ã¸ã«ããè¿½å ããããµã¼ãã¹ã³ã¼ã«
 
@@ -225,4 +246,9 @@
 
 	CRE_MBF(ID mbfid, { ATR mbfatr, uint_t maxmsz, size_t mbfsz, void *mbfmb })
+
+ã¡ãã»ã¼ã¸ãããã¡æ©è½æ¡å¼µããã±ã¼ã¸ã§ã¯ï¼memcpyãä½¿ç¨ãã¦ããããï¼æ¨
+æºCã©ã¤ãã©ãªãå¿
+è¦ã§ããï¼æ¨æºCã©ã¤ãã©ãªãç¨æããä»£ããã«ï¼memcpyé¢
+æ°ã®ã¿ãèªåã§ç¨æãã¦ãããï¼
 
 âãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µããã±ã¼ã¸
@@ -329,5 +355,5 @@
 §ãããã¨ï¼
 
-åçæ©è½æ¡å¼µæ¡å¼µããã±ã¼ã¸ã§ã¯ï¼TOPPERS_SUPPORT_DYNAMIC_CREãkernel.hä¸­
+åççææ©è½æ¡å¼µããã±ã¼ã¸ã§ã¯ï¼TOPPERS_SUPPORT_DYNAMIC_CREãkernel.hä¸­
 ã§å®ç¾©ããã¦ããã®ã§ï¼ãããç¨ãã¦åççææ©è½ãä½¿ç¨ã§ãããã©ãããå¤
 å¥ãããã¨ãã§ããï¼
@@ -370,4 +396,15 @@
 	DEF_KMM({ SIZE kmmsz, STK_T *kmm })
 
+åççææ©è½æ¡å¼µããã±ã¼ã¸ã§ã¯ï¼del_yyyã§åé¤ãããªãã¸ã§ã¯ãã«å¯¾ããå¾
+
+ã¡ç¶æ
+ã®ã¿ã¹ã¯ãè¤æ°ããã¨ï¼del_yyyã«ããï¼è¤æ°ã®ã¿ã¹ã¯ãå¾
+ã¡è§£é¤ãããï¼
+ãã®å ´åï¼ãµã¼ãã¹ã³ã¼ã«ã®å®è¡æéããã³ã«ã¼ãã«å
+ã§ã®å²è¾¼ã¿ç¦æ­¢æéãï¼
+å¾
+ã¡è§£é¤ãããã¿ã¹ã¯ã®æ°ã®ãªã¼ãã§é·ããªãã®ã§æ³¨æãå¿
+è¦ã§ããï¼
+
 ----------------------------------------------------------------------
 DEF_KMM		ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®è¨­å®ãSDã
@@ -375,4 +412,5 @@
 ãéçAPIã
 	DEF_KMM({ SIZE kmmsz, STK_T *kmm })
+	â» kmmã®è¨è¿°ã¯çç¥ãããã¨ãã§ããï¼
 
 ããã©ã¡ã¼ã¿ã
@@ -401,8 +439,8 @@
 kmmszã¯æ´æ°å®æ°å¼ãã©ã¡ã¼ã¿ï¼kmmã¯ä¸è¬å®æ°å¼ãã©ã¡ã¼ã¿ã§ããï¼
 
-kmmãNULLã¨ããå ´åï¼kmmszã§æå®ãããµã¤ãºã®ã¡ã¢ãªé åãï¼ã³ã³ãã£ã®ã¥
-ã¬ã¼ã¿ãç¢ºä¿ããï¼kmmszã«ã¿ã¼ã²ããå®ç¾©ã®å¶ç´ã«åè´ããªããµã¤ãºãæå®ã
-ãæã«ã¯ï¼ã¿ã¼ã²ããå®ç¾©ã®å¶ç´ã«åè´ããããã«ãµã¤ãºãå¤§ããæ¹ã«ä¸¸ãã¦
-ç¢ºä¿ããï¼
+kmmã®è¨è¿°ãçç¥ãããï¼kmmãNULLã¨ããå ´åï¼kmmszã§æå®ãããµã¤ãºã®ã¡ã¢
+ãªé åãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãç¢ºä¿ããï¼kmmszã«ã¿ã¼ã²ããå®ç¾©ã®å¶ç´ã«å
+è´ããªããµã¤ãºãæå®ããæã«ã¯ï¼ã¿ã¼ã²ããå®ç¾©ã®å¶ç´ã«åè´ããããã«ãµ
+ã¤ãºãå¤§ããæ¹ã«ä¸¸ãã¦ç¢ºä¿ããï¼
 
 ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åãã¢ããªã±ã¼ã·ã§ã³ã§ç¢ºä¿ããå ´åã«ã¯ï¼
Index: asp3_wo_tecs/trunk/doc/migration.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/migration.txt	(revision 306)
+++ asp3_wo_tecs/trunk/doc/migration.txt	(revision 306)
@@ -0,0 +1,609 @@
+
+		TOPPERS/ASP3ã«ã¼ãã«
+		TOPPERS/ASP3ã«ã¼ãã«ã¸ã®ãã¤ã°ã¬ã¼ã·ã§ã³ã¬ã¤ã
+
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1
+		æçµæ´æ°: 2016å¹´2æ3æ¥
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASPã«ã¼ãã« Release 1.Xï¼ä»¥ä¸ï¼ASP1ã«ã¼ãã«ï¼
+ãTOPPERS/JSPã«ã¼ãã«ï¼ä»¥ä¸ï¼JSPã«ã¼ãã«ï¼ï¼ä»ã®Î¼ITRON4.0ä»æ§æºæ ã®ã«ã¼
+ãã«ä¸ã®ã¢ããªã±ã¼ã·ã§ã³ãï¼TOPPERS/ASP3ã«ã¼ãã«ï¼TOPPERS/ASPã«ã¼ãã«
+Release 3.Xï¼ä»¥ä¸ï¼ASP3ã«ã¼ãã«ï¼ã«ãã¼ãã£ã³ã°ããããã®æ¹æ³ï¼ã¾ãã¯ã
+ã³ãï¼ãèª¬æãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+ TOPPERS/ASP Kernel
+     Toyohashi Open Platform for Embedded Real-Time Systems/
+     Advanced Standard Profile Kernel
+
+ Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
+             Graduate School of Information Science, Nagoya Univ., JAPAN
+ 
+ ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+     æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+     ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+     è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+     ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+     ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+     ã¨ï¼
+   (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+       ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+   (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+       å ±åãããã¨ï¼
+ (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+     å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+     ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+     ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+     å
+è²¬ãããã¨ï¼
+ 
+ æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ã®è²¬ä»»ãè² ããªãï¼
+ 
+ $Id: migration.txt 724 2016-04-02 21:36:23Z ertl-hiro $
+----------------------------------------------------------------------
+
+âç®æ¬¡
+
+ã»é¢é£ãã­ã¥ã¡ã³ã
+ã»ASP1ã«ã¼ãã«ã¨ã®ã¢ããªã±ã¼ã·ã§ã³ã®æ§ç¯ç°å¢ã®éã
+	- æ§ç¯æé 
+	- ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«å«ããã¹ãå
+å®¹
+	- TECSãç¨ãã¦å®è£
+ãããã·ã¹ãã ãµã¼ãã¹ã®ä½¿ç¨
+	- ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®ä»æ§ã®éã
+	- ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä»æ§ã®éã
+ã»ASP1ã«ã¼ãã«ã¨ã®ã«ã¼ãã«ä»æ§ã®éã
+	- æéã®åä½
+	- å¨æãã³ãã©ã¨ã¢ã©ã¼ã ãã³ãã©
+	- ã¿ã¹ã¯ä¾å¤å¦ç
+	- ã¡ã¼ã«ããã¯ã¹
+	- ãã®ä»ã®éã
+ã»Î¼ITRON4.0ä»æ§ããã®ç§»è¡
+	- ãã¼ã¿åã¨å®æ°ã®å¤æ´
+	- ãªãã¸ã§ã¯ãå±æ§ã®å¤æ´
+	- ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®å¤æ´
+	- ãªãã¸ã§ã¯ãIDã®èªåå²ä»ãã¸ã®å¯¾å¿
+	- ããããã¡ã¤ã«ã®å¤æ´
+	- sta_tskã®ç½®ãæã
+	- å¨æãã³ãã©ã®éäºææ§
+
+
+âé¢é£ãã­ã¥ã¡ã³ã
+
+ASP3ã«ã¼ãã«ã®ä»æ§ã®æ¦è¦ãèª¬æãããã­ã¥ã¡ã³ãã¨ãã¦ï¼ãTOPPERS/ASP3ã«ã¼
+ãã«ã®ä»æ§æ¦è¦ããããï¼ãã®ãã­ã¥ã¡ã³ãã§ã¯ï¼ASP3ã«ã¼ãã«ã®ä»æ§ãï¼
+Î¼ITRON4.0ä»æ§ã®ã¹ã¿ã³ãã¼ããã­ãã¡ã¤ã«ï¼JSPã«ã¼ãã«ï¼ASP1ã«ã¼ãã«ãã
+ã®å¤æ´ç®æããããããã«èª¬æãã¦ããï¼
+
+ASP3ã«ã¼ãã«ã®è©³ç´°ãªä»æ§ã«ã¤ãã¦ã¯ï¼ãTOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼
+çµ±åä»æ§æ¸ãã§è¦å®ãã¦ããï¼ãã®ä»æ§æ¸ã§ãï¼Î¼ITRON4.0ä»æ§ï¼JSPã«ã¼ãã«
+ã¯ãã®ä»æ§ã«æºæ ï¼ããã³TOPPERSæ°ä¸ä»£ã«ã¼ãã«çµ±åä»æ§ï¼ASP1ã«ã¼ãã«ã¯ã
+ã®ä»æ§ã«æºæ ï¼ã¨ã®éããè¨è¼ãã¦ããï¼
+
+
+âASP1ã«ã¼ãã«ã¨ã®ã¢ããªã±ã¼ã·ã§ã³ã®æ§ç¯ç°å¢ã®éã
+
+ãã®ç« ã§ã¯ï¼ASP3ã«ã¼ãã«ã®æ¨æºã®ã¢ããªã±ã¼ã·ã§ã³ã®æ§ç¯ç°å¢ãï¼ASP1ã«ã¼
+ãã«ããã©ã®ããã«å¤æ´ããããã«ã¤ãã¦èª¬æããï¼
+
+âæ§ç¯æé 
+
+ASP1ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼configureï¼ã¯ï¼ããã©ã«
+ãã§ã¯ãµã³ãã«ãã­ã°ã©ã ãã«ã¬ã³ããã£ã¬ã¯ããªã«ã³ãã¼ãã¦ãããï¼ASP3
+ã«ã¼ãã«ã§ã¯ã³ãã¼ãè¡ããï¼ãµã³ãã«ãã­ã°ã©ã ã®ãã£ã¬ã¯ããªã«ãããã¡
+ã¤ã«ãç´æ¥åç
+§ããï¼
+
+ASP1ã«ã¼ãã«ã®æ¨æºã®æ§ç¯æé ã§ã¯ï¼ãmake dependãã«ããä¾å­é¢ä¿ãã¡ã¤ã«
+ãä½æãã¦ããï¼ãmakeãã«ããã­ã¼ãã¢ã¸ã¥ã¼ã«ãçæãã¦ãããï¼ASP3ã«ã¼
+ãã«ã§ã¯ä¾å­é¢ä¿ãã¡ã¤ã«ãèªåçã«ä½æããããï¼ãmake dependããå®è¡ã
+ãå¿
+è¦ã¯ãªãï¼
+
+âã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«å«ããã¹ãå
+å®¹
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼ã«ã¼ãã«ãå¿
+è¦ã¨ããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³è¨è¿°ãï¼ã¢
+ããªã±ã¼ã·ã§ã³ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã¨ã¯å¥ã®ãã¡ã¤ã«
+ã«ç¨æãï¼æ¨æºã®Makefileã§ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹1ã«ãããèª­ã¿è¾¼ã¾
+ãã¦ããï¼ãã®ããï¼ASP1ã«ã¼ãã«ã§ã¯ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡
+ã¤ã«ã«è¨è¿°ããªããã°ãªããªãã£ãä»¥ä¸ã®è¡ã¯ï¼ASP3ã«ã¼ãã«ã§ã¯åé¤ããªã
+ãã°ãªããªãï¼
+
+----------------------------------------
+INCLUDE("target_timer.cfg");
+----------------------------------------
+
+âTECSãç¨ãã¦å®è£
+ãããã·ã¹ãã ãµã¼ãã¹ã®ä½¿ç¨
+
+ASP3ã«ã¼ãã«ã®é
+å¸ããã±ã¼ã¸ã«å«ã¾ããã·ã¹ãã ãµã¼ãã¹ã¯ï¼ASP1ã«ã¼ãã«
+ã«å«ã¾ãããã®ã¨ã»ã¼äºæã®æ©è½ãï¼TOPPERSçµè¾¼ã¿ã³ã³ãã¼ãã³ãã·ã¹ãã 
+ï¼TECSï¼ãç¨ãã¦å®ç¾ãã¦ããï¼ãã®ããï¼ASP1ã«ã¼ãã«ã®é
+å¸ããã±ã¼ã¸ã«
+å«ã¾ããã·ã¹ãã ãµã¼ãã¹ãç¨ããã¢ããªã±ã¼ã·ã§ã³ãï¼ASP3ã«ã¼ãã«ã«ãã¼
+ãã£ã³ã°ããéã«ã¯ï¼ä»¥ä¸ã®ä¿®æ­£ãå¿
+è¦ã§ããï¼
+
+TECSã§è¨è¿°ãããã·ã¹ãã ãµã¼ãã¹ãç¨ãã¦ã·ã¹ãã ãæ§ç¯ããéã«ã¯ï¼ã·ã¹
+ãã ãµã¼ãã¹ã®æ§æãè¨è¿°ããã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ãç¨æãããã¨ã
+å¿
+è¦ã§ããï¼ãµã³ãã«ãã­ã°ã©ã ï¼sample1ï¼ã¨åæ§ã«ï¼ã·ã¹ãã ã­ã°æ©è½ï¼ã·
+ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ï¼ã«ã¼ãã«èµ·åã¡ãã»ã¼
+ã¸åºåã®4ã¤ã®ã·ã¹ãã ãµã¼ãã¹ãç¨ããå ´åã«ã¯ï¼ãµã³ãã«ãã­ã°ã©ã ç¨ã®ã³
+ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ï¼sample1.cdlï¼ããã®ã¾ã¾ä½¿ç¨ãããã¨ãã§ããï¼
+
+ä¸æ¹ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼<ã¢ããªã±ã¼ã·ã§ã³å>.cfgï¼
+ããã¯ï¼ä»¥ä¸ã®4è¡ãåé¤ãï¼ä»£ããã«ãINCLUDE("tecsgen.cfg");ããè¿½å ã
+ãªããã°ãªããªãï¼
+
+----------------------------------------
+INCLUDE("syssvc/syslog.cfg");
+INCLUDE("syssvc/banner.cfg");
+INCLUDE("syssvc/serial.cfg");
+INCLUDE("syssvc/logtask.cfg");
+----------------------------------------
+
+ä¸è¦ãªã·ã¹ãã ãµã¼ãã¹ã¯ï¼ãµã³ãã«ãã­ã°ã©ã ç¨ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡
+ã¤ã«ï¼sample1.cdlï¼ãä¿®æ­£ãããã¨ã§åãå¤ããã¨ãã§ããï¼å
+·ä½çãªæ¹æ³ã¯ï¼
+sample1.cdlå
+ã®ã³ã¡ã³ãã¨ï¼ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ã®ãï¼ï¼ã·ã¹ãã ãµã¼ãã¹ã
+ã®ç« ã§èª¬æãã¦ããï¼
+
+ãªãï¼é
+å¸ããã±ã¼ã¸ã«å«ã¾ããã·ã¹ãã ãµã¼ãã¹ãå
+¨ãç¨ããªãå ´åã«ã¯ï¼
+TECSãä½¿ç¨ããå¿
+è¦ã¯ãªããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®-wãªãã·ã§
+ã³ã«ããï¼TECSãä½¿ç¨ããªãï¼TECSã¸ã§ãã¬ã¼ã¿ãåä½ãããªãï¼è¨­å®ã«ãã
+ãã¨ãã§ããï¼
+
+âã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®ä»æ§ã®éã
+
+ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼configure.rbï¼ã¯ï¼ASP1
+ã®ãã®ã®ã»ã¼ä¸ä½äºæã¨ãªã£ã¦ãããï¼ä»¥ä¸ã®ãªãã·ã§ã³ãå»æ­¢ãããããï¼
+ä½¿ç¨ãã¦ããå ´åã«ã¯å¤æ´ãå¿
+è¦ã§ããï¼
+
+ã»ãã³ãã¬ã¼ããã£ã¬ã¯ããªã®æå®ï¼-tï¼
+	ãã³ãã¬ã¼ããã£ã¬ã¯ããªã¯ï¼ãã³ãã¬ã¼ãMakefileã®ã³ãã¼å
+ã¨ãã¦ã
+	ãä½¿ãããªãããï¼ãã³ãã¬ã¼ãMakefileåã®æå®ï¼-mï¼ã§ä»£ç¨ã§ããï¼
+
+ã»å®è¡ç°å¢ã®åç§°ï¼-dï¼
+	å®è¡ç°å¢ã®åç§°ã®æå®ãå¿
+è¦ãªå ´åã¯ï¼ã³ã³ãã¤ã«æã®ã·ã³ãã«ã®å®ç¾©ã«
+	ãã£ã¦å¯¾å¿ãããã¨ã¨ããããï¼å
+±éã·ã³ãã«å®ç¾©ãªãã·ã§ã³ï¼-Oï¼ã§å¯¾
+	å¿ããï¼
+
+ã»perlã®ãã¹åï¼-pï¼
+	ASP3ã«ã¼ãã«ã§ã¯perlãä½¿ç¨ãã¦ããªãããå»æ­¢ããï¼
+
+ã»ãã­ã»ããµæ°ï¼-Pï¼â¦ ASP3ã«ã¼ãã«ã§ã¯ä½¿ç¨ãã¦ããªã
+	ãã­ã»ããµæ°ãæå®ããå ´åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®
+	ãã©ã¡ã¼ã¿ã«ï¼ãPRC_NUM=<ãã­ã»ããµæ°>ããä¸ãããã¨ã§å¯¾å¿ããï¼
+
+ãªãï¼ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã§ã¯ï¼-tã¨-dã¯å¥ã®
+æå³ã®ãªãã·ã§ã³ã¨ãªã£ã¦ããããï¼æ³¨æãããã¨ï¼
+
+âã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä»æ§ã®éã
+
+ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼ã¯ï¼ã¦ã¼ã¶
+ããè¦ãå ´åã«ã¯ASP1ã®ãã®ã¨ã»ã¼äºæã«ãªã£ã¦ãããï¼ä»¥ä¸ã®ãªãã·ã§ã³ã
+å»æ­¢ã¾ãã¯å¤æ´ãããããï¼ä½¿ç¨ãã¦ããå ´åã«ã¯å¤æ´ãå¿
+è¦ã§ããï¼
+
+ã»ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ããªåï¼--include-pathï¼
+	ãªãã·ã§ã³åã--include-directoryã«å¤æ´ããï¼ç­ç¸®å½¢ï¼-Iï¼ãç¨ãã¦ã
+	ãå ´åã«ã¯ï¼å½±é¿ã¯ãªãï¼
+
+ã»å¤åå¾ã·ã³ãã«ãã¼ãã«ãã¡ã¤ã«åï¼--cfg1-def-tableï¼
+	ãªãã·ã§ã³åã--symval-tableã«å¤æ´ããï¼ã¾ãï¼å¤åå¾ã·ã³ãã«ãã¼ã
+	ã«ã®ãã©ã¼ããããå¤æ´ã«ãªã£ã¦ããï¼
+
+ã»ã­ã¼ãã¢ã¸ã¥ã¼ã«ã®ã·ã³ãã«ãã¡ã¤ã«åï¼--symbol-tableï¼
+	ãªãã·ã§ã³åã--rom-symbolã«å¤æ´ããï¼
+
+ã»ãªãã¸ã§ã¯ãIDçªå·ãä¿æããå¤æ°ã®çæï¼--external-idï¼
+	ã³ã³ãã¤ã«ãªãã·ã§ã³ã«-DUSE_EXTERNAL_IDãæå®ãããã¨ã§åãæ©è½ãå®
+	ç¾ããããã«ããããï¼ãã®ãªãã·ã§ã³ã¯å»æ­¢ããï¼
+
+ã»ãã¹1ã®çæãã¡ã¤ã«åï¼--cfg1_outï¼
+	ãã®ãªãã·ã§ã³ã¯å»æ­¢ããï¼ç¾æç¹ã§ã¯ï¼åç­ã®æ©è½ã¯æã£ã¦ããªãï¼ã
+	ã®æ©è½ãå¿
+è¦ãªã¦ã¼ã¹ã±ã¼ã¹ãåºã¦ããå ´åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã
+	æ¡å¼µããï¼æ¡å¼µã¯å®¹æã§ããï¼ï¼
+
+ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãç½®ããã¦ãããã£ã¬ã¯ããªåï¼--cfg-directoryï¼
+	ãã®ãªãã·ã§ã³ã¯ä¸è¦ã¨ãªã£ãããï¼å»æ­¢ããï¼
+
+ã»ã¡ãã»ã¼ã¸ã«ã¿ã­ã°ãç½®ããã¦ãããã£ã¬ã¯ããªåï¼--msgcat-directoryï¼
+	Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã§ã¯ï¼ã¡ãã»ã¼ã¸ã«ã¿ã­ã°ã®æ©è½ããµãã¼ãã
+	ã¦ããªãããï¼ãã®ãªãã·ã§ã³ã¯å»æ­¢ããï¼
+
+ä»ã«ãå»æ­¢ããããªãã·ã§ã³ããããï¼ã»ã¨ãã©ä½¿ããã¦ããªãã¨æãããã
+ãï¼ããã«ã¯è¨è¼ãã¦ããªãï¼
+
+
+âASP1ã«ã¼ãã«ã¨ã®ã«ã¼ãã«ä»æ§ã®éã
+
+ãã®ç« ã§ã¯ï¼ASP1ã«ã¼ãã«åãã«è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ãï¼ASP3ã«ã¼ã
+ã«ä¸ã§åä½ãããããã«ï¼ä¿®æ­£ãå¿
+è¦ã¨ãªãä¸»ãªç¹ã«ã¤ãã¦èª¬æããï¼
+
+âæéã®åä½
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼ã·ã¹ãã æå»ï¼SYSTIMåï¼ï¼ç¸å¯¾æéï¼RELTIMåï¼ï¼ã¿ã¤
+ã ã¢ã¦ãæéï¼TMOåï¼ã®æéåä½ãï¼ããªç§ãããã¤ã¯ã­ç§ã«å¤æ´ããï¼ãã®
+ããï¼ãããã®æéãè¨è¿°ãã¦ããå®æ°å¤ãï¼1000åããå¤ã«æ¸ãæãããã¨
+ãå¿
+è¦ã§ããï¼
+
+âå¨æãã³ãã©ã¨ã¢ã©ã¼ã ãã³ãã©
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼å¨æãã³ãã©æ©è½ã¨ã¢ã©ã¼ã ãã³ãã©æ©è½ãæ¡å¼µãï¼å¨æ
+éç¥æ©è½ã¨ã¢ã©ã¼ã éç¥æ©è½ãå®è£
+ãã¦ããï¼å¾æ¥ã®å¨æï¼ã¢ã©ã¼ã ãã³ãã©
+ã¨åç­ã®æ©è½ã¯ï¼ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºãã«ããéç¥ã§å®ç¾ã§ããï¼
+å
+·ä½çã«ã¯ï¼éçAPIãä»¥ä¸ã®ä¾ã®ããã«æ¸ãæãããã¨ãå¿
+è¦ã§ããï¼
+
+ãï¼æ¸ãæãå
+	CRE_CYC(CYCHDR1, { TA_NULL, 0, cyclic_handler, 2000, 0 });
+	CRE_ALM(ALMHDR1, { TA_NULL, 0, alarm_handler });
+
+ãï¼æ¸ãæãå¾
+	CRE_CYC(CYCHDR1, { TA_NULL, { TNFY_HANDLER, 0, cyclic_handler },
+														2000000, 0 });
+	CRE_ALM(ALMHDR1, { TA_NULL, { TNFY_HANDLER, 0, alarm_handler }});
+
+âã¿ã¹ã¯ä¾å¤å¦ç
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼ã¿ã¹ã¯ä¾å¤å¦çæ©è½ãå»æ­¢ããï¼ã¿ã¹ã¯ä¾å¤å¦çæ©è½ãä½¿
+ç¨ãã¦ããå ´åã«ã¯ï¼ä»ã®æ©è½ãç¨ãã¦æ¸ãæãããã¨ãå¿
+è¦ã§ããï¼ä¾ãã°ï¼
+ã¿ã¹ã¯ä¾å¤å¦çã§å®ç¾ãã¦ããå¦çã¯ï¼ç¬ç«ããã¿ã¹ã¯ã§å®ç¾ããæ¹æ³ãæå
+ã§ããï¼ã¾ãï¼ã¿ã¹ã¯ä¾å¤å¦çã«ã¼ãã³ã®ä¸­ã§ã¿ã¹ã¯ãçµäºããã¦ããå ´åã«
+ã¯ï¼ã¿ã¹ã¯çµäºè¦æ±æ©è½ãç¨ãã¦æ¸ãæããããå¯è½æ§ãããï¼
+
+âã¡ã¼ã«ããã¯ã¹
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼ã¡ã¼ã«ããã¯ã¹ã®æ©è½ãå»æ­¢ããï¼åç­ã®æ©è½ã¯ï¼ãã¼ã¿
+ã­ã¥ã¼ã¾ãã¯åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã§å®ç¾ã§ããããï¼ããããç¨ããããã«ä¿®
+æ­£ããå¿
+è¦ãããï¼
+
+âãã®ä»ã®éã
+
+ãã®ä»ã«ï¼ä»¥ä¸ã®ä¿®æ­£ãå¿
+è¦ã«ãªãï¼
+
+ã»ASP3ã«ã¼ãã«ã§ã¯ï¼éçAPI ATT_ISRãå»æ­¢ããï¼éçAPI CRE_ISRãç¨ãã
+ãè¨è¿°ã«ä¿®æ­£ããå¿
+è¦ãããï¼
+
+ã»ASP3ã«ã¼ãã«ã§ã¯ï¼æ§è½è©ä¾¡ç¨ã®ãµã¼ãã¹ã³ã¼ã« get_utmãå»æ­¢ããï¼æ§è½
+ãè©ä¾¡ç®çã§ããã°ï¼é«åè§£è½ã¿ã¤ããåç
+§ãããµã¼ãã¹ã³ã¼ã« fch_hrtãç¨
+ããã¦ä»£æ¿ã§ããï¼
+
+ã»SIZEåãsize_tåã«å¤æ´ããï¼
+
+ã»ASP3ã«ã¼ãã«ã§ã¯ï¼å¾
+ã¡ç¶æ
+ã«å
+¥ããã¹ã¦ã®ãµã¼ãã¹ã³ã¼ã«ããï¼E_RASTER
+ããè¿ãå¯è½æ§ãããï¼ãã®ã¨ã©ã¼ãè¿ã£ãå ´åã®å¯¾ç­ãå¿
+è¦ã§ããï¼
+
+
+âÎ¼ITRON4.0ä»æ§ããã®ç§»è¡
+
+ãã®ç« ã§ã¯ï¼JSPã«ã¼ãã«ãä»ã®Î¼ITRON4.0ä»æ§æºæ ã®ã«ã¼ãã«ããï¼ASP3ã«ã¼
+ãã«ã«ç§»è¡ããããã®æ¹æ³ï¼ã¾ãã¯ãã³ãï¼ãèª¬æããï¼
+
+âãã¼ã¿åã¨å®æ°ã®å¤æ´
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼Î¼ITRON4.0ä»æ§ã®æ¬¡ã®ãã¼ã¿åãå»æ­¢ãã¦ããï¼å¯¾å¿ãã
+æ°ãããã¼ã¿åãç¨æãã¦ããã®ã§ï¼åç´ã«ç½®ãæããã°ããï¼
+
+	å»æ­¢ãããã¼ã¿å		ç½®ãæãããã¼ã¿å
+	------------------------------------------
+	B						int8_t
+	UB						uint8_t
+	VB						uint8_t
+	H						int16_t
+	UH						uint16_t
+	VH						uint16_t
+	W						int32_t
+	UW						uint32_t
+	VW						uint32_t
+	D						int64_t
+	UD						uint64_t
+	VD						uint64_t
+	VP						void *
+	INT						int_t
+	UINT					uint_t
+	BOOL					bool_t
+	SIZE					size_t
+	VP_INT					intptr_t
+
+ã¾ãï¼å®æ°ã«ã¤ãã¦ãï¼æ¬¡ã®éãç½®ãæããå¿
+è¦ãããï¼
+
+	å»æ­¢ããå®æ°			ç½®ãæããå®æ°
+	------------------------------------------
+	TRUE					true
+	FALSE					false
+
+ãªãï¼Î¼ITRON4.0ä»æ§ã®ãã¼ã¿åã¨å®æ°ãä½¿ãããã¢ããªã±ã¼ã·ã§ã³ã®ããã«ï¼
+Î¼ITRON4.0ä»æ§ã¨ã®äºææ§ãä¿ã¤ããã®itron.hãç¨æãã¦ãããï¼ä½¿ç¨ããã
+ã¨ã¯æ¨å¥¨ããªãï¼
+
+âãªãã¸ã§ã¯ãå±æ§ã®å¤æ´
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼æ¬¡ã®ãªãã¸ã§ã¯ãå±æ§ã¯ï¼ããã©ã«ãæ±ãã«ãã¦å»æ­¢ãã¦
+ããï¼
+
+	TA_HLNG					é«ç´è¨èªç¨ã¤ã³ã¿ãã§ã¼ã¹
+	TA_TFIFO				ã¿ã¹ã¯ã®å¾
+ã¡è¡åãFIFOé ã«
+	TA_WSGL					å¾
+ã¡ã¿ã¹ã¯ã¯1ã¤ã®ã¿
+
+ãããã®ãªãã¸ã§ã¯ãå±æ§ãæå®ãã¦ããå ´åã«ã¯ï¼åç´ã«åé¤ããã°ããï¼
+åé¤ãããã¨ã«ããï¼æå®ãããªãã¸ã§ã¯ãå±æ§ããªããªãå ´åã«ã¯ï¼
+TA_NULLãæå®ããï¼
+
+ãªãï¼Î¼ITRON4.0ä»æ§ã®ãªãã¸ã§ã¯ãå±æ§ãä½¿ãããã¢ããªã±ã¼ã·ã§ã³ã®ãã
+ã«ï¼Î¼ITRON4.0ä»æ§ã¨ã®äºææ§ãä¿ã¤ããã®itron.hãç¨æãã¦ãããï¼ä½¿ç¨ã
+ããã¨ã¯æ¨å¥¨ããªãï¼
+
+âã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®å¤æ´
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«ãããCè¨èªã
+ãªãã­ã»ããµã®ãã£ã¬ã¯ãã£ãã®æ±ããå¤æ´ã«ãªã£ã¦ããããï¼ã·ã¹ãã ã³ã³
+ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®å¤æ´ãå¿
+è¦ã«ãªãï¼
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ä¸­ã«è¨è¿°ã§ãã
+ãã£ã¬ã¯ãã£ããï¼ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼ã¨æ¡ä»¶ãã£ã¬ã¯
+ãã£ãï¼#ifï¼#ifdefãªã©ï¼ã®ã¿ã¨ãªã£ã¦ããï¼ãã®ããï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥
+ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«ãã¯ã­å®ç¾©ãã£ã¬ã¯ãã£ãï¼#defineï¼ãå«ã¾ãã¦ããå ´
+åã«ã¯ï¼ãã®è¨è¿°ãåé¤ãï¼å¿
+è¦ã§ããã°ï¼#includeãã£ã¬ã¯ãã£ãã§ã¤ã³ã¯
+ã«ã¼ããããã¡ã¤ã«ä¸­ã«ç§»åããå¿
+è¦ãããï¼
+
+Î¼ITRON4.0ä»æ§ã«æºæ ãã¦è¨è¿°ãããã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤
+ã«ä¸­ã®#includeãã£ã¬ã¯ãã£ãã¯ï¼INCLUDEãã£ã¬ã¯ãã£ãã«æ¸ãæããå¿
+è¦ã
+ããï¼INCLUDEãã£ã¬ã¯ãã£ãã§ã¤ã³ã¯ã«ã¼ããããã¡ã¤ã«ã¯ï¼ã·ã¹ãã ã³ã³ãã£
+ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ä¸é¨ã¨ã¿ãªãããããï¼ä¸è¨ã¨åãå¶éãããï¼
+
+éã«ï¼Î¼ITRON4.0ä»æ§ã«æºæ ãã¦è¨è¿°ãããã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+ãã¡ã¤ã«ä¸­ã®INCLUDEéçAPIã¯ï¼#includeãã£ã¬ã¯ãã£ãã«æ¸ãæããå¿
+è¦ã
+ããï¼
+
+âãªãã¸ã§ã¯ãIDã®èªåå²ä»ãã¸ã®å¯¾å¿
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼ãªãã¸ã§ã¯ãã®IDçªå·ãèªåå²ä»ããããã¨ãåºæ¬ã¨ãªã£
+ã¦ããï¼ASP3ã«ã¼ãã«ãç¨ããéã®IDçªå·ã®ç®¡çæ¹æ³ã«ã¤ãã¦ã¯ï¼ãTOPPERS/
+ASP3ã«ã¼ãã« ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ãã®ã11.4 ãªãã¸ã§ã¯ãIDã®ç®¡çãã®ç¯
+ã«èª¬æãããã®ã§ï¼ã¾ãã¯ãããåç
+§ãããã¨ï¼
+
+å¾æ¥ï¼IDçªå·ãæåã§å²ãä»ãã¦ããï¼æåã§å²ãä»ãã¦ããIDçªå·ãå¤æ´ã
+ãããªãå ´åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®æã¤IDçªå·ã®å²ä»ãããã¡ã¤ã«ãã
+åãè¾¼ãæ©è½ï¼--id-input-fileãªãã·ã§ã³ï¼ãç¨ãããã¨ã§ï¼æåã§å²ãä»ã
+ãIDçªå·ãç¨ãããã¨ãã§ããï¼ãã®å ´åã«ï¼æåã§å²ãä»ããIDçªå·ã¯ï¼ã³
+ã³ãã£ã®ã¥ã¬ã¼ã¿ã--id-input-fileãªãã·ã§ã³ã§åãè¾¼ããã¡ã¤ã«ä¸­ã«ã®ã¿è¨
+è¿°ãï¼ã¢ããªã±ã¼ã·ã§ã³ã®ã½ã¼ã¹ãã­ã°ã©ã ããã¯ï¼kernel_cfg.hãç¨ããã
+ã¨ãæã¾ããï¼
+
+âããããã¡ã¤ã«ã®å¤æ´
+
+Î¼ITRON4.0ä»æ§ã«ããã¦ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæããèªåå²ä»ãçµæãã
+ããã¡ã¤ã«ã®åç§°ãkernel_id.hã§ãã£ããï¼ASP3ã«ã¼ãã«ã§ã¯ï¼
+kernel_cfg.hã«å¤æ´ã«ãªã£ã¦ããï¼kernel_cfg.hã®æ¹ãå«ã¾ããå®ç¾©ãå¤ãï¼ï¼
+kernel_id.hãã¤ã³ã¯ã«ã¼ããã¦ããã¢ããªã±ã¼ã·ã§ã³ã¯ï¼kernel_cfg.hãã¤ã³
+ã¯ã«ã¼ãããããã«å¤æ´ããï¼
+
+âsta_tskã®ç½®ãæã
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼ã¿ã¹ã¯ãèµ·åãããµã¼ãã¹ã³ã¼ã«ã¨ãã¦act_tskããµãã¼ã
+ãã¦ããï¼sta_tskããµãã¼ããã¦ããªãï¼act_tskã¨sta_tskã®æ©è½ãæ¯è¼ãã
+å ´åï¼åè
+ã¯ã¿ã¹ã¯èµ·åã®ã­ã¥ã¼ã¤ã³ã°æ©è½ãæã¤ã®ã«å¯¾ãã¦ï¼å¾è
+ã¯ã¿ã¹ã¯
+ã«èµ·åã³ã¼ããæ¸¡ãæ©è½ãæã¤ï¼ãã®ããï¼sta_tskãact_tskã«ç½®ãæããå ´
+åã«ï¼èµ·åã³ã¼ããæ¸¡ãæ©è½ãã©ã®ããã«å®ç¾ããããåé¡ã¨ãªãï¼
+
+èµ·åã³ã¼ããæ¸¡ãæ©è½ãæãç°¡åã«ä»£ç¨ããæ¹æ³ã¯ï¼èµ·åã³ã¼ããæ¸¡ãããã®
+ãã¼ã¿ã­ã¥ã¼ãç¨æããæ¹æ³ã§ããï¼ã¿ã¹ã¯ãèµ·åããå¦çåä½ã¯ï¼ãã¼ã¿
+ã­ã¥ã¼ã«èµ·åã³ã¼ããéä¿¡ããå¾ï¼act_tskã«ããã¿ã¹ã¯ãèµ·åããï¼èµ·åãã
+ãã¿ã¹ã¯ã¯ï¼ãã¼ã¿ã­ã¥ã¼ããèµ·åã³ã¼ããåä¿¡ããï¼
+
+ã¿ã¹ã¯èµ·åã®ã­ã¥ã¼ã¤ã³ã°ãèµ·ãããªããã¨ãä¿è¨¼ã§ããï¼è¨ãæããã¨ï¼ã¿
+ã¹ã¯ãèµ·åããæã«ã¯ï¼å¯¾è±¡ã¿ã¹ã¯ã¯ä¼æ­¢ç¶æ
+ã«ãããã¨ãä¿è¨¼ã§ããå ´åã«
+ã¯ï¼èµ·åã³ã¼ããã°ã­ã¼ãã«å¤æ°ã«ç½®ãã¦æ¸¡ãæ¹æ³ãããï¼ã¿ã¹ã¯ãèµ·åãã
+å¦çåä½ããã®ã°ã­ã¼ãã«å¤æ°ã«æ¸ãã®ã¯ï¼ã¿ã¹ã¯ãä¼æ­¢ç¶æ
+ã®éã«éããï¼
+èµ·åãããã¿ã¹ã¯ããã®ã°ã­ã¼ãã«å¤æ°ãèª­ãã®ã¯ï¼ã¿ã¹ã¯ãå®è¡ã§ããç¶æ
+
+ã®éã«éãããããï¼ã°ã­ã¼ãã«å¤æ°ã«å¯¾ããæä»å¶å¾¡ã¯å¿
+è¦ãªãï¼
+
+âå¨æãã³ãã©ã®éäºææ§
+
+TA_PHSå±æ§ã§ãªãå¨æãã³ãã©ã«ããã¦ï¼sta_cycãå¼ã³åºããå¾ï¼æåã«å¨æ
+ãã³ãã©ãèµ·åãããæå»ãï¼Î¼ITRON4.0ä»æ§ã§ã¯ï¼sta_cycãå¼ã³åºãã¦ãã
+å¨æãã³ãã©ã®èµ·åå¨æï¼cyctimï¼ã§æå®ããç¸å¯¾æéå¾ã¨ãªã£ã¦ãããï¼
+ASP3ã«ã¼ãã«ã§ã¯ï¼èµ·åä½ç¸ï¼cycphsï¼ã§æå®ããç¸å¯¾æéå¾ã¨ãªã£ã¦ããï¼
+
+CRE_CYCã«ããã¦ï¼TA_STAå±æ§ãæå®ããªãå ´åã«ã¯ï¼cycphsã«cyctimã¨åãå¤
+ãæå®ãããã¨ã§ï¼Î¼ITRON4.0ä»æ§ã¨åãæ¯èãã¨ãªãï¼Î¼ITRON4.0ä»æ§ã§ã¯ï¼
+TA_STAå±æ§ã¨TA_PHSå±æ§ã®ããããæå®ããªãå ´åã«ã¯ï¼cycphsã¯æå³ãæã
+ãªãï¼ï¼
+
+TA_STAå±æ§ãæå®ããå ´åã«ã¯ï¼ã«ã¼ãã«ã®èµ·åå¾ï¼æåã«å¨æãã³ãã©ãèµ·
+åãããã¾ã§ã®ç¸å¯¾æéã¨ï¼sta_cycãå¼ã³åºãã¦ããæåã«å¨æãã³ãã©ãèµ·
+åãããã¾ã§ã®ç¸å¯¾æéãåä¸ã§ãããã°ï¼ãã®æéãcycphsã«æå®ããã°ã
+ãï¼ä¸¡è
+ãåä¸ã§ã¯ä¸é½åãªå ´åã«ã¯ï¼Î¼ITRON4.0ä»æ§ã¨åãæ¯èããããã
+ãã¨ã¯ã§ããªãï¼ä»£æ¿ææ®µã¨ãã¦ã¯ï¼ä»¥ä¸ã®2ã¤ãèããããï¼
+
+(1) TA_STAå±æ§ãä½¿ç¨ããï¼ã«ã¼ãã«ã®èµ·åå¾é©åãªã¿ã¤ãã³ã°ã§sta_cycãå¼
+ã³åºããã¨ã§ï¼å¨æãã³ãã©ãåä½éå§ããï¼
+
+(2) å¨æãã³ãã©ã2ã¤ç¨ããï¼1ã¤ãTA_STAå±æ§ã¨ãï¼sta_cycã§åä½ãå¶å¾¡ã
+ãã®ãããçæ¹ã®å¨æãã³ãã©ã¨ããï¼
+
+âåçã¡ã¢ãªç®¡çã®å®ç¾
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼åçã¡ã¢ãªç®¡çã¯ï¼ã«ã¼ãã«å
+ã§å®ç¾ããããã©ã¤ãã©ãª
+ã¨ãã¦å®ç¾ããæ¹ãé©åã¨èãï¼å¯å¤é·ã¡ã¢ãªãã¼ã«ããµãã¼ããã¦ããªãï¼
+ãããï¼ã¢ããªã±ã¼ã·ã§ã³ãåçã¡ã¢ãªç®¡çï¼mallocï¼freeï¼ãç¨ããå ´åã«ï¼
+ãã®å®ç¾ã«å¯å¤é·ã¡ã¢ãªãã¼ã«ãç¨ãããããã¨ãããï¼å¯å¤é·ã¡ã¢ãªãã¼ã«
+ããµãã¼ãããã¦ããªããã¨ãåé¡ã¨ãªãå ´åãããï¼
+
+ããã§ï¼ããã§ã¯ï¼ã¢ããªã±ã¼ã·ã§ã³ãç¨ããmallocï¼freeãï¼ãªã¼ãã³ã½ã¼
+ã¹ã®ã¡ã¢ãªå²ä»ãã©ã¤ãã©ãªã§ããTLSFãç¨ãã¦å®ç¾ããæ¹æ³ã«ã¤ãã¦è¿°ã¹ãï¼
+
+TLSFã¯ï¼ãªã¢ã«ã¿ã¤ã ã·ã¹ãã åãã®å¹ççãªã¡ã¢ãªå²ä»ãã©ã¤ãã©ãªã§ããï¼
+TLSFã®ã©ã¤ã»ã³ã¹æ¡ä»¶ã¯ï¼GPLã¨LGPLã®ãã¥ã¢ã«ã©ã¤ã»ã³ã¹ã§ãããï¼TLSFãé
+å¸¸ã®ã©ã¤ãã©ãªã¨ãã¦ç¨ãã¦å®è£
+ããããã­ã°ã©ã ã¯ï¼TLSFã®æ´¾çç©ã¨ã¯è¦ãª
+ãããï¼GPLãé©ç¨ãããªããã¨ãæè¨ããã¦ããï¼
+
+TLSFã¯ï¼ä»¥ä¸ã®ã¦ã§ããµã¤ããããã¦ã³ã­ã¼ããããã¨ãã§ããï¼
+
+	http://www.gii.upv.es/tlsf/
+
+TLSFï¼åä½ç¢ºèªã¯ï¼Version 2.4.6ï¼ã®ã¢ã¼ã«ã¤ãã®ä¸­ããï¼tlsf.hã¨tlsf.cãï¼
+ã¢ããªã±ã¼ã·ã§ã³ã¾ãã¯ã©ã¤ãã©ãªã®ã½ã¼ã¹ãã¡ã¤ã«ã®ç½®ããããã£ã¬ã¯ããª
+ã«ã³ãã¼ããï¼
+
+tlsf.hã¯åçã¡ã¢ãªç®¡çãç¨ããã¢ããªã±ã¼ã·ã§ã³ããã¤ã³ã¯ã«ã¼ããã¹ããã
+ããã¡ã¤ã«ï¼tlsf.cã¯åçã¡ã¢ãªç®¡çã©ã¤ãã©ãªã®æ¬ä½ã§ããï¼tlsf.cã«ã¯ä»¥
+ä¸ã®ãããªãããããã¦ãï¼
+
+----------------------------------------
+*** tlsf.c.orig	Wed Sep 16 16:40:39 2009
+--- tlsf.c	Wed Sep 16 16:45:10 2009
+***************
+*** 76,82 ****
+  
+  
+  #if TLSF_USE_LOCKS
+! #include "target.h"
+  #else
+  #define TLSF_CREATE_LOCK(_unused_)   do{}while(0)
+  #define TLSF_DESTROY_LOCK(_unused_)  do{}while(0) 
+--- 76,88 ----
+  
+  
+  #if TLSF_USE_LOCKS
+! #include "kernel.h"
+! #include "kernel_cfg.h"
+! #define TLSF_MLOCK_T ID
+! #define TLSF_CREATE_LOCK(lock)   (*lock = TLSF_MTX)
+! #define TLSF_DESTROY_LOCK(lock)  ini_mtx(*lock)
+! #define TLSF_ACQUIRE_LOCK(lock)  loc_mtx(*lock)
+! #define TLSF_RELEASE_LOCK(lock)  unl_mtx(*lock)
+  #else
+  #define TLSF_CREATE_LOCK(_unused_)   do{}while(0)
+  #define TLSF_DESTROY_LOCK(_unused_)  do{}while(0) 
+***************
+*** 169,176 ****
+  
+  #ifdef USE_PRINTF
+  #include <stdio.h>
+! # define PRINT_MSG(fmt, args...) printf(fmt, ## args)
+! # define ERROR_MSG(fmt, args...) printf(fmt, ## args)
+  #else
+  # if !defined(PRINT_MSG)
+  #  define PRINT_MSG(fmt, args...)
+--- 175,184 ----
+  
+  #ifdef USE_PRINTF
+  #include <stdio.h>
+! #include <t_stddef.h>
+! #include <t_syslog.h>
+! # define PRINT_MSG(fmt, args...) syslog(LOG_ERROR, fmt, ## args)
+! # define ERROR_MSG(fmt, args...) syslog(LOG_ERROR, fmt, ## args)
+  #else
+  # if !defined(PRINT_MSG)
+  #  define PRINT_MSG(fmt, args...)
+----------------------------------------
+  
+ãã®ãããã¯ï¼tlsf.cã«ä»¥ä¸ã®ä¿®æ­£ãå ãã¦ããï¼
+
+ã»PRINT_MSGããã³ERROR_MSGãï¼syslogãç¨ããããã«å¤æ´ããï¼
+ã»ã¿ã¹ã¯éã®æä»ãï¼ãã¥ã¼ããã¯ã¹ãç¨ãã¦è¡ãï¼
+
+mallocï¼freeãè¤æ°ã®ã¿ã¹ã¯ããå¼ã³åºãå ´åã«ã¯ï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ã«
+-DTLSF_USE_LOCKSãè¿½å ãï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«æ¬¡ã®
+ãããªè¨è¿°ãè¿½å ããï¼ãã¥ã¼ããã¯ã¹ã®å±æ§ã¯å¤æ´ãã¦ãããï¼ï¼
+
+----------------------------------------
+CRE_MTX(TLSF_MTX, { TA_TPRI, 0 });
+----------------------------------------
+
+TLSFãä½¿ç¨ãããã­ã°ã©ã ã§ã¯ï¼ã¡ã¢ãªãã¼ã«ã®é åãé
+åã¨ãã¦ç¢ºä¿ãã
+ï¼ä¸ã®ä¾ã¯ï¼ã¡ã¢ãªãã¼ã«ã®ããã«10KBã®é åãç¢ºä¿ãã¦ããï¼ï¼
+
+----------------------------------------
+#define MEMORY_POOL_SIZE	(TOPPERS_ROUND_SZ(10*1024, sizeof(intptr_t))
+							/* 10*1024ã®é¨åã¯ï¼é©åãªãµã¤ãºã«å¤æ´ãã */
+intptr_t memory_pool[MEMORY_POOL_SIZE / sizeof(intptr_t)];
+----------------------------------------
+
+æ¬¡ã«ã¡ã¢ãªãã¼ã«ã®åæåãè¡ãï¼
+
+----------------------------------------
+	init_memory_pool(MEMORY_POOL_SIZE, memory_pool);
+----------------------------------------
+
+ä»¥ä¸ã«ããï¼tlsf_mallocï¼tlsf_freeã§ï¼mallocï¼freeãå®ç¾ã§ããï¼
+
+ãªãï¼TLSFã¯ï¼è¤æ°ã®ã¡ã¢ãªãã¼ã«ãç¨ããæ©è½ãï¼ã¡ã¢ãªãã¼ã«ã®ãµã¤ãºã
+æ¡å¼µããæ©è½ãæã¤ï¼è©³ããã¯ï¼TLSFã®ã¢ã¼ã«ã¤ãä¸­ã®READMEãåç
+§ãããã¨ï¼
+
+ä»¥ä¸
Index: asp3_wo_tecs/trunk/doc/ovrhdr_memo.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/ovrhdr_memo.txt	(revision 305)
+++ 	(revision )
@@ -1,591 +1,0 @@
-													TOPPERS Confidential
-		TOPPERSãã­ã¸ã§ã¯ã ãã£ã¹ã«ãã·ã§ã³ã¡ã¢
-		ãªã¼ãã©ã³ãã³ãã©ã«é¢ããè¨­è¨ã¡ã¢
-
-		ä½æè
-: é«ç°åºç« ï¼åå¤å±å¤§å­¦ï¼
-		æçµæ´æ°: 2015å¹´8æ21æ¥
-
-âã¡ã¢ã®ä½ç½®ä»ã
-
-ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã®ãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µã«
-é¢ããè¨­è¨ã¡ã¢ã§ããï¼
-
-âãã¼ã¿åã¨å®æ°ã®å®ç¾©
-
-ãã­ã»ããµæéãè¡¨ç¾ãããã¼ã¿åPRCTIMã®å®ç¾©ãï¼t_stddef.hã«å«ããï¼
-
-----------------------------------------
-typedef	uint32_t		PRCTIM;		/* ãã­ã»ããµæé */
-----------------------------------------
-
-æ®ããã­ã»ããµæéã«æå®ã§ããæå¤§å¤ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ï¼target_kernel.h
-ã¾ãã¯ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ã§å®ç¾©ãããã®ã¨ãããï¼ããã©
-ã«ãã®å®ç¾©ãkernel.hã«å«ããï¼
-
-----------------------------------------
-#ifndef TMAX_OVRTIM
-#define TMAX_OVRTIM		UINT32_MAX
-#endif /* TMAX_OVRTIM */
-----------------------------------------
-
-ã¾ãï¼ãªã¼ãã©ã³ãã³ãã©ã®ãã¼ã¿åOVRHDRã®å®ç¾©ãï¼kernel.hã«å«ããï¼
-
-----------------------------------------
-typedef void	(*OVRHDR)(ID tskid, intptr_t exinf);
-----------------------------------------
-
-ãã®ä»ã«ï¼ãªã¼ãã©ã³ãã³ãã©æ©è½ã®ãµã¼ãã¹ã³ã¼ã«ã®å®£è¨ã¨é¢é£ããå®æ°ã®
-å®ç¾©ãï¼kernelã«å«ããï¼
-
-âç¨ãããã¼ãã¦ã§ã¢è³æºã¨ãµãã¼ãã§ããªãå ´åã®æªç½®
-
-ãªã¼ãã©ã³ãã³ãã©ãå®ç¾ããããã«ï¼ã·ã¹ãã æå»ãé²ããããã®é«åè§£è½
-ã¿ã¤ãã¨ã¯å¥ã®ã¿ã¤ãï¼ä»¥ä¸ï¼ããããªã¼ãã©ã³ã¿ã¤ãã¨å¼ã¶ï¼ãç¨ããï¼ã
-ã®ããï¼ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼ãªã¼ãã©ã³ãã³ãã©ããµãã¼ãã§ããªãå ´å
-ãèããããï¼
-
-ããã§ï¼ãªã¼ãã©ã³ãã³ãã©ããµãã¼ãã§ããå ´åã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã«
-ããã¦ï¼TOPPERS_TARGET_SUPPORT_OVRHDRããã¯ã­å®ç¾©ãããã®ã¨ããï¼
-
-ãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µã®kernel.hã§ã¯ï¼TOPPERS_TARGET_SUPPORT_OVRHDR
-ããã¯ã­å®ç¾©ããã¦ããã°ï¼TOPPERS_SUPPORT_OVRHDRãå®ç¾©ããï¼
-
-----------------------------------------
-#ifdef TOPPERS_TARGET_SUPPORT_OVRHDR
-#define TOPPERS_SUPPORT_OVRHDR			/* ãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µ */
-#endif /* TOPPERS_TARGET_SUPPORT_OVRHDR */
-----------------------------------------
-
-ãªã¼ãã©ã³ãã³ãã©æ©è½ã¯ï¼TOPPERS_SUPPORT_OVRHDRãå®ç¾©ããã¦ããå ´åã®
-ã¿çµã¿è¾¼ãï¼ããã«ããï¼ãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µãä½¿ç¨ãï¼ã¿ã¼ã²ãã
-ä¾å­é¨ããªã¼ãã©ã³ãã³ãã©ããµãã¼ããã¦ããå ´åã®ã¿ï¼ãªã¼ãã©ã³ãã³ã
-ã©æ©è½ãçµã¿è¾¼ã¾ãããã¨ã«ãªãï¼
-
-âãªã¼ãã©ã³ãã³ãã©ã«é¢é£ãããã¼ã¿æ§é 
-
-ãªã¼ãã©ã³ãã³ãã©ãå®è£
-ããããã«ï¼TCBã«ï¼ãªã¼ãã©ã³ãã³ãã©ãåä½ç¶æ
-
-ã§ãããã¨ãç¤ºããã£ã¼ã«ãstaovrã¨ï¼æ®ããã­ã»ããµæéãè¡¨ããã£ã¼ã«ã
-leftotmãè¿½å ããï¼task.hï¼ï¼
-
-----------------------------------------
-typedef struct task_control_block {
-	...
-	BIT_FIELD_BOOL	staovr : 1;		/* ãªã¼ãã©ã³ãã³ãã©åä½ç¶æ
- */
-	...
-	PRCTIM			leftotm;		/* æ®ããã­ã»ããµæé */
-	...
-} TCB;
-----------------------------------------
-
-ãªã¼ãã©ã³ãã³ãã©ã®åä½ç¶æ
-ã¯ï¼ã¿ã¹ã¯ã®ç»é²æã¨ã¿ã¹ã¯ãä¼æ­¢ç¶æ
-ã«é·ç§»
-ããæã«ï¼åä½ãã¦ããªãç¶æ
-ã«åæåãããï¼»NGKI2587ï¼½ãã¨ããï¼
-make_dormantã®ä¸­ã§staovrãfalseã«åæåããï¼task.cï¼ï¼
-
-----------------------------------------
-void
-make_dormant(TCB *p_tcb)
-{
-	...
-	p_tcb->staovr = false;
-	...
-}
-----------------------------------------
-
-ãªã¼ãã©ã³ãã³ãã©ã«å¯¾ãã¦ã¯ï¼ç®¡çãã­ãã¯ã¯å¿
-è¦ãªãï¼DEF_OVRã§å®ç¾©ãã
-æ
-å ±ãæ ¼ç´ããåæåãã­ãã¯ã®ã¿ãç¨æããï¼åæåãã­ãã¯ãï¼åä¸ã®è¦
-ç´ ã§ååã§ããï¼é
-åã§ããå¿
-è¦ã¯ãªãï¼overrun.hï¼ï¼
-
-----------------------------------------
-typedef struct overrun_handler_initialization_block {
-	ATR			ovratr;			/* ãªã¼ãã©ã³ãã³ãã©å±æ§ */
-	OVRHDR		ovrhdr;			/* ãªã¼ãã©ã³ãã³ãã©ã®èµ·åçªå° */
-} OVRINIB;
-----------------------------------------
-extern const OVRINIB	ovrinib;
-----------------------------------------
-
-ãªã¼ãã©ã³ã¿ã¤ããåä½ä¸­ããç¤ºããã©ã°ã¨ãã¦ï¼boot_tåã®å¤æ°
-ovrtimer_flagãç¨æããï¼overrun.hï¼overrun.cï¼ï¼
-
-----------------------------------------
-extern boot_t	ovrtimer_flag;
-----------------------------------------
-
-ã·ã³ã°ã«ãã­ã»ããµã®å ´åã«ã¯ï¼ãªã¼ãã©ã³ã¿ã¤ããåä½ä¸­ãã¯ï¼æ¬¡ã®æ¹æ³ã§
-å¤å¥ãããã¨ãã§ããï¼
-
-	ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§ã¯ï¼
-		(p_runtsk != NULL && p_runtsk->staovr)ã®æã®ã¿åä½ãã¦ããï¼
-	éã¿ã¹ã¯ã³ã³ãã­ã¹ãã§ã¯ï¼åä½ãã¦ããªãï¼
-
-ãã®ããï¼ãã®ãã©ã°ãç¨ããªãå®è£
-ãå¯è½ã§ãããï¼ãã«ããã­ã»ããµã¸ã®
-æ¡å¼µæ§ãã¿ã¼ã²ããä¾å­æ§ãä¸ããããã«ï¼ãããç¨ããå®è£
-ã¨ãã¦ããï¼å®
-éï¼Mac OS Xã¿ã¼ã²ããä¾å­é¨ã§ã¯ï¼ãããæ´»ç¨ãã¦ããï¼ï¼
-
-ovrtimer_flagãç¨ãããã¨ã«ãããã¨ããï¼å²è¾¼ã¿ï¼CPUä¾å¤åºå
-¥å£å¦çã«ã
-ãã¦ï¼p_runtskãNULLã§ãããã©ããããã§ãã¯ããã«ï¼ovrtimer_stopãå¼ã¶
-ãã¨ã¨ãã¦ããï¼ã¿ã¼ã²ããä¾å­é¨ ãã¼ãã£ã³ã°ã¬ã¤ãï¼ï¼
-
-âæ®ããã­ã»ããµæéã®ä¿å­ï¼å¾©å¸°å¦çã®å
-å®¹
-
-ãã£ã¹ãããã£ããã³å²è¾¼ã¿å¦çï¼CPUä¾å¤å¦çã®åºå
-¥å£ã§ï¼ã¿ã¹ã¯ã®æ®ããã­
-ã»ããµæéãä¿å­ï¼å¾©å¸°ããå¿
-è¦ãããï¼å
-·ä½çã«ã¯ï¼ä»¥ä¸ã®ãããªå¦çãå¿
-
-è¦ã§ããï¼
-
-(a) dispatchã¸ã®å
-¥å£
-
-ovrtimer_flagãtrueã§ããã°ï¼ã¾ãã¯ï¼p_runtsk->staovrãtrueã§ããã°ï¼ï¼
-ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ããï¼æ®ããã­ã»ããµæéãp_runtsk->leftotmã«æ ¼ç´
-ããï¼æ®ããã­ã»ããµæéããªããªã£ã¦ããå ´åã«ã¯ï¼p_runtsk->leftotmã«0
-ãæ ¼ç´ããï¼
-
-(b) dispatchããã®åºå£
-
-p_runtsk->staovrãtrueã§ããã°ï¼æ®ããã­ã»ããµæéãp_runtsk->leftotmã¨
-ãã¦ãªã¼ãã©ã³ã¿ã¤ããåä½éå§ããï¼
-
-(c) å²è¾¼ã¿å¦çï¼CPUä¾å¤å¦çã®å
-¥å£
-
-ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿ï¼CPUä¾å¤ãçºçããå ´åã«ï¼ovrtimer_flagã
-trueã§ããã°ï¼ã¾ãã¯ï¼p_runtskãNULLã§ãªãï¼p_runtsk->staovrãtrueã§ã
-ãã°ï¼ï¼ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ããï¼æ®ããã­ã»ããµæéã
-p_runtsk->leftotmã«æ ¼ç´ããï¼æ®ããã­ã»ããµæéããªããªã£ã¦ããå ´åã«ã¯ï¼
-p_runtsk->leftotmã«0ãæ ¼ç´ããï¼
-
-ãã®å¦çã¯ï¼ã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ããã¹ã¦ç¦æ­¢ããç¶æ
-ã§è¡ãå¿
-è¦ãããï¼
-å²è¾¼ã¿ï¼CPUä¾å¤çºçç´å¾ã«ãã¹ã¦ã®å²è¾¼ã¿ãç¦æ­¢ãããªããã­ã»ããµã§ã¯ï¼å²
-è¾¼ã¿ãç¦æ­¢ããå¾ã«ãã®å¦çãè¡ãå¿
-è¦ãããï¼
-
-(d) å²è¾¼ã¿å¦çï¼CPUä¾å¤å¦çã®åºå£
-
-ã¿ã¹ã¯ã³ã³ãã­ã¹ãã«æ»ãå ´åã«ï¼p_runtskãNULLã§ãªãï¼p_runtsk->staovr
-ãtrueã§ããã°ï¼æ®ããã­ã»ããµæéãp_runtsk->leftotmã¨ãã¦ãªã¼ãã©ã³ã¿
-ã¤ããåä½éå§ããï¼
-
-(e) ã¿ã¹ã¯ã®çµäºæ
-
-ovrtimer_flagãtrueã§ããã°ï¼ã¾ãã¯ï¼p_runtsk->staovrãtrueã§ããã°ï¼ï¼
-ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ãããï¼æ®ããã­ã»ããµæéãp_runtsk->leftotmã«æ ¼
-ç´ããå¿
-è¦ã¯ãªãï¼ã¿ã¹ã¯ãçµäºããã¨ï¼ãªã¼ãã©ã³ãã³ãã©ã¯åæ­¢ããã
-ãï¼ï¼
-
-(f) ã¿ã¹ã¯ã®å®è¡éå§æ
-
-p_runtsk->staovrãtrueã§ããã°ï¼æ®ããã­ã»ããµæéãp_runtsk->leftotmã¨
-ãã¦ãªã¼ãã©ã³ã¿ã¤ããåä½éå§ããï¼
-
-âã¿ã¼ã²ããä¾å­é¨ã®ã¤ã³ã¿ãã§ã¼ã¹
-
-ãªã¼ãã©ã³ãã³ãã©æ©è½ã®ã¿ã¼ã²ããä¾å­é¨ã§ã¯ï¼ãªã¼ãã©ã³ãã³ãã©ç¨ã®ã¿
-ã¤ãï¼ä»¥ä¸ï¼ãªã¼ãã©ã³ã¿ã¤ãã¨å¼ã¶ï¼ãæä½ããããã®æ©è½ãæä¾ããï¼
-
-ã¾ãï¼æ¬¡ã®å®æ°ããã¯ã­å®ç¾©ããï¼
-
-(1) TMAX_OVRTIM
-
-æ®ããã­ã»ããµæéã¨ãã¦ãªã¼ãã©ã³ãã³ãã©ç¨ã¿ã¤ãã«è¨­å®ã§ããæå¤§ã®å¤ï¼
-åä½ã¯ãã¤ã¯ã­ç§ã¨ããï¼ã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ããªãå ´åã«ã¯ï¼kernel.h
-ã§UINT32_MAXã«å®ç¾©ããï¼
-
-ã¾ãï¼æ¬¡ã®5ã¤ã®é¢æ°ãç¨æããï¼
-
-(1) void target_ovrtimer_initialize(intptr_t exinf)
-
-ãªã¼ãã©ã³ã¿ã¤ãã®åæåå¦çãè¡ãï¼ã¿ã¤ãã®åä½éå§ã¯è¡ããªãï¼
-
-ãã®é¢æ°ã¯ï¼target_timer.cfgä¸­ã«è¨è¿°ããéçAPIã«ããï¼åæåã«ã¼ãã³ã¨
-ãã¦ã«ã¼ãã«ã«ç»é²ãããã¨ãæ³å®ãã¦ããï¼
-
-(2) void target_ovrtimer_terminate(intptr_t exinf)
-
-ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢å¦çãè¡ãï¼
-
-ãã®é¢æ°ã¯ï¼target_timer.cfgä¸­ã«è¨è¿°ããéçAPIã«ããï¼çµäºå¦çã«ã¼ãã³
-ã¨ãã¦ã«ã¼ãã«ã«ç»é²ãããã¨ãæ³å®ãã¦ããï¼
-
-(3) void target_ovrtimer_start(PRCTIM ovrtim)
-
-ãªã¼ãã©ã³ã¿ã¤ããï¼ovrtimã§æå®ããæéãçµéãããå²è¾¼ã¿ãçºçããã
-ãã«è¨­å®ãï¼åä½éå§ããï¼ovrtimã0ã®å ´åã¯ï¼ã§ããéãæ©ããªã¼ãã©ã³ã¿
-ã¤ãå²è¾¼ã¿ãçºçãããï¼ovrtimã®åä½ã¯ãã¤ã¯ã­ç§ã¨ããï¼
-
-(4) PRCTIM target_ovrtimer_stop(void)
-
-ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ãï¼ã¿ã¤ãã®æ®ãæéï¼å²è¾¼ã¿çºçã¾ã§ã®æéï¼ãè¿
-ãï¼æ®ãæéããªããªã£ã¦ããå ´åã«ã¯ï¼0ãè¿ãï¼ã¾ãï¼ãªã¼ãã©ã³ã¿ã¤ãã
-ãã®å²è¾¼ã¿è¦æ±ãã¯ãªã¢ããï¼ã¯ãªã¢ããªãã¨ã¹ããªã¢ã¹å²è¾¼ã¿ãçºçãããï¼
-ã¯ãªã¢ãããã¨ã¯å¿
-é ã§ã¯ãªãï¼ï¼
-
-(5) PRCTIM target_ovrtimer_get_current(void)
-
-ãªã¼ãã©ã³ã¿ã¤ãã®æ®ãæéï¼å²è¾¼ã¿çºçã¾ã§ã®æéï¼ãèª­ã¿åºãï¼æ®ãæé
-ããªããªã£ã¦ããå ´åã«ã¯ï¼0ãè¿ãï¼ãªã¼ãã©ã³ã¿ã¤ãããã®å²è¾¼ã¿ã¯ã¯ãªã¢
-ããªãï¼
-
-âæ®ããã­ã»ããµæéã®ä¿å­ï¼å¾©å¸°ã®å®è£
-ï¼ã¿ã¼ã²ããéä¾å­é¨ï¼
-
-ã¾ãï¼(a)ã¨(b)ãå®ç¾ããé¢æ°ovrtimer_stopã¨ovrtimer_startãã¿ã¼ã²ããé
-ä¾å­é¨ã«è¨­ãï¼ã¿ã¼ã²ããä¾å­é¨ã®è©²å½ç®æããå¼ã³åºãããã«ããï¼
-
-----------------------------------------
-void
-ovrtimer_stop(void)
-{
-	if (ovrtimer_flag) {
-		assert(p_rutsk != NULL && p_runtsk->staovr);
-		p_runtsk->leftotm = target_ovrtimer_stop();
-		ovrtimer_flag = false;
-	}
-}
-----------------------------------------
-void
-ovrtimer_start(void)
-{
-	if (p_runtsk->staovr) {
-		target_ovrtimer_start(p_runtsk->leftotm);
-		ovrtimer_flag = true;
-	}
-}
-----------------------------------------
-
-
-(c)ã¯ï¼(a)ã¨åãå¦çå
-å®¹ã§ããããï¼ovrtimer_stopãå¼ã³åºãã°ããï¼(d)
-ã¯ï¼p_runtskãNULLã§ãªãå ´åã«ï¼ovrtime_startãå¼ã³åºãããã«å®ç¾ããã°
-ããï¼
-
-(e)ã¯ï¼æ®ããã­ã»ããµæéãp_runtsk->leftotmã«æ ¼ç´ããå¿
-è¦ããªãç¹ã§
-(a)ã¨å¦çå
-å®¹ãç°ãªãããï¼ext_tskã¨ena_terã«æ¬¡ã®ä¿®æ­£ãå ãã
-ï¼task_term.cï¼ï¼task_terminateã®ä¸­ã§ï¼TCBä¸­ã®staovrãåæåããããï¼
-ãããå¼ã¶åã«ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢å¦çãå
-¥ããå¿
-è¦ãããï¼
-
-----------------------------------------
-ER
-ext_tsk(void)
-{
-	...
-#ifdef TOPPERS_SUPPORT_OVRHDR
-	if (p_runtsk->staovr) {
-		(void) target_ovrtimer_stop();
-		ovrtimer_flag = false;
-	}
-#endif /* TOPPERS_SUPPORT_OVRHDR */
-	(void) task_terminate(p_runtsk);
-	exit_and_dispatch();
-	...
-}
-----------------------------------------
-ER
-ena_ter(void)
-{
-		...
-#ifdef TOPPERS_SUPPORT_OVRHDR
-		if (p_runtsk->staovr) {
-			(void) target_ovrtimer_stop();
-			ovrtimer_flag = false;
-		}
-#endif /* TOPPERS_SUPPORT_OVRHDR */
-		(void) task_terminate(p_runtsk);
-		exit_and_dispatch();
-		...
-}
-----------------------------------------
-
-(f)ã¯(b)ã¨åãå¦çå
-å®¹ã§ããããï¼ovrtimer_startãå¼ã³åºãã°ããï¼
-
-âæ®ããã­ã»ããµæéã®ä¿å­ï¼å¾©å¸°ã®å®è£
-ï¼ã¿ã¼ã²ããä¾å­é¨ï¼
-
-(a) dispatchã¸ã®å
-¥å£
-
-----------------------------------------
-void
-dispatch(void)
-{
-|#ifdef TOPPERS_SUPPORT_OVRHDR
-|	ovrtimer_stop();					/* ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢ */
-|#endif /* TOPPERS_SUPPORT_OVRHDR */
-	ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãé¤ããã¹ã¦ã®ã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ã«ä¿å­ãã
-	...
-}
-----------------------------------------
-
-(b) dispatchããã®åºå£
-
-----------------------------------------
-void
-dispatch(void)
-{
-	...
-
-  dispatch_r:
-	ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãé¤ããã¹ã¦ã®ã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ããå¾©å¸°ãã
-|#ifdef TOPPERS_SUPPORT_OVRHDR
-|	ovrtimer_start();					/* ãªã¼ãã©ã³ã¿ã¤ãã®åä½éå§ */
-|#endif /* TOPPERS_SUPPORT_OVRHDR */
-	calltex(); â¦ (*b)
-}
-----------------------------------------
-
-(c) å²è¾¼ã¿å¦çï¼CPUä¾å¤å¦çã®å
-¥å£
-
-å²è¾¼ã¿å¦çï¼CPUä¾å¤å¦çã®å
-¥å£ã¯æ¬¡ã®éãã«ä¿®æ­£ããï¼
-
-----------------------------------------
-void
-<å²è¾¼ã¿ã®åºå
-¥å£å¦ç>(void)
-{
-	å°ãªãã¨ãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
-ã«ãã â¦ (*f)
-	ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ã«ä¿å­ãã
-	if (ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç) {
-|#ifdef TOPPERS_SUPPORT_OVRHDR
-|		ovrtimer_stop();				/* ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢ */
-|#endif /* TOPPERS_SUPPORT_OVRHDR */
-		dspflgãã¹ã¿ãã¯ã«ä¿å­ãã
-		dspflg = false;
-		ã¹ã¿ãã¯ãéã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæãï¼
-								éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæãã
-	}
-	...
-}
-----------------------------------------
-void
-<CPUä¾å¤ã®åºå
-¥å£å¦ç>(void)
-{
-		if (ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§CPUä¾å¤çºç) {
-			ï¼å°ãªãã¨ãï¼ã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
-ã«ãã
-|#ifdef TOPPERS_SUPPORT_OVRHDR
-|			ovrtimer_stop();			/* ãªã¼ãã©ã³ã¿ã¤ãã®åæ­¢ */
-|#endif /* TOPPERS_SUPPORT_OVRHDR */
-			dspflgãã¹ã¿ãã¯ã«ä¿å­ãã
-			dspflg = false;
-			ã¹ã¿ãã¯ãéã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæãï¼
-									éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæãã
-		}
-		...
-}
-----------------------------------------
-
-(d) å²è¾¼ã¿å¦çï¼CPUä¾å¤å¦çã®åºå£
-
-å²è¾¼ã¿å¦çï¼CPUä¾å¤å¦çã®åºå£ã¯æ¬¡ã®éãã«ä¿®æ­£ããï¼
-
-----------------------------------------
-void
-<å²è¾¼ã¿ã®åºå
-¥å£å¦ç>(void)
-{
-	...
-
-		  ret_int_r:
-			ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãé¤ããã¹ã¦ã®ã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ããå¾©å¸°ãã
-		}
-|#ifdef TOPPERS_SUPPORT_OVRHDR
-|		if (p_runtsk != NULL) {
-|			ovrtimer_start();			/* ãªã¼ãã©ã³ã¿ã¤ãã®åä½éå§ */
-|		}
-|#endif /* TOPPERS_SUPPORT_OVRHDR */
-	}
-	...
-}
-----------------------------------------
-void
-<CPUä¾å¤ã®åºå
-¥å£å¦ç>(void)
-{
-	...
-
-			  ret_exc_r:
-				ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãé¤ããã¹ã¦ã®ã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ããå¾©å¸°ãã
-			}
-|#ifdef TOPPERS_SUPPORT_OVRHDR
-|			if (p_runtsk != NULL) {
-|				ovrtimer_start();		/* ãªã¼ãã©ã³ã¿ã¤ãã®åä½éå§ */
-|			}
-|a#endif /* TOPPERS_SUPPORT_OVRHDR */
-		}
-		CPUä¾å¤å¦çããã®ãªã¿ã¼ã³å¾ã«ï¼CPUã­ãã¯è§£é¤ç¶æ
-ã«æ»ãããã«æºåãã
-	}
-	...
-}
-----------------------------------------
-
-(e) ã¿ã¹ã¯ã®çµäºæ
-
-ã¿ã¼ã²ããéä¾å­é¨ã®ext_tskã¨ena_terã§å¯¾å¿ããï¼
-
-(f) ã¿ã¹ã¯ã®å®è¡éå§æ
-
-----------------------------------------
-void
-activate_context(TCB *p_tcb)
-{
-	...
-
-  start_r:
-|#ifdef TOPPERS_SUPPORT_OVRHDR
-|	ovrtimer_start();					/* ãªã¼ãã©ã³ã¿ã¤ãã®åä½éå§ */
-|#endif /* TOPPERS_SUPPORT_OVRHDR */
-	CPUã­ãã¯è§£é¤ç¶æ
-ã«ãã
-	èªã¿ã¹ã¯ï¼p_runtskï¼ã®èµ·åçªå°ãï¼æ¡å¼µæ
-å ±ããã©ã¡ã¼ã¿ã¨ãã¦å¼ã³åºã
-	ext_tskã«åå²ãã ... (*c)
-}
-----------------------------------------
-
-âãªã¼ãã©ã³ãã³ãã©ã®å¼åºãã®å®è£
-
-
-ãªã¼ãã©ã³ã¿ã¤ããæºäºãï¼å²è¾¼ã¿ãçºçããå ´åã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã®
-å²è¾¼ã¿ãã³ãã©ï¼ã¾ãã¯ï¼å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ããï¼ã¿ã¼ã²ããéä¾å­
-é¨ã®call_ovrhdrãå¼ã³åºãï¼
-
-ããã§ï¼ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿ãã³ãã©ã®èµ·åã¨ï¼sta_ovrï¼stp_ovrã®å¼åº
-ãã®ç«¶åã®åé¡ãããï¼å
-·ä½ä¾ã¨ãã¦ï¼ãªã¼ãã©ã³ã¿ã¤ããæºäºããç´å¾ã«ï¼
-ä»ã®é«åªå
-åº¦ã®å²è¾¼ã¿ãçºçãï¼ãã®å¦çä¸­ã§ãªã¼ãã©ã³ãã³ãã©ãååä½é
-å§ï¼æ®ããã­ã»ããµã¯æ´æ°ãããï¼ãããå ´åãåæ­¢ãããå ´åãåé¡ã«ãªãï¼
-ãã®å ´åï¼ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿ãã³ãã©ã®ä¸­ã§ï¼ãªã¼ãã©ã³ãã³ãã©ãå¼
-ã³åºããªãããã«ãã¹ãã§ããï¼
-
-ã¿ã¼ã²ããéä¾å­é¨ã®call_ovrhdrã®å®è£
-ã¯æ¬¡ã®éãï¼
-
-----------------------------------------
-void
-call_ovrhdr(void)
-{
-	assert(sense_context());
-	assert(!sense_lock());
-	assert(ovrinib.ovrhdr != NULL);
-
-	lock_cpu();
-	if (p_runtsk != NULL && p_runtsk->staovr && p_runtsk->leftotm == 0U) {
-		p_runtsk->staovr = false;
-		unlock_cpu();
-
-		LOG_OVR_ENTER(p_runtsk);
-		((OVRHDR)(ovrinib.ovrhdr))(TSKID(p_runtsk), p_runtsk->p_tinib->exinf);
-		LOG_OVR_LEAVE(p_runtsk);
-	}
-	else {
-		/*
-		 *  ãã®ã«ã¼ãã³ãå¼ã³åºãããåã«ï¼ãªã¼ãã©ã³ãã³ãã©ã®èµ·åã
-		 *  ã­ã£ã³ã»ã«ãããå ´å
-		 */
-		unlock_cpu();
-	}
-}
-----------------------------------------
-
-p_runtskãNULLã®å ´åãèæ
-®ãã¦ããã®ã¯ï¼ã¹ããªã¢ã¹å²è¾¼ã¿ã«å¯¾ããã­ãã¹
-ãæ§ãç¢ºä¿ããããã§ããï¼
-
-ãªã¼ãã©ã³ãã³ãã©ã®å¼åºãå¾ã«ï¼å¼åºãåã®ç¶æ
-ï¼CPUã­ãã¯ï¼å²è¾¼ã¿åªå
-åº¦
-ãã¹ã¯ï¼ã«æ»ããªãã®ã¯ï¼ãã®ã«ã¼ãã³ããã®ãªã¿ã¼ã³å¾ã«ï¼å²è¾¼ã¿åºå£å¦ç
-ã§å
-ã®ç¶æ
-ã«æ»ãããã§ããï¼
-
-call_ovrhdrã¯ï¼å²è¾¼ã¿ãã³ãã©ããï¼ã¾ãã¯ï¼å²è¾¼ã¿ãã³ãã©ã¨ãã¦ï¼å¼ã³åº
-ãããããï¼ãã®ã«ã¼ãã³ã«æ¥ãã¾ã§ã«ï¼ovrtimer_stopãå¼ã°ãã¦ããï¼ããª
-ãã¡ï¼ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ãã¦ããï¼ï¼
-
-å²è¾¼ã¿ãã³ãã©ã®è¨­å®ã¯ï¼ä»¥ä¸ã®ãããªéçAPIãï¼target_timer.hä¸­ã«è¨è¿°ã
-ããã¨ã§è¡ããã®ã¨ããï¼ã¿ã¼ã²ããã®äºæ
-ã§å¤æ´ãã¦ããï¼ï¼
-
-----------------------------------------
-#ifdef TOPPERS_SUPPORT_OVRHDR
-ATT_INI({ TA_NULL, 0, target_ovrtimer_initialize });
-ATT_TER({ TA_NULL, 0, target_ovrtimer_terminate });
-CFG_INT(INTNO_OVRTIMER, { TA_ENAINT | INTATR_OVRTIMER, INTPRI_OVRTIMER });
-DEF_INH(INHNO_OVRTIMER, { TA_NULL, target_ovrtimer_handler });
-#endif /* TOPPERS_SUPPORT_OVRHDR */
-----------------------------------------
-
-ãããã®éçAPIä¸­ã®ï¼INHNO_OVRTIMERï¼INTNO_OVRTIMERï¼INTPRI_OVRTIMERï¼
-INTATR_OVRTIMERã®4ã¤ã®å®æ°ã¯ï¼target_timer.hä¸­ã§å®ç¾©ããï¼
-
-âãªã¼ããããã®ä½æ¸æ¹æ³
-
-ä»¥ä¸ã§èª¬æããæ¹æ³ã§ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã®ã¢ã»ã³ããªè¨èªã§è¨è¿°ãããã¨
-ãæ³å®ããã³ã¼ãããï¼ã¿ã¼ã²ããéä¾å­é¨ã®ovrtimer_startã¨
-ovrtimer_stopãå¼ã³åºãã¦ãããï¼ãããã®é¢æ°ã¯ç­ããã®ã§ï¼ã¢ã»ã³ããªè¨
-èªã®ä¸­ã«å±éããæ¹ãå¹çãããï¼ãããã®é¢æ°ãã¢ã»ã³ããªè¨èªã®ä¸­ã«å±é
-ããå ´åã«ã¯ï¼ããããï¼OMIT_OVRTIMER_STARTã¨OMIT_OVRTIMER_STOPããã¯ã­
-å®ç¾©ããï¼
-
-âãã«ããã­ã»ããµå¯¾å¿ã«ã¼ãã«ã¸ã®å¯¾å¿ã«é¢ããã¡ã¢
-
-ãã«ããã­ã»ããµå¯¾å¿ã«ã¼ãã«ã«ããã¦ï¼sta_ovrï¼stp_ovrãï¼å¼ã³åºããå¦
-çåä½ã¨ç°ãªããã­ã»ããµã«å²ãä»ããããã¿ã¹ã¯ãå¯¾è±¡ã«çºè¡ããå ´åã®å®
-è£
-ã¯å·¥å¤«ãè¦ããï¼
-
-åºæ¬çã«ã¯ï¼å¯¾è±¡ã¿ã¹ã¯ãå²ãä»ãããããã­ã»ããµã«å¯¾ãã¦ãã­ã»ããµéå²
-è¾¼ã¿ãããããã¨ã«ãã£ã¦ï¼å¯¾è±¡ã¿ã¹ã¯ã®ãªã¼ãã©ã³ãã³ãã©ã®åä½ãéå§ï¼
-åæ­¢ããããã¨ãå¿
-è¦ã§ããï¼
-
-âMac OS Xã¿ã¼ã²ããä¾å­é¨ã«é¢ããã¡ã¢
-
-Mac OS Xã¿ã¼ã²ããä¾å­é¨ã§ã¯ï¼å²è¾¼ã¿å¦çï¼CPUä¾å¤å¦çåºå£ãããªã¿ã¼ã³ã
-ãç´å¾ï¼dispatch_handlerãåä½ããåã«ï¼ä»ã®å²è¾¼ã¿å¦çãå®è¡ãããå ´å
-ãããï¼ãã®å ´åã«ã¯ï¼ovrtimer_stopãç¶ãã¦å¼ã³åºãããç¶æ³ãçããï¼ã¿ã¼
-ã²ããéä¾å­é¨ã§ovrtimer_flagãç¨ãããã¨ã§ï¼ovrtimer_stopãç¶ãã¦å¼ã³
-åºããã¦ãåé¡ãªãããã«ãªã£ã¦ããããï¼ãã®å®è£
-ã§å·®ãæ¯ããªãï¼
-
-ã¿ã¼ã²ããéä¾å­é¨ã§ovrtimer_flagãç¨ããªãå ´åï¼å²è¾¼ã¿å¦çï¼CPUä¾å¤åº
-å£å¦çã§ã¿ã¹ã¯åæããè¡ãå ´åã«ï¼åæãåã®ã¿ã¹ã¯ã«å¯¾ãã¦ãªã¼ãã©ã³ã
-ã³ãã©ãåä½éå§ãï¼ç´å¾ã«åæ­¢ããã¨ããï¼ã ããªï¼å¦çãè¡ãå®è£
-ãèã
-ãããï¼
-
-ä»¥ä¸
Index: asp3_wo_tecs/trunk/doc/porting.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/porting.txt	(revision 305)
+++ asp3_wo_tecs/trunk/doc/porting.txt	(revision 306)
@@ -3,6 +3,6 @@
 		ã¿ã¼ã²ããä¾å­é¨ ãã¼ãã£ã³ã°ã¬ã¤ã
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.B.0
-		æçµæ´æ°: 2016å¹´1æ12æ¥
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1.0
+		æçµæ´æ°: 2016å¹´3æ31æ¥
 
 ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ãï¼æªãµãã¼ãã®ã¿ã¼ã²ããã·ã¹
@@ -63,6 +63,6 @@
  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
  ã®è²¬ä»»ãè² ããªãï¼
- 
- $Id: porting.txt 507 2016-01-12 01:58:33Z ertl-hiro $
+
+ $Id: porting.txt 718 2016-04-01 15:05:01Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -93,5 +93,5 @@
 	2.5 ãªãã»ãããã¡ã¤ã«ã®çææ¹æ³
 	2.6 ãªã³ã¯æ¹æ³ã®è¨­å®
-	2.7 ä¾å­é¢ä¿ã®å®ç¾©
+	2.7 ä¾å­é¢ä¿ã®å®ç¾©ï¼ãªãã·ã§ã³ï¼
 	2.8 ãã®ä»ã®è¨­å®
 ï¼ï¼TOPPERSå
@@ -204,10 +204,12 @@
 	6.15 åçã¡ã¢ãªç®¡çï¼ãªãã·ã§ã³ï¼
 		6.15.1 TLSFãç¨ããã¡ã¢ãªç®¡çã¢ã¸ã¥ã¼ã«ã®ä¾
+	6.16 ã«ã¼ãã«å®è£
+ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
 ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
 	7.1 è¨­å®ãã¡ã¤ã«ã¨ã¿ã¼ã²ããä¾å­é¨ã®ä½ç½®ä»ã
-	7.2 ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+	7.2 ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
 		7.2.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
 		7.2.2 ã¿ã¼ã²ããéä¾å­é¨ã§å®ç¾©ãããå¤æ°
-	7.3 ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+	7.3 ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
 		7.3.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
 		7.3.2 ã¿ã¼ã²ããä¾å­é¨ã§è¡ãã¹ãã¨ã©ã¼ãã§ãã¯
@@ -215,14 +217,17 @@
 è¦ãªã¹ã¿ãã®å®ç¾©ãã¡ã¤ã«
 ï¼ï¼ã·ã¹ãã ãµã¼ãã¹ç­ã®ã¿ã¼ã²ããä¾å­é¨
-	8.0 ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­é¨
-	8.1 ã·ã¹ãã ã­ã°æ©è½ã®ã¿ã¼ã²ããä¾å­å®ç¾©
-	8.2 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¿ã¼ã²ããä¾å­å®ç¾©
-	8.3 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨
-		8.3.1 å¤æ°ï¼ãã¼ã¿åï¼ç®¡çé¢æ°
-		8.3.2 ããã¤ã¹ãµã¼ãã¹ã«ã¼ãã³
-		8.3.3 ã³ã¼ã«ããã¯ã«ã¼ãã³
-	8.4 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã®ã¿ã¼ã²ããä¾å­å®ç¾©
-	8.5 ãµã³ãã«ãã­ã°ã©ã ã¨ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©
-	8.6 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+	8.1 ã·ã¹ãã ãµã¼ãã¹ã®æ§æã¨ã¿ã¼ã²ããä¾å­é¨
+	8.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨
+		8.2.1 ã¿ã¼ã²ããä¾å­é¨ã®å®ç¾å½¢æ
+
+		8.2.2 ã¿ã¼ã²ããä¾å­é¨ã®åãå£ï¼æä¾ãããµã¼ãã¹ï¼
+		8.2.3 ã¿ã¼ã²ããä¾å­é¨ã®å¼ã³å£ï¼ã³ã¼ã«ããã¯ï¼
+	8.3 ä½ã¬ãã«åºå
+		8.3.1 ä½ã¬ãã«åºåã®å®ç¾å½¢æ
+
+		8.3.2 ä½ã¬ãã«åºåã®åãå£ï¼æä¾ãããµã¼ãã¹ï¼
+	8.4 ã¿ã¼ã²ããä¾å­é¨ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+	8.5 ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+	8.6 ãµã³ãã«ãã­ã°ã©ã ã¨ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©
 ï¼ï¼ãã®ä»
 	9.1 ãã­ã¥ã¡ã³ã
@@ -409,7 +414,7 @@
 
 ã»ãã®ä»ã®ãã£ã¬ã¯ããªã«ç½®ããã¦ããå ´åã«ã¯ï¼ã½ã¼ã¹ãã­ã°ã©ã ã®ã«ã¼ã
-ããã£ã¬ã¯ããªï¼configureãç½®ããã¦ãããã£ã¬ã¯ããªï¼ããã®ç¸å¯¾ãã¹ã§è¨
-ãè¿°ããï¼
-		ä¾ï¼#include "arch/logtrace/trace_config.h"
+ããã£ã¬ã¯ããªï¼configure.rbãç½®ããã¦ãããã£ã¬ã¯ããªï¼ããã®ç¸å¯¾ãã¹
+ãã§è¨è¿°ããï¼
+		ä¾ï¼#include "arch/tracelog/trace_log.h"
 
 ã»ã«ã¼ãã«ãæ§æãããã¡ã¤ã«ããï¼kernelãã£ã¬ã¯ããªä¸ã®ããããã¡ã¤ã«
@@ -477,5 +482,5 @@
 
 GNUéçºç°å¢ç¨ã®ã·ã¹ãã æ§ç¯ç°å¢ã¯ï¼ãµã³ãã«ã®Makefileï¼sample/Makefileï¼ï¼
-ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼configureï¼ã§æ§æãããï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼configure.rbï¼ã§æ§æãããï¼
 
 GNUéçºç°å¢ä»¥å¤ã®éçºç°å¢ãç¨ããå ´åã«ã¯ï¼ãããã®ãã¡ã¤ã«ãï¼ãã®éçº
@@ -525,5 +530,5 @@
 ãªãï¼ã¿ã¼ã²ããä¾å­é¨ãã£ã¬ã¯ããªã¯ï¼ã¿ã¼ã²ããéä¾å­ã®Makefileã«ãã
 ã¦ï¼å¤æ°TARGETDIRã«å®ç¾©ããã¦ãããã¨ãæ³å®ããï¼ã¾ãï¼ã½ã¼ã¹ãã­ã°ã©ã 
-ã®ã«ã¼ããã£ã¬ã¯ããªï¼configureãç½®ããã¦ãããã£ã¬ã¯ããªï¼ã¯ï¼å¤æ°
+ã®ã«ã¼ããã£ã¬ã¯ããªï¼configure.rbãç½®ããã¦ãããã£ã¬ã¯ããªï¼ã¯ï¼å¤æ°
 SRCDIRã«å®ç¾©ããã¦ãããã¨ãæ³å®ããï¼
 
@@ -610,8 +615,4 @@
 ----------------------------------------
 
-ã¾ãï¼ã¢ã»ã³ããªè¨èªã¬ãã«ã®è­å¥åãï¼Cè¨èªã¬ãã«ã®è­å¥åã®å
-é ­ã«"_"ã
-ä»ãããã®ã«ãªãå ´åã«ã¯ï¼CDEFSã«-DTOPPERS_LABEL_ASMãè¿½å ããï¼
-
 (2-4-6) SYSSVC_DIRS			ã·ã¹ãã ãµã¼ãã¹ã®ã½ã¼ã¹ãç½®ããããã£ã¬ã¯ããª
 (2-4-7) SYSSVC_ASMOBJS		ã¢ã»ã³ããªè¨èªã§è¨è¿°ãããã·ã¹ãã ãµã¼ãã¹ã®
@@ -657,5 +658,5 @@
 åã«ã¯ï¼ä¸ã«ç¤ºããå¤æ°ã«å®ç¾©ããï¼å
 ·ä½çã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¤å
-å¾ã·ã³ãã«ãã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ï¼target_def.csvï¼ãããå ´åã«ã¯ï¼
+å¾ã·ã³ãã«ãã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ï¼target_sym.defï¼ãããå ´åã«ã¯ï¼
 ãããæå®ãããªãã·ã§ã³ãè¿½å ããå¿
 è¦ãããï¼
@@ -666,5 +667,5 @@
 
 ----------------------------------------
-CFG_TABS := $(CFG_TABS) --cfg1-def-table $(TARGETDIR)/target_def.csv
+CFG_TABS := $(CFG_TABS) --symval-table $(TARGETDIR)/target_sym.def
 ----------------------------------------
 
@@ -738,48 +739,49 @@
 offset.hãçæããï¼
 
-ãã®æ¹æ³ãç¨ããããã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ãªãã»ãããã¡ã¤ã«çæç¨ã
-ã³ãã¬ã¼ããã¡ã¤ã«ãç¨æãï¼target_cfg1_out.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼
-ãããããã¡ã¤ã«ï¼ã¨target_def.csvï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼
-ã«è¨è¿°ãè¿½å ããå¿
-è¦ãããï¼ãªãï¼ãããã®ãã¡ã¤ã«ãæ°ãã«ç¨æããéã
-ä¿®æ­£ããéã«ã¯ï¼offset.hã«å¦¥å½ãªå®ç¾©ãçæããã¦ãããã¨ãç¢ºèªãã¹ãã§
-ããï¼
-
-ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤ã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ï¼
-target_offset.tfã«ç¨æããï¼ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤
-ã«ãå¥ã®ãã£ã¬ã¯ããªã¾ãã¯å¥ã®ãã¡ã¤ã«åã§ç¨æããå ´åã«ã¯ï¼ãã®ãã¡ã¤
-ã«åãï¼Makefileã®ã¿ã¼ã²ããä¾å­é¨ã§OFFSET_TFã«å®ç¾©ããï¼
-
-ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤ã«ã«ã¯ï¼ä»¥ä¸ã®å
+ãã®æ¹æ³ãç¨ããããã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ãªãã»ãããã¡ã¤ã«çæç¨ã®
+çæã¹ã¯ãªãããç¨æãï¼target_cfg1_out.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ã
+ããããã¡ã¤ã«ï¼ã¨target_sym.defï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼ã«
+è¨è¿°ãè¿½å ããå¿
+è¦ãããï¼ãªãï¼ãããã®ãã¡ã¤ã«ãæ°ãã«ç¨æããéãä¿®
+æ­£ããéã«ã¯ï¼offset.hã«å¦¥å½ãªå®ç¾©ãçæããã¦ãããã¨ãç¢ºèªãã¹ãã§ã
+ãï¼
+
+ãªãã»ãããã¡ã¤ã«çæç¨ã®çæã¹ã¯ãªããã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ï¼
+target_offset.trbã«ç¨æããï¼ãªãã»ãããã¡ã¤ã«çæç¨ã®çæã¹ã¯ãªããã
+å¥ã®ãã£ã¬ã¯ããªã¾ãã¯å¥ã®ãã¡ã¤ã«åã§ç¨æããå ´åã«ã¯ï¼ãã®ãã¡ã¤ã«å
+ãï¼Makefileã®ã¿ã¼ã²ããä¾å­é¨ã§TARGET_OFFSET_TRBã«å®ç¾©ããï¼
+
+ãªãã»ãããã¡ã¤ã«çæç¨ã®çæã¹ã¯ãªããã«ã¯ï¼ä»¥ä¸ã®å
 å®¹ãè¨è¿°ããï¼
 
-(1) æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
-
-ãªãã»ãããã¡ã¤ã«çæç¨ã®æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ï¼kernel/genoffset.tfï¼
-ãã¤ã³ã¯ã«ã¼ãããï¼æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ã«ã¯ï¼ä»¥ä¸ã§ç¨ããDEFINEé¢
-æ°ãDEFINE_BITé¢æ°ã®å®ç¾©ãªã©ãå«ã¾ãã¦ããï¼
-
-----------------------------------------
-$ æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
-$INCLUDE "kernel/genoffset.tf"$
+(1) çæã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+
+ãªãã»ãããã¡ã¤ã«çæç¨ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨
+ï¼kernel/genoffset.trbï¼ãã¤ã³ã¯ã«ã¼ãããï¼çæã¹ã¯ãªããã®ã¿ã¼ã²ãã
+éä¾å­é¨ã«ã¯ï¼ä»¥ä¸ã§ç¨ããGenerateDefineé¢æ°ãGenerateDefineBité¢æ°ã®å®
+ç¾©ãªã©ãå«ã¾ãã¦ããï¼
+
+----------------------------------------
+# ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+IncludeTrb("kernel/genoffset.trb")
 ----------------------------------------
 
 (2) ãªãã»ããå¤ã®ãã¯ã­å®ç¾©ã®çæ
 
-DEFINEé¢æ°ãç¨ãã¦ï¼ãªãã»ããå¤ã®ãã¯ã­å®ç¾©ãçæããï¼ä¾ãã°ï¼TCBä¸­ã®
-ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ï¼tskctxbï¼ã«å«ã¾ããpcãã£ã¼ã«ãã®ãªãã»ãã
-å¤ãï¼TCB_pcã«ãã¯ã­å®ç¾©ããå ´åã«ã¯ï¼æ¬¡ã®ããã«è¨è¿°ããï¼
-
-----------------------------------------
-$ ãªãã»ããå¤ã®ãã¯ã­å®ç¾©ã®çæ
-$DEFINE("TCB_pc", offsetof_TCB_pc)$
-----------------------------------------
-
-ããã§ï¼DEFINEé¢æ°ã®ç¬¬1ãã©ã¡ã¼ã¿ã¯ãã¯ã­å®ç¾©ããã·ã³ãã«ï¼ç¬¬2ãã©ã¡ã¼
-ã¿ã¯ï¼ãªãã»ããå¤ãä¿æããã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¤æ°ã§ããï¼
+GenerateDefineé¢æ°ãç¨ãã¦ï¼ãªãã»ããå¤ã®ãã¯ã­å®ç¾©ãçæããï¼ä¾ãã°ï¼
+TCBä¸­ã®ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ï¼tskctxbï¼ã«å«ã¾ããpcãã£ã¼ã«ãã®ãª
+ãã»ããå¤ãï¼TCB_pcã«ãã¯ã­å®ç¾©ããå ´åã«ã¯ï¼æ¬¡ã®ããã«è¨è¿°ããï¼
+
+----------------------------------------
+# ãªãã»ããå¤ã®ãã¯ã­å®ç¾©ã®çæ
+GenerateDefine("TCB_pc", $offsetof_TCB_pc)
+----------------------------------------
+
+ããã§ï¼GenerateDefineé¢æ°ã®ç¬¬1ãã©ã¡ã¼ã¿ã¯ãã¯ã­å®ç¾©ããã·ã³ãã«ï¼ç¬¬2
+ãã©ã¡ã¼ã¿ã¯ï¼ãªãã»ããå¤ãä¿æããå¤æ°ã§ããï¼
 
 ã¾ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãï¼ãªãã»ããå¤ãä¿æããå¤æ°ï¼ä¸ã®ä¾ã§ã¯
-offsetof_TCB_pcï¼ã«å¤ãè¨­å®ããããã«ï¼target_def.csvï¼ã¾ãã¯ï¼åç­ã®å½¹
-å²ãæã¤ãã¡ã¤ã«ï¼ã«æ¬¡ã®ä¾ã®ãããªè¡ãè¿½å ããï¼
+$offsetof_TCB_pcï¼ã«å¤ãè¨­å®ããããã«ï¼target_sym.defï¼ã¾ãã¯ï¼åç­ã®
+å½¹å²ãæã¤ãã¡ã¤ã«ï¼ã«æ¬¡ã®ãããªè¡ãè¿½å ããï¼
 
 ----------------------------------------
@@ -788,6 +790,6 @@
 
 ãã ãï¼åãªãã¸ã§ã¯ãã®åæåãã­ãã¯ã®ã¿ã¼ã²ããéä¾å­ã®ãã£ã¼ã«ãã®
-ãªãã»ããå¤ãåå¾ããããã®è¨è¿°ã¯ï¼kernel/kernel_def.csvã«å«ã¾ãã¦ããï¼
-kernel/kernel_def.csvã«å«ã¾ãã¦ããè¨è¿°ã¯ï¼target_def.csvï¼ã¾ãã¯ï¼åç­
+ãªãã»ããå¤ãåå¾ããããã®è¨è¿°ã¯ï¼kernel/kernel_sym.defã«å«ã¾ãã¦ããï¼
+kernel/kernel_sym.defã«å«ã¾ãã¦ããè¨è¿°ã¯ï¼target_sym.defï¼ã¾ãã¯ï¼åç­
 ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼ã«è¿½å ããå¿
 è¦ã¯ãªãï¼
@@ -795,31 +797,31 @@
 (3) ããããªãã»ããå¤ç­ã®ãã¯ã­å®ç¾©ã®çæ
 
-DEFINE_BITé¢æ°ãç¨ãã¦ï¼ãããã®ãªãã»ããå¤ï¼ãããä½ç½®ï¼ããããã¹ã¯
-ã®ãã¯ã­å®ç¾©ãçæããï¼ä¾ãã°ï¼TCBä¸­ã®enaterãã£ã¼ã«ãã®ãªãã»ããå¤ï¼
-ãããä½ç½®ï¼ããããã¹ã¯ãï¼ããããTCB_enaterï¼TCB_enater_bitï¼
+GenerateDefineBité¢æ°ãç¨ãã¦ï¼ãããã®ãªãã»ããå¤ï¼ãããä½ç½®ï¼ããã
+ãã¹ã¯ã®ãã¯ã­å®ç¾©ãçæããï¼ä¾ãã°ï¼TCBä¸­ã®enaterãã£ã¼ã«ãã®ãªãã»ã
+ãå¤ï¼ãããä½ç½®ï¼ããããã¹ã¯ãï¼ããããTCB_enaterï¼TCB_enater_bitï¼
 TCB_enater_maskã«ãã¯ã­å®ç¾©ããå ´åã«ã¯ï¼æ¬¡ã®ããã«è¨è¿°ããï¼
 
 ----------------------------------------
-$DEFINE_BIT("TCB_enater", sizeof_TCB, "B")$
-----------------------------------------
-
-ããã§ï¼DEFINE_BITé¢æ°ã®ç¬¬1ãã©ã¡ã¼ã¿ã¯ãã¯ã­å®ç¾©ããã·ã³ãã«ï¼ã®å
-é ­é¨
-åï¼ï¼ç¬¬2ãã©ã¡ã¼ã¿ã¯æ§é ä½ã®ãµã¤ãºã§ããï¼ç¬¬3ãã©ã¡ã¼ã¿ã«ã¯ï¼ãããã®
-ãªãã»ããï¼ãããä½ç½®ï¼ããããã¹ã¯ãï¼8ãããåä½ï¼ãã¤ãåä½ï¼ã§æ±ã
-ãå ´åã«ã¯"B"ãï¼16ãããåä½ã§æ±ããå ´åã«ã¯"H"ãï¼32ãããåä½ã§æ±ã
-ãå ´åã«ã¯"W"ãæå®ããï¼ãªãï¼ãããä½ç½®ã¯ï¼LSBã0ã¨ããå¤ï¼ããããªã
-ã«ã¨ã³ãã£ã¢ã³ãæ³å®ï¼ãæ±ããï¼
+GenerateDefineBit("TCB_enater", $sizeof_TCB, "B")
+----------------------------------------
+
+ããã§ï¼GenerateDefineBité¢æ°ã®ç¬¬1ãã©ã¡ã¼ã¿ã¯ãã¯ã­å®ç¾©ããã·ã³ãã«
+ï¼ã®å
+é ­é¨åï¼ï¼ç¬¬2ãã©ã¡ã¼ã¿ã¯æ§é ä½ã®ãµã¤ãºã§ããï¼ç¬¬3ãã©ã¡ã¼ã¿ã«ã¯ï¼
+ãããã®ãªãã»ããï¼ãããä½ç½®ï¼ããããã¹ã¯ãï¼8ãããåä½ï¼ãã¤ãåä½ï¼
+ã§æ±ããå ´åã«ã¯"B"ãï¼16ãããåä½ã§æ±ããå ´åã«ã¯"H"ãï¼32ãããåä½
+ã§æ±ããå ´åã«ã¯"W"ãæå®ããï¼ãªãï¼ãããä½ç½®ã¯ï¼LSBã0ã¨ããå¤ï¼ãã
+ããªãã«ã¨ã³ãã£ã¢ã³ãæ³å®ï¼ãæ±ããï¼
 
 ã¾ãï¼target_cfg1_out.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ã«ï¼
 ããããªãã»ããå¤ç­ãæ±ããããã®æ§é ä½ã®å¤æ°å®ç¾©ãè¿½å ããï¼ãã®æ§é 
-ä½ã®å¤æ°ã¯ï¼åç§°ããã¯ã­å®ç¾©ããã·ã³ãã«ï¼DEFINE_BITé¢æ°ã®ç¬¬1ãã©ã¡ã¼ã¿ï¼
-ã¨ãï¼å¯¾è±¡ã®ãããã®ã¿ã1ã§ï¼ä»ã®ãã¹ã¦ã®ãããã0ã«ãªãããã«åæåã
-ãï¼ã¾ãï¼constä¿®é£¾å­ãä»å ããï¼ä¾ãã°ï¼TCBä¸­ã®enaterãã£ã¼ã«ãã®ãã
-ããªãã»ããå¤ç­ãæ±ããå ´åã«ã¯ï¼æ¬¡ã®ãããªå®ç¾©ãè¿½å ããï¼tskctxbã®å
-æå¤ã¯ï¼ã¿ã¼ã²ããä¾å­ãªã®ã§æ³¨æãããã¨ï¼ï¼
-
-----------------------------------------
-const TCB	TCB_enater = {
+ä½ã®å¤æ°ã¯ï¼åç§°ããã¯ã­å®ç¾©ããã·ã³ãã«ï¼GenerateDefineBité¢æ°ã®ç¬¬1ã
+ã©ã¡ã¼ã¿ï¼ã¨ãï¼å¯¾è±¡ã®ãããã®ã¿ã1ã§ï¼ä»ã®ãã¹ã¦ã®ãããã0ã«ãªããã
+ã«åæåããï¼ã¾ãï¼constä¿®é£¾å­ãä»å ããï¼ä¾ãã°ï¼TCBä¸­ã®enaterãã£ã¼
+ã«ãã®ããããªãã»ããå¤ç­ãæ±ããå ´åã«ã¯ï¼æ¬¡ã®ãããªå®ç¾©ãè¿½å ãã
+ï¼tskctxbã®åæå¤ã¯ï¼ã¿ã¼ã²ããä¾å­ãªã®ã§æ³¨æãããã¨ï¼ï¼
+
+----------------------------------------
+const TCB TCB_enater = {
 	{ NULL, NULL },			/* task_queue */
 	NULL,					/* p_tinib */
@@ -846,6 +848,6 @@
 ----------------------------------------
 
-ããã«ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãï¼æ§é ä½ã®ãµã¤ãºï¼ä¸ã®ä¾ã§ã¯sizeof_TCBï¼ã«
-å¤ãè¨­å®ããããã«ï¼target_def.csvï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼
+ããã«ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãï¼æ§é ä½ã®ãµã¤ãºï¼ä¸ã®ä¾ã§ã¯$sizeof_TCBï¼ã«
+å¤ãè¨­å®ããããã«ï¼target_sym.defï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼
 ã«æ¬¡ã®ä¾ã®ãããªè¡ãè¿½å ããï¼
 
@@ -854,6 +856,6 @@
 ----------------------------------------
 
-ãã ãï¼åè¿°ããéãï¼kernel/kernel_def.csvã«å«ã¾ãã¦ããè¨è¿°ã¯ï¼
-target_def.csvï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼ã«è¿½å ããå¿
+ãã ãï¼åè¿°ããéãï¼kernel/kernel_sym.defã«å«ã¾ãã¦ããè¨è¿°ã¯ï¼
+target_sym.defï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼ã«è¿½å ããå¿
 è¦ã¯ãªãï¼
 
@@ -979,27 +981,38 @@
 2.7 ä¾å­é¢ä¿ã®å®ç¾©ï¼ãªãã·ã§ã³ï¼
 
-ã¿ã¼ã²ããä¾å­é¨ã®éçºä¸­ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®åãã¹ã«å¯¾ãã¦ï¼ã¿ã¼ã²ã
-ãä¾å­é¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã¸ã®ä¾å­é¢ä¿ãå®ç¾©ããã¨ä¾¿å©ã§ããï¼å
-·ä½
-çã«ã¯ï¼ãã¹1ï¼ãã¹2ï¼ãã¹3ãä¾å­ãããã¡ã¤ã«ãï¼ããããcfg1_out.cï¼
-kernel_cfg.timestampï¼$(OBJFILE)ã«å¯¾ããä¾å­é¢ä¿ã®å½¢ã§è¨è¿°ããï¼
-
-ã»ã¨ãã©ã®å ´åï¼ã¿ã¼ã²ããä¾å­é¨ãã£ã¬ã¯ããªã®Makefile.targetã«å«ããè¨
-è¿°ã¯ï¼ä»¥ä¸ã®ããã«ãªãï¼
-
-----------------------------------------
-cfg1_out.c: $(TARGETDIR)/target_def.csv
-kernel_cfg.timestamp: $(TARGETDIR)/target.tf
-$(OBJFILE): $(TARGETDIR)/target_check.tf
+ã¿ã¼ã²ããä¾å­é¨ã®éçºä¸­ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®åãã¹ã«å¯¾ãã¦ï¼çæã¹
+ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ã¸ã®ä¾å­é¢ä¿ãå®ç¾©ããã¨ä¾¿å©ã§ããï¼å
+·ä½çã«
+ã¯ï¼ãã¹1ï¼ãªãã»ãããã¡ã¤ã«çæï¼ãã¹2ï¼ãã¹3ãä¾å­ãããã¡ã¤ã«ãï¼ã
+ãããcfg1_out.timestampï¼offset.timestampï¼kernel_cfg.timestampï¼
+check.timestampã«å¯¾ããä¾å­é¢ä¿ã®å½¢ã§è¨è¿°ããï¼
+
+å
+¸åçã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ãã£ã¬ã¯ããªã®Makefile.targetã«å«ããè¨è¿°ã¯ï¼
+ä»¥ä¸ã®ããã«ãªãï¼
+
+----------------------------------------
+cfg1_out.timestamp: $(TARGETDIR)/target_sym.def
+offset.timestamp: $(TARGETDIR)/target_offset.trb
+kernel_cfg.timestamp: $(TARGETDIR)/target_kernel.trb
+check.timestamp: $(TARGETDIR)/target_check.trb
 ----------------------------------------
 
 2.8 ãã®ä»ã®è¨­å®
 
-(2-8-1) CLEAN_FILES				cleanã«ããåé¤ãããã¡ã¤ã«å
+(2-8-1) TARGET_OFFSET_TRB		target_offset.trbã®ãã¹å
+(2-8-2) TARGET_KERNEL_TRB		target_kernel.trbã®ãã¹å
+(2-8-3) TARGET_CHECK_TRB		target_check.trbã®ãã¹å
+(2-8-4) TARGET_KERNEL_CFG		target_kernel.cfgã®ãã¹å
+
+ã¿ã¼ã²ããä¾å­é¨ã®åãã¡ã¤ã«ã®ãã¹åãï¼æ¨æºããå¤æ´ãããå ´åã«ã¯ï¼ã
+ã¹åããããã®å¤æ°ã«å®ç¾©ããï¼
+
+(2-8-5) CLEAN_FILES				cleanã«ããåé¤ãããã¡ã¤ã«å
 
 cleanã«ããåé¤ãããã¡ã¤ã«ãã¿ã¼ã²ããä¾å­é¨ã§è¿½å ãããå ´åã«ã¯ï¼ãã¡
 ã¤ã«åããã®å¤æ°ã«è¿½å å®ç¾©ããï¼
 
-(2-8-2) REALCLEAN_FILES			realcleanã«ããåé¤ãããã¡ã¤ã«å
+(2-8-6) REALCLEAN_FILES			realcleanã«ããåé¤ãããã¡ã¤ã«å
 
 realcleanã«ããåé¤ãããã¡ã¤ã«ãã¿ã¼ã²ããä¾å­é¨ã§è¿½å ãããå ´åã«ã¯ï¼
@@ -1602,7 +1615,7 @@
 é ­ã«_kernel_ãä»ä¸
 ããååã«ãªãã¼ã ããããã®ã¢ã¸ã¥ã¼ã«ï¼target_rename.defãç¨æãï¼ãã¼
-ã«ï¼utils/genrenameï¼ã«ããï¼target_rename.hã¨target_unrename.hãçæã
-ãï¼éçºç°å¢ä¾å­é¨ï¼ãã­ã»ããµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ãåãåããå ´å
-ã«ã¯ï¼ãªãã¼ã è¨è¿°ãåãåããï¼
+ã«ï¼utils/genrename.rbï¼ã«ããï¼target_rename.hã¨target_unrename.hãç
+æããï¼éçºç°å¢ä¾å­é¨ï¼ãã­ã»ããµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ãåãåãã
+å ´åã«ã¯ï¼ãªãã¼ã è¨è¿°ãåãåããï¼
 
 (d) ã¿ã¤ããã©ã¤ã
@@ -1616,6 +1629,5 @@
 
 ã¾ãï¼ãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µããã±ã¼ã¸ããµãã¼ãããå ´åã«ã¯ï¼ãªã¼
-ãã©ã³ãã³ãã©ãèµ·åããããã®ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ããï¼åããã¡ã¤ã«
-ã«å«ããï¼
+ãã©ã³ãã³ãã©ãèµ·åããããã®ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ããç¨æããï¼
 
 ãªãï¼ãã®ç« ã«ç¤ºãã³ã¼ãä¸­ã§ï¼TOPPERS_SUPPORT_OVRHDRããã¯ã­å®ç¾©ããã¦
@@ -1627,7 +1639,7 @@
 (e) ã³ã³ãã£ã®ã¥ã¬ã¼ã¿è¨­å®ãã¡ã¤ã«
 
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è¨­å®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ãï¼target_def.csvï¼
-target.tfï¼target_check.tfã«ç¨æããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ã®
-è¨è¿°æ¹æ³ã«ã¤ãã¦ã¯ï¼ï¼ç« ã§èª¬æããï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è¨­å®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ãï¼target_sym.defï¼
+target_kernel.trbï¼target_check.trbã«ç¨æããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿è¨­å®ãã¡
+ã¤ã«ã®è¨è¿°æ¹æ³ã«ã¤ãã¦ã¯ï¼ï¼ç« ã§èª¬æããï¼
 
 6.2 ãã¬ã¼ã¹ã­ã°æ©è½ã¸ã®å¯¾å¿
@@ -2071,10 +2083,14 @@
 å ±ãTSKINICTXBä¸­ã«æã¤å¿
 è¦ãããï¼
-ã¾ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­
-é¨ã§ï¼TSKINICTXBã®åæåæ
-å ±ãçæããããã®GENERATE_TSKINICTXBãï¼ãã¹
-3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§ï¼TINIBããã¹ã¿ãã¯é åã®
-å
-é ­çªå°ãåãåºãããã®GET_STK_TSKINICTXBãå®ç¾©ããå¿
+ã¾ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨ã§ï¼
+TSKINICTXBã®åæåæ
+å ±ãçæããããã®GenerateTskinictxbãï¼ãã¹3ã®çæ
+ã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨ã§ï¼TINIBããã¹ã¿ãã¯é åã®å
+é ­çªå°ãåã
+åºãããã®GetStackTskinictxbãå®ç¾©ããå¿
+è¦ãããï¼
+
+ããã«ï¼åççææ©è½æ¡å¼µããã±ã¼ã¸ããµãã¼ãããå ´åã«ã¯ï¼TSKINICTXBã
+åæåããããã®init_tskinictxbé¢æ°ãç¨æããå¿
 è¦ãããï¼
 
@@ -2416,12 +2432,12 @@
 åº¦ãã¹ã¯ãï¼åãä»ããå²è¾¼ã¿ã®å²è¾¼ã¿åªå
 åº¦ã«è¨­å®ãã
+	å²è¾¼ã¿ãã³ãã©ã®å
+¥å£ã§å¿
+è¦ãªIRCã®æä½ãè¡ãï¼å²è¾¼ã¿è¦æ±ã©ã¤ã³ãã¨ã
+				ã¸ããªã¬ã§ããå ´åã®ããªã¬ãããå²è¾¼ã¿è¦æ±ã®ã¯ãªã¢ãªã©ï¼
 	CPUã­ãã¯è§£é¤ç¶æ
 ã«ããï¼åãä»ããå²è¾¼ã¿ãããåªå
 åº¦ã®é«ãå²è¾¼ã¿ã
 												åãä»ããããã«ããï¼
-	å²è¾¼ã¿ãã³ãã©ã®å
-¥å£ã§å¿
-è¦ãªIRCã®æä½ãè¡ãï¼å²è¾¼ã¿è¦æ±ã©ã¤ã³ãã¨ã
-				ã¸ããªã¬ã§ããå ´åã®ããªã¬ãããå²è¾¼ã¿è¦æ±ã®ã¯ãªã¢ãªã©ï¼
 
 #ifdef LOG_INH_ENTER
@@ -2433,9 +2449,9 @@
 #endif /* LOG_INH_LEAVE */
 
+	å°ãªãã¨ãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+ã«ãã
 	å²è¾¼ã¿ãã³ãã©ã®åºå£ã§å¿
 è¦ãªIRCã®æä½ãè¡ãï¼IRCã«å¯¾ããå²è¾¼ã¿å¦ç
 														ã®çµäºéç¥ãªã©ï¼
-	å°ãªãã¨ãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
-ã«ãã
 	å²è¾¼ã¿åªå
 åº¦ãã¹ã¯ãï¼å²è¾¼ã¿ãåãä»ããåã®å¤ã«æ»ã â¦ (*f)
@@ -2618,6 +2634,12 @@
 ãå¤ããï¼ï¼
 
-reqflgãå»æ­¢ããï¼ã¾ãï¼ã¿ã¹ã¯åæãã®æ¡ä»¶å¤å®ã§ï¼dspflgããã§ãã¯ãã
-å¿
+reqflgãå»æ­¢ããï¼ã¾ãï¼p_schedtskã®æå³ãå¤æ´ããï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯
+å
+¨è§£é¤ã§ãªãç¶æ
+ã®éã¨ãã£ã¹ãããç¦æ­¢ç¶æ
+ã®éã¯ï¼p_schedtskãæ´æ°ããª
+ããã¨ã«ããï¼ãã¨ã«ããï¼ã¿ã¹ã¯åæãã®æ¡ä»¶å¤å®ã§ï¼dspflgããã§ãã¯ã
+ãå¿
 è¦ããªããªã£ãï¼
 
@@ -2689,6 +2711,6 @@
 åã®åä½ã¯ä¿è¨¼ããå¿
 è¦ããªãï¼assertã§ã¨ã©ã¼ã¨ããã®ãæã¾ããï¼ï¼ãã
-ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãï¼ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
-ã§å®ç¾©ããINHNO_DEFINH_VALIDãç¨ãã¦ã¨ã©ã¼ãæ¤åºããããã§ããï¼
+ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãï¼ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©
+ãã$INHNO_DEFINH_VALIDãç¨ãã¦ã¨ã©ã¼ãæ¤åºããããã§ããï¼
 
 6.6.4 å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®
@@ -2727,10 +2749,10 @@
 ãããã®å±æ§åãã¿ã¼ã²ããå®ç¾©ã§è¿½å ããå ´åã«ã¯ï¼ãã®å±æ§å¤ãæ±ºå®ãï¼
 å®ç¾©ãtarget_kernel.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ã«å«
-ããï¼ã¾ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãã³ãã¬ã¼ããã¡ã¤ã«ããåç
+ããï¼ã¾ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®çæã¹ã¯ãªããããåç
 §ã§ããããã«ï¼
-target_def.csvï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼ã«å«ãï¼ã³ã³ãã£ã®ã¥
-ã¬ã¼ã¿ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§ã¨ã©ã¼ã¨ãªããªãããã«ï¼
-target.tfï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ã§TARGET_INTATR
-ã«è¨­å®ããï¼
+target_sym.defï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼ã«å«ããï¼ããã«ï¼ã³
+ã³ãã£ã®ã¥ã¬ã¼ã¿ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨ã§ã¨ã©ã¼ã¨ãªããªã
+ããã«ï¼target_kernel.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ã§
+TARGET_INTATRãå®ç¾©ããï¼
 
 æå®ãããå²è¾¼ã¿çªå·ãæå¹ãªå¤ã§ãªãå ´åãï¼ãã®å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ã
@@ -2740,11 +2762,11 @@
 è¦ããªãï¼assertã§ã¨ã©ã¼ã¨ããã®ãæã¾ããï¼ï¼ãã®
 ãããªã±ã¼ã¹ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã§ã¨ã©ã¼ãæ¤åºãã¹ãã§ããï¼ã³ã³ãã£
-ã®ã¥ã¬ã¼ã¿ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨ã¯ï¼ãã¹2ã®ãã³ãã¬ã¼
-ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ããINTNO_CFGINT_VALIDï¼
-TARGET_INTATRï¼INTPRI_CFGINT_VALIDãç¨ãã¦ã¨ã©ã¼ãæ¤åºãããï¼æ¨æºã®å²
-è¾¼ã¿å±æ§ï¼TA_ENAINTï¼TA_EDGEï¼ãè¨­å®ã§ããªãå ´åãï¼è¨­å®ã§ããªãå±æ§ã
-å²è¾¼ã¿åªå
-åº¦ãå²è¾¼ã¿è¦æ±ã©ã¤ã³ã«ãã£ã¦ç°ãªãå ´åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼
-ã¿ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ã§æ¤åºããªããã°ãªããªãï¼
+ã®ã¥ã¬ã¼ã¿ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨ã¯ï¼çæã¹ã¯ãªããã®ã¿ã¼
+ã²ããä¾å­é¨ã§å®ç¾©ãã$INTNO_CFGINT_VALIDï¼$INTPRI_CFGINT_VALIDã¨ï¼ã¿ã¼
+ã²ããä¾å­é¨ã®ããããã¡ã¤ã«ã§å®ç¾©ããTARGET_INTATRãç¨ãã¦ã¨ã©ã¼ãæ¤åº
+ãããï¼æ¨æºã®å²è¾¼ã¿å±æ§ï¼TA_ENAINTï¼TA_EDGEï¼ãè¨­å®ã§ããªãå ´åãï¼è¨­
+å®ã§ããªãå±æ§ãå²è¾¼ã¿åªå
+åº¦ãå²è¾¼ã¿è¦æ±ã©ã¤ã³ã«ãã£ã¦ç°ãªãå ´åã«ã¯ï¼
+çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ã§æ¤åºããªããã°ãªããªãï¼
 
 6.6.5 å²è¾¼ã¿ç®¡çæ©è½ã®åæåå¦çã®å¤æ´
@@ -2762,6 +2784,6 @@
 ¥å£å¦çãç
 æããããã®è¨è¿°ï¼INTHDR_ENTRYãã¯ã­ã®ãªã¹ãï¼ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®
-ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨ã«ãã£ã¦kernel_cfg.cã«ç
-æãããªããªãï¼
+ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨ã«ãã£ã¦kernel_cfg.cã«çæãã
+ãªããªãï¼
 
 (6-6-5-2) void initialize_interrupt(void)ï¼ãªãã·ã§ã³ï¼
@@ -2864,12 +2886,12 @@
 ã»TARGET_INHATRã«ï¼TA_NONKERNELãè¨­å®ããï¼
 
-ã»(a-1)ã¾ãã¯(a-2)ãæ¡ç¨ããå ´åã«ã¯ï¼INHNO_DEFINH_VALIDã«ï¼ã«ã¼ãã«ç®¡
+ã»(a-1)ã¾ãã¯(a-2)ãæ¡ç¨ããå ´åã«ã¯ï¼$INHNO_DEFINH_VALIDã«ï¼ã«ã¼ãã«ç®¡
 ãçå¤ã¨ããå²è¾¼ã¿ã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·ãå«ããï¼ã¾ãï¼
 ãVALID_INHNOãï¼ã«ã¼ãã«ç®¡çå¤ã¨ããå²è¾¼ã¿ãã³ãã©çªå·ãæå¹ãªå¤ã¨å¤å®
 ãããããã«ããï¼
 
-ã»(a-1)ã¾ãã¯(a-2)ãæ¡ç¨ããå ´åã«ã¯ï¼INHNO_FIX_KERNELã«ã«ã¼ãã«ç®¡çã¨
-ãããå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ããï¼INHNO_FIX_NONKERNELã«ã«ã¼ãã«ç®¡çå¤
-ãã¨ããå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ãè¨­å®ããï¼
+ã»(a-1)ã¾ãã¯(a-2)ãæ¡ç¨ããå ´åã«ã¯ï¼$INHNO_FIX_KERNELã«ã«ã¼ãã«ç®¡çã¨
+ãããå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ããï¼$INHNO_FIX_NONKERNELã«ã«ã¼ãã«ç®¡ç
+ãå¤ã¨ããå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ãè¨­å®ããï¼
 
 ã»DEF_INHãã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ã«å¯¾å¿ã§ããããã«ããï¼æ¨æºã®å²è¾¼ã¿ç®¡
@@ -2894,5 +2916,5 @@
 è¦ã«ãªãï¼
 
-ã»(a-1)ã¾ãã¯(a-2)ãæ¡ç¨ããå ´åã«ã¯ï¼INTNO_CFGINT_VALIDã«ï¼ã«ã¼ãã«ç®¡
+ã»(a-1)ã¾ãã¯(a-2)ãæ¡ç¨ããå ´åã«ã¯ï¼$INTNO_CFGINT_VALIDã«ï¼ã«ã¼ãã«ç®¡
 ãçå¤ã¨ããå²è¾¼ã¿ã«å¯¾å¿ããå²è¾¼ã¿çªå·ãå«ããï¼ã¾ãï¼VALID_INTNOãï¼ã«ã¼
 ããã«ç®¡çå¤ã¨ããå²è¾¼ã¿çªå·ãæå¹ãªå¤ã¨å¤å®ããããã«ããï¼å¿
@@ -2900,9 +2922,9 @@
 ãã°ï¼VALID_INTNO_DISINTã¨VALID_INTNO_CREISRã®å®ç¾©ãè¿½å ã¾ãã¯å¤æ´ããï¼
 
-ã»(a-1)ã¾ãã¯(a-2)ãæ¡ç¨ããå ´åã«ã¯ï¼INTNO_FIX_KERNELã«ã«ã¼ãã«ç®¡çã¨
-ãããå²è¾¼ã¿çªå·ã®ãªã¹ããï¼INTNO_FIX_NONKERNELã«ã«ã¼ãã«ç®¡çå¤ã¨ããå²
-ãè¾¼ã¿çªå·ã®ãªã¹ãè¨­å®ããï¼
-
-ã»INTPRI_CFGINT_VALIDã«ï¼ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ã¨ãªãåªå
+ã»(a-1)ã¾ãã¯(a-2)ãæ¡ç¨ããå ´åã«ã¯ï¼$INTNO_FIX_KERNELã«ã«ã¼ãã«ç®¡çã¨
+ãããå²è¾¼ã¿çªå·ã®ãªã¹ããï¼$INTNO_FIX_NONKERNELã«ã«ã¼ãã«ç®¡çå¤ã¨ãã
+ãå²è¾¼ã¿çªå·ã®ãªã¹ãè¨­å®ããï¼
+
+ã»$INTPRI_CFGINT_VALIDã«ï¼ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿ã¨ãªãåªå
 åº¦ãå«ããï¼
 
@@ -3244,6 +3266,6 @@
 å ´åã®åä½ã¯ä¿è¨¼ããå¿
 è¦ããªãï¼assertã§ã¨ã©ã¼ã¨ããã®ãæã¾ããï¼ï¼ã
-ãã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãï¼ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­
-é¨ã§å®ç¾©ããEXCNO_VALIDãç¨ãã¦ã¨ã©ã¼ãæ¤åºããããã§ããï¼
+ãã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãï¼ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ã§å®
+ç¾©ãã$EXCNO_VALIDãç¨ãã¦ã¨ã©ã¼ãæ¤åºããããã§ããï¼
 
 6.7.4 CPUä¾å¤ç®¡çæ©è½ã®åæåå¦çã®å¤æ´
@@ -3260,6 +3282,6 @@
 ¥å£å¦çã
 çæããããã®è¨è¿°ï¼EXCHDR_ENTRYãã¯ã­ã®ãªã¹ãï¼ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿
-ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨ã«ãã£ã¦kernel_cfg.cã«
-çæãããªããªãï¼
+ã®ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨ã«ãã£ã¦kernel_cfg.cã«çæã
+ããªããªãï¼
 
 (6-7-4-2) void initialize_exception(void)ï¼ãªãã·ã§ã³ï¼
@@ -3530,7 +3552,7 @@
 (6-10-1-5) TARGET_EXCATRï¼ãªãã·ã§ã³ï¼	ã¿ã¼ã²ããå®ç¾©ã®CPUä¾å¤ãã³ãã©å±æ§
 
-åãªãã¸ã§ã¯ãã®å±æ§ãï¼ã¿ã¼ã²ããå®ç¾©ã«æ¡å¼µããå ´åã«ï¼è©²å½ãããªãã¸ã§
-ã¯ãå±æ§ãç¤ºãå¤æ°ã«ï¼æ¡å¼µã«ä½¿ç¨ãããããã®è«çåãå®ç¾©ããï¼ããã«ã
-ãï¼æ¡å¼µã«ä½¿ç¨ããããããè¨­å®ããã¦ããå ´åã«ï¼ã¨ã©ã¼ã«ãªãã®ãé²ãï¼
+åãªãã¸ã§ã¯ãã®å±æ§ãã¿ã¼ã²ããå®ç¾©ã§æ¡å¼µããå ´åã«ï¼è©²å½ãããªãã¸ã§
+ã¯ãå±æ§ãç¤ºãå¤æ°ã«ï¼æ¡å¼µã§ä½¿ç¨ãããããã®è«çåãå®ç¾©ããï¼ããã«ã
+ãï¼æ¡å¼µã§ä½¿ç¨ããããããè¨­å®ããã¦ããå ´åã«ã¨ã©ã¼ã«ãªãã®ãé²ãï¼
 
 ãªãï¼TOPPERSæ°ä¸ä»£ã«ã¼ãã«çµ±åä»æ§æ¸ã§ã¯ï¼å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼
@@ -3552,10 +3574,10 @@
 
 ã¹ã¿ãã¯é åã®ãµã¤ãºãããå¤ï¼ã¢ã©ã¤ã³åä½ï¼ã®åæ°ã§ãªããã°ãªããªãå ´
-åã«ï¼ãã®å¤æ°ãã¢ã©ã¤ã³åä½ã«å®ç¾©ããï¼ãã®å¤æ°ãå®ç¾©ãããã¨ã§ï¼
-kernel.tfããã³acre_tskï¼åççææ©è½æ¡å¼µããã±ã¼ã¸ã®ã¿ï¼ã«ããã¦ï¼ã¹ã¿ã
-ã¯é åã®ãµã¤ãºãæ­£ãããªãï¼ãã®å¤æ°ã«å®ç¾©ããå¤ã®åæ°ã§ãªãï¼å ´åã®ã¨
-ã©ã¼ããã§ãã¯ããããã«ãªãï¼ãã§ãã¯ãå¿
-è¦ãªãå ´åã«ã¯ï¼ãã®å¤æ°ãå®
-ç¾©ããªãï¼
+åã«ï¼ãã®å¤æ°ãã¢ã©ã¤ã³åä½ã«å®ç¾©ããï¼ãã®å¤æ°ãå®ç¾©ãããã¨ã§ï¼ã³ã³
+ãã£ã®ã¥ã¬ã¼ã¿ã®çæã¹ã¯ãªããã¨acre_tskï¼åççææ©è½æ¡å¼µããã±ã¼ã¸ã®
+ã¿ï¼ã«ããã¦ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºãæ­£ãããªãï¼ãã®å¤æ°ã«å®ç¾©ããå¤ã®
+åæ°ã§ãªãï¼å ´åã®ã¨ã©ã¼ããã§ãã¯ããããã«ãªãï¼ãã§ãã¯ãå¿
+è¦ãªãå ´
+åã«ã¯ï¼ãã®å¤æ°ãå®ç¾©ããªãï¼
 
 (6-10-2-4) CHECK_INTPTR_ALIGNï¼ãªãã·ã§ã³ï¼	intptr_tåã®å¤æ°ã®ã¢ã©ã¤ã³åä½
@@ -3743,5 +3765,5 @@
 
 ãã¬ã¼ã¹ã­ã°ãè¨é²ããæ¹æ³ã®ä¸ä¾ã¨ãã¦ï¼ã¡ã¢ãªä¸ã«ãã¬ã¼ã¹ã­ã°ãè¨é²ã
-ãããã®ãµã³ãã«ã³ã¼ããarch/logtraceãã£ã¬ã¯ããªã«ç¨æãã¦ããï¼ãã®ãµ
+ãããã®ãµã³ãã«ã³ã¼ããarch/tracelogãã£ã¬ã¯ããªã«ç¨æãã¦ããï¼ãã®ãµ
 ã³ãã«ã³ã¼ãã¯ï¼ã·ã¹ãã ã­ã°æ©è½ã¨åæ§ã®ãã¬ã¼ã¹ã­ã°æ©è½ãç¨æãï¼ãã¬ã¼
 ã¹ã­ã°æ
@@ -3754,5 +3776,5 @@
 
 	#ifdef TOPPERS_ENABLE_TRACE
-	#include "arch/logtrace/trace_config.h"
+	#include "arch/tracelog/trace_log.h"
 	#endif /* TOPPERS_ENABLE_TRACE */
 
@@ -3761,12 +3783,6 @@
 	ifeq ($(ENABLE_TRACE),true)
 		COPTS := $(COPTS) -DTOPPERS_ENABLE_TRACE
-		KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/arch/logtrace
-		KERNEL_COBJS := $(KERNEL_COBJS) trace_config.o trace_dump.o
+		SYSSVC_DIRS := $(SYSSVC_DIRS) $(SRCDIR)/arch/tracelog
 	endif
-
-(3) ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã§ï¼bssã»ã¯ã·ã§ã³ã®ã¯ãªã¢ãçç¥ãã¦ããå ´å
-    ã«ã¯ï¼trace_modeãTRACE_STOPï¼ï¼0ï¼ã«åæåããã³ã¼ããè¿½å ããï¼ã
-    ãã¯ï¼ãã¬ã¼ã¹ã­ã°æ©è½ãåæåãããåã«æ¸ãè¾¼ã¾ãããã¬ã¼ã¹ã­ã°ã
-    ç¡è¦ããããã§ããï¼
 
 ãã®ãµã³ãã«ã³ã¼ããç¨ãã¦ï¼ãã¬ã¼ã¹ã­ã°ãè¨é²ã»ãã³ãããæ¹æ³ã®ä¾ã«ã¤
@@ -3778,7 +3794,7 @@
 é·ç§»ï¼
 ã·ã¹ãã ã­ã°ã®åºåã®3ã¤ã®ãã¬ã¼ã¹ã­ã°ã®ã¿ãè¨é²ãã¦ããï¼ä»ã®ãã¬ã¼ã¹ã­
-ã°ãè¨é²ãããå ´åã«ã¯ï¼trace_config.hï¼ããã³trace_dump.cï¼ãä¿®æ­£ãã
-å¿
-è¦ãããï¼
+ã°ãè¨é²ãããå ´åã«ã¯ï¼trace_log.hï¼ããã³tTraceLog.cï¼ãä¿®æ­£ããå¿
+è¦
+ãããï¼
 
 6.12 ã«ã¼ãã«å®è£
@@ -3787,19 +3803,18 @@
 ã«ã¼ãã«å
 é¨ã«éãã¦ä½¿ãããé¢æ°ãå¤æ°ãªã©ã®åç§°ã§ï¼ãªãã¸ã§ã¯ããã¡ã¤
-ã«ã®ã·ã³ãã«è¡¨ã«ç»é²ããã¦å¤é¨ããåç
+ã«ã®å¤é¨ããåç
 §ã§ããåç§°ã¯ï¼Cè¨èªã¬ãã«ã§ï¼å
-é ­
-ã"_kernel_"ã¾ãã¯"_KERNEL_"ã§ããåç§°ã¨ããªããã°ãªããªããï¼ASP3ã«ã¼
-ãã«ã§ã¯ï¼ã½ã¼ã¹ã³ã¼ããã³ã³ãã¯ãã«ä¿ã¡ã¤ã¤ãããå®ç¾ããããã«ï¼ãªãã¼
-ã è¨è¿°ãã¡ã¤ã«ãå°å
+é ­ã"_kernel_"ã¾ãã¯
+"_KERNEL_"ã§ããåç§°ã¨ãã¦ããï¼ASP3ã«ã¼ãã«ã§ã¯ï¼ã½ã¼ã¹ã³ã¼ããã³ã³ã
+ã¯ãã«ä¿ã¡ã¤ã¤ãããå®ç¾ããããã«ï¼ãªãã¼ã è¨è¿°ãã¡ã¤ã«ãå°å
 ¥ãã¦ããï¼
 
 å
 ·ä½çã«ã¯ï¼ãªãã¼ã ãã¹ãåç§°ããªã¹ãã¢ããããxxx_rename.defãç¨æãï¼
-ãã®ãã¡ã¤ã«ãããã¼ã«ï¼utils/genrenameï¼ã«ããï¼åç§°ããªãã¼ã ãããã
-ã®ãã¯ã­å®ç¾©ãå«ãxxx_rename.hã¨ï¼ãããã®ãã¯ã­å®ç¾©ãè§£é¤ããããã®
-xxx_unrename.hãçæããï¼ãã¼ã«ã®èµ·åæ¹æ³ã¯æ¬¡ã®éãã§ããï¼
-
-	% genrename xxx
+ãã®ãã¡ã¤ã«ãããã¼ã«ï¼utils/genrename.rbï¼ã«ããï¼åç§°ããªãã¼ã ãã
+ããã®ãã¯ã­å®ç¾©ãå«ãxxx_rename.hã¨ï¼ãããã®ãã¯ã­å®ç¾©ãè§£é¤ãããã
+ã®xxx_unrename.hãçæããï¼ãã¼ã«ã®èµ·åæ¹æ³ã¯æ¬¡ã®éãã§ããï¼
+
+	% ruby genrename.rb xxx
 
 xxx_rename.defã«ã¯ï¼ãªãã¼ã ãã¹ãåç§°ã1è¡ã«1ã¤è¨è¿°ããï¼xxxxã¨ããå
@@ -3807,14 +3822,8 @@
 
 #define xxxx				_kernel_xxxx
-#ifdef TOPPERS_LABEL_ASM
-#define _xxxx				__kernel_xxxx
-#endif /* TOPPERS_LABEL_ASM */
 
 ã¾ãï¼xxx_unrename.hã«ã¯æ¬¡ã®ãããªè¨è¿°ãçæãããï¼
 
 #undef xxxx
-#ifdef TOPPERS_LABEL_ASM
-#undef _xxxx
-#endif /* TOPPERS_LABEL_ASM */
 
 xxx_rename.defã®ä¸­ã«ã¯ï¼ä»ã®ãªãã¼ã è¨è¿°ãåãè¾¼ãããã«ï¼ãINCLUDE
@@ -3825,6 +3834,6 @@
 ããï¼
 
-xxx_rename.defã®ä¸­ã®"#"ã§å§ã¾ãè¡ã¯ã³ã¡ã³ãã¨ãã¦èª­ã¿é£ã°ãããï¼ã¾ãï¼
-ç©ºè¡ãç¡è¦ãããï¼
+xxx_rename.defã®ä¸­ã®"#"ã§å§ã¾ãè¡ã¯ã³ã¡ã³ãã¨ãã¦æ±ããï¼çæãããã¡ã¤
+ã«ä¸­ã«ã³ã¡ã³ããçæããï¼xxx_rename.defã®ä¸­ã®ç©ºè¡ã¯ç¡è¦ãããï¼
 
 ã«ã¼ãã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§ä½¿ãããåç§°ããªãã¼ã ããããã«ï¼kernel
@@ -3843,4 +3852,18 @@
 ¥ãï¼éçºç°å¢ä¾å­é¨ï¼ãã­ã»ããµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ã®
 ãªãã¼ã è¨è¿°ãåãè¾¼ãããã«ããï¼
+
+ã¢ã»ã³ããªè¨èªã¬ãã«ã®è­å¥åãï¼Cè¨èªã¬ãã«ã®è­å¥åã®å
+é ­ã«"_"ãä»ãã
+ãã®ã«ãªãå ´åï¼ã¢ã»ã³ããªè¨èªã§å®ç¾©ï¼åç
+§ããé¢æ°ãå¤æ°ãªã©ã«ã¤ãã¦ã¯ï¼
+ã¢ã»ã³ããªè¨èªã¬ãã«ã®è­å¥åãxxx_rename.defã«ãªã¹ãã¢ããããå¿
+è¦ãã
+ãã®ã§æ³¨æãããã¨ï¼
+
+ãTOPPERS/ASP1ã«ã¼ãã«ã¨ã®é¢ä¿ã
+
+TOPPERS_LABEL_ASMãå®ç¾©ããå ´åã«ï¼å
+é ­ã«"_"ãä»ããè­å¥åã®ãªãã¼ã ã
+è¡ãæ©è½ã¯å»æ­¢ããï¼
 
 6.13 é«åè§£è½ã¿ã¤ããã©ã¤ã
@@ -4073,21 +4096,22 @@
 
 ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ãã¯ï¼é«åè§£è½ã¿ã¤ããã©ã¤ãã¨åããã¡ã¤ã«ã®ä¸­ã«
-è¨è¿°ããï¼ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ãã®ããã®è¨è¿°ã¯ï¼TOPPERS_SUPPORT_OVRHDR
-ããã¯ã­å®ç¾©ããã¦ããå ´åã«ã®ã¿æå¹ã«ãªãããã«ããï¼
+è¨è¿°ãã¦ãï¼å¥ã®ãã¡ã¤ã«ãç¨æãã¦è¨è¿°ãã¦ãããï¼ãããã®å ´åãï¼ãªã¼
+ãã©ã³ã¿ã¤ããã©ã¤ãã®ããã®è¨è¿°ã¯ï¼TOPPERS_SUPPORT_OVRHDRããã¯ã­å®ç¾©
+ããã¦ããå ´åã«ã®ã¿æå¹ã«ãªãããã«ããï¼
 
 å
-·ä½çã«ã¯ï¼ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ããçµã¿è¾¼ãããã®éçAPIã¯
-target_timer.cfgã®ä¸­ã«è¨è¿°ããï¼ãã®ãã¡ã¤ã«ã«ã¯ï¼ãªã¼ãã©ã³ã¿ã¤ããã©
-ã¤ããåæåããããã®åæåã«ã¼ãã³ã®è¿½å ï¼ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ãã
-çµäºãããããã®çµäºå¦çã«ã¼ãã³ã®è¿½å ï¼ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿ã®ããã®
-å²è¾¼ã¿ãã³ãã©ã®å®ç¾©ï¼ã¾ãã¯ï¼å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®çæï¼ï¼ãªã¼ãã©
-ã³ã¿ã¤ãå²è¾¼ã¿ã®ããã®å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®ã®éçAPIãªã©ãå«ãã
-ã¨ã«ãªãï¼
+·ä½çã«ã¯ï¼ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ããçµã¿è¾¼ãããã®ã·ã¹ãã ã³ã³ãã£ã®ã¥
+ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼target_timer.cfgã®ä¸­ã«è¨è¿°ãã¦ãããï¼ã«ã¯ï¼ãªã¼ã
+ã©ã³ã¿ã¤ããã©ã¤ããåæåããããã®åæåã«ã¼ãã³ã®è¿½å ï¼ãªã¼ãã©ã³ã¿
+ã¤ããã©ã¤ããçµäºãããããã®çµäºå¦çã«ã¼ãã³ã®è¿½å ï¼ãªã¼ãã©ã³ã¿ã¤ã
+å²è¾¼ã¿ã®ããã®å²è¾¼ã¿ãã³ãã©ã®å®ç¾©ï¼ã¾ãã¯ï¼å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®ç
+æï¼ï¼ãªã¼ãã©ã³ã¿ã¤ãå²è¾¼ã¿ã®ããã®å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®ã®éç
+APIãªã©ãå«ããã¨ã«ãªãï¼
 
 ã¾ãï¼ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ããå¼ã³åºãããã«å¿
-è¦ãªå®ç¾©ã¯
-target_timer.hã®ä¸­ã«ï¼ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ãã®å®è£
-ã¯target_timer.cã®
-ä¸­ã«è¨è¿°ããï¼
+è¦ãªå®ç¾©ãå«ãããããã¡
+ã¤ã«ï¼target_timer.hã®ä¸­ã«è¨è¿°ãã¦ãããï¼ã¨ï¼ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ã
+ã®å®è£
+ãå«ããã¡ã¤ã«ï¼target_timer.cã®ä¸­ã«è¨è¿°ãã¦ãããï¼ãç¨æããï¼
 
 ãªã¼ãã©ã³ãã³ãã©ã¯ï¼ã¿ã¹ã¯ã®ãªã¼ãã©ã³ã«å¯¾ããå¦çãè¡ããã®ã§ããã
@@ -4249,4 +4273,19 @@
 ----------------------------------------
 
+6.16 ã«ã¼ãã«å®è£
+ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+
+ã«ã¼ãã«å®è£
+ã«å¿
+è¦ãªéçAPIãå«ããã¡ã¤ã«ã¨ãã¦ï¼ã«ã¼ãã«å®è£
+ã®ã³ã³ãã£
+ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼target_kernel.cfgï¼ãç¨æããï¼
+
+æ¨æºçãªã¿ã¼ã²ããä¾å­é¨ã§ã¯ï¼target_kernel.cfgã«ã¯ï¼é«åè§£è½ã¿ã¤ããã©
+ã¤ããçµã¿è¾¼ãããã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼target_timer.cfgï¼
+ã¨ãªã¼ãã©ã³ã¿ã¤ããã©ã¤ããçµã¿è¾¼ãããã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤
+ã«ï¼target_timer.cfgã«å«ã¾ãã¦ããå ´åãããï¼ã®ã¤ã³ã¯ã«ã¼ãè¨è¿°ã®ã¿ã
+å«ã¾ããï¼
+
 
 ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
@@ -4254,14 +4293,15 @@
 7.1 è¨­å®ãã¡ã¤ã«ã¨ã¿ã¼ã²ããä¾å­é¨ã®ä½ç½®ä»ã
 
-ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼è¨­å®ãã¡ã¤ã«ã®è¨è¿°ã«å¾ã£ã¦ãã¡ã¤ã«
-ã®çæããã³ã¨ã©ã¼ãã§ãã¯ãè¡ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è¨­å®ãã¡ã¤ã«ã«ã¯ï¼
-ä»¥ä¸ã®4ã¤ãããï¼
+ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼è¨­å®ãã¡ã¤ã«ã®è¨è¿°ã«å¾ã£ã¦ï¼ãã¡ã¤
+ã«ã®çæããã³ã¨ã©ã¼ãã§ãã¯ãè¡ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è¨­å®ãã¡ã¤ã«ã«
+ã¯ï¼ä»¥ä¸ã®4ã¤ãããï¼
 
 (a) éçAPIãã¼ãã«
 
-éçAPIã®ä¸è¦§ã¨ï¼åéçAPIã®ãã©ã¡ã¼ã¿ã«ã¤ãã¦è¨è¿°ãããã¡ã¤ã«ï¼éç
-APIãæ¡å¼µããå ´åä»¥å¤ã¯å¤æ´ããå¿
-è¦ããªãããï¼ã¿ã¼ã²ããéä¾å­é¨ã§ç¨æ
-ãã¦ããï¼kernel/kernel_api.csvï¼ï¼
+éçAPIã®ä¸è¦§ã¨ï¼åéçAPIã®ãã©ã¡ã¼ã¿ã«é¢ããæ
+å ±ãè¨è¿°ãããã¡ã¤ã«ï¼
+éçAPIãæ¡å¼µããå ´åä»¥å¤ã¯å¤æ´ããå¿
+è¦ããªãããï¼ã¿ã¼ã²ããéä¾å­é¨ã§
+ç¨æãã¦ããï¼kernel/kernel_api.defï¼ï¼
 
 (b) å¤åå¾ã·ã³ãã«ãã¼ãã«
@@ -4271,95 +4311,95 @@
 ãéä¾å­é¨ã§ã¯ï¼ã¿ã¼ã²ããã«ä¾å­ããã«å¿
 è¦ã¨ãªãã·ã³ãã«ãè¨è¿°ãããã¡
-ã¤ã«ãç¨æãã¦ããï¼kernel/kernel_def.csvï¼ï¼
+ã¤ã«ãç¨æãã¦ããï¼kernel/kernel_sym.defï¼ï¼
 
 ã¿ã¼ã²ããã«ä¾å­ãã¦å¿
 è¦ã¨ãªãã·ã³ãã«ãããå ´åã«ã¯ï¼targetãã£ã¬ã¯ã
-ãªã«ç½®ãããtarget_def.csvä¸­ã«è¨è¿°ããï¼target_def.csvä¸­ã«è¨è¿°ãã¦å¤ã
+ãªã«ç½®ãããtarget_sym.defä¸­ã«è¨è¿°ããï¼target_sym.defä¸­ã«è¨è¿°ãã¦å¤ã
 æ±ãããã¨ãã§ããã·ã³ãã«ã¯ï¼kernel/kernel_int.hããã³ããããã¤ã³ã¯ã«ã¼
 ãããããã¡ã¤ã«ã§å®ç¾©ããã¦ããªããã°ãªããªãï¼kernel_int.hããã¯ï¼
 target_stddef.hï¼target_kernel.hï¼target_kernel_impl.hãï¼éæ¥çã«ï¼ã¤
 ã³ã¯ã«ã¼ããã¦ããããï¼ãããã®ãã¡ã¤ã«ããã³ããããã¤ã³ã¯ã«ã¼ããã
-ããã¡ã¤ã«ã§å®ç¾©ãããã¿ã¼ã²ããä¾å­ã®ã·ã³ãã«ã¯ï¼target_def.csvä¸­ã«è¨
+ããã¡ã¤ã«ã§å®ç¾©ãããã¿ã¼ã²ããä¾å­ã®ã·ã³ãã«ã¯ï¼target_sym.defä¸­ã«è¨
 è¿°ãããã¨ãã§ããï¼
 
-ããã§å¤ãæ±ããã·ã³ãã«ã®å¤ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ããã³ãã¹3ã®
-ãã³ãã¬ã¼ããã¡ã¤ã«ä¸­ã§åç
-§ãããã¨ãã§ããï¼
-
-(c) ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã¯ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã«å¾ã£ã¦ï¼ã«ã¼ãã«ã®æ§
-æã»åæåãã¡ã¤ã«ï¼kernel_cfg.cï¼ï¼æ§æã»åæåããããã¡ã¤ã«
-ï¼kernel_cfg.hï¼ãªã©ãçæããï¼ãã®ãã³ãã¬ã¼ããã¡ã¤ã«ã¯ï¼ã¿ã¼ã²ãã
-éä¾å­é¨ã¨ã¿ã¼ã²ããä¾å­é¨ã«åãåãã¦ãããï¼ä»ã®ãã¡ã¤ã«ã®ã¿ã¼ã²ãã
-ä¾å­é¨ã¨ã¯éã«ï¼ã¿ã¼ã²ããä¾å­é¨ããã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãã
-ãå½¢ã«ãªã£ã¦ããï¼
+ããã§å¤ãæ±ããã·ã³ãã«ã®å¤ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ï¼ãã¹3ããã³
+ãªãã»ããçæç¨ã®çæã¹ã¯ãªããä¸­ã§ï¼ã°ã­ã¼ãã«å¤æ°ã¨ãã¦åç
+§ãããã¨
+ãã§ããï¼
+
+(c) ãã¹2ã®çæã¹ã¯ãªãã
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã¯ï¼çæã¹ã¯ãªããã«ããï¼ã«ã¼ãã«ã®æ§æã»åæ
+åãã¡ã¤ã«ï¼kernel_cfg.cï¼ï¼æ§æã»åæåããããã¡ã¤ã«ï¼kernel_cfg.hï¼
+ãªã©ãçæããï¼ãã®çæã¹ã¯ãªããã¯ï¼ã¿ã¼ã²ããéä¾å­é¨ã¨ã¿ã¼ã²ããä¾
+å­é¨ã«åãåãã¦ãããï¼ä»ã®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ã¨ã¯éã«ï¼ã¿ã¼ã²ã
+ãä¾å­é¨ããã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããå½¢ã«ãªã£ã¦ããï¼
 
 å
-·ä½çã«ã¯ï¼targetãã£ã¬ã¯ããªã«ç½®ãããtarget.tfã§ï¼å¿
-è¦ãªå¤æ°ãå®ç¾©ã
-ãå¾ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨ï¼kernel/kernel.tfï¼ãã¤
-ã³ã¯ã«ã¼ãããï¼kernel.tfã§ã¯ï¼ã«ã¼ãã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§ä½¿ç¨ããå¤
-æ°å®ç¾©ç­ãçæããï¼kernel.tfãã¤ã³ã¯ã«ã¼ãããå¾ï¼target.tfã§ã¯ï¼ã«ã¼
-ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã§ä½¿ç¨ããå¤æ°å®ç¾©ç­ãçæããï¼target.tfããï¼é
-çºç°å¢ä¾å­é¨ï¼ãã­ã»ããµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ãåãåãã¦ãããï¼
-
-(d) ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã¯ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã«å¾ã£ã¦ï¼éçAPIã®ä¸
-è¬å®æ°å¼ãã©ã¡ã¼ã¿ã®ãã§ãã¯ãè¡ãï¼ãã®ãã³ãã¬ã¼ããã¡ã¤ã«ãï¼ã¿ã¼ã²ã
-ãéä¾å­é¨ã¨ã¿ã¼ã²ããä¾å­é¨ã«åãåãã¦ããï¼ã¿ã¼ã²ããä¾å­é¨ããã¿ã¼
-ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããå½¢ã«ãªã£ã¦ããï¼
+·ä½çã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ãã£ã¬ã¯ããªã«ç½®ãããtarget_kernel.trbã§å¿
+
+è¦ãªå¤æ°ãå®ç¾©ããå¾ï¼ã¿ã¼ã²ããéä¾å­é¨ï¼kernel/kernel.trbï¼ãã¤ã³ã¯ã«ã¼
+ãããï¼kernel.trbã§ã¯ï¼ã«ã¼ãã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§ä½¿ç¨ããå¤æ°å®ç¾©
+ç­ãçæããï¼kernel.trbã®ã¤ã³ã¯ã«ã¼ãã®å¾ï¼target_kernel.trbã§ã¯ï¼ã«ã¼
+ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã§ä½¿ç¨ããå¤æ°å®ç¾©ç­ãçæããï¼target_kernel.trb
+ããï¼éçºç°å¢ä¾å­é¨ï¼ãã­ã»ããµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ãåãåãã¦ã
+ããï¼
+
+(d) ãã¹3ã®çæã¹ã¯ãªãã
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã¯ï¼çæã¹ã¯ãªããã«ããï¼éçAPIã®ä¸è¬å®æ°å¼
+ãã©ã¡ã¼ã¿ã®ãã§ãã¯ãè¡ãï¼ãã®çæã¹ã¯ãªãããï¼ã¿ã¼ã²ããéä¾å­é¨ã¨
+ã¿ã¼ã²ããä¾å­é¨ã«åãåãã¦ããï¼ã¿ã¼ã²ããä¾å­é¨ããã¿ã¼ã²ããéä¾å­
+é¨ãã¤ã³ã¯ã«ã¼ãããå½¢ã«ãªã£ã¦ããï¼
 
 å
-·ä½çã«ã¯ï¼targetãã£ã¬ã¯ããªã«ç½®ãããtarget_check.tfã§ï¼å¿
-è¦ãªå¤æ°ã
-å®ç¾©ããå¾ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨
-ï¼kernel/kernel_check.tfï¼ãã¤ã³ã¯ã«ã¼ãããï¼kernel_check.tfã§ã¯ï¼ã«ã¼
-ãã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§åæåãã­ãã¯ã«åºåããä¸è¬å®æ°å¼ãã©ã¡ã¼ã¿
-ã®ãã§ãã¯ãè¡ãï¼kernel_check.tfãã¤ã³ã¯ã«ã¼ãããå¾ï¼target_check.tf
-ã§ã¯ï¼ã¿ã¼ã²ããã«ä¾å­ãããã§ãã¯ãè¡ãï¼target_check.tfããï¼éçºç°å¢
-ä¾å­é¨ï¼ãã­ã»ããµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ãåãåãã¦ãããï¼
-
-ãªãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è©³ç´°ä»æ§ã¨è¨­å®ãã¡ã¤ã«ã®è¨è¿°æ¹æ³ã«ã¤ãã¦ã¯ï¼
-å¥éPDFãã¡ã¤ã«ã®å½¢ã§é
-å¸ãã¦ãããTOPPERSæ°ä¸ä»£ã«ã¼ãã«ç¨ã³ã³ãã£ã®ã¥
-ã¬ã¼ã¿ä»æ§ãããã³ãTOPPERSæ°ä¸ä»£ã«ã¼ãã«ç¨ã³ã³ãã£ã®ã¥ã¬ã¼ã¿å
-èµãã¯ã­
-ãã­ã»ããµä»æ§ããåç
-§ãããã¨ï¼
-
-7.2 ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
-
-ä»¥ä¸ã§ã¯ï¼ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ãè¨è¿°ããä¸ã§å¿
-
-è¦ãªäºé 
+·ä½çã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ãã£ã¬ã¯ããªã«ç½®ãããtarget_check.trbã§ï¼
+å¿
+è¦ãªå¤æ°ãå®ç¾©ããå¾ï¼ã¿ã¼ã²ããéä¾å­é¨ï¼kernel/kernel_check.trbï¼ã
+ã¤ã³ã¯ã«ã¼ãããï¼kernel_check.trbã§ã¯ï¼ã«ã¼ãã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§
+åæåãã­ãã¯ã«åºåããä¸è¬å®æ°å¼ãã©ã¡ã¼ã¿ã®ãã§ãã¯ãè¡ãï¼
+kernel_check.trbã®ã¤ã³ã¯ã«ã¼ãã®å¾ï¼target_check.trbã§ã¯ï¼ã¿ã¼ã²ããã«
+ä¾å­ãããã§ãã¯ãè¡ãï¼target_check.trbããï¼éçºç°å¢ä¾å­é¨ï¼ãã­ã»ã
+ãµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ãåãåãã¦ãããï¼
+
+ãªãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è¨­å®ãã¡ã¤ã«ã®è¨è¿°æ¹æ³ã«ã¤ãã¦ã¯ï¼ãTOPPERSç¬¬
+3ä¸ä»£ã«ã¼ãã«åã Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ããåç
+§
+ãããã¨ï¼
+
+7.2 ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
+
+ä»¥ä¸ã§ã¯ï¼ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ãè¨è¿°ããä¸ã§å¿
+è¦ãªäº
+é 
 ã«ã¤ãã¦èª¬æããï¼
 
 7.2.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
 
-target.tfããkernel.tfãã¤ã³ã¯ã«ã¼ãããåã«ï¼æ¬¡ã®å¤æ°ãå®ç¾©ãã¦ãããª
-ããã°ãªããªãï¼
-
-(7-2-1-1) INTNO_VALID			æå¹ãªå²è¾¼ã¿çªå·ã®ãªã¹ã
-(7-2-1-2) INHNO_VALID			æå¹ãªå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ã
-(7-2-1-3) EXCNO_VALID			æå¹ãªCPUä¾å¤ãã³ãã©çªå·ã®ãªã¹ã
+target_kernel.trbããkernel.trbãã¤ã³ã¯ã«ã¼ãããåã«ï¼æ¬¡ã®å¤æ°ããã³é¢
+æ°ãå®ç¾©ãã¦ãããªããã°ãªããªãï¼ãªãï¼ãªã¹ãã¯ï¼Rubyã§ã¯é
+åã§å®ç¾ã
+ãï¼
+
+(7-2-1-1) $INTNO_VALID			æå¹ãªå²è¾¼ã¿çªå·ã®ãªã¹ã
+(7-2-1-2) $INHNO_VALID			æå¹ãªå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ã
+(7-2-1-3) $EXCNO_VALID			æå¹ãªCPUä¾å¤ãã³ãã©çªå·ã®ãªã¹ã
 
 æå¹ãªå²è¾¼ã¿çªå·ï¼å²è¾¼ã¿ãã³ãã©çªå·ï¼CPUä¾å¤ãã³ãã©çªå·ã®ãªã¹ããï¼å
 å¤æ°ã«å®ç¾©ããï¼
 
-(7-2-1-4) INTNO_CREISR_VALIDï¼ãªãã·ã§ã³ï¼
-(7-2-1-5) INHNO_CREISR_VALIDï¼ãªãã·ã§ã³ï¼
-
-CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã®ãªã¹ããINTNO_CREISR_VALIDã«ï¼ããã«å¯¾å¿
-ããå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ããINHNO_CREISR_VALIDã«å®ç¾©ããï¼ä¸¡è
+(7-2-1-4) $INTNO_CREISR_VALIDï¼ãªãã·ã§ã³ï¼
+(7-2-1-5) $INHNO_CREISR_VALIDï¼ãªãã·ã§ã³ï¼
+
+CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã®ãªã¹ãã$INTNO_CREISR_VALIDã«ï¼ããã«å¯¾
+å¿ããå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ãã$INHNO_CREISR_VALIDã«å®ç¾©ããï¼ä¸¡è
 ã¯ï¼
 é åºã¾ã§å«ãã¦å¯¾å¿ãã¦ããªããã°ãªããªãï¼
 
-ãããã®å¤æ°ãå®ç¾©ããªãå ´åï¼ããããINTNO_VALIDã¨INHNO_VALIDãä½¿ãã
-ãï¼ããã§è¯ãå ´åã«ã¯ï¼ãããã®å¤æ°ãå®ç¾©ããå¿
+ãããã®å¤æ°ãå®ç¾©ããªãå ´åï¼ãããã$INTNO_VALIDã¨$INHNO_VALIDãä½¿ã
+ããï¼ããã§è¯ãå ´åã«ã¯ï¼ãããã®å¤æ°ãå®ç¾©ããå¿
 è¦ã¯ãªãï¼
 
-(7-2-1-6) INTPRI_CFGINT_VALIDï¼ãªãã·ã§ã³ï¼
+(7-2-1-6) $INTPRI_CFGINT_VALIDï¼ãªãã·ã§ã³ï¼
 
 CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿åªå
@@ -4370,105 +4410,101 @@
 TMIN_INTPRIãããå°ããå¤ãæå¹ã¨ãããã¨ãã§ããï¼
 
-(7-2-1-7) INTNO_FIX_KERNELï¼ãªãã·ã§ã³ï¼	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ãã
-											å²è¾¼ã¿çªå·
-(7-2-1-8) INHNO_FIX_KERNELï¼ãªãã·ã§ã³ï¼	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ãã
-		 									å²è¾¼ã¿ãã³ãã©çªå·
-(7-2-1-9) INHNO_FIX_NONKERNELï¼ãªãã·ã§ã³ï¼	ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ãã
-											å²è¾¼ã¿çªå·
-(7-2-1-10) INHNO_FIX_NONKERNELï¼ãªãã·ã§ã³ï¼ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ãã
-		 									å²è¾¼ã¿ãã³ãã©çªå·
+(7-2-1-7) $INTNO_FIX_KERNELï¼ãªãã·ã§ã³ï¼	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ãã
+											å²è¾¼ã¿çªå·ã®ãªã¹ã
+(7-2-1-8) $INHNO_FIX_KERNELï¼ãªãã·ã§ã³ï¼	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ãã
+		 									å²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ã
+(7-2-1-9) $INHNO_FIX_NONKERNELï¼ãªãã·ã§ã³ï¼ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ãã
+											å²è¾¼ã¿çªå·ã®ãªã¹ã
+(7-2-1-10) $INHNO_FIX_NONKERNELï¼ãªãã·ã§ã³ï¼ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ã
+		 									ãå²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ã
 
 ã«ã¼ãã«ç®¡çã¾ãã¯ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããå²è¾¼ã¿ãããå ´åã«ã¯ï¼
 ãããã®å²è¾¼ã¿çªå·ã¨å²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ããï¼åå¤æ°ã«å®ç¾©ããï¼
 
-(7-2-1-11) GENERATE_TSKINICTXBï¼ãªãã·ã§ã³ï¼
+(7-2-1-11) GenerateTskinictxbï¼ãªãã·ã§ã³ï¼
 
 USE_TSKINICTXBããã¯ã­å®ç¾©ããå ´åï¼TSKINICTXBã®åæåæ
 å ±ãçæããã
-ããã³ãã¬ã¼ããã¡ã¤ã«é¢æ°GENERATE_TSKINICTXBãå®ç¾©ããï¼
-GENERATE_TSKINICTXBã«ã¯ï¼ã¿ã¹ã¯IDããã©ã¡ã¼ã¿ã¨ãã¦æ¸¡ãããï¼
-
-(7-2-1-12) ALLOC_STACKï¼ãªãã·ã§ã³ï¼
+ãã®é¢æ°GenerateTskinictxbãå®ç¾©ããï¼GenerateTskinictxbã«ã¯ï¼ã¿ã¹ã¯ã®
+IDçªå·ï¼æ°å¤ï¼ã¨ãã©ã¡ã¼ã¿æ
+å ±ï¼ããã·ã¥ï¼ããã©ã¡ã¼ã¿ã¨ãã¦æ¸¡ãããï¼
+
+(7-2-1-12) AllocStackï¼ãªãã·ã§ã³ï¼
 
 ã¹ã¿ãã¯é åã®çææ¹æ³ãããã©ã«ãããå¤æ´ãããå ´åã«ã¯ï¼ã¹ã¿ãã¯é å
-ãçæããããã®ãã³ãã¬ã¼ããã¡ã¤ã«é¢æ°ALLOC_STACKãå®ç¾©ããï¼
-ALLOC_STACKã«ã¯ï¼ã¹ã¿ãã¯é åã®å¤æ°åã¨ä¸¸ããåã®ãµã¤ãºããã©ã¡ã¼ã¿ã¨ã
-ã¦æ¸¡ãããã®ã§ï¼ã¹ã¿ãã¯é åãçæããã³ã¼ããçæãï¼å¤§ããæ¹ã«ä¸¸ãã
-ãµã¤ãºãè¡¨ãæå­åãè¿ãï¼
+ãçæããããã®é¢æ°AllocStackãå®ç¾©ããï¼AllocStackã«ã¯ï¼ã¹ã¿ãã¯é å
+ã®å¤æ°åã¨ä¸¸ããåã®ãµã¤ãºããã©ã¡ã¼ã¿ã¨ãã¦æ¸¡ãããã®ã§ï¼ã¹ã¿ãã¯é å
+ãçæããã³ã¼ããçæãï¼å¤§ããæ¹ã«ä¸¸ãããµã¤ãºãè¡¨ãæå­åãè¿ãï¼
 
 7.2.2 ã¿ã¼ã²ããéä¾å­é¨ã§å®ç¾©ãããå¤æ°
 
-kernel.tfã®ä¸­ã§ã¯æ¬¡ã®å¤æ°ãå®ç¾©ãããããï¼kernel.tfãã¤ã³ã¯ã«ã¼ããã
-å¾ï¼target.tfã®ä¸­ã§ããããåç
+kernel.trbã®ä¸­ã§ã¯æ¬¡ã®å¤æ°ãå®ç¾©ãããããï¼kernel.trbã®ã¤ã³ã¯ã«ã¼ãã®
+å¾ï¼target_kernel.trbã®ä¸­ã§ããããåç
 §ãããã¨ãã§ããï¼
 
-(7-2-2-1) INTNO[inhno]		inhnoãå¯¾å¿ããintnoã«å¤æããããã®é£æ³é
-å
-(7-2-2-2) INHNO[intno]		intnoãå¯¾å¿ããinhnoã«å¤æããããã®é£æ³é
-å
-
-7.3 ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
-
-ä»¥ä¸ã§ã¯ï¼ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ãè¨è¿°ããä¸ã§å¿
-
-è¦ãªäºé 
+(7-2-2-1) $toIntnoVal[inhnoVal]		å²è¾¼ã¿ãã³ãã©çªå·inhnoValãï¼å¯¾å¿ã
+									ãå²è¾¼ã¿çªå·ã«å¤æããããã®ããã·ã¥
+(7-2-2-2) $toInhnoVal[intnoVal]		å²è¾¼ã¿çªå·intnoValãï¼å¯¾å¿ããå²è¾¼ã¿
+									ãã³ãã©çªå·ã«å¤æããããã®ããã·ã¥
+
+7.3 ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
+
+ä»¥ä¸ã§ã¯ï¼ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ãè¨è¿°ããä¸ã§å¿
+è¦ãªäº
+é 
 ã«ã¤ãã¦èª¬æããï¼
 
 7.3.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
 
-target_check.tfããkernel_check.tfãã¤ã³ã¯ã«ã¼ãããåã«ï¼å¿
-è¦ã«å¿ãã¦ï¼
-æ¬¡ã®å¤æ°ãå®ç¾©ãã¦ãããªããã°ãªããªãï¼
-
-(7-3-1-1) GET_STK_TSKINICTXBï¼ãªãã·ã§ã³ï¼
+target_check.trbããkernel_check.trbãã¤ã³ã¯ã«ã¼ãããåã«ï¼å¿
+è¦ã«å¿ã
+ã¦ï¼æ¬¡ã®å¤æ°ããã³é¢æ°ãå®ç¾©ãã¦ãããªããã°ãªããªãï¼
+
+(7-3-1-1) GetStackTskinictxbï¼ãªãã·ã§ã³ï¼
 
 USE_TSKINICTXBããã¯ã­å®ç¾©ããå ´åï¼TINIBããã¹ã¿ãã¯é åã®å
 é ­çªå°ãå
-ãåºãããã®ãã³ãã¬ã¼ããã¡ã¤ã«é¢æ°GET_STK_TSKINICTXBãå®ç¾©ããï¼
-GET_STK_TSKINICTXBã«ã¯ï¼ã¿ã¹ã¯åæåãã­ãã¯ï¼TINIBï¼ã®å
-é ­çªå°ããã©ã¡ã¼
-ã¿ã¨ãã¦æ¸¡ãããï¼CHECK_STACK_ALIGNï¼CHECK_STACK_NONNULLã¨ãå®ç¾©ããªã
-å ´åã«ã¯ï¼GET_STK_TSKINICTXBãå®ç¾©ããå¿
-è¦ã¯ãªãï¼
-
-(7-3-1-2) LMA.ORDER_LISTï¼ãªãã·ã§ã³ï¼
-(7-3-1-3) LMA.START_DATA[lmano]ï¼ãªãã·ã§ã³ï¼
-(7-3-1-4) LMA.END_DATA[lmano]ï¼ãªãã·ã§ã³ï¼
-(7-3-1-5) LMA.START_IDATA[lmano]ï¼ãªãã·ã§ã³ï¼
-
-ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ã§dataã»ã¯ã·ã§ã³ãããã¼ã¿
-ãåå¾ããå ´åãï¼rodataã»ã¯ã·ã§ã³ãRAMã«ç½®ãå ´åï¼ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
-ã®ã11.8 rodataã»ã¯ã·ã§ã³ãRAMã«ç½®ãå ´åãã®ç¯ãåç
-§ï¼ã«ã¯ï¼ãããã®ã»
-ã¯ã·ã§ã³ã®å
+ãåºãããã®é¢æ°GetStackTskinictxbãå®ç¾©ããï¼GetStackTskinictxbã«ã¯ï¼
+ã¿ã¹ã¯ã®IDçªå·ï¼å¤ï¼ï¼ãã©ã¡ã¼ã¿ãªã¹ãï¼ããã·ã¥ï¼ï¼ã¿ã¹ã¯åæåãã­ã
+ã¯ã®å
+é ­çªå°ããã©ã¡ã¼ã¿ã¨ãã¦æ¸¡ãããï¼
+
+(7-3-1-2) $lmaListï¼ãªãã·ã§ã³ï¼
+
+ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ã§dataã»ã¯ã·ã§ã³ãããã¼ã¿ãåå¾
+ããå ´åãï¼rodataã»ã¯ã·ã§ã³ãRAMã«ç½®ãå ´åï¼ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ã®
+ã11.8 rodataã»ã¯ã·ã§ã³ãRAMã«ç½®ãå ´åãã®ç¯ãåç
+§ï¼ã«ã¯ï¼ãããã®ã»ã¯
+ã·ã§ã³ã®å
 å®¹ãï¼é
 ç½®ã¢ãã¬ã¹ï¼ROMå
-ã®ã¢ãã¬ã¹ï¼LMAã¨å¼ã¶ï¼ããã¢ã¯ã»
-ã¹ã¢ãã¬ã¹ï¼RAMå
+ã®ã¢ãã¬ã¹ï¼LMAã¨å¼ã¶ï¼ããã¢ã¯ã»ã¹
+ã¢ãã¬ã¹ï¼RAMå
 ã®ã¢ãã¬ã¹ï¼VMAã¨å¼ã¶ï¼ã«ã³ãã¼ããå¿
 è¦ãããï¼
 
-ãã®ã³ãã¼ã¯ï¼LMA.ORDER_LISTã«ï¼ã³ãã¼ããã»ã¯ã·ã§ã³ã®çªå·ï¼lmanoï¼ã®ãª
-ã¹ãï¼çªå·ã¯ä»»æã«ä»ä¸ãã¦ããï¼ï¼LMA.START_DATA[lmano]ã«ã³ãã¼ããã»ã¯
-ã·ã§ã³ã®ã¢ã¯ã»ã¹ã¢ãã¬ã¹ã®å
-é ­ã®ã©ãã«ï¼LMA.END_DATA[lmano]ã«æ«å°¾ã®ã©ã
-ã«ï¼LMA.START_IDATA[lmano]ã«ãã®é
-ç½®ã¢ãã¬ã¹ã®å
-é ­ã®ã©ãã«ãè¨­å®ããã
-ã¨ã§ï¼ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§å®æ½ããï¼
+ãã®ã³ãã¼ã¯ï¼$lmaListã«ï¼ã³ãã¼ããã»ã¯ã·ã§ã³æ
+å ±ã®ãªã¹ããè¨­å®ããã
+ã¨ã§ï¼ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããéä¾å­é¨ã§å®æ½ããï¼ã»ã¯ã·ã§ã³æ
+
+å ±lmaã¯ï¼lma[:START_DATA]ã«ã³ãã¼ããã»ã¯ã·ã§ã³ã®ã¢ã¯ã»ã¹ã¢ãã¬ã¹ã®å
+é ­
+ã®ã©ãã«ï¼lma[:END_DATA]ã«æ«å°¾ã®ã©ãã«ï¼lma[:START_IDATA]ã«ãã®é
+ç½®ã¢ã
+ã¬ã¹ã®å
+é ­ã®ã©ãã«ãè¨­å®ããããã·ã¥ã§è¡¨ãï¼
 
 ä¾ãã°ï¼ã³ãã¼ããã»ã¯ã·ã§ã³ã®ã¢ã¯ã»ã¹ã¢ãã¬ã¹ã®å
 é ­ã®ã©ãã«ã
-"__data_start"ï¼æ«å°¾ã®ã©ãã«ã"__data_end"ï¼ãã®é
+"__start_data"ï¼æ«å°¾ã®ã©ãã«ã"__end_data"ï¼ãã®é
 ç½®ã¢ãã¬ã¹ã®å
 é ­ã®ã©
-ãã«ã"__idata_start"ã®å ´åã«ã¯ï¼ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ã
-ãä¾å­é¨ã«ä»¥ä¸ã®è¨è¿°ãå«ããï¼
-
-----------------------------------------
-$LMA.ORDER_LIST = { 1 }$
-$LMA.START_DATA[1] = "__data_start"$
-$LMA.END_DATA[1] = "__data_end"$
-$LMA.START_IDATA[1] = "__idata_start"$
+ãã«ã"__start_idata"ã®å ´åã«ã¯ï¼ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­
+é¨ã«ä»¥ä¸ã®è¨è¿°ãå«ããï¼
+
+----------------------------------------
+$lmaList = [ { :START_DATA => "__start_data",
+               :END_DATA => "__end_data",
+               :START_IDATA => "__start_idata" } ]
 ----------------------------------------
 
@@ -4477,5 +4513,5 @@
 ä»¥ä¸ã®å
 é ­çªå°ã¯ï¼ã¿ã¼ã²ããéä¾å­é¨ã§çæãããã¼ãã«ã«åºåãããªãã
-ãï¼ãã¹3ã®ã¿ã¼ã²ããéä¾å­é¨ï¼kernel_check.tfï¼ã§ã¯ï¼ãã­ã°ã©ã ã®éå§
+ãï¼ãã¹3ã®ã¿ã¼ã²ããéä¾å­é¨ï¼kernel_check.trbï¼ã§ã¯ï¼ãã­ã°ã©ã ã®éå§
 çªå°ã¨ãã¦æ­£ãããªãå ´åã®ã¨ã©ã¼ããã§ãã¯ããªãï¼ãã®ããï¼ã¿ã¼ã²ãã
 ä¾å­é¨ã§ã¨ã©ã¼ãã§ãã¯ãè¡ãå¿
@@ -4550,38 +4586,229 @@
 ï¼ï¼ã·ã¹ãã ãµã¼ãã¹ç­ã®ã¿ã¼ã²ããä¾å­é¨
 
-8.0 ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­é¨
-
-ã·ãªã¢ã«ãã¼ãæ°ãã·ã¹ãã ã­ã°ã¿ã¹ã¯é¢é£ã®å®æ°ãªã©ï¼ã·ã¹ãã ãµã¼ãã¹ã®
-æ§æãæ±ºå®ããããã®å®ç¾©ãtarget_syssvc.hã¾ãã¯ããããã¤ã³ã¯ã«ã¼ããã
+ASP3ã«ã¼ãã«ã§ã¯ï¼TOPPERSçµè¾¼ã¿ã³ã³ãã¼ãã³ãã·ã¹ãã ï¼TECSï¼ãç¨ãã¦ã·
+ã¹ãã ãµã¼ãã¹ãæ§ç¯ãã¦ããï¼TECSã®ä»æ§ã«ã¤ãã¦ã¯ï¼ä»¥ä¸ã®URLã«ãã
+TECSãªãã¡ã¬ã³ã¹ããã¥ã¢ã«ãåèã«ãããã¨ï¼
+
+	http://dev.toppers.jp/trac_user/tecs/wiki/WikiStart
+
+ãTOPPERS/ASP1ã«ã¼ãã«ã¨ã®é¢ä¿ã
+
+TECSãç¨ãã¦ã·ã¹ãã ãµã¼ãã¹ãæ§ç¯ãã¦ããããï¼ãã®å
+é¨æ§é ã¯ï¼ASP1ã«ã¼
+ãã«ã¨ã¯å¤§ããç°ãªãï¼
+
+8.1 ã·ã¹ãã ãµã¼ãã¹ã®æ§æã¨ã¿ã¼ã²ããä¾å­é¨
+
+ASP3ã«ã¼ãã«ã®é
+å¸ããã±ã¼ã¸ã«ã¯ï¼ä»¥ä¸ã®ã·ã¹ãã ãµã¼ãã¹ãå«ã¾ãã¦ããï¼
+
+  ã»ã·ã¹ãã ã­ã°æ©è½
+  ã»ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+	  - ã¿ã¼ã²ããéä¾å­é¨
+	  - ã¿ã¼ã²ããä¾å­é¨
+  ã»ã·ã¹ãã ã­ã°ã¿ã¹ã¯
+  ã»ä½ã¬ãã«åºåï¼ã¿ã¼ã²ããä¾å­é¨ã®ã¿ï¼
+  ã»ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹
+  ã»å®è¡æéåå¸éè¨ãµã¼ãã¹
+  ã»ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºå
+
+ãããã®å
+ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã¨ä½ã¬ãã«
+åºåã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ç¨æããå¿
+è¦ãããï¼ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ã
+ãä¾å­é¨ã®ã³ã³ãã¼ãã³ãè¨è¿°ã¯ï¼target.cdlã¾ãã¯ããããã¤ã³ãã¼ããã
 ããã¡ã¤ã«ï¼éçºç°å¢ä¾å­é¨ï¼ãã­ã»ããµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ã§ç¨æã
-ããããããã¡ã¤ã«ãªã©ï¼ã«å«ããï¼
-
-ãªãï¼TOPPERSçµè¾¼ã¿ã³ã³ãã¼ãã³ãã·ã¹ãã ãå°å
-¥ãããã¨ï¼ãã®ãã¡ã¤ã«ã®
-å
-å®¹ã¯ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã«è¨è¿°ããããã¨ã«ãªãï¼ãã®ãã¡ã¤ã«ã¯
-ç¡ããªãï¼ã¾ãã¯ï¼å¤§å¹
-ã«ç¸®å°ãããï¼è¦è¾¼ã¿ã§ããï¼
-
-8.1 ã·ã¹ãã ã­ã°æ©è½ã®ã¿ã¼ã²ããä¾å­å®ç¾©
-
-ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ããå ´åã§ï¼ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã§bssã»ã¯ã·ã§
-ã³ã®ã¯ãªã¢ãçç¥ãã¦ããå ´åã«ã¯ï¼syslog_logmaskã¨syslog_lowmask_notã
-0ã«åæåããã³ã¼ããè¿½å ããï¼ããã¯ï¼ã·ã¹ãã ã­ã°æ©è½ãåæåãããå
-ã«åºåãããã­ã°æ
-å ±ãï¼ä½ã¬ãã«åºåæ©è½ãç¨ãã¦åºåããããã§ããï¼
-
-ã¿ã¼ã²ããä¾å­é¨ã§æä¾ãã¹ãã·ã¹ãã ã­ã°æ©è½ã®ããã®å®ç¾©ã¯æ¬¡ã®éãã§ã
-ãï¼
-
-(8-1-1) TCNT_SYSLOG_BUFFERï¼ãªãã·ã§ã³ï¼
-
-ã·ã¹ãã ã­ã°æ©è½ã®ã­ã°ãããã¡ã®ãµã¤ãºãå®ç¾©ãããã¯ã­ï¼å®ç¾©ããªãå ´å
-ã®ããã©ã«ãå¤ã¯32ï¼
-
-(8-1-2) void target_fput_log(char c)
-
-ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®æå­åºåé¢æ°ï¼ã¿ã¼ã²ããä¾å­ã®æ¹æ³ã§ï¼
-æå­cãè¡¨ç¤º/åºå/ä¿å­ããï¼
+ããã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ãªã©ï¼ã«å«ããï¼
+
+ãã®ä»ã®ã·ã¹ãã ãµã¼ãã¹ã¯ï¼ã¿ã¼ã²ããéä¾å­é¨ã§ç¨æããã¦ãããï¼ã¿ã¼
+ã²ããä¾å­ã«è¨­å®ãå¤æ´ãããã¨ãã§ããï¼å
+·ä½çã«ã¯ï¼ã·ã¹ãã ãµã¼ãã¹ã®
+è¨­å®ãå¤æ´ããããã®å®ç¾©ãï¼target.cdlã¾ãã¯ããããã¤ã³ãã¼ãããããã¡
+ã¤ã«ãï¼target_syssvc.hã¾ãã¯ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼éçºç°
+å¢ä¾å­é¨ï¼ãã­ã»ããµã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ã§ç¨æãããããããã¡ã¤ã«
+ãªã©ï¼ï¼target_stddef.hã¾ãã¯ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ã«å«ããï¼
+
+8.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨
+
+8.2.1 ã¿ã¼ã²ããä¾å­é¨ã®å®ç¾å½¢æ
+
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã¯ï¼éä¾å­é¨ã¨çµåãã
+ããã®åãå£ã¨å¼ã³å£ã1ã¤ãã¤æã¤ã»ã«ã¿ã¤ãã¨ãã¦å®è£
+ããï¼éä¾å­é¨ã¨çµ
+åããªãã¦ãã¨ã©ã¼ã¨ãªããªãããã«ï¼å¼ã³å£ã«ã¯optionalæå®ãè¡ãï¼åã
+å£ï¼ã¿ã¼ã²ããä¾å­é¨ãéä¾å­é¨ã«å¯¾ãã¦ãµã¼ãã¹ãæä¾ï¼ã¨å¼ã³å£ï¼ã¿ã¼ã²ã
+ãä¾å­é¨ãéä¾å­é¨ãå¼ã³åºãã³ã¼ã«ããã¯ï¼ã®ã¤ã³ã¿ãã§ã¼ã¹ã«ã¤ãã¦ã¯ï¼
+ä»¥éã®ç¯ã§èª¬æããï¼
+
+ã¿ã¼ã²ããä¾å­é¨ã®ã»ã«ã¿ã¤ãåã¨ï¼ã»ã«ã¿ã¤ãã®å®ç¾©ãå
+¥ããã³ã³ãã¼ãã³
+ãè¨è¿°ãã¡ã¤ã«ã®åç§°ã¯ï¼æ¬¡ã®éãã¨ããï¼
+
+	ã»ã«ã¿ã¤ãå	tSIOPort<ã·ã¹ãã ç¥ç§°>
+	ãã¡ã¤ã«å		tSIOPort<ã·ã¹ãã ç¥ç§°>.cdl
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã®ã»ã«ã¿ã¤ãã¯ï¼å
+é¨ã«ï¼
+å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ãçµäºå¦çã«ã¼ãã³ï¼ã·ãªã¢ã«I/Oããã¤ã¹ï¼SIOï¼ã®
+ã¿ã«ä¾å­ããé¨åï¼ãããï¼SIOãã©ã¤ãã¨å¼ã¶ï¼ãªã©ãå«ãè¤åã³ã³ãã¼ãã³
+ãã«ãªãã®ãéå¸¸ã§ããï¼
+
+ã¿ã¼ã²ããã·ã¹ãã ãè¤æ°ã®ã·ãªã¢ã«ãã¼ããæã¤å ´åã«ã¯ï¼ãã¼ãæ¯ã«ã»ã«
+ãä½æï¼ã¤ã³ã¹ã¿ã³ã·ã¨ã¼ãï¼ã§ããã»ã«ã¿ã¤ãã¨ãã¦å®è£
+ããã®ãæã¾ããï¼
+ãã®æï¼ãã¼ãã®åºå¥ã¯ï¼ã»ã«ã¿ã¤ãã®å±æ§ã«SIOã®ããã¤ã¹ã¬ã¸ã¹ã¿ã®çªå°ã
+æããããªã©ã®æ¹æ³ã§è¡ãï¼ã¾ãï¼SIOããã®å²è¾¼ã¿çªå·ãå²è¾¼ã¿åªå
+åº¦ãï¼å¿
+
+è¦ã«å¿ãã¦ï¼ã»ã«ã¿ã¤ãã®å±æ§ã¨ããï¼
+
+8.2.2 ã¿ã¼ã²ããä¾å­é¨ã®åãå£ï¼æä¾ãããµã¼ãã¹ï¼
+
+ã¿ã¼ã²ããä¾å­é¨ãéä¾å­é¨ã«å¯¾ãã¦ãµã¼ãã¹ãæä¾ããåãå£ã®ã·ã°ããã£
+ã¯æ¬¡ã®éãã§ããï¼
+
+----------------------------------------
+signature sSIOPort {
+	void	open(void);
+	void	close(void);
+	bool_t	putChar([in] char c);
+	int_t	getChar(void);
+	void	enableCBR([in] uint_t cbrtn);
+	void	disableCBR([in] uint_t cbrtn);
+};
+----------------------------------------
+
+ãã®ã·ã°ããã£ã«å«ã¾ããé¢æ°ã¯ï¼ï¼å°ãªãã¨ãï¼SIOããã®å²è¾¼ã¿ããã¹ã¯ã
+ããç¶æ
+ã§å¼ã³åºãããï¼ã¾ãï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ã
+ã®ãããã§å¼ã³åºãããå ´åãããï¼ãããã§å¼ã³åºããã¦ãåä½ããããã«
+ããªããã°ãªããªãï¼ï¼
+
+ãã®ã·ã°ããã£ã«å«ã¾ããåé¢æ°ã®ä»æ§ã¯æ¬¡ã®éãï¼
+
+(8-2-2-1) void open(void)
+
+SIOãã¼ãããªã¼ãã³ããï¼
+
+(8-2-2-2) void close(void)
+
+SIOãã¼ããã¯ã­ã¼ãºããï¼
+
+(8-2-2-3) bool_t putChar([in] char c)
+
+SIOãã¼ãããï¼æå­cãéä¿¡ããï¼æå­ãéä¿¡ã¬ã¸ã¹ã¿ã«å
+¥ããå ´åã«ã¯true
+ãï¼åã«éä¿¡ããæå­ã®éä¿¡ãçµãã£ã¦ããªãããã«ï¼æå­ãéä¿¡ã¬ã¸ã¹ã¿ã«
+å
+¥ããããªãã£ãå ´åã«ã¯falseãè¿ãï¼
+
+(8-2-2-4) int_t getChar(void)
+
+SIOãã¼ãããæå­ãèª­ãï¼æå­ãåä¿¡ãã¦ããå ´åï¼èª­ãã æå­ã®ã³ã¼ãã¯æ­£
+ã®å¤ã¨ãã¦è¿ãï¼æå­ãåä¿¡ãã¦ããªãå ´åã«ã¯-1ãè¿ãï¼
+
+(8-2-2-5) void enableCBR([in] uint_t cbrtn)
+
+SIOãã¼ãããã®cbrtnã§æå®ãããã³ã¼ã«ããã¯ãè¨±å¯ããï¼cbrtnã«ã¯ï¼
+SIOSendReadyãSIOReceiveReadyãæå®ã§ããï¼
+
+(8-2-2-6) void disableCBR([in] uint_t cbrtn)
+
+SIOãã¼ãããã®cbrtnã§æå®ãããã³ã¼ã«ããã¯ãç¦æ­¢ããï¼cbrtnã«ã¯ï¼
+SIOSendReadyãSIOReceiveReadyãæå®ã§ããï¼
+
+8.2.3 ã¿ã¼ã²ããä¾å­é¨ã®å¼ã³å£ï¼ã³ã¼ã«ããã¯ï¼
+
+ã¿ã¼ã²ããä¾å­é¨ãéä¾å­é¨ãå¼ã³åºãã³ã¼ã«ããã¯ã®å¼ã³å£ã®ã·ã°ããã£ã¯
+æ¬¡ã®éãã§ããï¼
+
+----------------------------------------
+[callback]
+signature siSIOCBR {
+	void	readySend(void);
+	void	readyReceive(void);
+};
+----------------------------------------
+
+ã¿ã¼ã²ããä¾å­é¨ã¯ï¼æå®ãããã¿ã¤ãã³ã°ã§ï¼ãã®ã·ã°ããã£ã«å«ã¾ããã³ã¼
+ã«ããã¯é¢æ°ãå¼ã³åºããªããã°ãªããªãï¼ãã ãï¼ãã®ã³ã¼ã«ããã¯ãç¦æ­¢
+ããã¦ããæã¯ï¼ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã¦ã¯ãªããªãï¼ã¾ãï¼å¼ã³å£ã
+çµåããã¦ããªãå ´åã«ãï¼ã³ã¼ã«ããã¯é¢æ°ãå¼ã³åºãã¦ã¯ãªããªãï¼
+
+ãã®ã·ã°ããã£ã«å«ã¾ããé¢æ°ã¯ï¼ï¼å°ãªãã¨ãï¼SIOããã®å²è¾¼ã¿ãç¦æ­¢ãã
+ãç¶æ
+ã§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å¼ã³åºãï¼
+
+ãã®ã·ã°ããã£ã«å«ã¾ããåé¢æ°ã®ä»æ§ã¯æ¬¡ã®éãï¼
+
+(8-2-3-1) void readySend(void)
+
+éä¿¡å¯è½ã³ã¼ã«ããã¯ã«ã¼ãã³ï¼SIOãã¼ãã«å¯¾ãã¦æå­ãéä¿¡ã§ããç¶æ
+ã«ãªã£
+ãå ´åã«å¼ã³åºãï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããéä¾å­é¨ã¯ï¼
+ãã®ã³ã¼ã«ããã¯ã«ã¼ãã³ã®ä¸­ã§ï¼åãå£ã®putCharãå¼ã³åºãã¦æ¬¡ã®æå­ãé
+ä¿¡ãããï¼éä¿¡ãã¹ãæå­ããªãå ´åã«ã¯éä¿¡å¯è½ã³ã¼ã«ããã¯ãç¦æ­¢ããï¼
+
+(8-2-3-2) void readyReceive(void)
+
+åä¿¡éç¥ã³ã¼ã«ããã¯ã«ã¼ãã³ï¼SIOãã¼ãããæå­ãåä¿¡ããå ´åã«å¼ã³åºãï¼
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããéä¾å­é¨ã¯ï¼ãã®ã³ã¼ã«ããã¯
+ã«ã¼ãã³ã®ä¸­ã§ï¼åãå£ã®getCharãå¼ã³åºãã¦åä¿¡ããæå­ãåãåºãï¼
+
+8.3 ä½ã¬ãã«åºå
+
+8.3.1 ä½ã¬ãã«åºåã®å®ç¾å½¢æ
+
+
+ä½ã¬ãã«åºåã¯ï¼ãããç¨ããã³ã³ãã¼ãã³ãã¨çµåããããã®åãå£ã1ã¤æ
+ã¤ã·ã³ã°ã«ãã³ã®ã»ã«ã¿ã¤ãã¨ãã¦å®è£
+ããï¼åãå£ã®ã¤ã³ã¿ãã§ã¼ã¹ã«ã¤ã
+ã¦ã¯ï¼ä»¥éã®ç¯ã§èª¬æããï¼
+
+ä½ã¬ãã«åºåã®ã»ã«ã¿ã¤ãåã¨ï¼ã»ã«ã¿ã¤ãã®å®ç¾©ãå
+¥ããã³ã³ãã¼ãã³ãè¨
+è¿°ãã¡ã¤ã«ã®åç§°ã¯ï¼æ¬¡ã®éãã¨ããï¼
+
+	ã»ã«ã¿ã¤ãå	tPutLog<ã·ã¹ãã ç¥ç§°>
+	ãã¡ã¤ã«å		tPutLog<ã·ã¹ãã ç¥ç§°>.cdl
+
+ä½ã¬ãã«åºåãï¼SIOãã¼ããããã¼ãªã³ã°ã«ããåºåããå ´åã«ã¯ï¼ä½ã¬ãã«
+åºåãSIOãã©ã¤ãï¼ã¾ãã¯ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾
+å­åï¼ã¨çµåããããã®å¼ã³å£ãæããã¦ãè¯ãï¼
+
+ä½ã¬ãã«åºåãSIOãã¼ãçµç±ã§è¡ãå ´åï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨
+ãã¼ããå
+±ç¨ããªããã¨ãæã¾ãããï¼ãã¼ãæ°ãè¶³ããªãããã«ããããã
+å
+±ç¨ããå ´åã«ã¯ï¼ä¸¡è
+ãç«¶åããªãããã«æ³¨æãå¿
+è¦ã§ããï¼å
+·ä½çã«ã¯ï¼
+ä¸¡è
+ãåãè¨­å®ã§SIOãä½¿ãããã«ãï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®åä½
+ä¸­ã«ä½ã¬ãã«åºåãè¡ããã¦ãå·®ãæ¯ããªãããã«è¨­è¨ããï¼ã¾ãï¼ä½ã¬ãã«
+åºåãåä½éå§å¾ã«ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããSIOãåæåããã¨ï¼æ
+å­åããèµ·ããå¯è½æ§ãããï¼ãããé¿ããããã«ã¯ï¼å
+±ç¨ãããã¼ãã¯ä½ã¬
+ãã«åºåå´ã§åæåãï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã§ã¯åæåããªãã
+ãã«ããã¨ããï¼
+
+8.3.2 ä½ã¬ãã«åºåã®åãå£ï¼æä¾ãããµã¼ãã¹ï¼
+
+ä½ã¬ãã«åºåããµã¼ãã¹ãæä¾ããåãå£ã®ã·ã°ããã£ã¯æ¬¡ã®éãã§ããï¼
+
+----------------------------------------
+signature sPutLog {
+	void	putChar([in] char c);
+};
+----------------------------------------
+
+ãã®ã·ã°ããã£ã«å«ã¾ããé¢æ°ã®ä»æ§ã¯æ¬¡ã®éãï¼
+
+(8-3-2-1) void putChar([in] char c)
+
+ä½ã¬ãã«åºåã®ããã®æå­åºåé¢æ°ï¼ã¿ã¼ã²ããä¾å­ã®æ¹æ³ã§ï¼æå­cãè¡¨ç¤º/
+åºå/ä¿å­ããï¼
 
 ãã®é¢æ°ã¯ï¼ãªã¨ã³ãã©ã³ãã«å®è£
@@ -4600,30 +4827,83 @@
 ããªããã°ãªããªãï¼
 
-ä½ã¬ãã«åºåãã·ãªã¢ã«ãã¼ãçµç±ã§è¡ãå ´åã§ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ã
-ã©ã¤ãã¨ãã¼ããå
-±ç¨ããªããã¨ãæã¾ãããï¼ãã¼ãæ°ãè¶³ããªãããã«ã
-ããããå
-±ç¨ããå ´åã«ã¯ï¼ä¸¡è
-ãç«¶åããªãããã«æ³¨æãå¿
-è¦ã§ããï¼å
-·ä½
-çã«ã¯ï¼ä¸¡è
-ãåãè¨­å®ã§ã·ãªã¢ã«I/Oããã¤ã¹ãä½¿ãããã«ãï¼ã·ãªã¢ã«ã¤ã³
-ã¿ãã§ã¼ã¹ãã©ã¤ãã®åä½ä¸­ã«ä½ã¬ãã«åºåãè¡ããã¦ãå·®ãæ¯ããªãããã«
-è¨­è¨ããï¼ã¾ãï¼ä½ã¬ãã«åºåãåä½éå§å¾ã«ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤
-ããã·ãªã¢ã«I/Oããã¤ã¹ãåæåããã¨ï¼æå­åããèµ·ããå¯è½æ§ãããï¼ã
-ããé¿ããããã«ã¯ï¼å
-±ç¨ãããã¼ãã¯ä½ã¬ãã«åºåå´ã§åæåãï¼ã·ãªã¢ã«
-ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã§ã¯åæåããªãããã«ããã¨ããï¼
-
-ãªãï¼ãã®é¢æ°ã®æ¬ä½ãï¼ã©ã®ãã¡ã¤ã«ã«è¨è¿°ããããåé¡ã«ãªãï¼ã·ã¹ãã 
-ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­é¨ã«ã¯ï¼æ¨æºã§ã¯ï¼é¢æ°å®ç¾©ãè¨è¿°ããããã®ãã¡
-ã¤ã«ãç¨æãã¦ããªãï¼ã¿ã¼ã²ããä¾å­ã§ç¨æãã¦ããããï¼ä¾å¤çã«ï¼ã«ã¼
-ãã«å®è£
-ã®ã¿ã¼ã²ããä¾å­ã¢ã¸ã¥ã¼ã«ï¼target_kernel_impl.cï¼ã«è¨è¿°ãã¦ã
-ããï¼ãã®å ´åï¼target_fput_logãï¼ãªãã¼ã è¨è¿°ï¼target_rename.defãªã©ï¼
-ã«å«ãã¦ã¯ãªããªãï¼
-
-(8-1-3) LOGTIMï¼SYSLOG_GET_LOGTIMï¼ãªãã·ã§ã³ï¼
+8.4 ã¿ã¼ã²ããä¾å­é¨ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+
+ã¿ã¼ã²ããä¾å­é¨ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ï¼target.cdlï¼ã«ã¯ï¼ä»¥ä¸ã®
+å
+å®¹ãè¨è¿°ããï¼
+
+(8-4-1) ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ã
+
+ãã®ã¿ã¼ã²ããã·ã¹ãã ã«ãããã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ãå¤ãï¼
+ä¸ã®ä¾ã®ããã«ï¼DefaultTaskStackSizeã«å®ç¾©ããï¼
+
+----------------------------------------
+const size_t DefaultTaskStackSize = 4096;
+----------------------------------------
+
+(8-4-2) ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºã®å®ç¾©
+
+ãã®ã¿ã¼ã²ããã·ã¹ãã ã«ãããã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºãï¼ä¸
+ã®ä¾ã®ããã«ï¼LogTaskStackSizeã«å®ç¾©ããï¼
+
+----------------------------------------
+const size_t LogTaskStackSize = DefaultTaskStackSize;
+----------------------------------------
+
+(8-4-3) ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã«é¢ããå®ç¾©
+
+ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåãè¡¨ç¤ºããã¿ã¼ã²ããåã¨èä½æ¨©è¡¨ç¤ºãï¼ä¸ã®ä¾
+ã®ããã«ï¼BannerTargetNameã¨BannerCopyrightNoticeã«å®ç¾©ããï¼
+
+----------------------------------------
+const char *const BannerTargetName = "ARM CT11MPCore";
+const char *const BannerCopyrightNotice =
+						"Copyright (C) 2016 by Hiroaki Takada\n";
+----------------------------------------
+
+(8-4-4) ã¿ã¼ã²ããä¾å­ã®ã»ã«ã¿ã¤ãã®å®ç¾©ã®ã¤ã³ãã¼ã
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã¨ä½ã¬ãã«åºåã®ã»ã«ã¿
+ã¤ãã®å®ç¾©ãå
+¥ããã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ãã¤ã³ãã¼ãããï¼
+
+(8-4-5) ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã®çµã¿ä¸ãè¨è¿°
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã®ã»ã«ãï¼ä¸ã®ä¾ã®ãã
+ã«ï¼SIOPortTarget1ã®åç§°ã§ä½æï¼ã¤ã³ã¹ã¿ã³ã·ã¨ã¼ãï¼ããçµä¸ãè¨è¿°ãè¡
+ãï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ãSIOPortTarget1ã®åç§°ã§ãã
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããç¨ããï¼
+
+----------------------------------------
+cell tSIOPortCT11MPCore SIOPortTarget1 {
+	baseAddress     = C_EXP("EB_UART0_BASE");
+	interruptNumber = C_EXP("EB_IRQNO_UART0");
+};
+----------------------------------------
+
+ã¿ã¼ã²ããã·ã¹ãã ãè¤æ°ã®ã·ãªã¢ã«ãã¼ããæã¤å ´åã«ã¯ï¼è¤æ°ã®ã»ã«ãä½
+æï¼ã¤ã³ã¹ã¿ã³ã·ã¨ã¼ãï¼ãã¦ãããï¼
+
+(8-4-6) ä½ã¬ãã«åºåã®çµã¿ä¸ãè¨è¿°
+
+ä½ã¬ãã«åºåã®ã»ã«ãï¼ä¸ã®ä¾ã®ããã«ï¼PutLogTargetã®åç§°ã§ä½æï¼ã¤ã³ã¹
+ã¿ã³ã·ã¨ã¼ãï¼ããçµä¸ãè¨è¿°ãè¡ãï¼ã·ã¹ãã ã­ã°æ©è½ã¨ã·ã¹ãã ã­ã°ã¿ã¹
+ã¯ã¯ï¼PutLogTargetã®åç§°ã®ä½ã¬ãã«åºåãç¨ããï¼
+
+----------------------------------------
+cell tPutLogCT11MPCore PutLogTarget {
+	cSIOPort = SIOPortTarget1.eSIOPort;
+};
+----------------------------------------
+
+8.5 ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+
+ã·ã¹ãã ã­ã°æ©è½ï¼å®è¡æéåå¸éè¨ãµã¼ãã¹ï¼ãã¬ã¼ã¹ã­ã°æ©è½ã®è¨­å®ãå¤
+æ´ããããã®å®ç¾©ãï¼target_syssvc.hï¼target_stddef.hï¼ã¾ãã¯ããããã
+ã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ã«è¨è¿°ãããã¨ãã§ããï¼
+
+8.5.1 ã·ã¹ãã ã­ã°æ©è½ã®è¨­å®å¤æ´
+
+(8-5-1-1) LOGTIMï¼SYSLOG_GET_LOGTIMï¼ãªãã·ã§ã³ï¼
 
 ã·ã¹ãã ã­ã°æ©è½ã«ããã¦è¨é²ããæå»ï¼ã­ã°æå»ï¼ã®ãã¼ã¿åãLOGTIMã«ï¼
@@ -4634,192 +4914,51 @@
 ã¤ã«ã«å«ããªããã°ãªããªãï¼
 
-(8-1-4) LOGPARï¼ULOGPARï¼ãªãã·ã§ã³ï¼
+(8-5-1-2) LOGPARï¼ULOGPARï¼ãªãã·ã§ã³ï¼
 
 ã·ã¹ãã ã­ã°æ©è½ã«ããã¦è¨é²ããã­ã°ãã©ã¡ã¼ã¿ã®ãã¼ã¿åãLOGPARã«ãã¯
 ã­å®ç¾©ããï¼LOGPARã«å®ç¾©ãããã¼ã¿åã¯ï¼ç¬¦å·ä»ãã®æ´æ°åã§ãªããã°ãªã
 ãªãï¼ã¾ãï¼LOGPARã¨åããµã¤ãºã®ç¬¦å·ç¡ãã®æ´æ°åãï¼ULOGPARã«ãã¯ã­å®ç¾©
-ããï¼
-
-ãããã®å®ç¾©ããªãå ´åï¼ã­ã°ãã©ã¡ã¼ã¿ã®ãã¼ã¿åã¯intptr_tã¨ããï¼
+ããï¼ããããå®ç¾©ããªãå ´åï¼ã­ã°ãã©ã¡ã¼ã¿ã®ãã¼ã¿åã¯intptr_tã¨ããï¼
 
 ãªãï¼LOGPARããã³ULOGPARã®å®ç¾©ã¯ï¼target_stddef.hã¾ãã¯ããããã¤ã³ã¯
 ã«ã¼ãããããã¡ã¤ã«ã«å«ããªããã°ãªããªãï¼
 
-8.2 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¿ã¼ã²ããä¾å­å®ç¾©
-
-ã¿ã¼ã²ããä¾å­é¨ã§æä¾ãã¹ãã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ããã®å®ç¾©ã¯æ¬¡ã®éãã§
-ããï¼ãããã®å®ç¾©ã¯ï¼target_syssvc.hã¾ãã¯ããããã¤ã³ã¯ã«ã¼ãããããã¡
-ã¤ã«ã«å«ããï¼
-
-(8-2-1) LOGTASK_PRIORITYï¼ãªãã·ã§ã³ï¼
-
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åªå
-åº¦ãå®ç¾©ãããã¯ã­ï¼å®ç¾©ããªãå ´åã®ããã©ã«ã
-å¤ã¯3ï¼
-
-(8-2-2) LOGTASK_STACK_SIZEï¼ãªãã·ã§ã³ï¼
-
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºãå®ç¾©ãããã¯ã­ï¼å®ç¾©ããªãå ´åã®ã
-ãã©ã«ãå¤ã¯1024ï¼
-
-(8-2-3) LOGTASK_PORTIDï¼ãªãã·ã§ã³ï¼
-
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åºåå
-ã®ã·ãªã¢ã«ãã¼ãçªå·ï¼å®ç¾©ããªãå ´åã®ããã©
-ã«ãå¤ã¯1ï¼
-
-(8-2-4) LOGTASK_INTERVALï¼ãªãã·ã§ã³ï¼
-
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åä½ééï¼åä½ã¯ãã¤ã¯ã­ç§ï¼ï¼å®ç¾©ããªãå ´åã®ããã©
-ã«ãå¤ã¯10000ï¼
-
-(8-2-5) LOGTASK_FLUSH_WAITï¼ãªãã·ã§ã³ï¼
-
-ã­ã°åºåãå¾
-ã¡åãããå¦çã«ããã¦ï¼ã¿ã¹ã¯ãå¾
-ãããåä½ã¨ãªãæéï¼å
-ä½ã¯ãã¤ã¯ã­ç§ï¼ï¼å®ç¾©ããªãå ´åã®ããã©ã«ãå¤ã¯1000ï¼
-
-8.3 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨
-
-ã¿ã¼ã²ããä¾å­é¨ã§æä¾ãã¹ãã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ããã®å®ç¾©
-ã¯æ¬¡ã®éãã§ããï¼ãããã®å®ç¾©ã¯ï¼å¥ã«æå®ããªãéãï¼target_serial.hã¾
-ãã¯ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ã«å«ãï¼å¿
-è¦ãªã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
-ã³æ
-å ±ãtarget_serial.cfgã«è¨è¿°ããï¼é¢æ°ã®å®ä½ãå¿
-è¦ãªå ´åã«ã¯ï¼
-target_serial.cç­ã®ãã¡ã¤ã«ãç¨æããï¼
-
-ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ä¸­ã§ï¼ã¿ã¼ã²ããã®ã·ãªã¢ã«I/Oããã¤ã¹ã«
-ä¾å­ããé¨åãï¼ã·ãªã¢ã«I/Oããã¤ã¹ãã©ã¤ãã¨å¼ã¶ï¼ã·ãªã¢ã«I/Oããã¤ã¹
-ãã©ã¤ãã¯ï¼ããããï¼ITRONããã¤ã¹ãã©ã¤ãè¨­è¨ã¬ã¤ãã©ã¤ã³ã®PDICã«ç¸å½
-ããï¼
-
-8.3.1 å¤æ°ï¼ãã¼ã¿åï¼ç®¡çé¢æ°
-
-(8-3-1-1) TNUM_PORT
-
-ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãããµãã¼ãããã·ãªã¢ã«ãã¼ãæ°ãå®ç¾©ãã
-ãã¯ã­ï¼ãã®ãã¯ã­ã®å®ç¾©ã¯ï¼target_syssvc.hã¾ãã¯ããããã¤ã³ã¯ã«ã¼ãã
-ãããã¡ã¤ã«ã«å«ããï¼
-
-(8-3-1-2) void sio_initialize(intptr_t exinf)ï¼ãªãã·ã§ã³ï¼
-
-ã·ãªã¢ã«I/Oããã¤ã¹ãã©ã¤ãã®åæåå¦çï¼target_serial.cfgã«ï¼ãã®é¢æ°
-ãåæåã«ã¼ãã³ã¨ãã¦ç»é²ããéçAPIãå«ããï¼
-
-(8-3-1-3) void sio_terminate(intptr_t exinf)ï¼ãªãã·ã§ã³ï¼
-
-ã·ãªã¢ã«I/Oããã¤ã¹ãã©ã¤ãã®çµäºå¦çï¼target_serial.cfgã«ï¼ãã®é¢æ°ã
-çµäºå¦çã«ã¼ãã³ã¨ãã¦ç»é²ããéçAPIãå«ããï¼
-
-(8-3-1-4) void sio_isr(intptr_t exinf)
-
-ã·ãªã¢ã«I/Oããã¤ã¹ã®å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼target_serial.cfgã«ï¼ãã®
-é¢æ°ãå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã¨ãã¦ç»é²ããéçAPIãå«ããï¼ã¾ãï¼ãã®é
-çAPIã«å¿
-è¦ãªã·ãªã¢ã«I/Oããã¤ã¹ã®å²è¾¼ã¿çªå·ãªã©ã¯ï¼target_serial.hã§ã
-ã¯ã­å®ç¾©ããï¼å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã§ã¯ãªãï¼å²è¾¼ã¿ãã³ãã©ã¨ãããã¨
-ãã§ããï¼
-
-(8-3-1-5) SIOPCB
-
-ã·ãªã¢ã«I/Oãã¼ãç®¡çãã­ãã¯ã®ãã¼ã¿åï¼target_serial.hã«ã¯ï¼ãã¼ã¿å
-ã®å®£è¨ã ãå«ã¾ãã¦ããã°ããï¼ï¼
-
-(8-3-1-6) SIO_RDY_SNDã¨SIO_RDY_RCV
-
-éä¿¡å¯è½ã³ã¼ã«ããã¯ã®è­å¥çªå·ãSIO_RDY_SNDã«ï¼åä¿¡éç¥ã³ã¼ã«ããã¯ã®è­
-å¥çªå·ãSIO_RDY_RCVã«ãã¯ã­å®ç¾©ããï¼ã³ã¼ã«ããã¯ã®ç¦æ­¢ï¼è¨±å¯ãè¡ãªããµã¼
-ãã¹ã³ã¼ã«ï¼sio_ena_cbrã¨sio_dis_cbrï¼ã§ç¨ããï¼
-
-8.3.2 ããã¤ã¹ãµã¼ãã¹ã«ã¼ãã³
-
-ä»¥ä¸ã®ããã¤ã¹ãµã¼ãã«ã«ã¼ãã³ã¯ï¼ï¼å°ãªãã¨ãï¼ã·ãªã¢ã«I/Oãã¼ãããã®
-å²è¾¼ã¿ããã¹ã¯ãããç¶æ
-ã§å¼ã³åºãããï¼ã¾ãï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãï¼éã¿
-ã¹ã¯ã³ã³ãã­ã¹ãã®ãããã§å¼ã³åºãããå ´åãããï¼ãããã§å¼ã³åºããã¦
-ãåä½ããããã«ããªããã°ãªããªãï¼ï¼
-
-(8-3-2-1) SIOPCB *sio_opn_por(ID siopid, intptr_t exinf)
-
-siopidã§æå®ãããã·ãªã¢ã«I/Oãã¼ãããªã¼ãã³ããé¢æ°ï¼exinfã¯ã·ãªã¢ã«
-I/Oãã¼ãã«å¯¾ããæ¡å¼µæ
-å ±ã§ï¼ã³ã¼ã«ããã¯ãå¼ã¶æã«ãã¼ããåºå¥ããã
-ãã«æ¸¡ãï¼
-
-(8-3-2-2) void sio_cls_por(SIOPCB *siopcb)
-
-siopcbã§æå®ãããã·ãªã¢ã«I/Oãã¼ããã¯ã­ã¼ãºããé¢æ°ï¼
-
-(8-3-2-3) bool_t sio_snd_chr(SIOPCB *siopcb, char c)
-
-siopcbã§æå®ãããã·ãªã¢ã«I/Oãã¼ãã«ï¼cã§ç¤ºãããæå­ãéä¿¡ããé¢æ°ï¼
-æå­ãéä¿¡ã¬ã¸ã¹ã¿ã«å
-¥ããå ´åã«ã¯trueãï¼åã«éä¿¡ããæå­ã®éä¿¡ãçµãã£
-ã¦ããªãããã«ï¼æå­ãéä¿¡ã¬ã¸ã¹ã¿ã«å
-¥ããããªãã£ãå ´åã«ã¯falseãè¿ãï¼
-
-(8-3-2-4) int_t sio_rcv_chr(SIOPCB *siopcb)
-
-siopcbã§æå®ãããã·ãªã¢ã«I/Oãã¼ãããæå­ãèª­ãé¢æ°ï¼æå­ãåä¿¡ãã¦ã
-ãå ´åï¼èª­ãã æå­ã®ã³ã¼ãã¯æ­£ã®å¤ã¨ãã¦è¿ãï¼æå­ãåä¿¡ãã¦ããªãå ´å
-ã«ã¯-1ãè¿ãï¼
-
-(8-3-2-5) void sio_ena_cbr(SIOPCB *siopcb, uint_t cbrtn)
-
-siopcbã§æå®ãããã·ãªã¢ã«I/Oãã¼ãããã®ï¼cbrtnã§æå®ãããã³ã¼ã«ãã
-ã¯ãè¨±å¯ããï¼cbrtnã«ã¯ï¼SIO_RDY_SNDãSIO_RDY_RCVãæå®ã§ããï¼
-
-(8-3-2-6) void sio_dis_cbr(SIOPCB *siopcb, uint_t cbrtn)
-
-siopcbã§æå®ãããã·ãªã¢ã«I/Oãã¼ãããã®ï¼cbrtnã§æå®ãããã³ã¼ã«ãã
-ã¯ãç¦æ­¢ããï¼cbrtnã«ã¯ï¼SIO_RDY_SNDãSIO_RDY_RCVãæå®ã§ããï¼
-
-8.3.3 ã³ã¼ã«ããã¯ã«ã¼ãã³
-
-ã¿ã¼ã²ããä¾å­é¨ã¯ï¼å¿
-è¦ãªã¿ã¤ãã³ã°ã§ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
-ã®ã¿ã¼ã²ããéä¾å­é¨ã«å«ã¾ããä»¥ä¸ã®ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºã³ã ã
-ãªããã°ãªããªãï¼ãã ãï¼ããããã®ã³ã¼ã«ããã¯ãç¦æ­¢ããã¦ããæã¯ï¼
-ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºãã¦ã¯ãªããªãï¼
-
-ã³ã¼ã«ããã¯ã«ã¼ãã³ã¯ï¼ï¼å°ãªãã¨ãï¼ã·ãªã¢ã«I/Oãã¼ãããã®å²è¾¼ã¿ãç¦
-æ­¢ãããç¶æ
-ã§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å¼ã³åºãï¼exinfã«ã¯ï¼ã·ãªã¢ã«I/O
-ãã¼ãã®ãªã¼ãã³æã«æå®ãããæ¡å¼µæ
-å ±ãæ¸¡ãï¼
-
-(8-3-3-1) void sio_irdy_snd(intptr_t exinf)
-
-éä¿¡å¯è½ã³ã¼ã«ããã¯ã«ã¼ãã³ï¼ã·ãªã¢ã«I/Oãã¼ãã«å¯¾ãã¦æå­ãéä¿¡ã§ãã
-ç¶æ
-ã«ãªã£ãå ´åã«å¼ã³åºãï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¯ï¼ãã®ã³ã¼
-ã«ããã¯ã«ã¼ãã³ã®ä¸­ã§ï¼sio_snd_chrãå¼ã³åºãã¦æ¬¡ã®æå­ãéä¿¡ãããï¼é
-ä¿¡ãã¹ãæå­ããªãå ´åã«ã¯éä¿¡å¯è½ã³ã¼ã«ããã¯ãç¦æ­¢ããï¼
-
-(8-3-3-2) void sio_irdy_rcv(intptr_t exinf)
-
-åä¿¡éç¥ã³ã¼ã«ããã¯ã«ã¼ãã³ï¼ã·ãªã¢ã«I/Oãã¼ãããæå­ãåä¿¡ããå ´åã«
-å¼ã³åºãï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¯ï¼ãã®ã³ã¼ã«ããã¯ã«ã¼ãã³ã®
-ä¸­ã§ï¼å¿
-ãsio_rcv_chrãå¼ã³åºãã¦åä¿¡ããæå­ãåãåºãï¼
-
-8.4 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã®ã¿ã¼ã²ããä¾å­å®ç¾©
-
-ã¿ã¼ã²ããä¾å­é¨ã§æä¾ãã¹ãã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã®ããã®å®ç¾©ã¯
-æ¬¡ã®éãã§ããï¼
-
-(8-4-1) TARGET_NAME
-
-ã¿ã¼ã²ããã®åç§°ã«å®ç¾©ããï¼
-
-(8-4-2) TARGET_COPYRIGHTï¼ãªãã·ã§ã³ï¼
-
-ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã«ï¼ã¿ã¼ã²ããä¾å­é¨ã®èä½æ¨©è¡¨ç¤ºãè¿½å ããããã®
-ãã¯ã­ï¼ããã©ã«ãã§ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã®èä½æ¨©è¡¨ç¤ºãè¿½å ããªãï¼
-
-8.5 ãµã³ãã«ãã­ã°ã©ã ã¨ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+8.5.2 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®è¨­å®å¤æ´
+
+(8-5-2-1) HISTTIMï¼ãªãã·ã§ã³ï¼
+
+å®è¡æéè¨æ¸¬ç¨ã®æå»ã®ãã¼ã¿åãå®ç¾©ãããã¯ã­ï¼å®ç¾©ããªãå ´åã®ããã©
+ã«ãã¯HRTCNTï¼
+
+(8-5-2-2) void HIST_GET_TIM(HISTTIM *p_time)ï¼ãªãã·ã§ã³ï¼
+
+å®è¡æéè¨æ¸¬ç¨ã®ç¾å¨æå»ã*p_timeã«åå¾ããå¦çã«å®ç¾©ãããã¯ã­ï¼å®ç¾©ã
+ãªãå ´åã®ããã©ã«ãã¯ï¼fch_hrtã®è¿å¤ã*p_timeã«åå¾ããå¦çã«ãªãï¼
+
+(8-5-2-3) uint_t HIST_CONV_TIM(HISTTIM time)ï¼ãªãã·ã§ã³ï¼
+
+å®è¡æéè¨æ¸¬ç¨ã®æå»ã®å·®ï¼æéï¼ãï¼å®è¡æéåå¸éè¨ç¨ã®å¤ã«å¤æããå¦
+çã«å®ç¾©ãããã¯ã­ï¼æå»ãéå»ã«æ»ã£ãããªã¼ããã­ã¼ãããã®åºå¥ãã¤ã
+ãªãå ´åã«ã¯ï¼æä¸ä½ãããã1ã®å¤ï¼INT_MAXãããå¤§ããå¤ï¼ãè¿ãï¼å®ç¾©
+ããªãå ´åã®ããã©ã«ãã¯ï¼timeãuint_tã«ã­ã£ã¹ãããå¦çã«ãªãï¼
+
+(8-5-2-4) void HIST_BM_HOOK(void)ï¼ãªãã·ã§ã³ï¼
+
+å®è¡æéè¨æ¸¬ç´åã«è¡ãã¹ãå¦çã«å®ç¾©ãããã¯ã­ï¼ã­ã£ãã·ã¥ã®ãã¼ã¸ããã£
+ã«ï¼ã¡ã¢ãªããªã¢å¦çç­ãè¡ãããå ´åã«ã¯ï¼ãã®ãã¯ã­ã«å®ç¾©ããï¼å®ç¾©ã
+ãªãå ´åã®ããã©ã«ãã¯ï¼ç©ºã®å¦çã«ãªãï¼
+
+8.5.3 ãã¬ã¼ã¹ã­ã°æ©è½ã®è¨­å®å¤æ´
+
+ã·ã¹ãã ã­ã°æ©è½ã®è¨­å®ãå¤æ´ããããã«ï¼LOGTIMï¼SYSLOG_GET_LOGTIMï¼
+LOGPARï¼ULOGPARãå®ç¾©ããå ´åï¼ãã¬ã¼ã¹ã­ã°æ©è½ã«ãåãè¨­å®ãé©ç¨ãããï¼
+
+ãªãï¼ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ããçµã¿è¾¼ãéã«ã¯ï¼target_syssvc.h
+ã«è¨è¿°ãè¿½å ããå¿
+è¦ãããï¼è©³ããã¯ï¼ã6.11.2 ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ã
+ã«ã³ã¼ããã®ç¯ãåç
+§ãããã¨ï¼
+
+8.6 ãµã³ãã«ãã­ã°ã©ã ã¨ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©
 
 ã¿ã¼ã²ããä¾å­é¨ã§æä¾ãã¹ããµã³ãã«ãã­ã°ã©ã ããã³ãã¹ããã­ã°ã©ã ã®
@@ -4827,5 +4966,5 @@
 ããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ã«å«ããï¼
 
-(8-5-1) STACK_SIZEï¼ãªãã·ã§ã³ï¼
+(8-6-1) STACK_SIZEï¼ãªãã·ã§ã³ï¼
 
 ãµã³ãã«ãã­ã°ã©ã ããã³ãã¹ããã­ã°ã©ã ã®ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãºãå®ç¾©
@@ -4836,5 +4975,5 @@
 ããï¼
 
-(8-5-2) CPUEXC1ï¼ãªãã·ã§ã³ï¼
+(8-6-2) CPUEXC1ï¼ãªãã·ã§ã³ï¼
 
 ãµã³ãã«ãã­ã°ã©ã ããã³ãã¹ããã­ã°ã©ã ã§ç¨ããCPUä¾å¤ã®CPUä¾å¤ãã³ã
@@ -4843,5 +4982,5 @@
 ãã¹ããã­ã°ã©ã ã¯ã³ã³ãã¤ã«ã§ããªãï¼
 
-(8-5-3) RAISE_CPU_EXCEPTIONï¼ãªãã·ã§ã³ï¼
+(8-6-3) RAISE_CPU_EXCEPTIONï¼ãªãã·ã§ã³ï¼
 
 CPUEXC1ã«å®ç¾©ããCPUä¾å¤ãçºçãããCè¨èªã®ãã­ã°ã©ã ãå®ç¾©ãããã¯ã­ï¼
@@ -4849,5 +4988,5 @@
 ãå®ç¾©ããªããã°ãªããªãï¼
 
-(8-5-4) PREPARE_RETURN_CPUEXCï¼ãªãã·ã§ã³ï¼
+(8-6-4) PREPARE_RETURN_CPUEXCï¼ãªãã·ã§ã³ï¼
 
 CPUä¾å¤ãèµ·ãããå½ä»¤ãã¹ã­ããããããã«æ»ãçªå°ãä¿®æ­£ãããªã©ï¼CPUä¾
@@ -4861,10 +5000,10 @@
 å¤ãã³ãã©ãããªã¿ã¼ã³ããå¾ã®å¦çãé¤å¤ãããï¼
 
-(8-5-5) TASK_PORTIDï¼ãªãã·ã§ã³ï¼
+(8-6-5) TASK_PORTIDï¼ãªãã·ã§ã³ï¼
 
 ãµã³ãã«ãã­ã°ã©ã ã«ããã¦ï¼ã³ãã³ãæå­ãèª­ã¿è¾¼ãã·ãªã¢ã«ãã¼ãçªå·ã
 å®ç¾©ãããã¯ã­ï¼å®ç¾©ããªãå ´åã®ããã©ã«ãå¤ã¯1ï¼
 
-(8-5-6) LOOP_REFï¼ãªãã·ã§ã³ï¼
+(8-6-6) LOOP_REFï¼ãªãã·ã§ã³ï¼
 
 ãµã³ãã«ãã­ã°ã©ã ã«ããã¦ï¼ãã­ã»ããµã®éåº¦ãè¨æ¸¬ããããã®ã«ã¼ãåæ°
@@ -4874,5 +5013,5 @@
 æ°ã«å®ç¾©ããï¼
 
-(8-5-7) MEASURE_TWICEï¼ãªãã·ã§ã³ï¼
+(8-6-7) MEASURE_TWICEï¼ãªãã·ã§ã³ï¼
 
 ãµã³ãã«ãã­ã°ã©ã ã«ããã¦ï¼ãã­ã»ããµã®éåº¦ã2åº¦è¨æ¸¬ããå ´åã«å®ç¾©ãã
@@ -4880,5 +5019,5 @@
 è¨æ¸¬ã§ã¯è¨æ¸¬çµæãå®å®ããªãå ´åã«å®ç¾©ããï¼
 
-(8-5-8) TASK_LOOPï¼ãªãã·ã§ã³ï¼
+(8-6-8) TASK_LOOPï¼ãªãã·ã§ã³ï¼
 
 ãµã³ãã«ãã­ã°ã©ã ã«ããã¦ï¼ãã­ã»ããµã®éåº¦ãè¨æ¸¬ããã«ï¼ã¿ã¹ã¯å
@@ -4887,36 +5026,4 @@
 ¨ä½ã®å®
 è¡æéã0.4ç§ç¨åº¦ã«ãªããããªã«ã¼ãåæ°ãï¼ãã®ãã¯ã­ã«å®ç¾©ããï¼
-
-8.6 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­å®ç¾©
-
-å®è¡æéåå¸éè¨ãµã¼ãã¹ã®è¨­å®ãã¿ã¼ã²ããä¾å­é¨ã§å¤æ´ããå ´åã«ï¼ã¿ã¼
-ã²ããä¾å­é¨ã§æä¾ãã¹ãå®è¡æéåå¸éè¨ãµã¼ãã¹ã®ããã®å®ç¾©ã¯æ¬¡ã®éã
-ã§ããï¼ãããã®å®ç¾©ã¯ï¼target_test.hï¼ã¾ãã¯ããããã¤ã³ã¯ã«ã¼ãããã
-ãã¡ã¤ã«ï¼ã«å«ããï¼ãã®ä»ã«ï¼ã¿ã¼ã²ããä¾å­ã§å¿
-è¦ãªåæåå¦çãããå ´
-åã«ãï¼ã¿ã¼ã²ããä¾å­é¨ã«å«ããï¼
-
-(8-6-1) HISTTIMï¼ãªãã·ã§ã³ï¼
-
-å®è¡æéè¨æ¸¬ç¨ã®æå»ã®ãã¼ã¿åãå®ç¾©ãããã¯ã­ï¼å®ç¾©ããªãå ´åã®ããã©
-ã«ãã¯HRTCNTï¼
-
-(8-6-2) void HIST_GET_TIM(HISTTIM *p_time)ï¼ãªãã·ã§ã³ï¼
-
-å®è¡æéè¨æ¸¬ç¨ã®ç¾å¨æå»ã*p_timeã«åå¾ããå¦çã«å®ç¾©ãããã¯ã­ï¼å®ç¾©ã
-ãªãå ´åã®ããã©ã«ãã¯ï¼fch_hrtã®è¿å¤ã*p_timeã«åå¾ããå¦çã«ãªãï¼
-
-(8-6-3) uint_t HIST_CONV_TIM(HISTTIM time)ï¼ãªãã·ã§ã³ï¼
-
-å®è¡æéè¨æ¸¬ç¨ã®æå»ã®å·®ï¼æéï¼ãï¼å®è¡æéåå¸éè¨ç¨ã®å¤ã«å¤æããå¦
-çã«å®ç¾©ãããã¯ã­ï¼æå»ãéå»ã«æ»ã£ãããªã¼ããã­ã¼ãããã®åºå¥ãã¤ã
-ãªãå ´åã«ã¯ï¼æä¸ä½ãããã1ã®å¤ï¼INT_MAXãããå¤§ããå¤ï¼ãè¿ãï¼å®ç¾©
-ããªãå ´åã®ããã©ã«ãã¯ï¼timeãuint_tã«ã­ã£ã¹ãããå¦çã«ãªãï¼
-
-(8-6-4) void HIST_BM_HOOK(void)ï¼ãªãã·ã§ã³ï¼
-
-å®è¡æéè¨æ¸¬ç´åã«è¡ãã¹ãå¦çã«å®ç¾©ãããã¯ã­ï¼ã­ã£ãã·ã¥ã®ãã¼ã¸ããã£
-ã«ï¼ã¡ã¢ãªããªã¢å¦çç­ãè¡ãããå ´åã«ã¯ï¼ãã®ãã¯ã­ã«å®ç¾©ããï¼å®ç¾©ã
-ãªãå ´åã®ããã©ã«ãã¯ï¼ç©ºã®å¦çã«ãªãï¼
 
 
@@ -4994,16 +5101,14 @@
 å®¹
 
-(3-5) æ§è½è©ä¾¡ç¨ã·ã¹ãã æå»ã®åç
-§ã«é¢ããè¦å®
-	ã»get_utmã®ãµãã¼ãã®æç¡ï¼ãã®å¶éäºé 
-
-
-(3-6) æ¡å¼µããã±ã¼ã¸ã«é¢ããè¦å®
+(3-5) æ¡å¼µããã±ã¼ã¸ã«é¢ããè¦å®
 	ã»åæ¡å¼µããã±ã¼ã¸ã®ãµãã¼ãã®æç¡
-		- ãã¥ã¼ããã¯ã¹æ©è½æ¡å¼µããã±ã¼ã¸
+		- ããªããèª¿æ´æ©è½æ¡å¼µããã±ã¼ã¸
+		- ã¡ãã»ã¼ã¸ãããã¡æ©è½æ¡å¼µããã±ã¼ã¸
 		- ãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µããã±ã¼ã¸
 		- ã¿ã¹ã¯åªå
 åº¦æ¡å¼µããã±ã¼ã¸
 		- å¶ç´ã¿ã¹ã¯æ¡å¼µããã±ã¼ã¸
+		- ãµãåªå
+åº¦æ©è½æ¡å¼µããã±ã¼ã¸
 		- åççææ©è½æ¡å¼µããã±ã¼ã¸
 	ã»ãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µããã±ã¼ã¸ããµãã¼ãããå ´åã«ï¼æ®ãã
@@ -5012,5 +5117,5 @@
 	ãæ¹æ³
 
-(3-7) ãã®ä»
+(3-6) ãã®ä»
 	ã»ãã®ä»ã®å¶éäºé 
 
@@ -5081,5 +5186,5 @@
 ããã±ã¼ã¸ãä½æããå ´åã«ã¯ï¼æ¬¡ã®ã³ãã³ããå®è¡ããï¼
 
-	% utils/makerelease arch/arm_gcc/MANIFEST
+	% ruby utils/makerelease.rb arch/arm_gcc/MANIFEST
 
 ãã®ã³ãã³ãã«ããï¼RELEASE/asp3_arch_arm_gcc-<ãã¼ã¸ã§ã³çªå·>.tar.gzã
@@ -5088,5 +5193,5 @@
 ãï¼
 
-	% utils/makerelease target/ct11mpcore_gcc/E_PACKAGE
+	% ruby utils/makerelease.rb target/ct11mpcore_gcc/E_PACKAGE
 
 ãã®ã³ãã³ãã«ããï¼RELEASE/asp3_ct11mpcore_gcc-<ãã¼ã¸ã§ã³çªå·>.tar.gz
@@ -5094,9 +5199,9 @@
 ãï¼ï¼
 
-ãªãï¼makereleaseã¦ã¼ãã£ãªãã£ã¯ï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãç½®ãã
-ããã£ã¬ã¯ããªãï¼asp3ã¨ããåç§°ã§ãããã¨ãä»®å®ãã¦ããï¼ç°ãªãåç§°ã®
-å ´åã§ãããã±ã¼ã¸ã¯ä½æã§ãããï¼ããã±ã¼ã¸ãå±éããæã«å±éããããã£
-ã¬ã¯ããªãasp3ã§ãªããªãï¼ï¼ã¾ãï¼æ¨æºã®tarã³ãã³ããGNU tarã§ãããã¨
-ï¼æ­£ç¢ºã«ã¯ï¼zãªãã·ã§ã³ã«å¯¾å¿ãã¦ãããã¨ï¼ãæ³å®ãã¦ããï¼
+ãªãï¼makerelease.rbã¯ï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãç½®ããããã£ã¬ã¯
+ããªãï¼asp3ã¨ããåç§°ã§ãããã¨ãä»®å®ãã¦ããï¼ç°ãªãåç§°ã®å ´åã§ããã
+ã±ã¼ã¸ã¯ä½æã§ãããï¼ããã±ã¼ã¸ãå±éããæã«å±éããããã£ã¬ã¯ããªã
+asp3ã§ãªããªãï¼ï¼ã¾ãï¼æ¨æºã®tarã³ãã³ããGNU tarã§ãããã¨ï¼æ­£ç¢ºã«ã¯ï¼
+zãªãã·ã§ã³ã«å¯¾å¿ãã¦ãããã¨ï¼ãæ³å®ãã¦ããï¼
 
 ããã±ã¼ã¸è¨è¿°ãã¡ã¤ã«ã«ã¯ï¼ããã±ã¼ã¸ã«å«ãããã¡ã¤ã«åãï¼ããã±ã¼ã¸
@@ -5153,5 +5258,5 @@
 
 Makefile.target		Makefileã®ã¿ã¼ã²ããä¾å­é¨ï¼ï¼ç« ï¼
-target_offset.tf	ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤ã«ï¼2.5.1ç¯ï¼
+target_offset.trb	ãªãã»ãããã¡ã¤ã«çæç¨ã®çæã¹ã¯ãªããï¼2.5.1ç¯ï¼
 					ãªãã·ã§ã³ï¼
 
@@ -5179,4 +5284,6 @@
 target_rename.h		target_rename.defããçæããããã¡ã¤ã«ï¼6.12ç¯ï¼
 target_unrename.h	target_rename.defããçæããããã¡ã¤ã«ï¼6.12ç¯ï¼
+target_kernel.cfg	ã«ã¼ãã«å®è£
+ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼6.16ç¯ï¼
 target_timer.cfg	ã¿ã¤ããã©ã¤ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡
 					ã¤ã«ï¼6.13ç¯ï¼
@@ -5190,22 +5297,19 @@
 					ã«ã®ä¸¡æ¹ããã¤ã³ã¯ã«ã¼ããããï¼ï¼ç« ï¼ãªãã·ã§ã³ï¼
 
-target_def.csv		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¤åå¾ã·ã³ãã«ãã¼ãã«ã®ã¿ã¼ã²ã
+target_sym.def		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¤åå¾ã·ã³ãã«ãã¼ãã«ã®ã¿ã¼ã²ã
 					ãä¾å­é¨ï¼ï¼ç« ï¼ãªãã·ã§ã³ï¼
-target.tf			ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®
-					ã¿ã¼ã²ããä¾å­é¨ï¼7.2ç¯ï¼
-target_check.tf		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ï¼7.3
-					ç¯ï¼
+target_kernel.trb	ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ã
+					ãä¾å­é¨ï¼7.2ç¯ï¼
+target_check.trb	ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯ãªããï¼7.3ç¯ï¼
 target_cfg1_out.h	cfg1_out.cã®ãªã³ã¯ã«å¿
 è¦ãªã¹ã¿ãã®å®ç¾©ãã¡ã¤ã«ï¼7.4
 					ç¯ï¼
 
-target_syssvc.h		ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼8.0ç¯ï¼
-target_serial.cfg	ã·ãªã¢ã«ãã©ã¤ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡
-					ã¤ã«ï¼8.3ç¯ï¼
-target_serial.h		ã·ãªã¢ã«ãã©ã¤ãã®ããããã¡ã¤ã«ï¼8.3ç¯ï¼ï¼ã·ãªã¢ã«
-					ãã©ã¤ãã®ã¿ããã¤ã³ã¯ã«ã¼ãããã
-target_serial.c		ã·ãªã¢ã«ãã©ã¤ãã®å®è£
-ãã¡ã¤ã«ï¼8.3ç¯ï¼ãªãã·ã§ã³ï¼ï¼
-target_test.h		ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼8.4ç¯ï¼
+tSIOPort<ã·ã¹ãã ç¥ç§°>.cdl		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ã
+								ãä¾å­é¨ã®ã»ã«ã¿ã¤ãã®å®ç¾©ï¼8.2ç¯ï¼
+tPutLog<ã·ã¹ãã ç¥ç§°>.cdl		ä½ã¬ãã«åºåã®ã»ã«ã¿ã¤ãã®å®ç¾©ï¼8.3ç¯ï¼
+target.cdl			ã¿ã¼ã²ããä¾å­é¨ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ï¼8.4ç¯ï¼
+target_syssvc.h		ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼8.5ç¯ï¼
+target_test.h		ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼8.6ç¯ï¼
 
 target_user.txt		ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ï¼9.1ç¯ï¼
Index: asp3_wo_tecs/trunk/doc/systim_design.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/systim_design.txt	(revision 305)
+++ 	(revision )
@@ -1,809 +1,0 @@
-													TOPPERS Confidential
-		TOPPERS/ASP3ã«ã¼ãã« è¨­è¨ã¡ã¢
-		ASP3ã«ã¼ãã«ã«ãããã·ã¹ãã æå»ç®¡çæ©è½ã®è¨­è¨ã«ã¤ãã¦
-
-		ä½æè
-: é«ç°åºç« ï¼åå¤å±å¤§å­¦ï¼
-		æçµæ´æ°: 2014å¹´6æ22æ¥
-
-âã¡ã¢ã®ä½ç½®ä»ã
-
-ãã®ã¡ã¢ã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã«ãããã·ã¹ãã æå»ç®¡çæ©è½ã®è¨­è¨ã«ã¤
-ãã¦è¨è¿°ãããã®ã§ããï¼æçµçãªè¨­è¨ãã­ã¥ã¡ã³ãã¯ï¼ASP3ã«ã¼ãã«ã®è¨­è¨
-æ¸ã«å
-¥ãè¾¼ãäºå®ã§ãããï¼ãã®ã¡ã¢ã¯ï¼è¨­è¨ãã­ã¥ã¡ã³ããä½æããéç¨ã
-è¨é²ãããã¨ãç®çã¨ããï¼
-
-âåç
-§æç®
-
-[1] TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼çµ±åä»æ§æ¸ Release 3.A.0ï¼æçµæ´æ°:
-2014å¹´5æ18æ¥ï¼ï¼
-
-[2] TOPPERSãã­ã¸ã§ã¯ã ãã£ã¹ã«ãã·ã§ã³ã¡ã¢ãTOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«
-ï¼ITRONç³»ï¼ã«ãããæéç®¡çã«ã¤ãã¦ãï¼æçµæ´æ°: 2014å¹´5æ18æ¥ï¼ï¼
-
-[3] TOPPERS/ASP3ã«ã¼ãã« è¨­è¨ã¡ã¢ Release 3.A.0ï¼æçµæ´æ°: 2014å¹´5æ31
-æ¥ï¼ï¼
-
-âå®è£
-å¯¾è±¡ã¨ããå¤é¨ä»æ§
-
-ãã®ã¡ã¢ã§ã¯ï¼æç®[1]ã®ä»¥ä¸ã®é¨åã«è¨è¿°ããã¦ããä»æ§ã®ä¸­ã§ï¼ASP3ã«ã¼ã
-ã«ï¼ããªããèª¿æ´æ©è½æ¡å¼µããã±ã¼ã¸ãå«ãï¼ã§ãµãã¼ãããæ©è½ãå®è£
-ãã
-ããã®è¨­è¨ãã­ã¥ã¡ã³ããä½æããï¼
-
-	ã2.3.2 ãµã¼ãã¹ã³ã¼ã«ã¨ãã©ã¡ã¼ã¿ãã®ç¯ã®æ¬¡ã®é¨å
-		(2) ã·ã¹ãã æå»ã¨ç¸å¯¾æé
-		(3) ã¿ã¤ã ã¢ã¦ãã¨ãã¼ãªã³ã°
-
-	ã4.6.1 ã·ã¹ãã æå»ç®¡çãã®ç¯ã®å
-¨ä½
-
-ã¾ãï¼å®è£
-ã§æ³å®ãããã¼ãã¦ã§ã¢æ§æã¨ãã¦ï¼æ¬¡ã®è¨è¿°ãèæ
-®ããï¼
-
-	ã2.1.4 æ³å®ãããã¼ãã¦ã§ã¢æ§æãã®ç¯ã®(c)
-
-å
-·ä½çã«ã¯ï¼ä»¥ä¸ã®ã¿ã°ãæã¤ä»æ§ãå®è£
-å¯¾è±¡ã¨ãªãï¼ä»æ§æ¸ã«è¨è¿°ããã¦ã
-ãé ã«ãªã¹ãã¢ããããï¼ï¼ãªãï¼ä¸ã®ãªã¹ãä¸­ã®ãâãä»¥éã®è¨è¿°ã¯ï¼å¾ã®
-å·¥ç¨ã§è¿½è¨ãããã®ã§ããï¼ãã®å·¥ç¨ã§ã¯ï¼ã¾ãã¯ãªã¹ãã¢ããã®ã¿ãè¡ã£ã¦
-ããï¼
-
-â2.1.4 æ³å®ãããã¼ãã¦ã§ã¢æ§æ
-
-NGKI0556ï¼(c)ã3ã
-
-â2.3.2(2) ã·ã¹ãã æå»ã¨ç¸å¯¾æé
-
-NGKI0548ï¼(a*)ã3ã		âASPD1001ï¼ASPD1043ï¼t_stddef.h
-NGKI0041ï¼(b)			âASPD1001ï¼â¦
-NGKI0042ï¼(a)			âASPD1001ï¼â¦
-NGKI0549ï¼(a)ã3ã		âASPD1001ï¼â¦ï¼t_stddef.h
-NGKI0550ï¼(b*)ã3ã		âASPD1001ï¼ã·ã¹ãã æå»ç®¡çæ©è½ã®è¨­è¨å
-¨ä½ã«å½±é¿
-NGKI0551ï¼(b*)ã3ã		ât_stddef.h
-NGKI0046ï¼(a*)			âASPD1026ï¼ASPD1027
-NGKI0048ï¼(b)			âNGKI1233ï¼NGKI2472ï¼NGKI2481
-NGKI0049ï¼(a)			âASPD1049
-NGKI0050ï¼(a)			âASPD1049
-NGKI0552ï¼(a)ã3ã		âtime_event.c
-
-â2.3.2(3) ã¿ã¤ã ã¢ã¦ãã¨ãã¼ãªã³ã°ï¼ä¸é¨ï¼
-
-NGKI0553ï¼(b)ã3ã		âASPD1001ï¼â¦
-NGKI0554ï¼(a)ã3ã		âASPD1001ï¼â¦
-
-â4.6.1 ã·ã¹ãã æå»ç®¡ç
-
-NGKI3603ï¼(a)
-NGKI2333ï¼(a)
-NGKI3559ï¼(a)ã3ã
-NGKI2336ï¼(a)
-NGKI2337ï¼(a)
-NGKI2338ï¼(a)ãMã		âASP3å¯¾è±¡å¤
-NGKI2339ï¼(a)ãMã		âASP3å¯¾è±¡å¤
-NGKI2340ï¼(a)ãMã		âASP3å¯¾è±¡å¤
-NGKI2341ï¼(a)ãMã		âASP3å¯¾è±¡å¤
-NGKI2342ï¼(a)ãMã		âASP3å¯¾è±¡å¤
-NGKI3560ï¼(a)ã3ã
-NGKI3593ï¼(a)ã3ã		âããªããæ©è½æ¡å¼µ
-NGKI3594ï¼(b)ã3ã		âããªããæ©è½æ¡å¼µ
-NGKI3595ï¼(a)ã3Mã		âASP3å¯¾è±¡å¤
-NGKI3580ï¼(a)ã3ã
-NGKI3574ï¼(d)ã3ã
-NGKI3573ï¼(a)ã3ã
-NGKI3575ï¼(a)ã3ã
-NGKI3576ï¼(a)ã3Mã		âASP3å¯¾è±¡å¤
-NGKI3561ï¼(a)ã3ãâNGKI3594
-NGKI3562ï¼(a)ã3ã
-NGKI3578ï¼(a)ã3ã
-NGKI3579ï¼(a)ã3ã
-ASPS0224ï¼(a)ã3ã
-ASPS0225ï¼(a)ã3ã
-NGKI3563ï¼(a*)ã3ã		âtime_manage.c
-NGKI3564ï¼(a*)ã3ã		âtime_manage.c
-NGKI3565ï¼(a*)ã3ã		âtime_manage.c
-NGKI3566ï¼(a)ã3Pã		âASP3å¯¾è±¡å¤
-NGKI3567ï¼(a)ã3ã		âASPD1059ï¼ASPD1060
-NGKI3568ï¼(a)ã3Mã		âASP3å¯¾è±¡å¤
-NGKI2349ï¼(a*)			âtime_manage.c
-NGKI2350ï¼(a*)			âtime_manage.c
-NGKI2351ï¼(a*)			âtime_manage.c
-NGKI2352ï¼(a)ãPã		âASP3å¯¾è±¡å¤
-NGKI2353ï¼(a)ãPã		âASP3å¯¾è±¡å¤
-NGKI2354ï¼(a)			âASPD1057ï¼ASPD1058
-NGKI3591ï¼(a)ã3ã		âASPD1041ï¼ASPD1057ï¼ASPD1058
-NGKI3592ï¼(a)ã3ã		âASPD1059ï¼ASPD1060
-NGKI2355ï¼(a)ãMã		âASP3å¯¾è±¡å¤
-NGKI3581ï¼(a*)ã3ã		âtime_manage.c
-NGKI3583ï¼(a*)ã3ã		âtime_manage.c
-NGKI3584ï¼(a*)ã3ã		âtime_manage.c
-NGKI3585ï¼(a)ã3Pã		âASP3å¯¾è±¡å¤
-NGKI3586ï¼(a*)ã3ã		âASPD1053
-NGKI3587ï¼(a*)ã3ã		âASPD1053
-NGKI3588ï¼(a*)ã3ã		âtime_event.c
-NGKI3589ï¼(a*)ã3ã		âtime_event.c
-NGKI3590ï¼(a)ã3Mã		âASP3å¯¾è±¡å¤
-NGKI3596ï¼(a)ã3ã		âããªããæ©è½æ¡å¼µ
-NGKI3598ï¼(a)ã3ã		âããªããæ©è½æ¡å¼µ
-NGKI3599ï¼(a)ã3ãâNGKI3594		âããªããæ©è½æ¡å¼µ
-NGKI3600ï¼(a)ã3Pã		âASP3å¯¾è±¡å¤
-NGKI3601ï¼(a)ã3ã		âããªããæ©è½æ¡å¼µ
-NGKI3602ï¼(a)ã3Mã		âASP3å¯¾è±¡å¤
-ASPS0226ï¼(a)ã3ã		âãµãã¼ãç¯å²ã«é¢ããè¦æ±
-ASPS0227ï¼(a)ã3ã		âãµãã¼ãç¯å²ã«é¢ããè¦æ±
-NGKI3569ï¼(a*)ã3ã		âtime_manage.c
-NGKI3571ï¼(a*)ã3ã		âtime_manage.c
-NGKI3572ï¼(a*)ã3ã		âtime_manage.c
-NGKI3577ï¼(a)ã3Mã		âASP3å¯¾è±¡å¤
-
-ãããã®ä¸­ã§ï¼ASP3ã«ã¼ãã«ã§ãµãã¼ãããªãæ©è½ã«é¢ããã¿ã°ã«ã¯ï¼ãâ
-ASP3å¯¾è±¡å¤ãã¨è¨è¼ããï¼å
-·ä½çã«ã¯ï¼ä¿è­·æ©è½å¯¾å¿ã«ã¼ãã«ããã«ããã­ã»ã
-ãµå¯¾å¿ã«ã¼ãã«ã®ã¿ã«é©ç¨ãããã¿ã°ãããã«è©²å½ããï¼
-
-ã¾ãï¼ãâããªããæ©è½æ¡å¼µãã¨è¨è¼ããã¿ã°ã¯ï¼ï¼»ASPS0224ï¼½ã«ããæ¨æºã§
-ã¯ãµãã¼ãããªããï¼ï¼»ASPS0225ï¼½ã«ããããªããèª¿æ´æ©è½æ¡å¼µããã±ã¼ã¸ã§
-ãµãã¼ããããã¨ãç¤ºãï¼ãâãµãã¼ãç¯å²ã«é¢ããè¦æ±ãã¯ï¼ASP3ã«ã¼ãã«
-ããã³æ¡å¼µããã±ã¼ã¸ã§ï¼ã©ã®ç¯å²ã®ä»æ§ããµãã¼ããããã«é¢ããè¨è¿°ã§ã
-ãï¼
-
-å¤é¨ä»æ§æ¸ããã®è¦æ±äºé 
-ã«å ãã¦ï¼ASP3ã«ã¼ãã« è¨­è¨ã¡ã¢ï¼æç®[3]ï¼ã®
-ãTOPPERS/ASP3ã«ã¼ãã«ã®å®è£
-è¨­è¨æ¹éãã®ç« ã«è¨è¿°ããã¦ããä»¥ä¸ã®è¦æ±äº
-é 
-ãèæ
-®ããï¼
-
-(1) ã½ã¼ã¹ã³ã¼ãã®èª­ã¿ãããã»æ¹é ãããããéè¦ãã
-(2) æ°ããã¿ã¼ã²ããã·ã¹ãã ã¸ã®ãã¼ãã£ã³ã°ãå®¹æãªæ§é ã¨ãã
-(3) æ¤è¨¼ãå®¹æãªæ§é ã¨ãã
-(4) å®è¡æ§è½ã¨ã¡ã¢ãªä½¿ç¨éã«é
-æ
-®ãã
-(5) ã¹ã±ã¼ã©ããªãã£ã«é
-æ
-®ãã
-(6) ãã£ãã¯ã¬ã¹ã®æéç®¡çï¼ãã£ãã¯ã¬ã¹ã«ã¼ãã«ï¼
-
-âTOPPERS/ASP3ã«ã¼ãã«ã®å®è£
-è¨­è¨æ¹é
-
-ASPR0001ï¼(a)
-ASPR0002ï¼(a)
-ASPR0003ï¼(a)
-ASPR0004ï¼(a)
-ASPR0005ï¼(a)
-ASPR0006ï¼(a)
-ASPR0007ï¼(a)
-ASPR0008ï¼(a)
-ASPR0009ï¼(a)
-ASPR0010ï¼(a)
-ASPR0011ï¼(a)ã3ã
-
-âè¨­è¨ãã­ã¥ã¡ã³ãã®æ¬ä½
-
-âãã£ãã¯ã¬ã¹ã®ã¿ã¤ã ã¤ãã³ãå¦ç
-
-ãªã¼ãã©ã³ãã³ãã©ã®èµ·åä»¥å¤ã®ã¿ã¤ã ã¤ãã³ãå¦çï¼ã¿ã¤ã ã¢ã¦ãå¦çï¼ã¿
-ã¹ã¯ã®é
-å»¶ï¼å¨æãã³ãã©ã®èµ·åï¼ã¢ã©ã¼ã ãã³ãã©ã®èµ·åï¼ã¯ï¼ã·ã¹ãã æ
-å»ããã£ããã¨ãã¦è¡ãããï¼»NGKI3603ï¼½ï¼
-
-ASP3ã«ã¼ãã«ã§ã¯ï¼ã·ã¹ãã æå»ã¯ï¼ãã¼ãã¦ã§ã¢ãæã¤é«åè§£è½ã¿ã¤ããç¨
-ãã¦å®ç¾ããï¼é«åè§£è½ã¿ã¤ãã¯ï¼ä¸å®æéæ¯ã«ã«ã¦ã³ãã¢ãããï¼æå®ãã
-åæ°ã«ã¦ã³ãã¢ãããããï¼ã¿ã¤ãå²è¾¼ã¿ãçºçãããæ©è½ãæã¤ãã®ã¨ãã
-ï¼»NGKI0556ï¼½ï¼
-
-å¦çãã¹ãã¿ã¤ã ã¤ãã³ãããªãæã«ã¿ã¤ãå²è¾¼ã¿ãçºçãããªãããã«ãã
-ããã«ã¯ï¼»ASPR0011ï¼½ï¼çºçãå¾
-ã£ã¦ããã¿ã¤ã ã¤ãã³ãã®ä¸­ã§ï¼æãæ©ãçº
-çããã¿ã¤ã ã¤ãã³ãã®çºçæå»ã«å²è¾¼ã¿ãçºçãããããã«ï¼é«åè§£è½ã¿ã¤
-ããè¨­å®ããã®ãåºæ¬ã§ãããASPD1002ãï¼
-
-âã¿ã¤ã ã¤ãã³ããã¼ã
-
-ã¿ã¤ã ã¤ãã³ããå¹ççã«å¦çããããã«ï¼çºçãå¾
-ã£ã¦ããã¿ã¤ã ã¤ãã³ã
-ã®éåãç®¡çãï¼ãã®ä¸­ã§çºçæå»ãæãæ©ããã®ãå¹ççã«åãåºãããã¼
-ã¿æ§é ãå¿
-è¦ã§ããï¼ãã®ãã¼ã¿æ§é ã«ã¯ï¼TOPPERS/JSPã«ã¼ãã«ã§å°å
-¥ãã¦ã
-ãé·ãå®ç¸¾ã®ããã¿ã¤ã ã¤ãã³ããã¼ããç¨ããï¼ã¿ã¤ã ã¤ãã³ããã¼ãã®è¨­
-è¨ã«ã¤ãã¦ã¯ï¼å¥ã«è¨è¿°ãããã¨ã¨ããï¼
-
-ã¿ã¤ã ã¤ãã³ããã¼ãã«ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®ä¸­ã§ï¼çºçæå»ãæ
-ãæ©ããã®ãï¼å
-é ­ã®ã¿ã¤ã ã¤ãã³ãã¨å¼ã¶ï¼
-
-âã¤ãã³ãæå»
-
-ã·ã¹ãã æå»ã¯64ãããã®æ´æ°åã«ãªãå ´åããããï¼»NGKI0548ï¼½ï¼ã¿ã¤ã ã¤
-ãã³ãã®çºçæå»ã64ãããã§ç®¡çããã®ã¯å¹çãæªãï¼ãªããªãï¼ã¿ã¤ã ã¤
-ãã³ãã®çºçæå»ã¯ç¸å¯¾æéã§ããæå®ã§ããï¼»NGKI0041ï¼½ï¼ç¸å¯¾æéã¯32ãã
-ãã§è¡¨ç¾ããããã¨ããï¼»NGKI0549ï¼½ï¼ããæç¹ã§ã¿ã¤ã ã¤ãã³ããã¼ãã«ç»
-é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ã¯ï¼ããããï¼32ãããã§è¡¨ç¾ã§ãã
-æéå¹
-ã«åã¾ãããã§ããï¼ããã§ï¼ã¿ã¤ã ã¤ãã³ããã¼ãã«ç»é²ããã¦ãã
-ã¿ã¤ã ã¤ãã³ãã®çºçæå»ã¯ï¼32ãããã®ç¬¦å·ç¡ãæ´æ°åã§è¡¨ç¾ãããã¨ã«ã
-ããASPD1001ãï¼ãã®æå»ãï¼ã¤ãã³ãæå»ã¨å¼ã¶ï¼
-
-å®éã«ã¯ï¼ããæç¹ã§ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ã32ãããã§
-è¡¨ç¾ã§ããæéå¹
-ã«åã¾ãããã«ï¼å¤é¨ä»æ§ãå®ãã¦ããï¼ä»¥ä¸ã§ã¯ï¼ããã
-32ãããã§è¡¨ç¾ã§ããæéå¹
-ã«åã¾ããã¨ãè«è¨¼ããï¼
-
-ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãç¸å¯¾æéã§æå®ããå ´åï¼ç¸å¯¾æéã®åºæºæå»ã¯ï¼
-å¨æãã³ãã©ã®èµ·åæå»ãé¤ãã¦ã¯ï¼»NGKI2372ï¼½ï¼»NGKI2373ï¼½ï¼ç¸å¯¾æéãæ
-å®ãããµã¼ãã¹ã³ã¼ã«ãå¼ã³åºããæå»ï¼è¨ãæããã¨ç¾å¨æå»ï¼ã§ãã
-ï¼»NGKI0042ï¼½ï¼ãã®ããï¼ç¸å¯¾æéã«æå®ã§ããæå¤§å¤ãTMAX_RELTIMã¨æ¸ãã
-ã¨ã«ããã¨ï¼ã¿ã¤ã ã¤ãã³ããã¼ãã«ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çºçæ
-å»ã¯ï¼ããããï¼ç¾å¨æå»ä»¥éã§ï¼(ç¾å¨æå»ï¼TMAX_RELTIM)ä»¥åã§ããï¼å¨æ
-ãã³ãã©ã®èµ·åæå»ã«é¢ãã¦ã¯ï¼ãå¨æãã³ãã©ã®ã¿ã¤ã ã¤ãã³ãã®ç»é²ãã®
-ç¯ã§æ¤è¨ããï¼
-
-ãã ãï¼ä»¥ä¸ã«æããããã¤ãã®çç±ã§ï¼ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çº
-çæå»ãï¼ç¾å¨æå»ããåãï¼(ç¾å¨æå»ï¼TMAX_RELTIM)ããå¾ã«ãªãå ´åãã
-ãï¼
-
-ããã§ï¼TMAX_RELTIMã4,000,000,000ã¨ãï¼»NGKI0550ï¼½ï¼32ãããã§è¡¨ç¾ã§ã
-ãæå¤§å¤ï¼4,294,967,296ï¼ã¨ã®éã«ï¼294,967,295ï¼ç´294ç§ï¼ã®ãã¼ã¸ã³ãè¨­
-ãã¦ããï¼ãã®ããï¼ä»¥ä¸ã«æããçç±æ¯ã®æå¤§å¹
-ã®åè¨ã294ç§ãè¶
-ããªãã
-ã°ï¼32ãããã§è¡¨ç¾ã§ããæéå¹
-ã«åã¾ããã¨ã«ãªãï¼
-
-ä»¥ä¸ã§ã¯ï¼ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ãï¼ç¾å¨æå»ããåã«ãª
-ãçç±ã¨åã«ãªãæå¤§å¹
-ï¼(ç¾å¨æå»ï¼TMAX_RELTIM)ããå¾ã«ãªãçç±ã¨å¾ã«ãª
-ãæå¤§å¹
-ã«ã¤ãã¦æ¤è¨ããï¼
-
-(1) ç¾å¨æå»ããåã«ãªãçç±
-
-(1-1) ã¿ã¤ã ã¤ãã³ãå¦çã®é
-ã
-
-ã¿ã¤ã ã¤ãã³ããå¦çããããã®ã¿ã¤ãå²è¾¼ã¿ãçºçãã¦ããï¼ã¿ã¤ã ã¤ãã³
-ããå¦çãããã¾ã§ã®éã¯ï¼ã¿ã¤ã ã¤ãã³ãã®çºçæå»ã¯ï¼ç¾å¨æå»ããåã«
-ãªã£ã¦ããï¼ç¹ã«ï¼ã¿ã¤ãå²è¾¼ã¿ãé·æéãã¹ã¯ããã¦ããå ´åãï¼ã¿ã¤ãå²
-è¾¼ã¿ããåªå
-ãããå¦çãé·æéå®è¡ããã¦ããå ´åï¼ãã­ã»ããµãå¦çã§ã
-ãä»¥ä¸ã®é »åº¦ã§ã¿ã¤ã ã¤ãã³ããçºçããå ´åã«ã¯ï¼ã¿ã¤ã ã¤ãã³ãã®å¦çã¯
-å¤§å¹
-ã«é
-ãããã¨ã«ãªãï¼ã¿ã¤ã ã¤ãã³ãã®å¦çãå¤§å¹
-ã«é
-ããåå ã¯ã¢ããª
-ã±ã¼ã·ã§ã³ã«ãã£ã¦ä½ããããã®ã§ããããï¼ãã®ç¶æ³ãé²ãã®ã¯ã¢ããªã±ã¼
-ã·ã§ã³ã®è²¬ä»»ã¨ããï¼å
-·ä½çã«ã¯ï¼ã¿ã¤ã ã¤ãã³ãã®å¦çã2ç§ä»¥ä¸é
-ããç¶æ³
-ã§ã¯ï¼ã«ã¼ãã«ã®åä½ã¯ä¿è¨¼ãããªããã®ã¨ãã¦ããï¼»NGKI3608ï¼½ï¼ãã®ããï¼
-ã¿ã¤ã ã¤ãã³ãå¦çã®é
-ãã«ããï¼ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çºçæå»
-ãç¾å¨æå»ããåã«ãªãæå¤§å¹
-ã¯ï¼2ç§ã¨èãã¦ããï¼
-
-(1-2) ã·ã¹ãã æå»ã®èª¿æ´ã«ããã·ã¹ãã æå»ãé²ãã
-
-ã·ã¹ãã æå»ãèª¿æ´ãããµã¼ãã¹ã³ã¼ã«ï¼adj_timï¼ã«ããã·ã¹ãã æå»ãé²ã
-ãã¨ï¼ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ãï¼ç¾å¨æå»ããåã«ãªãå¯
-è½æ§ãããï¼ããã«é¢ãã¦ã¯ï¼adj_timã®1åã®å¼åºãã§é²ããããæéç¯å²ã
-æå¤§1ç§ã«å¶éããã¦ããï¼»NGKI3561ï¼½ï¼»NGKI3584ï¼½ãã¨ã«å ãã¦ï¼1ç§ä»¥ä¸é
-å»ã®çºçæå»ãæã¤ã¿ã¤ã ã¤ãã³ããå¦çãããã«æ®ã£ã¦ããå ´åã¯ï¼ããä»¥
-ä¸ã·ã¹ãã æå»ãé²ãããã¨ãã§ããªãï¼»NGKI3588ï¼½ãã¨ã¨ãã¦ããï¼ãã®ã
-ãï¼ã·ã¹ãã æå»ãé²ãããã¨ã«ããï¼ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çºç
-æå»ãç¾å¨æå»ããåã«ãªãæå¤§å¹
-ã¯ï¼2ç§ä»¥ä¸ã§ããï¼
-
-å¤é¨ä»æ§ã®å¶éï¼»NGKI3608ï¼½ã¯ï¼ã·ã¹ãã æå»ã®èª¿æ´ã«ããã·ã¹ãã æå»ãé²
-ããå ´åã«ãé©ç¨ããããã®ã§ããï¼ãã®ããï¼(1-2)ã®çç±ã«ããã¿ã¤ã ã¤ã
-ã³ãã®çºçæå»ãç¾å¨æå»ããåã«ãªãæå¤§å¹
-ï¼2ç§ä»¥ä¸ï¼ã¯ï¼(1-1)ã®çç±ã«
-ããæå¤§å¹
-ï¼2ç§ï¼ã«å«ã¾ããï¼å®éã«ã¯ï¼(1-2)ã®æå¤§å¹
-ãèæ
-®ãã¦ï¼å¤é¨ä»
-æ§ï¼»NGKI3608ï¼½ã®å¶éæéãå®ããï¼
-
-(2) (ç¾å¨æå»ï¼TMAX_RELTIM)ããå¾ã«ãªãçç±
-
-(2-1) ç¸å¯¾æéãé·ãæ¹ã«ä¸¸ãã
-
-è©³ãããã¨ã¯å¾è¿°ãããï¼ç¸å¯¾æéãæå®ããæ°ããªã¿ã¤ã ã¤ãã³ããç»é²ã
-ãæã«ã¯ï¼ç¸å¯¾æéãé·ãæ¹ã«ä¸¸ããããã«ï¼ã¿ã¤ã ã¤ãã³ãã®çºçæå»ã«é«
-åè§£è½ã¿ã¤ãã®é²ã¿å¹
-ãå ããï¼ãã®ããï¼ç»é²ããã¿ã¤ã ã¤ãã³ãã®çºçæ
-å»ãï¼(ç¾å¨æå»ï¼TMAX_RELTIM)ããï¼é«åè§£è½ã¿ã¤ãã®é²ã¿å¹
-ã®åï¼å¾ã«ãªã
-å ´åãããï¼é«åè§£è½ã¿ã¤ãã®é²ã¿å¹
-ã¯ã¿ã¼ã²ããã«ããå®ã¾ããï¼ã¿ã¼ã²ã
-ãä¾å­é¨ã«å¯¾ãã¦ï¼1ããªç§ä»¥ä¸ã«ããã¨ããå¶ç´ãèª²ããã¨ã«ãã
-ãASPD1021ãï¼
-
-(2-2) ã·ã¹ãã æå»ã®èª¿æ´ã«ããã·ã¹ãã æå»ãæ»ãã
-
-ã·ã¹ãã æå»ãèª¿æ´ãããµã¼ãã¹ã³ã¼ã«ï¼adj_timï¼ã«ããã·ã¹ãã æå»ãæ»ã
-ã¨ï¼ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ãï¼(ç¾å¨æå»ï¼TMAX_RELTIM)ã
-ãå¾ã«ãªãå¯è½æ§ãããï¼ããã«é¢ãã¦ã¯ï¼adj_timã®1åã®å¼åºãã§æ»ããæ
-éç¯å²ãæå¤§1ç§ã«å¶éããã¦ããï¼»NGKI3561ï¼½ï¼»NGKI3584ï¼½ãã¨ã«å ãã¦ï¼ç¾
-å¨ã®ã·ã¹ãã æå»ãï¼ã·ã¹ãã æå»ãæãé²ãã§ããæã®ã·ã¹ãã æå»ãã1ç§
-ä»¥ä¸æ»ã£ã¦ããå ´åã«ã¯ï¼ã·ã¹ãã æå»ãããä»¥ä¸æ»ããªãï¼»NGKI3589ï¼½ãã¨
-ã¨ãã¦ããï¼ãã®ããï¼ã·ã¹ãã æå»ãæ»ãããã¨ã«ããï¼ç»é²ããã¦ããã¿
-ã¤ã ã¤ãã³ãã®çºçæå»ã(ç¾å¨æå»ï¼TMAX_RELTIM)ããå¾ã«ãªãæå¤§å¹
-ã¯ï¼2
-ç§ä»¥ä¸ã§ããï¼
-
-âã¤ãã³ãæå»ã®æ¯è¼æ¹æ³
-
-ã¤ãã³ãæå»ã32ãããã§è¡¨ç¾ããã¨ï¼å¨åãããã¨ã¯é¿ããããªãï¼ã¤ãã³
-ãæå»ãå¨åããï¼UINT32_MAXãè¶
-ããï¼ã¨ï¼ã¤ãã³ãæå»ã¯0ã«æ»ãããï¼ã¤
-ãã³ãæå»ã®åå¾é¢ä¿ãï¼ã¤ãã³ãæå»ã®åç´ãªå¤§å°é¢ä¿ã§å¤å®ãããã¨ãã§
-ããªããªãï¼
-
-ã¤ãã³ãæå»ãå¨åããå ´åã§ãï¼ã¤ãã³ãæå»ã®åå¾é¢ä¿ãå¤å®ã§ãããã
-ã«ããããã«ï¼å¨åããåã®ã¤ãã³ãæå»ï¼å¤ã¨ãã¦ã¯å¤§ããï¼ã¨å¨åå¾ã®ã¤
-ãã³ãæå»ï¼å¤ã¨ãã¦ã¯å°ããï¼ã®å¢çãç¤ºãå¤ãï¼ã°ã­ã¼ãã«å¤æ°ã§ç®¡çã
-ããASPD1008ãï¼ãããï¼å¢çã¤ãã³ãæå»ã¨å¼ã¶ï¼ã¤ãã³ãæå»ã®åå¾é¢ä¿
-ã¯ï¼æ¯è¼å¯¾è±¡ã®ã¤ãã³ãæå»ããå¢çã¤ãã³ãæå»ãå¼ããå¤ï¼ãªã¼ããã­ã¼
-ã¯ç¡è¦ããï¼ã®å¤§å°é¢ä¿ã§å¤å®ãããASPD1009ãï¼
-
-åå¾é¢ä¿ã®å¤å®ãå¿
-è¦ãªã¤ãã³ãæå»ã¯ï¼ã¿ã¤ã ã¤ãã³ããã¼ãã«ç»é²ããã¦
-ãããã¹ã¦ã®ã¿ã¤ã ã¤ãã³ãã®çºçæå»ã¨ï¼ç¾å¨ã®ã¤ãã³ãæå»ã§ããï¼ãã®
-ããï¼ç´æçã«ã¯ï¼å¢çã¤ãã³ãæå»ã¯ï¼åè¿°ã®ãã¼ã¸ã³ã®ä¸­ã«è¨­å®ããã¦ã
-ãã°ããï¼å
-·ä½çã«ã¯ï¼å¢çã¤ãã³ãæå»ã¯ï¼ç¾å¨æå»ãã(1-1)ã®æå¤§å¹
-ãå¼
-ããã¤ãã³ãæå»ã¨ï¼(ç¾å¨æå»ï¼TMAX_RELTIM)ã«(2-1)ã¨(2-2)ã®æå¤§å¹
-ãå ã
-ãã¤ãã³ãæå»ã®éï¼ã¤ãã³ãæå»ã¯å¾ªç°ãã¦ããããï¼2ã¤ã®ãéãããããï¼
-ãã¼ã¸ã³ã¨ãªã£ã¦ããæ¹ã®éï¼ã«è¨­å®ããã¦ããã°ããï¼
-
-åè¿°ã®ãã¼ã¸ã³ããï¼(1-1)(2-1)(2-2)ã®æå¤§å¹
-ãå¼ãã¨ï¼ç´290ç§ã®ãã¼ã¸ã³
-ãæ®ãï¼å¢çã¤ãã³ãæå»ã¯ï¼ãã®éã®ã©ãã«ç½®ãã¦ãè¯ããï¼(1-1)ã®æå¤§å¹
-
-ã¯ã¢ããªã±ã¼ã·ã§ã³ã®è¨­è¨ãæªãã¨è¶
-ãã¦ãã¾ãå¯è½æ§ãããããï¼ãããè¶
-
-ããå ´åã®ã­ãã¹ãæ§ãèæ
-®ãã¦ï¼ç¾å¨ã®ã¤ãã³ãæå»ã®200ç§åã«è¨­å®ããã
-ã¨ã¨ãããASPD1010ãï¼
-
-âç¾å¨æå»ã®ç®åº
-
-ã¤ãã³ãæå»ã¨ï¼é«åè§£è½ã¿ã¤ãã®ã«ã¦ã³ãå¤ï¼ä»¥ä¸ï¼åã«ã«ã¦ã³ãå¤ã¨å¼ã¶ï¼
-ã®å¯¾å¿ãç®¡çããããã«ï¼ç¾å¨æå»ãç®åºããåº¦ã«ï¼ç®åºããæç¹ã§ã®ã«ã¦ã³
-ãå¤ã¨ã¤ãã³ãæå»ãï¼ã°ã­ã¼ãã«å¤æ°ã«ä¿å­ãããASPD1012ãï¼ããªãã¡ï¼
-ãããã®ã°ã­ã¼ãã«å¤æ°ã«ã¯ï¼ç¾å¨æå»ãååã«ç®åºããæç¹ã§ã®ã«ã¦ã³ãå¤
-ã¨ã¤ãã³ãæå»ãä¿æãã¦ããï¼
-
-ç¾å¨æå»ï¼ç¾å¨ã®ã¤ãã³ãæå»ï¼ãå¿
-è¦ã¨ããå ´åã«ã¯ï¼æ¬¡ã®å¦çãè¡ãï¼ã¾
-ãï¼é«åè§£è½ã¿ã¤ãããï¼ç¾å¨ã®ã«ã¦ã³ãå¤ãèª­ã¿åºããASPD1013ãï¼èª­ã¿åº
-ããã«ã¦ã³ãå¤ã¨ååã®ã«ã¦ã³ãå¤ã®å·®ããï¼ã¤ãã³ãæå»ãã©ãã ãé²ãã 
-ããæ±ãããASPD1014ãï¼ãã®å¤ãï¼ååã®ã¤ãã³ãæå»ã«å ãã¦ï¼ç¾å¨ã®ã¤
-ãã³ãæå»ãç®åºãããASPD1015ãï¼ç®åºããã¤ãã³ãæå»ã¯ï¼èª­ã¿åºããç¾
-å¨ã®ã«ã¦ã³ãå¤ã¨ã¨ãã«ï¼ã°ã­ã¼ãã«å¤æ°ã«æ ¼ç´ãããASPD1016ãï¼ããã«ï¼
-å¢çã¤ãã³ãæå»ãæ´æ°ãããASPD1011ãï¼
-
-ãªãï¼æå¾ã«ç¾å¨æå»ãç®åºããæç¹ã§ã®ã¤ãã³ãæå»ã¯ï¼ã«ã¼ãã«ã®åæå
-æã«0ã«åæåãããASPD1047ãï¼ã¾ãï¼å¢çã¤ãã³ãæå»ãï¼ããã«åããã¦
-åæåãããASPD1048ãï¼
-
-âé«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ã®è¨­å®
-
-åè¿°ããããã«ï¼é«åè§£è½ã¿ã¤ãããã®å²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ã¯ï¼ã¿ã¤ã ã¤
-ãã³ããã¼ãã®å
-é ­ã®ã¿ã¤ã ã¤ãã³ãã®çºçæå»ã«è¨­å®ããã®ãåºæ¬ã§ãã
-ï¼»ASPD1002ï¼½ï¼
-
-ãã ãï¼é«åè§£è½ã¿ã¤ãã®ã¿ã¤ãå¨æãï¼APIã§æå®ã§ããæå¤§ç¸å¯¾æéããã
-ç­ãå ´åã«ã¯ï¼ä¸ã®ãããªè¨­å®ãã§ããªãå ´åãããï¼å
-·ä½çã«ã¯ï¼å
-é ­ã®ã¿
-ã¤ã ã¤ãã³ãã®çºçæå»ã¾ã§ã®æéãï¼é«åè§£è½ã¿ã¤ãã®ã¿ã¤ãå¨æãããé·
-ãå ´åã«ï¼å
-é ­ã®ã¿ã¤ã ã¤ãã³ãã®çºçæå»ã«å²è¾¼ã¿ãçºçããããã«è¨­å®ã§
-ããªãï¼ãã®å ´åï¼ã¿ã¤ãå¨æãçµéããä»¥åã«ããã¼ã®å²è¾¼ã¿ãçºçããï¼
-æå»ãæ´æ°ããå¦çãè¡ããASPD1003ãï¼ä¸å¿
-è¦ãªã¿ã¤ãã³ã°ã§å²è¾¼ã¿ãçºç
-ãããã¨ã«ãªããï¼ã¿ã¤ãå¨æãçµéããä»¥åã«æå»ãæ´æ°ããå¦çãè¡ããª
-ãã¨ï¼é«åè§£è½ã¿ã¤ããå¨åããããããããªããªãããï¼ãããããªãï¼
-
-ããã§ï¼ããã¼ã®å²è¾¼ã¿ãçºçãããã¿ã¤ãã³ã°ãåé¡ã«ãªãï¼ã¿ã¤ãå¨æã
-çµéããç´åã«å²è¾¼ã¿ããããããã«è¨­å®ããå ´åï¼ä½ããã®çç±ã§å²è¾¼ã¿å¦
-çãé
-å»¶ããã¨ï¼å²è¾¼ã¿ãã³ãã©å
-ã§é«åè§£è½ã¿ã¤ããèª­ãã æç¹ã§ã¿ã¤ãã
-å¨åãã¦ããå¯è½æ§ãããï¼ã¿ã¤ããå¨åãããã¨ãè¦è½ã¨ãå¯è½æ§ãããï¼
-ããã§ï¼ããã¼ã®å²è¾¼ã¿ãçºçãããã¾ã§ã®æéã¯ï¼ã¿ã¤ãå¨æããã¿ã¤ãå²
-è¾¼ã¿ã®æå¤§é
-å»¶æéãå¼ããæéãããç­ãæéã«è¨­å®ããªããã°ãªããªã
-ãASPD1004ãï¼ããã¼ã®å²è¾¼ã¿ãçºçãããã¾ã§ã®æéã¯ï¼ã¿ã¼ã²ããä¾å­ã«
-å®ãããã¨ã¨ãããASPD1005ãï¼
-
-åãçç±ã§ï¼ã¿ã¤ã ã¤ãã³ããã¼ãã®å
-é ­ã®ã¿ã¤ã ã¤ãã³ãã®çºçã¾ã§ã®æé
-ãï¼ããã¼ã®å²è¾¼ã¿ãçºçãããã¾ã§ã®æéãããé·ãå ´åã«ã¯ï¼ããã¼ã®å²
-è¾¼ã¿ãçºçãããã¾ã§ã®æéãçµéããã¿ã¤ãã³ã°ã§å²è¾¼ã¿ãçºçããï¼æå»
-ãæ´æ°ããå¦çãè¡ããASPD1006ãï¼ããã¼ã®å²è¾¼ã¿ãçºçãããã¾ã§ã®æé
-ã¯ã¿ã¤ãå¨æãããç­ãè¨­å®ããããã¨ããï¼ãã®å¦çã«ããï¼»ASPD1003ï¼½ã
-å®ç¾ãããï¼
-
-ããã«ï¼ã¿ã¤ã ã¤ãã³ããã¼ããç©ºã®å ´åã«ãï¼ããã¼ã®å²è¾¼ã¿ãçºçããã
-ã¾ã§ã®æéãçµéããã¿ã¤ãã³ã°ã§å²è¾¼ã¿ãçºçããï¼æå»ãæ´æ°ããå¦çã
-è¡ããASPD1007ãï¼
-
-ã·ã¹ãã æå»ãèª¿æ´ããå ´åãï¼ä½ããã®çç±ã§å²è¾¼ã¿å¦çãé
-å»¶ããå ´åã«
-ã¯ï¼é«åè§£è½ã¿ã¤ãã®å²è¾¼ã¿çºçã¿ã¤ãã³ã°ãè¨­å®ãããã¨ããæç¹ã§ï¼å
-é ­
-ã®ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãéãã¦ããå¯è½æ§ãããï¼ãã®ãããªå ´åã«ã¯ï¼
-ã¿ã¤ãå²è¾¼ã¿ãããã«çºçããããASPD1017ãï¼
-
-âé«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦ç
-
-é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ãçºçããã¨ï¼ã¾ãï¼åè¿°ã®æ¹æ³ã§ç¾å¨æå»ãç®åºãã
-ãASPD1022ãï¼æ¬¡ã«ï¼ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã®ã¿ã¤ã ã¤ãã³ãã®ä¸­ã§ï¼çºç
-æå»ãç¾å¨æå»ä»¥åã®ãã®ãï¼ä»¥ä¸ã®æé ã§å¦çããï¼
-
-ã¿ã¤ã ã¤ãã³ããã¼ããç©ºã§ãªãå ´åã«ã¯ï¼å
-é ­ã®ã¿ã¤ã ã¤ãã³ãã®çºçæå»
-ã¨ç¾å¨æå»ãæ¯è¼ãï¼çºçæå»ãç¾å¨æå»ä»¥åã§ããå ´åã«ã¯ï¼ãã®ã¿ã¤ã ã¤
-ãã³ããã¿ã¤ã ã¤ãã³ããã¼ãããåé¤ãï¼ã¿ã¤ã ã¤ãã³ããå¦çãã
-ãASPD1018ãï¼ãããï¼ã¿ã¤ã ã¤ãã³ããã¼ããç©ºã«ãªããï¼å
-é ­ã®ã¿ã¤ã ã¤
-ãã³ãã®çºçæå»ãç¾å¨æå»ä»¥åã§ãªããªãã¾ã§ç¹°ãè¿ããASPD1019ãï¼
-
-ï¼»ASPD1019ï¼½ã®ç¹°ãè¿ãã®éã«ï¼ã¿ã¤ã ã¤ãã³ãã1ã¤ä»¥ä¸å¦çãã¦ããå ´åã«
-ã¯ï¼ãã®éã«æéãçµéãã¦ããã¨èããããããï¼ååº¦ï¼åè¿°ã®æ¹æ³ã§ç¾å¨
-æå»ãç®åºãï¼åã®æ®µè½ã«è¨è¿°ããå¦çãè¡ããASPD1020ãï¼
-
-ã¿ã¤ã ã¤ãã³ãã1ã¤ãå¦çããã«ï¼»ASPD1019ï¼½ã®ç¹°ãè¿ããçµããå ´åã«ã¯ï¼
-åè¿°ã®æ¹æ³ã§é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ãï¼å²è¾¼ã¿å¦çã
-çµãããASPD1025ãï¼
-
-âç¸å¯¾æéæå®ã«ããã¿ã¤ã ã¤ãã³ãã®ç»é²
-
-ç¸å¯¾æéãæå®ãã¦ã¿ã¤ã ã¤ãã³ããç»é²ããå ´åã«ã¯ï¼ç¾å¨æå»ãé
-ãæ¹ã«
-ä¸¸ããæå»ã«ï¼æå®ãããç¸å¯¾æéãå ãã¦ï¼ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãæ±
-ãããASPD1026ãï¼
-
-ç¾å¨æå»ãé
-ãæ¹ã«ä¸¸ããã®ã¯ï¼ï¼»NGKI0046ï¼½ã«ããï¼ã¿ã¤ã ã¤ãã³ãã®å¦ç
-ãè¡ãã¾ã§ã®æéãï¼ç¸å¯¾æéã«ãã£ã¦æå®ããä»¥ä¸ã¨ããªããã°ãªããªãã
-ãã§ããï¼ããã«å¯¾ãã¦ï¼åè¿°ã®æ¹æ³ã§ç¾å¨æå»ãç®åºããã¨ï¼ç¾å¨æå»ãæ©
-ãæ¹ã«ä¸¸ããæå»ãæ±ã¾ãï¼ããã§ï¼åè¿°ã®æ¹æ³ã§ç®åºããç¾å¨æå»ã«ï¼é«å
-è§£è½ã¿ã¤ãã®é²ã¿å¹
-ï¼ãããï¼TSTEP_HRTCNTã¨æ¸ãï¼ãå ãã¦ï¼ç¾å¨æå»ãé
-
-ãæ¹ã«ä¸¸ããæå»ã¨ãããASPD1027ãï¼
-
-ä»¥ä¸ã®å¦çã®å¾ï¼ã¿ã¤ã ã¤ãã³ããã¿ã¤ã ã¤ãã³ããã¼ãã«æ¿å
-¥ãã
-ãASPD1030ãï¼ç»é²ããã¿ã¤ã ã¤ãã³ããï¼å
-é ­ã®ã¿ã¤ã ã¤ãã³ãã«ãªã£ãå ´
-åã«ã¯ï¼åè¿°ã®æ¹æ³ã§é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ãã
-ãASPD1031ãï¼
-
-ãã ãï¼é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦çã®éä¸­ã§ã¿ã¤ã ã¤ãã³ããç»é²ãããå ´
-åã«ã¯ï¼ã¿ã¤ãå²è¾¼ã¿å¦çãçµããåã«é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³
-ã°ãè¨­å®ãããããï¼ããã§è¨­å®ããå¿
-è¦ã¯ãªãï¼ãããå®ç¾ããããã«ï¼é«
-åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦çä¸­ã§ãããã¨ãç¤ºããã©ã°ãã°ã­ã¼ãã«å¤æ°ã«ç¨æ
-ããASPD1032ãï¼ãã®ãã©ã°ãã»ããããã¦ããå ´åã«ã¯ï¼é«åè§£è½ã¿ã¤ãå²
-è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ã®è¨­å®ãè¡ããªããASPD1034ãï¼ãªãï¼ãã®ãã©ã°ã¯ï¼
-ã·ã¹ãã ã®åæåæã«ã¯ãªã¢ãï¼é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦çã®å
-¥å£ã§ã»ãã
-ãï¼åºå£ã§ã¯ãªã¢ãããASPD1033ãï¼
-
-âå¨æãã³ãã©ã®ã¿ã¤ã ã¤ãã³ãã®ç»é²
-
-ASP3ã«ã¼ãã«ã§ã¯ï¼TA_PHSå±æ§ã®å¨æãã³ãã©ããµãã¼ãããªãï¼»ASPS0172ï¼½
-ããï¼å¨æãã³ãã©ãåä½éå§ããæå»ãï¼å¨æãã³ãã©ãèµ·åããæå»ã®åº
-æºæå»ã¨ãªãï¼»NGKI2372ï¼½ï¼
-
-å¨æãã³ãã©ã®ååã®èµ·åæå»ã¯ï¼å¨æãã³ãã©ãåä½éå§ããæå»ããï¼å¨
-æãã³ãã©ã®èµ·åä½ç¸å¾ã§ããï¼»NGKI2365ï¼½ï¼å¨æãã³ãã©ãèµ·åããã¿ã¤ã 
-ã¤ãã³ããç»é²ããå¦çã®å
-å®¹ã¯ï¼å¨æãã³ãã©ãéçAPIã«ããåä½éå§ãã
-å ´åã¨ï¼ãµã¼ãã¹ã³ã¼ã«ã«ããåä½éå§ããå ´åã§ç°ãªãï¼
-
-å¨æãã³ãã©ãéçAPIã«ããåä½éå§ããå ´åã«ã¯ï¼ã«ã¼ãã«ã®åæåå¦çã§ï¼
-ã¿ã¤ã ã¤ãã³ããç»é²ããï¼ãã®æç¹ã§ã¯ã·ã¹ãã æå»ã¯0ã§ããããï¼å¨æã
-ã³ãã©ãåä½éå§ããæå»ã¯0ã¨ãããã¨ã«ãªãï¼èµ·åä½ç¸ãçºçæå»ã¨ãã¦ï¼
-ã¿ã¤ã ã¤ãã³ããã¿ã¤ã ã¤ãã³ããã¼ãã«æ¿å
-¥ãããASPD1035ãï¼èµ·åä½ç¸ã¨
-ãã¦æå®ã§ããæéã¯0ä»¥ä¸TMAX_RELTIMä»¥ä¸ã§ããããï¼»NGKI2399ï¼½ï¼ã¿ã¤ã 
-ã¤ãã³ãã®çºçæå»ã¯ï¼ç¾å¨æå»ä»¥éï¼(ç¾å¨æå»ï¼TMAX_RELTIM)ä»¥åã¨ããç¯
-å²ã«åã¾ãï¼å¨æãã³ãã©ã®åä½éå§ã®æç¡ã«ãããããï¼ã«ã¼ãã«ã®åæå
-å¦çã®æå¾ã§ï¼é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ããå¿
-è¦ããã
-ããï¼ã¿ã¤ã ã¤ãã³ããç»é²ããæç¹ã§ã¯ï¼é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤
-ãã³ã°ã¯è¨­å®ããªãï¼
-
-å¨æãã³ãã©ããµã¼ãã¹ã³ã¼ã«ã«ããåä½éå§ããå ´åã«ã¯ï¼ç¾å¨æå»ãåºæº
-æå»ï¼èµ·åä½ç¸ãç¸å¯¾æéã¨ãã¦ã¿ã¤ã ã¤ãã³ããç»é²ããã°ããããï¼ãã§
-ã«æ¤è¨ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ãç¸å¯¾æéã§æå®ããå ´åã¨åæ§ã§ãã
-ãASPD1036ãï¼
-
-å¨æãã³ãã©ã®2åç®ä»¥éã®èµ·åæå»ã¯ï¼ååã®èµ·åæå»ããï¼å¨æãã³ãã©ã®
-èµ·åå¨æå¾ã§ããï¼»NGKI2365ï¼½ï¼ãã®ããã®ã¿ã¤ã ã¤ãã³ãã®ç»é²å¦çã¯ï¼é«
-åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦çããå¼ã³åºãããå¨æãã³ãã©èµ·åã«ã¼ãã³ã®ä¸­ã§ï¼
-å¨æãã³ãã©ãå¼ã³åºãåã«ï¼å¨æãã³ãã©ãæ¬¡åèµ·åããããã®ã¿ã¤ã ã¤ã
-ã³ããç»é²ããå½¢ã§è¡ããASPD1037ãï¼ç»é²ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ã¯ï¼
-å¨æãã³ãã©ã®ä»åã®èµ·åæå»ã«èµ·åå¨æãå ããæå»ã¨ãããASPD1038ãï¼
-
-å¨æãã³ãã©èµ·åã«ã¼ãã³ãå¼ã°ããæç¹ã§ï¼å¨æãã³ãã©ãä»åèµ·åããã¿
-ã¤ã ã¤ãã³ãã¯ï¼ç´åã¾ã§ï¼ã¿ã¤ã ã¤ãã³ããã¼ãã®å
-é ­ã«ãã£ãã¿ã¤ã ã¤ã
-ã³ãã§ããï¼ã¾ãï¼èµ·åå¨æã¨ãã¦æå®ã§ããæéã¯0ããå¤§ããTMAX_RELTIM
-ä»¥ä¸ã§ãããã¨ããï¼»NGKI2397ï¼½ï¼ç»é²ããã¿ã¤ã ã¤ãã³ãã®çºçæå»ã¯ï¼ç´
-åã¾ã§å
-é ­ã«ãã£ãã¿ã¤ã ã¤ãã³ãã®çºçæå»ããå¾ã§ï¼(ç´åã¾ã§å
-é ­ã«ãã£
-ãã¿ã¤ã ã¤ãã³ãã®çºçæå»ï¼TMAX_RELTIM)ä»¥åã¨ããç¯å²ã«åã¾ãï¼ã¿ã¤ã 
-ã¤ãã³ãã®å¦çã2ç§ä»¥ä¸é
-ããç¶æ³ã§ã¯ï¼ã«ã¼ãã«ã®åä½ã¯ä¿è¨¼ãããªããã®
-ã¨ãã¦ããï¼»NGKI3608ï¼½ãã¨ããï¼ç´åã¾ã§å
-é ­ã«ãã£ãã¿ã¤ã ã¤ãã³ãã®çº
-çæå»ãï¼ç¾å¨æå»ããåã«ãªãæå¤§å¹
-ã¯2ç§ã¨èãã¦ããï¼æ¢ã«æ¤è¨ãã
-(1-1)ã®æå¤§å¹
-ã®ç¯å²å
-ã§ããï¼
-
-ã¿ã¤ã ã¤ãã³ããç»é²ããå¨æãã³ãã©èµ·åã«ã¼ãã³ã¯ï¼é«åè§£è½ã¿ã¤ãå²è¾¼
-ã¿ã®å¦çããå¼ã³åºãããããï¼ããã§é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³
-ã°ãè¨­å®ããå¿
-è¦ã¯ãªãï¼
-
-âã¿ã¤ã ã¤ãã³ãã®ç»é²è§£é¤
-
-ã¿ã¤ã ã¤ãã³ãã®ç»é²ãè§£é¤ããå ´åã«ã¯ï¼ã¿ã¤ã ã¤ãã³ããã¿ã¤ã ã¤ãã³ã
-ãã¼ãããåé¤ãããASPD1039ãï¼
-
-é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦çã®éä¸­ã§ã¿ã¤ã ã¤ãã³ããç»é²è§£é¤ãããå ´åã§
-ãªãï¼åé¤ããã¿ã¤ã ã¤ãã³ããå
-é ­ã®ã¿ã¤ã ã¤ãã³ãã§ãã£ãå ´åã«ã¯ï¼å
-è¿°ã®æ¹æ³ã§é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ãããASPD1040ãï¼
-
-âã¿ã¤ã ã¤ãã³ããçºçããã¾ã§ã®æéã®è¨ç®
-
-ã¿ã¤ã ã¤ãã³ããçºçããã¾ã§ã®æéãè¨ç®ããå ´åã«ã¯ï¼ã¿ã¤ã ã¤ãã³ãã®
-çºçæå»ããï¼ç¾å¨æå»ãé
-ãæ¹ã«ä¸¸ããæå»ãå¼ããã¨ã«ãã£ã¦æ±ãã
-ãASPD1049ãï¼ç¾å¨æå»ãé
-ãæ¹ã«ä¸¸ããæå»ã¯ï¼ï¼»ASPD1027ï¼½ã®æ¹æ³ã§æ±ã
-ããASPD1050ãï¼
-
-ç¾å¨æå»ãé
-ãæ¹ã«ä¸¸ããã®ã¯ï¼ï¼»NGKI0050ï¼½ã«ããï¼ã¿ã¤ã ã¤ãã³ããçºç
-ããæå»ãç¸å¯¾æéã§è¿ãå ´åã«ã¯ï¼ã¿ã¤ã ã¤ãã³ããå¦çãããã®ã¯ï¼åºæº
-æå»ããç¸å¯¾æéã¨ãã¦è¿ãããä»¥ä¸ã®æéãçµéããå¾ã¨ããªããã°ãªããª
-ãããã§ããï¼ããã§ã®åºæºæå»ã¯ï¼ç¸å¯¾æéãè¿ããµã¼ãã¹ã³ã¼ã«ãå¼ã³åº
-ããæå»ï¼è¨ãæããã¨ç¾å¨æå»ï¼ã§ããï¼»NGKI0049ï¼½ï¼
-
-ãã ãï¼ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãï¼ç¾å¨æå»ä»¥åã§ããå ´åã«ã¯ï¼ã¿ã¤ã 
-ã¤ãã³ãã¾ã§ã®æ®ãæéã¨ãã¦0ãè¿ãï¼»NGKI0552ï¼½ï¼
-
-âã·ã¹ãã æå»ã®ç®¡ç
-
-ã·ã¹ãã æå»ãåç
-§ãããµã¼ãã¹ã³ã¼ã«ï¼get_timï¼ã¯ï¼ã·ã¹ãã æå»ãæãé²
-ãã§ããæã®ã·ã¹ãã æå»ï¼adj_timã§ã·ã¹ãã æå»ãæ»ãã¦ããªãå ´åã«ã¯ï¼
-ç¾å¨ã®ã·ã¹ãã æå»ã«ä¸è´ããï¼ãè¿ãï¼»NGKI3591ï¼½ï¼ãããå®ç¾ããããã«ï¼
-ã·ã¹ãã æå»ãæãé²ãã§ããæã®ã¤ãã³ãæå»ãï¼ã°ã­ã¼ãã«å¤æ°ã§ç®¡çã
-ããASPD1041ãï¼
-
-æãé²ãã§ããæã®ã¤ãã³ãæå»ã¯ï¼ã«ã¼ãã«ã®åæåæã«0ã«åæåã
-ãASPD1046ãï¼ç¾å¨ã®ã¤ãã³ãæå»ãé²ããåº¦ã«æ´æ°ããï¼å
-·ä½çã«ã¯ï¼æã
-é²ãã§ããæã®ã¤ãã³ãæå»ã¨é²ããåã®ç¾å¨ã®ã¤ãã³ãæå»ã®å·®ãï¼ç¾å¨ã®
-ã¤ãã³ãæå»ã®é²ã¿åãããå°ããå ´åã«ã¯ï¼æãé²ãã§ããæã®ã¤ãã³ãæ
-å»ãï¼é²ããå¾ã®ç¾å¨ã®ã¤ãã³ãæå»ã«ä¸è´ããããASPD1042ãï¼
-
-ã·ã¹ãã æå»ã¨ã¤ãã³ãæå»ã¯ï¼åãéåº¦ã§é²ãããï¼ã·ã¹ãã æå»ãè¨­å®ã
-ãªãéã¯ï¼ãã®å·®ã¯ä¸å®ã§ããï¼ãã®å·®ãç®¡çããããã«ï¼get_timã§åç
-§ãã
-ããã·ã¹ãã æå»ï¼64ãããã®ç¬¦å·ç¡ãæ´æ°åï¼ãã ãï¼64ãããã®æ´æ°åã
-ãµãã¼ãããã¦ããªãã¿ã¼ã²ããã§ã¯32ãããã®ç¬¦å·ç¡ãæ´æ°åï¼»NGKI0548ï¼½ï¼
-ã¨ï¼æãé²ãã§ããæã®ã¤ãã³ãæå»ï¼32ãããã®ç¬¦å·ç¡ãæ´æ°åï¼ã®å·®ãï¼
-ã°ã­ã¼ãã«å¤æ°ã§ç®¡çãããASPD1043ãï¼ãã®å·®ãï¼ã·ã¹ãã æå»ã®ãªãã»ã
-ãã¨å¼ã¶ï¼
-
-ã«ã¼ãã«ã®åæåæã«ã¯ï¼ã·ã¹ãã æå»ã¯0ã«åæåããï¼»NGKI2333ï¼½ï¼æãé²
-ãã§ããæã®ã¤ãã³ãæå»ã0ã«åæåãããï¼»ASPD1046ï¼½ãã¨ããï¼ã·ã¹ãã 
-æå»ã®ãªãã»ããã0ã«åæåãããASPD1044ãï¼ã¾ãï¼ã·ã¹ãã æå»ã64ãã
-ãã®ç¬¦å·ç¡ãæ´æ°åã®å ´åã«ã¯ï¼æãé²ãã§ããæã®ã¤ãã³ãæå»ãé²ããçµ
-æï¼ãã®å¤ãå¨åããæã«ã¯ï¼ã·ã¹ãã æå»ã®ãªãã»ããã«2^32ãå ç®ãã
-ãASPD1045ãï¼
-
-âã·ã¹ãã æå»ã®åç
-§ã¨è¨­å®
-
-ã·ã¹ãã æå»ã®åç
-§ï¼get_timï¼ã®å¦çæ¬ä½ï¼æä»å¶å¾¡ã®å
-å´ã®å¦çï¼ã§ã¯ï¼ã¾
-ãï¼åè¿°ã®æ¹æ³ã§ç¾å¨æå»ãç®åºã»æ´æ°ãï¼ããã«ä¼´ã£ã¦ï¼æãé²ãã§ããæ
-ã®ã¤ãã³ãæå»ãæ´æ°ãããASPD1057ãï¼ãã®å¾ï¼æãé²ãã§ããæã®ã¤ãã³
-ãæå»ã«ã·ã¹ãã æå»ã®ãªãã»ãããå ãããã¨ã§ï¼æãé²ãã§ããæã®ã·ã¹
-ãã æå»ãæ±ãï¼æå®ãããã¡ã¢ãªé åã«è¿ããASPD1058ãï¼
-
-ã·ã¹ãã æå»ã®è¨­å®ï¼set_timï¼ã®å¦çæ¬ä½ï¼æä»å¶å¾¡ã®å
-å´ã®å¦çï¼ã§ã¯ï¼ã¾
-ãï¼åè¿°ã®æ¹æ³ã§ç¾å¨æå»ãç®åºã»æ´æ°ãï¼ããã«ä¼´ã£ã¦ï¼æãé²ãã§ããæ
-ã®ã¤ãã³ãæå»ãæ´æ°ãããASPD1059ãï¼ãã®å¾ï¼æå®ãããã·ã¹ãã æå»ã¨
-æãé²ãã§ããæã®ã¤ãã³ãæå»ã®å·®ãæ±ãï¼ã·ã¹ãã æå»ã®ãªãã»ããã«æ ¼
-ç´ãããASPD1060ãï¼
-
-ï¼»NGKI3592ï¼½ã§å¤åããªããã¨ãè¦æ±ããã¦ãããget_timã§åç
-§ããã·ã¹ãã 
-æå»ã®é²ã¿ãæ­¢ã¾ã£ã¦ããæéãã¯ï¼æãé²ãã§ããæã®ã¤ãã³ãæå»ã¨ç¾å¨
-ã®ã¤ãã³ãæå»ã®å·®ã§å®ç¾ããã¦ããï¼ä¸è¨ã®set_timã®å¦çæé ã§ã¯ï¼ç¾å¨æ
-å»ã¨æãé²ãã§ããæã®ã¤ãã³ãæå»ãï¼ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãããæç¹
-ã®ç¶æ
-ã«æ´æ°ããä»¥å¤ã«ã¯ï¼æãé²ãã§ããæã®ã¤ãã³ãæå»ã¨ç¾å¨ã®ã¤ãã³
-ãæå»ã®å·®ãå¤æ´ãããã¨ã¯ãªãï¼ãã®ããï¼ä¸ã®å¦çæé ã§ï¼»NGKI3592ï¼½ã®
-è¦æ±ãæºããã¦ããï¼
-
-âã·ã¹ãã æå»ã®èª¿æ´
-
-ã·ã¹ãã æå»ã®èª¿æ´ï¼adj_timï¼ã®å¦çæ¬ä½ï¼æä»å¶å¾¡ã®å
-å´ã®å¦çï¼ã¯ï¼ä»¥ä¸
-ã®æé ã§è¡ãï¼
-
-ã¾ãï¼åè¿°ã®æ¹æ³ã§ç¾å¨æå»ãç®åºãããASPD1051ãï¼æ¬¡ã«ï¼E_OBJã¨ã©ã¼ã®
-ãã§ãã¯ãè¡ããASPD1052ãï¼E_OBJã¨ã©ã¼ã®ãã§ãã¯ã®å
-å®¹ã¯ï¼ã·ã¹ãã æå»
-ãé²ããå ´åã¨é
-ãããå ´åã§ç°ãªãï¼ã·ã¹ãã æå»ãé²ããå ´åã«ã¯ï¼ã¿ã¤
-ã ã¤ãã³ããã¼ããç©ºã§ãªãï¼å
-é ­ã®ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãç¾å¨æå»ã
-ãã1ç§ä»¥ä¸åã§ããå ´åã«ï¼E_OBJã¨ã©ã¼ã¨ããï¼»NGKI3588ï¼½ï¼ã·ã¹ãã æå»
-ãé
-ãããå ´åã«ã¯ï¼æãé²ãã§ããæã®ã¤ãã³ãæå»ã¨ç¾å¨ã®ã¤ãã³ãæå»
-ã¨ã®å·®ã1ç§ä»¥ä¸ã®å ´åã«ï¼E_OBJã¨ã©ã¼ã¨ããï¼»NGKI3589ï¼½ï¼
-
-E_OBJã¨ã©ã¼ã§ãªãå ´åã«ã¯ï¼ç¾å¨ã®ã¤ãã³ãæå»ã«ï¼æå®ãããèª¿æ´éãå ã
-ããASPD1053ãï¼ããã«ããï¼ã·ã¹ãã æå»ã®ç¾å¨å¤ã«æå®ãããèª¿æ´éãå 
-ãããï¼»NGKI3586ï¼½ï¼ã¿ã¤ã ã¤ãã³ããçºçããã¾ã§ã®ç¸å¯¾æéãèª¿æ´ããã
-ï¼»NGKI3587ï¼½ï¼ã¾ãï¼å¢çã¤ãã³ãæå»ãæ´æ°ãããASPD1055ãï¼
-
-ããã§ï¼ã¤ãã³ãæå»ãé²ããå ´åã«ã¯ï¼ï¼»ASPD1042ï¼½ã¨åãæ¹æ³ã§ï¼æãé²
-ãã§ããæã®ã¤ãã³ãæå»ãæ´æ°ãããASPD1054ãï¼
-
-æå¾ã«ï¼åè¿°ã®æ¹æ³ã§é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ãã
-ãASPD1056ãï¼
-
-âã«ã¼ãã«ã®åæåæã®å¦ç
-
-ã«ã¼ãã«ã®åæåæã«ã¯ï¼ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«ã®åæåå¦çã«ãã
-ã¦ï¼æå¾ã«ç¾å¨æå»ãç®åºããæç¹ã§ã®ã¤ãã³ãæå»ï¼å¢çã¤ãã³ãæå»ï¼æ
-ãé²ãã§ããæã®ã¤ãã³ãæå»ï¼é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å¦çä¸­ã§ãããã¨ã
-ç¤ºããã©ã°ãåæåãï¼ã¿ã¤ã ã¤ãã³ããã¼ããç©ºã«åæåãããASPD1061ãï¼
-
-ãã®å¾ã«å¼ã³åºãããå¨æãã³ãã©æ©è½ã®åæåå¦çã«ããã¦ï¼éçAPIã«ãã
-åä½éå§ããå¨æãã³ãã©ã®ï¼ååã®èµ·åã®ããã®ã¿ã¤ã ã¤ãã³ããç»é²ãã
-ãASPD1062ãï¼
-
-ã«ã¼ãã«ã®åæåå¦çã®æå¾ï¼ã«ã¼ãã«åä½ãéå§ããç´åï¼ã«ï¼é«åè§£è½ã¿
-ã¤ãã®ç¾å¨ã®ã«ã¦ã³ãå¤ãèª­ã¿åºãï¼ãã®å¤ã§ï¼æå¾ã«ç¾å¨æå»ãç®åºããæ
-ç¹ã§ã®ã«ã¦ã³ãå¤ãåæåãããASPD1063ãï¼æå¾ã«ï¼åè¿°ã®æ¹æ³ã§ï¼é«åè§£
-è½ã¿ã¤ãå²è¾¼ã¿ã®çºçã¿ã¤ãã³ã°ãè¨­å®ãããASPD1064ãï¼
-
-âé«åè§£è½ã¿ã¤ãã¢ã¸ã¥ã¼ã«ï¼ã¿ã¼ã²ããä¾å­é¨ï¼ã®ä»æ§
-
-â
-æªå®æ
-
-âãã¬ã¼ãµããªãã£
-
-âASPD1001ã«é¢ããè£è¶³èª¬æ
-
-ASPD1001ï¼ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãï¼ã«ã¼ãã«å
-é¨ã§ã¯32ãããã§æ±ãï¼
-ã¯ï¼ããåããè¨­è¨ã®çµæã§ããï¼å
-·ä½çã«ã¯ï¼å¤é¨ä»æ§ã®å¤ãã®è¦æ±ã«ä¾å­
-ãã¦æ±ºå®ããã¦ãããã¨ã«å ãã¦ï¼ããã«ä¾å­ãã¦ä»ã®å¤ãã®è¨­è¨ãåºã¦ãã¦
-ããï¼ã¤ã¾ãï¼å¤é¨ä»æ§ã¨è¨­è¨ãå¤å¯¾å¤ã«é¢ä¿ãã¦ããä¸­ã§ï¼ASPD1001ããã
-ã«ãªã£ã¦ããï¼
-
-ã¾ãï¼ASPD1001ããå¤é¨ä»æ§ã«å¯¾ããå¶éäºé 
-ãæ½åºããã¦ããã¨ããæå³ã§
-ãï¼ããåããè¨­è¨ã«ãªã£ã¦ããï¼ãã®é¢ä¿ãç´ ç´ã«è¡¨ç¾ããã¨ï¼è¨­è¨ããå¤
-é¨ä»æ§ã«å¯¾ãã¦ãªã³ã¯ããããã¨ã«ãªããï¼ãã®ãããªéé¢ä¿ã¯é¿ããã¹ãã¨
-èããããï¼å¤é¨ä»æ§ããè¨­è¨ã¸ã®ãªã³ã¯ã¨ãã¦è¡¨ç¾ãã¦ããï¼ããã«è©²å½ã
-ããªã³ã¯ã¯ï¼ä¸ã®ãã¬ã¼ãµããªãã£ä¸è¦§ã§"#"ãã¤ãã¦åºå¥ããï¼ã¾ãï¼å¤é¨ä»
-æ§æ¸ã®ä»æ§æ±ºå®ã®çç±ã«ï¼ãããã®å¶éäºé 
-ãï¼å®è£
-ãèæ
-®ãããã®ã§ããæ¨
-ãè¨è¿°ãã¦ããï¼
-
-âè¨­è¨é 
-ç®ã«å¯¾ããä¸ä½è¦æ±ããã®ãã¬ã¼ãµããªãã£
-
-ASPD1001ï¼(a*)				âASPR0006ï¼NGKI0548ï¼NGKI0041ï¼NGKI0042ï¼
-								NGKI0549ï¼NGKI0550#ï¼NGKI0553ï¼NGKI0554ï¼
-								NGKI3608#ï¼NGKI3561#ï¼NGKI3584#ï¼NGKI3588#ï¼
-								NGKI3589ï¼NGKI2372ï¼NGKI2373ï¼ASPS0172ï¼
-								NGKI2365ï¼NGKI2397ï¼NGKI2399
-ASPD1002ï¼(a*)				âASPR0011
-ASPD1003ï¼(b*)(e:ASPD1002)
-ASPD1004ï¼(d)
-ASPD1005ï¼(d)
-ASPD1006ï¼(a*)(e:ASPD1002)	âASPD1003
-ASPD1007ï¼(a*)
-ASPD1008ï¼(a*)				âASPD1001
-ASPD1009ï¼(a*)				âASPD1001
-ASPD1010ï¼(ab*)				âASPD1001
-ASPD1011ï¼(a*)				âASPD1016ï¼ASPD1010
-ASPD1012ï¼(a*)				âNGKI3559ï¼ASPR0011
-ASPD1013ï¼(a*)				âNGKI3559
-ASPD1014ï¼(a*)				âNGKI3559
-ASPD1015ï¼(a*)				âNGKI3559
-ASPD1016ï¼(a*)				âASPD1012
-ASPD1017ï¼(a*)(e:ASPD1002)
-ASPD1018ï¼(a*)
-ASPD1019ï¼(a*)
-ASPD1020ï¼(a*)
-ASPD1021ï¼(d)
-ASPD1022ï¼(a*)
-ASPD1023ï¼æ¬ çª
-ASPD1024ï¼æ¬ çª
-ASPD1025ï¼(a*)
-ASPD1026ï¼(a*)
-ASPD1027ï¼(a*)				âASPD1050
-ASPD1028ï¼æ¬ çª
-ASPD1029ï¼æ¬ çª
-ASPD1030ï¼(a*)
-ASPD1031ï¼(a*)
-ASPD1032ï¼(a*)
-ASPD1033ï¼(a*)
-ASPD1034ï¼(a*)
-ASPD1035ï¼(a*)
-ASPD1036ï¼(a*)
-ASPD1037ï¼(a*)
-ASPD1038ï¼(a*)
-ASPD1039ï¼(a*)
-ASPD1040ï¼(a*)
-ASPD1041ï¼(a*)				âNGKI3591
-ASPD1042ï¼(a*)				âASPD1041
-ASPD1043ï¼(a*)
-ASPD1044ï¼(a*)
-ASPD1045ï¼(a*)
-ASPD1046ï¼(a*)				âASPD1041
-ASPD1047ï¼(a*)
-ASPD1048ï¼(a*)				âASPD1010
-ASPD1049ï¼(a*)				âNGKI0049ï¼NGKI0050
-ASPD1050ï¼(a*)				âASPD1027
-ASPD1051ï¼(a*)
-ASPD1052ï¼(a*)
-ASPD1053ï¼(a*)				âNGKI3586ï¼NGKI3587
-ASPD1054ï¼(a*)
-ASPD1055ï¼(a*)				âASPD1010
-ASPD1056ï¼(a*)
-ASPD1057ï¼(a*)				âNGKI2354ï¼NGKI3591
-ASPD1058ï¼(a*)				âNGKI2354ï¼NGKI3591
-ASPD1059ï¼(a*)				âNGKI3567ï¼NGKI3592
-ASPD1060ï¼(a*)				âNGKI3567ï¼NGKI3592
-ASPD1061ï¼(a*)
-ASPD1062ï¼(a*)
-ASPD1063ï¼(a*)
-ASPD1064ï¼(a*)
-
-ä»¥ä¸
Index: asp3_wo_tecs/trunk/doc/user.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/user.txt	(revision 305)
+++ asp3_wo_tecs/trunk/doc/user.txt	(revision 306)
@@ -3,6 +3,6 @@
 		ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.0
-		æçµæ´æ°: 2016å¹´1æ11æ¥
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1
+		æçµæ´æ°: 2016å¹´5æ13æ¥
 
 ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ãä½¿ç¨ããããã«å¿
@@ -10,4 +10,13 @@
 ãèª¬
 æãããã®ã§ããï¼
+
+ãã®ãã­ã¥ã¡ã³ãã§ã¯ï¼TOPPERSçµè¾¼ã¿ã³ã³ãã¼ãã³ãã·ã¹ãã ï¼TECSï¼ãã·ã¹
+ãã ãµã¼ãã¹ã®æ§ç¯ã«ã®ã¿ç¨ãï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã¯Cè¨èªã«ããè¨
+è¿°ãããã¨ãæ³å®ãã¦ããï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ãå«ãã·ã¹ãã å
+¨ä½
+ãTECSãç¨ãã¦æ§ç¯ããæ¹æ³ã«ã¤ãã¦ã¯ï¼ä»¥ä¸ã®URLã«ããTECSãªãã¡ã¬ã³ã¹ã
+ãã¥ã¢ã«ãåèã«ãããã¨ï¼
+
+	http://dev.toppers.jp/trac_user/tecs/wiki/WikiStart
 
 ----------------------------------------------------------------------
@@ -63,5 +72,5 @@
  ã®è²¬ä»»ãè² ããªãï¼
  
- $Id: user.txt 505 2016-01-12 01:41:01Z ertl-hiro $
+ $Id: user.txt 752 2016-05-14 15:06:22Z ertl-hiro $
 ----------------------------------------------------------------------
 
@@ -82,5 +91,5 @@
 ï¼ï¼ã¯ã¤ãã¯ã¹ã¿ã¼ãã¬ã¤ã
 	3.1 éçºç°å¢ã®æºå
-	3.2 ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®æ§ç¯
+	3.2 TECSã¸ã§ãã¬ã¼ã¿ã®æºå
 	3.3 ãµã³ãã«ãã­ã°ã©ã ã®æ§ç¯ã¨å®è¡
 	3.4 ã«ã¼ãã«ãé¢æ°åä½ã§ã©ã¤ãã©ãªåããæ¹æ³
@@ -92,8 +101,10 @@
 	4.2 ã¿ã¼ã²ããéä¾å­é¨ã®ãã¡ã¤ã«æ§æ
 ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®ä½¿ãæ¹
-ï¼ï¼Makefileã®ä¿®æ­£æ¹æ³
+ï¼ï¼æ¨æºã®Makefileã®ä¿®æ­£æ¹æ³
 	6.1 Makefileã®å¤æ°å®ç¾©
 	6.2 ã³ã³ãã¤ã«ãªãã·ã§ã³
 ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä½¿ãæ¹
+	7.1 ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®èµ·å
+	7.2 ã¿ã¤ããã©ã¤ãã®çµè¾¼ã¿
 ï¼ï¼ã·ã¹ãã ãµã¼ãã¹
 	8.1 ã·ã¹ãã ã­ã°æ©è½
@@ -108,13 +119,18 @@
 		8.1.6 ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«
 		8.1.7 ã·ã¹ãã ã­ã°æ©è½ã®ããã®ã©ã¤ãã©ãªé¢æ°ã¨ãã¯ã­
-		8.1.8 ã·ã¹ãã ã­ã°æ©è½ã®ãã®ä»ã®ãµã¼ãã¹
+		8.1.8 ã·ã¹ãã ã­ã°æ©è½ã®çµè¾¼ã¿ã¨åå¤ã
 	8.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
 		8.2.1 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«
 		8.2.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãã®ä»ã®ãµã¼ãã¹
+		8.2.3 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®çµè¾¼ã¿ã¨åå¤ã
 	8.3 ã·ã¹ãã ã­ã°ã¿ã¹ã¯
-		8.3.1 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ãµã¼ãã¹ã³ã¼ã«
+		8.3.1 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®æ©è½
 		8.3.2 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ãã®ä»ã®ãµã¼ãã¹
+		8.3.3 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®çµè¾¼ã¿ã¨åå¤ã
 	8.4 å®è¡æéåå¸éè¨ãµã¼ãã¹
-	8.5 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºå
+		8.4.1 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®æ¦è¦
+		8.4.2 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ãµã¼ãã¹ã³ã¼ã«
+		8.4.3 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®çµè¾¼ã¿ã¨åå¤ã
+	8.5 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºå
 ï¼ï¼ãµãã¼ãã©ã¤ãã©ãª
 	9.1 åºæ¬çãªã©ã¤ãã©ãªé¢æ°
@@ -123,4 +139,6 @@
 ï¼ï¼ï¼ãã¹ããã­ã°ã©ã 
 	10.1 ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹
+		10.1.1 ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®ãµã¼ãã¹ã³ã¼ã«
+		10.1.2 ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®çµè¾¼ã¿ã¨åå¤ã
 	10.2 ã«ã¼ãã«ã®æ´åæ§æ¤æ»
 	10.3 æ©è½ãã¹ããã­ã°ã©ã 
@@ -128,5 +146,6 @@
 	10.5 æ§è½è©ä¾¡ãã­ã°ã©ã 
 ï¼ï¼ï¼ä½¿ç¨ä¸ã®æ³¨æã¨ãã³ã
-	11.1 ã¿ã¤ããã©ã¤ãã®çµè¾¼ã¿
+	11.1 å®è¡æéã¨å²è¾¼ã¿ç¦æ­¢æéã«é¢ããæ³¨æäºé 
+
 	11.2 assertãã¯ã­ã®å¦ç
 	11.3 ã·ã¹ãã ã­ã°æ©è½ã®æ±ã
@@ -171,14 +190,17 @@
 ã®ä»æ§ã®è©³ç´°ã«ã¤ãã¦ã¯ï¼å¥éPDFãã¡ã¤ã«ã®å½¢ã§é
 å¸ãã¦ãããTOPPERSç¬¬3ä¸
-ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼çµ±åä»æ§æ¸ï¼Release 3.B.0ï¼ããåç
+ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼çµ±åä»æ§æ¸ï¼Release 3.1.0ï¼ããåç
 §ãããã¨ï¼
 
+ã«ã¼ãã«ä»æ§ã®ä¸­ã§ï¼ã¿ã¼ã²ããå®ç¾©äºé 
+ã«ã¤ãã¦ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ãã£
+ã¬ã¯ããªã«ããã¿ã¼ã²ããä¾å­é¨ã®ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ãåç
+§ãããã¨ï¼
+
 1.3 ãã¤ã°ã¬ã¼ã·ã§ã³ã¬ã¤ã
 
-å¾æ¥ã®TOPPERSã«ã¼ãã«ãä»ã®Î¼ITRON4.0ä»æ§æºæ ã®ã«ã¼ãã«ããï¼TOPPERSç¬¬
-3ä¸ä»£ã«ã¼ãã«ã«ç§»è¡ããããã®æ¹æ³ï¼ã¾ãã¯ãã³ãï¼ãèª¬æãããTOPPERSç¬¬
-3ä¸ä»£ã«ã¼ãã«ã¸ã®ãã¤ã°ã¬ã¼ã·ã§ã³ã¬ã¤ãããï¼å¥éPDFãã¡ã¤ã«ã®å½¢ã§é
-å¸
-ãã¦ããï¼å¿
+å¾æ¥ã®TOPPERSã«ã¼ãã«ãä»ã®Î¼ITRON4.0ä»æ§æºæ ã®ã«ã¼ãã«ããï¼ASP3ã«ã¼ã
+ã«ã«ç§»è¡ããããã®æ¹æ³ï¼ã¾ãã¯ãã³ãï¼ãèª¬æãããTOPPERS/ASP3ã«ã¼ãã«
+ã¸ã®ãã¤ã°ã¬ã¼ã·ã§ã³ã¬ã¤ãããç¨æãã¦ããï¼å¿
 è¦ã«å¿ãã¦åç
 §ãããã¨ï¼
@@ -204,5 +226,5 @@
 é ­çªå°
 ï¼ATT_TERã®terrtnï¼ããã­ã°ã©ã ã®éå§çªå°ã¨ãã¦æ­£ãããªãå ´åã®ã¨ã©ã¼ã¯ï¼
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ãã£ã¦æ¤åºãããªãå ´åãããï¼ã¿ã¼ã²ããã«ä¾å­ï¼ï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ãã£ã¦æ¤åºãããªãå ´åãããï¼ã¿ã¼ã²ããã«ãä¾å­ï¼ï¼
 
 kernel_cfg.cï¼ããã³cfg1_out.cï¼ã¯ï¼ã«ã¼ãã«ï¼ã·ã¹ãã ãµã¼ãã¹ï¼ã¢ããª
@@ -219,7 +241,6 @@
 ããã¦ããå ´åã«ï¼ãã®ä¸­ã«å«ã¾ããCè¨èªããªãã­ã»ããµã®ã¤ã³ã¯ã«ã¼ããã£
 ã¬ã¯ãã£ãï¼#includeï¼ã§ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ç½®ããã¦ãã
-ãã£ã¬ã¯ããªãï¼ãã¡ã¤ã«ãæ¤ç´¢ãããã¹ã«ã¯ãããªãã¨ããåé¡ãããï¼ä¾
-ãã°ï¼syssvc/syslog.cfgã«ã#include "syslog.h"ãã¨è¨è¿°ã§ããªãã®ã¯ï¼ã
-ã®åé¡ãããããã§ããï¼
+ãã£ã¬ã¯ããªãï¼ãã¡ã¤ã«ãæ¤ç´¢ãããã¹ã«å
+¥ããªãã¨ããåé¡ãããï¼
 
 ç¾æç¹ã§ã¯ï¼ã¢ãã¬ã¹ã64ãããã®ç°å¢ã«ã¯å¯¾å¿ãã¦ããªãï¼64ãããã¢ãã¬
@@ -328,10 +349,12 @@
 
 	ãã¹ãã·ã¹ãã ç¨ã®ãã¼ã«
-		perl		åä½ç¢ºèªï¼5.10.0
 		GNU Make	åä½ç¢ºèªï¼3.81
-
-	TOPPERSæ°ä¸ä»£ã«ã¼ãã«ç¨ã³ã³ãã£ã®ã¥ã¬ã¼ã¿
-		cfg			åä½ç¢ºèªï¼1.9.4
-					â» 1.5ä»¥åã®ãã¼ã¸ã§ã³ã§ã¯åä½ããªãï¼
+		ruby		åä½ç¢ºèªï¼2.0.0
+
+	TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«åã Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿
+		cfg			åä½ç¢ºèªï¼1.2.1
+
+	TOPPERSçµè¾¼ã¿ã³ã³ãã¼ãã³ãã·ã¹ãã ï¼TECSï¼ã¸ã§ãã¬ã¼ã¿
+		tecsgen		åä½ç¢ºèªï¼1.3.1.7
 
 	ã¿ã¼ã²ããã·ã¹ãã ç¨ã®ãã¼ã«ï¼ã¯ã­ã¹éçºç°å¢ï¼
@@ -341,4 +364,12 @@
 		æ¨æºCã©ã¤ãã©ãªï¼å¿
 é ã§ã¯ãªãï¼
+
+ASP3ã«ã¼ãã«ã§ã¯ï¼æå­ã³ã¼ããUTF-8ã«çµ±ä¸ãã¦ãããï¼Windowsç°å¢ã§ruby
+ãç¨ããã¨ï¼ããã©ã«ãã®æå­ã³ã¼ããWindows-31Jã«ãªãï¼ã¨ã©ã¼ã¨ãªãå ´å
+ãããï¼ãã®ãããªç°å¢ã§ã¯ï¼rubyã®èµ·åæãªãã·ã§ã³ã«ã-Eutf-8ããæå®ã
+ãå¿
+è¦ãããï¼ããå
+·ä½çã«ã¯ï¼ãset RUBYOPT=-Eutf-8ãã«ããï¼rubyã®ããã©
+ã«ãã®ãªãã·ã§ã³ãæå®ããæ¹æ³ãæ¨å¥¨ããï¼
 
 ã¿ã¼ã²ããã·ã¹ãã ç¨ã®ãã¼ã«ã«GNUéçºç°å¢ãç¨ããå ´åã«ã¯ï¼ä»¥ä¸ã®ãã¼ã«
@@ -366,64 +397,42 @@
 ä»¥ä¸ã§ã¯ï¼ãããã®ãã¼ã«ãç¨æã§ãã¦ãããã¨ãåæã«ï¼UNIXãã·ã³ä¸ã§ã®
 æ§ç¯æé ãèª¬æããï¼ã¾ãä»¥ä¸ã®èª¬æã§ã¯ï¼makeã³ãã³ããGNU Makeã§ããã
-ã®ã¨ããï¼ASP3ã«ã¼ãã«ã®ãµã³ãã«ã®Makefileã¯ï¼GNU Makeã®æ¡å¼µæ©è½ãç¨ã
-ã¦ããï¼ï¼
-
-3.2 ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®æ§ç¯
-
-ã«ã¼ãã«ãæ§ç¯ããåã«ï¼ã¾ãï¼TOPPERSæ°ä¸ä»£ã«ã¼ãã«ç¨ã³ã³ãã£ã®ã¥ã¬ã¼ã¿
-ãæ§ç¯ããå¿
-è¦ãããï¼ç°¡æããã±ã¼ã¸ã«å«ã¾ãã¦ããå ´åãªã©ï¼ã³ã³ãã£ã®ã¥
-ã¬ã¼ã¿ãå®è¡ãã¡ã¤ã«å½¢å¼ã§å
-¥æããå ´åã«ã¯ï¼ãã®ã¹ãããã¯å¿
+ã®ã¨ããï¼ASP3ã«ã¼ãã«ã®æ¨æºã®Makefileã¯ï¼GNU Makeã®æ¡å¼µæ©è½ãç¨ãã¦ã
+ãï¼ï¼
+
+ãªãï¼TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«åã Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼ASP3ã«ã¼ã
+ã«ã®ããã±ã¼ã¸ã«å«ã¾ãã¦ããããï¼ç¹å¥ãªæºåã¯å¿
 è¦ãªãï¼
 
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®æ§ç¯ã«ã¯ï¼ä»¥ä¸ã®ãã¼ã«ãå¿
-è¦ã§ããï¼
-
-	ãã¹ãã·ã¹ãã ç¨ã®ãã¼ã«ï¼ã»ã«ãéçºç°å¢ï¼
-		C++ã³ã³ãã¤ã©ï¼C++ã©ã¤ãã©ãª
-					åä½ç¢ºèªï¼Mac OS Xç°å¢ï¼ï¼GNU C++ 4.2.1
-		Boost		åä½ç¢ºèªï¼1.52.0
-		GNU Make	åä½ç¢ºèªï¼3.81
-
-æåã«ï¼ããã±ã¼ã¸ã«ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ã½ã¼ã¹ãã¡ã¤ã«ãå«ã¾ãã¦ããªã
-å ´åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ããã±ã¼ã¸ãï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤
-ã«ãå±éãããã£ã¬ã¯ããªã®ä¸ã«å±éããï¼
-
+3.2 TECSã¸ã§ãã¬ã¼ã¿ã®æºå
+
+ã¾ãï¼TOPPERSçµè¾¼ã¿ã³ã³ãã¼ãã³ãã·ã¹ãã ï¼TECSï¼ã®ã¸ã§ãã¬ã¼ã¿ãæºåã
+ãå¿
+è¦ãããï¼TECSã¸ã§ãã¬ã¼ã¿ãï¼ASP3ã«ã¼ãã«ã®ç°¡æããã±ã¼ã¸ã«å«ã¾ã
+ã¦ããå ´åã«ã¯ï¼ãã®ã¹ãããã¯çç¥ãããã¨ãã§ããï¼
+
+TECSã¸ã§ãã¬ã¼ã¿ã¯ï¼TECSã¸ã§ãã¬ã¼ã¿ã®åå¥ããã±ã¼ã¸ã«å«ã¾ãã¦ããï¼
+TECSã¸ã§ãã¬ã¼ã¿ã®åå¥ããã±ã¼ã¸ãä»»æã®å ´æã«å±éãï¼ãã®ä¸ã®tecsgenãã£
+ã¬ã¯ããªãï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãå±éãããã£ã¬ã¯ããªããã·ã³
+ããªãã¯ãªã³ã¯ãã¯ãï¼ã³ãã¼ãã¦ãããï¼ï¼ã¤ã¾ãï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹
+ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªããtecsgen.rbã¸ã®ç¸å¯¾ãã¹ãï¼tecsgen/tecsgen.rb
+ã¨ãªãã°ããï¼ä¸ã®æé ã¯ï¼TECSã¸ã§ãã¬ã¼ã¿ã®ããã±ã¼ã¸ãï¼asp3ã®è¦ªãã£
+ã¬ã¯ããªã«å±éããå ´åã®ä¾ã§ããï¼
+
+	% tar xvfz tecsgen-1.3.1.7.tgz
 	% cd asp3
-	% tar xvfz cfg-1.9.4.tar.gz
-
-ã¾ãã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ããã±ã¼ã¸ãä»ã®ãã£ã¬ã¯ããªã«å±éãï¼ASP3
-ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãå±éãããã£ã¬ã¯ããªããã·ã³ããªãã¯ãªã³ã¯ã
-ã¯ã£ã¦ãããï¼
-
-ã½ã¼ã¹ãã¡ã¤ã«ãå±éã§ããã¨ï¼cfgãã£ã¬ã¯ããªã«ç§»åãï¼ã³ã³ãã£ã®ã¥ã¬ã¼
-ã·ã§ã³ã¹ã¯ãªããï¼configureï¼ã§Makefileã®ç°å¢ä¾å­é¨ï¼Makefile.configï¼
-ãçæããå¾ï¼makeã³ãã³ãã«ããã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼cfgãã­ã°ã©ã ï¼ãæ§
-ç¯ã§ããï¼
-
-	% cd cfg
-	% ./configure --without-xml
-	% make depend
-	% make
-
-ãã ãï¼Boostãã¤ã³ã¹ãã¼ã«ãããã£ã¬ã¯ããªããã³åç§°ãæ¨æºã§æ³å®ãã¦ã
-ããã®ã¨ã¯éãå ´åã«ã¯ï¼configureã®--with-headersããã³--with-librariesãª
-ãã·ã§ã³ã«ããï¼ããããã¡ã¤ã«ããã³ã©ã¤ãã©ãªã®ç½®ããããã£ã¬ã¯ããªã
-æå®ããå¿
-è¦ãããï¼--without-xmlã¯ï¼AUTOSAR XMLãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿æ©è½
-ï¼ASP3ã«ã¼ãã«ç¨ã«ã¯å¿
-è¦ãªãï¼ãåãè¾¼ã¾ãªããã¨ãæå®ãããªãã·ã§ã³ã§
-ããï¼AUTOSAR XMLãã¡ã¤ã«ã®èª­ã¿è¾¼ã¿æ©è½ãåãè¾¼ãã«ã¯ï¼Xerces-C++ XML
-Parserãå¿
-è¦ã«ãªãï¼ï¼
-
-ã¾ãï¼ãã¹ãã·ã¹ãã ã«ãã£ã¦ã¯ï¼æé©åã¬ãã«ãä¸ããã¨æ­£ããã³ã³ãã¤ã«
-ã§ããªããã¨ãç¥ããã¦ããï¼ãã®ãããªå ´åã«ã¯ï¼æé©åã¬ãã«ãä¸ãããï¼
-æé©åãææ­¢ããããã«ï¼Makefileãä¿®æ­£ããå¿
-è¦ãããï¼
-
-ãªãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä½¿ç¨æ¹æ³ã«ã¤ãã¦ã¯ï¼ãï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿
-ã®ä½¿ãæ¹ãã®ç« ã§èª¬æããï¼
+	% ln -s ../tecsgen/tecsgen .
+	% file tecsgen/tecsgen.rb
+	tecsgen/tecsgen.rb: a ruby script text executable
+
+ä»¥ä¸ã§èª¬æããæ¨æºã®æé ã§ã¯ï¼TECSã¸ã§ãã¬ã¼ã¿ãRubyã¹ã¯ãªããï¼ãã­ã¹
+ããã¡ã¤ã«å½¢å¼ï¼ã®ã¾ã¾å®è¡ãããï¼Windowsç°å¢ã§ã¯ï¼Exerbãç¨ãã¦å®è¡å½¢
+å¼ãã¡ã¤ã«ã«å¤æãã¦å®è¡ããæ¹æ³ãããï¼
+
+TECSã¸ã§ãã¬ã¼ã¿ãä¸è¨ä»¥å¤ã®å ´æã«ç½®ããå ´åãï¼Windowså®è¡å½¢å¼ã®TECSã¸ã§
+ãã¬ã¼ã¿ãç¨ããå ´åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®-Gãªãã·ã§
+ã³ã§ï¼TECSã¸ã§ãã¬ã¼ã¿ã®ãã¹åãæå®ããã°ããï¼
+
+ãªãï¼TECSã¸ã§ãã¬ã¼ã¿ã®ãã¼ã¸ã§ã³ãç¢ºèªãããå ´åã«ã¯ï¼tecsgenã
+--versionãªãã·ã§ã³ãã¤ãã¦å®è¡ããã°ããï¼
 
 3.3 ãµã³ãã«ãã­ã°ã©ã ã®æ§ç¯ã¨å®è¡
@@ -437,10 +446,10 @@
 ã¯ããªã®ä¸ã®OBJã¨ããåç§°ã®ãã£ã¬ã¯ããªã«ããå ´åã«ã¯ï¼æ¬¡ã®ã³ãã³ããå®
 è¡ããï¼ãã£ã¬ã¯ããªã®å ´æã¨åç§°ã¯ä»»æã«æ±ºãã¦ããï¼ãã ãï¼å ´æãå¤ã
-ãå ´åã«ã¯ï¼configureã®ç¸å¯¾ãã¹ãå¤æ´ãå¿
+ãå ´åã«ã¯ï¼configure.rbã®ç¸å¯¾ãã¹ãå¤æ´ãå¿
 è¦ã§ããï¼ä»¥ä¸åæ§ï¼ï¼
 
 	% mkdir OBJ
 	% cd OBJ
-	% perl ../configure -T <ã¿ã¼ã²ããç¥ç§°>
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°>
 
 ããã§ï¼<ã¿ã¼ã²ããç¥ç§°>ã¯ï¼targetãã£ã¬ã¯ããªã®ä¸ã«ç½®ããã¦ããã¿ã¼ã²ã
@@ -454,6 +463,6 @@
 ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®å®è¡å¾ï¼å¿
 è¦ã§ããã°Makefileãä¿®æ­£ã
-ãï¼Makefileã®ä¿®æ­£æ¹æ³ã«ã¤ãã¦ã¯ï¼ãï¼ï¼Makefileã®ä¿®æ­£æ¹æ³ãã®ç« ã§èª¬æ
-ããï¼
+ãï¼Makefileã®ä¿®æ­£æ¹æ³ã«ã¤ãã¦ã¯ï¼ãï¼ï¼æ¨æºã®Makefileã®ä¿®æ­£æ¹æ³ãã®ç« 
+ã§èª¬æããï¼
 
 ãã®å¾ï¼makeã³ãã³ãã«ãããµã³ãã«ãã­ã°ã©ã ã®ã­ã¼ãã¢ã¸ã¥ã¼ã«ï¼aspã¾ã
@@ -463,7 +472,8 @@
 
 ããã§æ§ç¯ãããµã³ãã«ãã­ã°ã©ã ï¼sampleãã£ã¬ã¯ããªã®sample1.hï¼
-sample1.cï¼sample1.cfgï¼ã¯ï¼ASP3ã«ã¼ãã«ã®åºæ¬çãªåä½ãç¢ºèªããããã®
-ãã®ã§ããï¼ãã®ãã­ã°ã©ã ã®æ¦è¦èª¬æã¯ï¼sample1.cã®å
-é ­ã®ã³ã¡ã³ãã«ããï¼
+sample1.cï¼sample1.cfgï¼sample1.cdlï¼ã¯ï¼ASP3ã«ã¼ãã«ã®åºæ¬çãªåä½ãç¢º
+èªããããã®ãã®ã§ããï¼ãã®ãã­ã°ã©ã ã®æ¦è¦èª¬æã¯ï¼sample1.cã®å
+é ­ã®ã³
+ã¡ã³ãã«ããï¼
 
 3.4 ã«ã¼ãã«ãé¢æ°åä½ã§ã©ã¤ãã©ãªåããæ¹æ³
@@ -482,5 +492,5 @@
 	% mkdir OBJ
 	% cd OBJ
-	% perl ../configure -T <ã¿ã¼ã²ããç¥ç§°> -f
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°> -f
 	% make
 
@@ -502,5 +512,5 @@
 	% mkdir KERNEL_LIB
 	% cd KERNEL_LIB
-	% perl ../configure -T <ã¿ã¼ã²ããç¥ç§°> -f
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°> -f
 	% make libkernel.a
 
@@ -516,5 +526,5 @@
 	% mkdir APL
 	% cd APL
-	% perl ../configure -T <ã¿ã¼ã²ããç¥ç§°> -L ../KERNEL_LIB
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°> -L ../KERNEL_LIB
 	% make
 
@@ -537,5 +547,5 @@
 	% mkdir OBJ
 	% cd OBJ
-	% perl ../configure -T <ã¿ã¼ã²ããç¥ç§°> -L ../OBJ
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°> -L ../OBJ
 	% make libkernel.a
 	% make cleankernel
@@ -559,4 +569,5 @@
 	include/		ã¢ããªã±ã¼ã·ã§ã³åãããããã¡ã¤ã«
 	kernel/			ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«
+	tecs_kernel/	TECSããã«ã¼ãã«ãå¼ã³åºãããã®ã½ã¼ã¹ãã¡ã¤ã«
 	syssvc/			ã·ã¹ãã ãµã¼ãã¹ã®ããããã¡ã¤ã«ï¼ã½ã¼ã¹ãã¡ã¤ã«
 	library/		ãµãã¼ãã©ã¤ãã©ãªã®ã½ã¼ã¹ãã¡ã¤ã«
@@ -566,4 +577,6 @@
 		gcc/		GCCéçºç°å¢ä¾å­é¨
 		logtrace/	ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ã
+	cfg/			ã³ã³ãã£ã®ã¥ã¬ã¼ã¿
+		doc/		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã­ã¥ã¡ã³ã
 	utils/			ã¦ã¼ãã£ãªãã£ãã­ã°ã©ã 
 	sample/			ãµã³ãã«ãã­ã°ã©ã ã¨Makefile
@@ -577,160 +590,214 @@
 
 	README.txt			TOPPERS/ASP3ã«ã¼ãã«ã®ç°¡åãªç´¹ä»
-	configure			ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼GNUéçºç°å¢ç¨ï¼
+	configure.rb		ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼GNUéçºç°å¢ç¨ï¼
 	MANIFEST			åå¥ããã±ã¼ã¸ã®ãã¡ã¤ã«ãªã¹ã
 
-	doc/
-		user.txt			ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
-		asp_spec.txt		TOPPERS/ASP3ã«ã¼ãã«ã®ä»æ§æ¦è¦
-		extension.txt		æ©è½æ¡å¼µã»ãã¥ã¼ãã³ã°ã¬ã¤ã
-		porting.txt			ã¿ã¼ã²ããä¾å­é¨ ãã¼ãã£ã³ã°ã¬ã¤ã
-		configurator.txt	ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ä»æ§
-		design.txt			è¨­è¨ã¡ã¢
-		version.txt			å¤æ´å±¥æ­´
-
-	include/
-		kernel.h		ASP3ã«ã¼ãã«ãä½¿ç¨ããããã®å®ç¾©
-		sil.h			ã·ã¹ãã ã¤ã³ã¿ãã§ã¼ã¹ã¬ã¤ã¤ãä½¿ç¨ããããã®å®ç¾©
-		t_stddef.h		TOPPERSå
+  doc/
+	user.txt			ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+	asp_spec.txt		TOPPERS/ASP3ã«ã¼ãã«ã®ä»æ§æ¦è¦
+	migration.txt		TOPPERS/ASP3ã«ã¼ãã«ã¸ã®ãã¤ã°ã¬ã¼ã·ã§ã³ã¬ã¤ã
+	extension.txt		æ©è½æ¡å¼µã»ãã¥ã¼ãã³ã°ã¬ã¤ã
+	porting.txt			ã¿ã¼ã²ããä¾å­é¨ ãã¼ãã£ã³ã°ã¬ã¤ã
+	configurator.txt	ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ä»æ§
+	design.txt			è¨­è¨ã¡ã¢
+	version.txt			å¤æ´å±¥æ­´
+
+  include/
+	kernel.h		ASP3ã«ã¼ãã«ãä½¿ç¨ããããã®å®ç¾©
+	sil.h			ã·ã¹ãã ã¤ã³ã¿ãã§ã¼ã¹ã¬ã¤ã¤ãä½¿ç¨ããããã®å®ç¾©
+	t_stddef.h		TOPPERSå
 ±éããããã¡ã¤ã«
-		itron.h			ITRONä»æ§å
+	itron.h			ITRONä»æ§å
 ±éè¦å®ã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­
-		t_syslog.h		ã·ã¹ãã ã­ã°åºåãè¡ãããã®å®ç¾©
-		t_stdlib.h		åºæ¬çãªã©ã¤ãã©ãªé¢æ°ãä½¿ç¨ããããã®å®ç¾©
-		queue.h			ã­ã¥ã¼æä½ã©ã¤ãã©ãªãä½¿ç¨ããããã®å®ç¾©
-		log_output.h	ã·ã¹ãã ã­ã°ã®ãã©ã¼ãããåºåãä½¿ç¨ããããã®å®ç¾©
-
-	kernel/
-		Makefile.kernel		ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
-		kernel_impl.h		ã«ã¼ãã«å®è£
+	t_syslog.h		ã·ã¹ãã ã­ã°åºåãè¡ãããã®å®ç¾©
+	t_stdlib.h		åºæ¬çãªã©ã¤ãã©ãªé¢æ°ãä½¿ç¨ããããã®å®ç¾©
+	queue.h			ã­ã¥ã¼æä½ã©ã¤ãã©ãªãä½¿ç¨ããããã®å®ç¾©
+	log_output.h	ã·ã¹ãã ã­ã°ã®ãã©ã¼ãããåºåãä½¿ç¨ããããã®å®ç¾©
+
+  kernel/
+	Makefile.kernel		ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+	kernel_impl.h		ã«ã¼ãã«å®è£
 ç¨æ¨æºããããã¡ã¤ã«
-		kernel_int.h		kernel_cfg.cç¨ã®ããããã¡ã¤ã«
-		kernel_rename.def	ã«ã¼ãã«ã®å
+	kernel_int.h		kernel_cfg.cç¨ã®ããããã¡ã¤ã«
+	kernel_rename.def	ã«ã¼ãã«ã®å
 é¨è­å¥åã®ãªãã¼ã å®ç¾©
-		kernel_rename.h		ã«ã¼ãã«ã®å
+	kernel_rename.h		ã«ã¼ãã«ã®å
 é¨è­å¥åã®ãªãã¼ã 
-		kernel_unrename.h	ã«ã¼ãã«ã®å
+	kernel_unrename.h	ã«ã¼ãã«ã®å
 é¨è­å¥åã®ãªãã¼ã è§£é¤	
-		kernel_api.csv		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®éçAPIãã¼ãã«
-		kernel_def.csv		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¤åå¾ã·ã³ãã«ãã¼ãã«
-		kernel.tf			ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		kernel_check.tf		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		genoffset.tf		ãªãã»ãããã¡ã¤ã«çæç¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		allfunc.h		ãã¹ã¦ã®é¢æ°ãã³ã³ãã¤ã«ããããã®å®ç¾©
-		check.h			ã¨ã©ã¼ãã§ãã¯ç¨ãã¯ã­
-		startup.c		ã«ã¼ãã«ã®åæåã¨çµäºå¦ç
-		task.h			ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«é¢é£ã®å®ç¾©
-		task.c			ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«
-		task.tf			ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		taskhook.h		ã¿ã¹ã¯ç®¡çã«é¢é£ããããã¯ã«ã¼ãã³é¢é£ã®å®ç¾©
-		taskhook.c		ã¿ã¹ã¯ç®¡çã«é¢é£ããããã¯ã«ã¼ãã³
-		wait.h			å¾
+	kernel_api.def		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®éçAPIãã¼ãã«
+	kernel_sym.def		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¤åå¾ã·ã³ãã«ãã¼ãã«
+	kernel.trb			ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+	kernel_check.trb	ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯ãªãã
+	genoffset.trb		ãªãã»ãããã¡ã¤ã«çæç¨ã®çæã¹ã¯ãªãã
+	allfunc.h			ãã¹ã¦ã®é¢æ°ãã³ã³ãã¤ã«ããããã®å®ç¾©
+	check.h				ã¨ã©ã¼ãã§ãã¯ç¨ãã¯ã­
+	startup.c			ã«ã¼ãã«ã®åæåã¨çµäºå¦ç
+	task.h				ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«é¢é£ã®å®ç¾©
+	task.c				ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«
+	task.trb			ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+	taskhook.h			ã¿ã¹ã¯ç®¡çã«é¢é£ããããã¯ã«ã¼ãã³é¢é£ã®å®ç¾©
+	taskhook.c			ã¿ã¹ã¯ç®¡çã«é¢é£ããããã¯ã«ã¼ãã³
+	wait.h				å¾
 ã¡ç¶æ
 ç®¡çã¢ã¸ã¥ã¼ã«é¢é£ã®å®ç¾©
-		wait.c			å¾
+	wait.c				å¾
 ã¡ç¶æ
 ç®¡çã¢ã¸ã¥ã¼ã«
-		time_event.h	ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«é¢é£ã®å®ç¾©
-		time_event.c	ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«
-		task_manage.c	ã¿ã¹ã¯ç®¡çæ©è½
-		task_refer.c	ã¿ã¹ã¯ã®ç¶æ
+	time_event.h		ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«é¢é£ã®å®ç¾©
+	time_event.c		ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«
+	task_manage.c		ã¿ã¹ã¯ç®¡çæ©è½
+	task_refer.c		ã¿ã¹ã¯ã®ç¶æ
 åç
 §æ©è½
-		task_sync.c		ã¿ã¹ã¯ä»å±åææ©è½
-		task_term.c		ã¿ã¹ã¯çµäºæ©è½
-		semaphore.h		ã»ããã©æ©è½é¢é£ã®å®ç¾©
-		semaphore.c		ã»ããã©æ©è½
-		semaphore.tf	ã»ããã©æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		eventflag.h		ã¤ãã³ããã©ã°æ©è½é¢é£ã®å®ç¾©
-		eventflag.c		ã¤ãã³ããã©ã°æ©è½
-		eventflag.tf	ã¤ãã³ããã©ã°æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		dataqueue.h		ãã¼ã¿ã­ã¥ã¼æ©è½é¢é£ã®å®ç¾©
-		dataqueue.c		ãã¼ã¿ã­ã¥ã¼æ©è½
-		dataqueue.tf	ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		pridataq.h		åªå
+	task_sync.c			ã¿ã¹ã¯ä»å±åææ©è½
+	task_term.c			ã¿ã¹ã¯çµäºæ©è½
+	semaphore.h			ã»ããã©æ©è½é¢é£ã®å®ç¾©
+	semaphore.c			ã»ããã©æ©è½
+	semaphore.trb		ã»ããã©æ©è½ã®çæã¹ã¯ãªãã
+	eventflag.h			ã¤ãã³ããã©ã°æ©è½é¢é£ã®å®ç¾©
+	eventflag.c			ã¤ãã³ããã©ã°æ©è½
+	eventflag.trb		ã¤ãã³ããã©ã°æ©è½ã®çæã¹ã¯ãªãã
+	dataqueue.h			ãã¼ã¿ã­ã¥ã¼æ©è½é¢é£ã®å®ç¾©
+	dataqueue.c			ãã¼ã¿ã­ã¥ã¼æ©è½
+	dataqueue.trb		ãã¼ã¿ã­ã¥ã¼æ©è½ã®çæã¹ã¯ãªãã
+	pridataq.h			åªå
 åº¦ãã¼ã¿ã­ã¥ã¼æ©è½é¢é£ã®å®ç¾©
-		pridataq.c		åªå
+	pridataq.c			åªå
 åº¦ãã¼ã¿ã­ã¥ã¼æ©è½
-		pridataq.tf		åªå
-åº¦ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		mempfix.h		åºå®é·ã¡ã¢ãªãã¼ã«æ©è½é¢é£ã®å®ç¾©
-		mempfix.c		åºå®é·ã¡ã¢ãªãã¼ã«æ©è½
-		mempfix.tf		åºå®é·ã¡ã¢ãªãã¼ã«æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		mutex.h			ãã¥ã¼ããã¯ã¹æ©è½é¢é£ã®å®ç¾©
-		mutex.c			ãã¥ã¼ããã¯ã¹æ©è½
-		mutex.tf		ãã¥ã¼ããã¯ã¹æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		time_manage.c	ã·ã¹ãã æå»ç®¡çæ©è½
-		cyclic.h		å¨æéç¥æ©è½é¢é£ã®å®ç¾©
-		cyclic.c		å¨æéç¥æ©è½
-		cyclic.tf		å¨æéç¥æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		alarm.h			ã¢ã©ã¼ã éç¥æ©è½é¢é£ã®å®ç¾©
-		alarm.c			ã¢ã©ã¼ã éç¥æ©è½
-		alarm.tf		ã¢ã©ã¼ã éç¥æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		sys_manage.c	ã·ã¹ãã ç¶æ
+	pridataq.trb		åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æ©è½ã®çæã¹ã¯ãªãã
+	mutex.h				ãã¥ã¼ããã¯ã¹æ©è½é¢é£ã®å®ç¾©
+	mutex.c				ãã¥ã¼ããã¯ã¹æ©è½
+	mutex.trb			ãã¥ã¼ããã¯ã¹æ©è½ã®çæã¹ã¯ãªãã
+	mempfix.h			åºå®é·ã¡ã¢ãªãã¼ã«æ©è½é¢é£ã®å®ç¾©
+	mempfix.c			åºå®é·ã¡ã¢ãªãã¼ã«æ©è½
+	mempfix.trb			åºå®é·ã¡ã¢ãªãã¼ã«æ©è½ã®çæã¹ã¯ãªãã
+	time_manage.c		ã·ã¹ãã æå»ç®¡çæ©è½
+	cyclic.h			å¨æéç¥æ©è½é¢é£ã®å®ç¾©
+	cyclic.c			å¨æéç¥æ©è½
+	cyclic.trb			å¨æéç¥æ©è½ã®çæã¹ã¯ãªãã
+	alarm.h				ã¢ã©ã¼ã éç¥æ©è½é¢é£ã®å®ç¾©
+	alarm.c				ã¢ã©ã¼ã éç¥æ©è½
+	alarm.trb			ã¢ã©ã¼ã éç¥æ©è½ã®çæã¹ã¯ãªãã
+	sys_manage.c		ã·ã¹ãã ç¶æ
 ç®¡çæ©è½
-		interrupt.h		å²è¾¼ã¿ç®¡çæ©è½é¢é£ã®å®ç¾©
-		interrupt.c		å²è¾¼ã¿ç®¡çæ©è½
-		interrupt.tf	å²è¾¼ã¿ç®¡çæ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-		exception.h		CPUä¾å¤ç®¡çæ©è½é¢é£ã®å®ç¾©
-		exception.c		CPUä¾å¤ç®¡çæ©è½
-		exception.tf	CPUä¾å¤ç®¡çæ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-
-	syssvc/
-		banner.h		ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã®ããã®å®ç¾©
-		banner.c		ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºå
-		banner.cfg		ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã®ã³ã³ãã£ã®ã¥ã¬ã¼
-						ã·ã§ã³ãã¡ã¤ã«
-		histogram.h		å®è¡æéåå¸éè¨ãµã¼ãã¹ãä½¿ç¨ããããã®å®ç¾©
-		histogram.c		å®è¡æéåå¸éè¨ãµã¼ãã¹
-		logtask.h		ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãä½¿ç¨ããããã®å®ç¾©
-		logtask.c		ã·ã¹ãã ã­ã°ã¿ã¹ã¯
-		logtask.cfg		ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
-		serial.h		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããä½¿ç¨ããããã®å®ç¾©
-		serial.c		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
-		serial.cfg		ã·ãªã¢ã«ãã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
-		syslog.h		ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ããããã®å®ç¾©
-		syslog.c		ã·ã¹ãã ã­ã°æ©è½
-		syslog.cfg		ã·ã¹ãã ã­ã°æ©è½ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
-		test_svc.h		ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ãä½¿ç¨ããããã®å®ç¾©
-		test_svc.c		ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹
-
-	library/
-		log_output.c	ã·ã¹ãã ã­ã°ã®ãã©ã¼ãããåºå
-		strerror.c		ã¨ã©ã¼ã¡ãã»ã¼ã¸æå­åãè¿ãé¢æ°
-		t_perror.c		ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®åºå
-		vasyslog.c		å¯å¤æ°å¼æ°ã®ã·ã¹ãã ã­ã°ã©ã¤ãã©ãª
-
-	arch/gcc/
-		tool_stddef.h	t_stddef.hã®éçºç°å¢ä¾å­é¨ï¼GCCç¨ï¼
-
-	arch/logtrace/
-		trace_config.h	ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
-		trace_config.c	ãã¬ã¼ã¹ã­ã°æ©è½
-		trace_config.cfg ãã¬ã¼ã¹ã­ã°æ©è½ãçµã¿è¾¼ãããã®ã³ã³ãã£ã®ã¥
-						ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
-		trace_dump.c	ãã¬ã¼ã¹ã­ã°ã®ãã³ã
-
-	utils/
-		applyrename		ãã¡ã¤ã«ã«ãªãã¼ã ãé©ç¨
-		genrename		ãªãã¼ã ããããã¡ã¤ã«ã®çæ
-		gentest			ãã¹ããã­ã°ã©ã ã®çæ
-		makerelease		é
+	interrupt.h			å²è¾¼ã¿ç®¡çæ©è½é¢é£ã®å®ç¾©
+	interrupt.c			å²è¾¼ã¿ç®¡çæ©è½
+	interrupt.trb		å²è¾¼ã¿ç®¡çæ©è½ã®çæã¹ã¯ãªãã
+	exception.h			CPUä¾å¤ç®¡çæ©è½é¢é£ã®å®ç¾©
+	exception.c			CPUä¾å¤ç®¡çæ©è½
+	exception.trb		CPUä¾å¤ç®¡çæ©è½ã®çæã¹ã¯ãªãã
+
+  tecs_kernel/
+	kernel.cdl						ã«ã¼ãã«ãªãã¸ã§ã¯ãã®ã³ã³ãã¼ãã³ã
+									è¨è¿°ãã¡ã¤ã«
+	tecs_kernel.h					ã«ã¼ãã«ãªãã¸ã§ã¯ãã®ã³ã³ãã¼ãã³ã
+									åã®ããã®ããããã¡ã¤ã«
+	init_tecs.c						TECSã®åæåå¦ç
+	tKernel_inline.h				ã«ã¼ãã«æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tTask.c							ã¿ã¹ã¯æä½
+	tTask_inline.h					ã¿ã¹ã¯æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tSemaphore_inline.h				ã»ããã©æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tEventflag_inline.h				ã¤ãã³ããã©ã°æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tDataqueue_inline.h				ãã¼ã¿ã­ã¥ã¼æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tPriorityDataqueue_inline.h		åªå
+åº¦ãã¼ã¿ã­ã¥ã¼æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tFixedSizeMemoryPool_inline.h	åºå®é·ã¡ã¢ãªãã¼ã«æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tMutex_inline.h					ãã¥ã¼ããã¯ã¹æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tCyclicNotifier.c				å¨æéç¥æä½
+	tCyclicNotifier_inline.h		å¨æéç¥æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tAlarmNotifier.c				ã¢ã©ã¼ã éç¥æä½
+	tAlarmNotifier_inline.h			ã¢ã©ã¼ã éç¥æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tInterruptRequest_inline.h		å²è¾¼ã¿è¦æ±ã©ã¤ã³æä½ã®ã¤ã³ã©ã¤ã³é¢æ°
+	tISR.c							å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³æä½
+	tInterruptHandler.c				å²è¾¼ã¿ãã³ãã©æä½
+	tCpuExceptionHandler.c			CPUä¾å¤ç®¡çæä½
+	tInitializeRoutine.c			åæåã«ã¼ãã³æä½
+	tTerminateRoutine.c				çµäºå¦çã«ã¼ãã³æä½
+
+  syssvc/
+	syslog.h				ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ããããã®å®ç¾©
+	tSysLog.cdl				ã·ã¹ãã ã­ã°æ©è½ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+	tSysLog.c				ã·ã¹ãã ã­ã°æ©è½
+	tSysLogAdapter.cdl		ã·ã¹ãã ã­ã°æ©è½ã®ã¢ããã¿ã®ã³ã³ãã¼ãã³ãè¨
+							è¿°ãã¡ã¤ã«
+	tSysLogAdapter.c		ã·ã¹ãã ã­ã°æ©è½ã®ã¢ããã¿
+	serial.h				ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããä½¿ç¨ãããã
+							ã®å®ç¾©
+	tSerialPort.cdl			ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã³ã³ãã¼ãã³
+							ãè¨è¿°ãã¡ã¤ã«
+	tSerialPortMain.c		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®æ¬ä½
+	tSerialAdapter.cdl		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¢ããã¿ã®ã³
+							ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+	tSerialAdapter.c		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¢ããã¿
+	tLogTask.cdl			ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+	tLogTaskMain.c			ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®æ¬ä½
+	test_svc.h				ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ãä½¿ç¨ããããã®å®ç¾©
+	tTestService.cdl		ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®ã³ã³ãã¼ãã³ãè¨
+							è¿°ãã¡ã¤ã«
+	tTestService.c			ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹
+	histogram.h				å®è¡æéåå¸éè¨ãµã¼ãã¹ãä½¿ç¨ããããã®å®ç¾©
+	tHistogram.cdl			å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã³ã³ãã¼ãã³ãè¨è¿°
+							ãã¡ã¤ã«
+	tHistogram.h			å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ããããã¡ã¤ã«
+	tHistogram.c			å®è¡æéåå¸éè¨ãµã¼ãã¹
+	tHistogramAdapter.cdl	å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã¢ããã¿ã®ã³ã³ãã¼
+							ãã³ãè¨è¿°ãã¡ã¤ã«
+	tHistogramAdapter.c		å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã¢ããã¿
+	tBanner.cdl				ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã®ã³ã³ãã¼ãã³ãè¨
+							è¿°ãã¡ã¤ã«
+	tBannerMain.c			ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã®æ¬ä½
+
+  library/
+	log_output.c		ã·ã¹ãã ã­ã°ã®ãã©ã¼ãããåºå
+	strerror.c			ã¨ã©ã¼ã¡ãã»ã¼ã¸æå­åãè¿ãé¢æ°
+	t_perror.c			ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®åºå
+	vasyslog.c			å¯å¤æ°å¼æ°ã®ã·ã¹ãã ã­ã°ã©ã¤ãã©ãª
+
+  arch/gcc/
+	tool_stddef.h		t_stddef.hã®éçºç°å¢ä¾å­é¨ï¼GCCç¨ï¼
+
+  arch/tracelog/
+	trace_log.h			ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+	tTraceLog.cdl		ãã¬ã¼ã¹ã­ã°æ©è½ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+	tTraceLog.c			ãã¬ã¼ã¹ã­ã°æ©è½
+
+  cfg/
+	MANIFEST			åå¥ããã±ã¼ã¸ã®ãã¡ã¤ã«ãªã¹ã
+	cfg.rb				ã³ã³ãã£ã®ã¥ã¬ã¼ã¿æ¬ä½
+	pass1.rb			ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹1ã®å¦ç
+	pass2.rb			ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®å¦ç
+	GenFile.rb			GenFileã¯ã©ã¹ã®å®ç¾©
+	SRecord.rb			SRecordã¯ã©ã¹ã®å®ç¾©
+
+  cfg/doc/
+	cfg_user.txt		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+
+  utils/
+	applyrename.rb		ãã¡ã¤ã«ã«ãªãã¼ã ãé©ç¨
+	genrename.rb		ãªãã¼ã ããããã¡ã¤ã«ã®çæ
+	gentest.rb			ãã¹ããã­ã°ã©ã ã®çæ
+	makerelease.rb		é
 å¸ããã±ã¼ã¸ã®çæ
-		move-if-change	å
-å®¹ã«æ´æ°ããã£ãå ´åã®ãã¡ã¤ã«ã®ç½®æ
-
-	sample/
-		Makefile		ãµã³ãã«ã®Makefileï¼GNUéçºç°å¢ç¨ï¼
-		sample1.h		ãµã³ãã«ãã­ã°ã©ã (1)ã«é¢ããå®ç¾©
-		sample1.c		ãµã³ãã«ãã­ã°ã©ã (1)
-		sample1.cfg		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+
+  sample/
+	Makefile			æ¨æºã®Makefileï¼GNUéçºç°å¢ç¨ï¼ã®ãã³ãã¬ã¼ã
+	sample1.h			ãµã³ãã«ãã­ã°ã©ã (1)ã«é¢ããå®ç¾©
+	sample1.c			ãµã³ãã«ãã­ã°ã©ã (1)
+	sample1.cfg			ãµã³ãã«ãã­ã°ã©ã (1)ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+	sample1.cdl			ãµã³ãã«ãã­ã°ã©ã (1)ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+	tSample2.h			ãµã³ãã«ãã­ã°ã©ã (2)ã«é¢ããå®ç¾©
+	tSample2.c			ãµã³ãã«ãã­ã°ã©ã (2)
+	tSample2.cfg		ãµã³ãã«ãã­ã°ã©ã (2)ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+	tSample2.cdl		ãµã³ãã«ãã­ã°ã©ã (2)ã®ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
 
 
 ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®ä½¿ãæ¹
 
-ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼configureï¼ã¯ï¼ASP3ã«ã¼ãã«ããã³ã¢ã
-ãªã±ã¼ã·ã§ã³ãã­ã°ã©ã ãæ§ç¯ããããã«å¿
-è¦ãªåºæ¬çãªã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
-ã³ãè¡ãããã®ãã­ã°ã©ã ã§ããï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼configure.rbï¼ã¯ï¼ASP3ã«ã¼ãã«ããã³
+ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ãæ§ç¯ããããã«å¿
+è¦ãªåºæ¬çãªã³ã³ãã£ã®ã¥ã¬ã¼
+ã·ã§ã³ãè¡ãããã®ãã­ã°ã©ã ã§ããï¼
 
 ASP3ã«ã¼ãã«ãç¨ãã¦ã¢ããªã±ã¼ã·ã§ã³ãä½æããå ´åã«ã¯ï¼ã¾ããªãã¸ã§ã¯
@@ -750,6 +817,6 @@
 		åãæå®ããï¼çç¥ããå ´åã«ã¯ï¼sampleãã£ã¬ã¯ããªï¼ASP3ã«ã¼ã
 		ã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãç½®ãããã£ã¬ã¯ããªã®ä¸ã®"sample"ï¼ã¨ãªãï¼
-		""ã§å²ããã¨ã«ãã£ã¦ï¼è¤æ°ã®ãã£ã¬ã¯ããªãæå®ãããã¨ãå¯è½ã§
-		ããï¼
+		ãã®ãªãã·ã§ã³ãè¤æ°è¨è¿°ãããï¼""ã§å²ããã¨ã«ãã£ã¦ï¼è¤æ°ã®ãã£
+		ã¬ã¯ããªãæå®ãããã¨ãå¯è½ã§ããï¼
 
 	-A <ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã å>
@@ -778,10 +845,11 @@
 		ãªã±ã¼ã·ã§ã³ãã­ã°ã©ã åã«".o"ãä»å ãããã®ï¼ä»¥å¤ã«ï¼ãªã³ã¯ã
 		ã¹ããªãã¸ã§ã¯ããã¡ã¤ã«ã®åç§°ãï¼".o"ãä»å ããå½¢ã§æå®ããï¼
-		""ã§å²ããã¨ã«ãã£ã¦ï¼è¤æ°ã®ãã¡ã¤ã«ãæå®ãããã¨ãå¯è½ã§ããï¼
+		ãã®ãªãã·ã§ã³ãè¤æ°è¨è¿°ãããï¼""ã§å²ããã¨ã«ãã£ã¦ï¼è¤æ°ã®ãã¡
+		ã¤ã«ãæå®ãããã¨ãå¯è½ã§ããï¼
 
 	-S <ãªãã¸ã§ã¯ããã¡ã¤ã«å>
 		ã·ã¹ãã ãµã¼ãã¹ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ã®åç§°ãï¼".o"ãä»å ãã
-		å½¢ã§æå®ããï¼""ã§å²ããã¨ã«ãã£ã¦ï¼è¤æ°ã®ãã¡ã¤ã«ãæå®ããã
-		ã¨ãå¯è½ã§ããï¼
+		å½¢ã§æå®ããï¼ãã®ãªãã·ã§ã³ãè¤æ°è¨è¿°ãããï¼""ã§å²ããã¨ã«ãã£
+		ã¦ï¼è¤æ°ã®ãã¡ã¤ã«ãæå®ãããã¨ãå¯è½ã§ããï¼
 
 	-L <ã«ã¼ãã«ã©ã¤ãã©ãªã®ãã£ã¬ã¯ããªå>
@@ -802,5 +870,5 @@
 	-D <ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã£ã¬ã¯ããªå>
 		ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãç½®ãããã£ã¬ã¯ããªåãæå®ããï¼
-		çç¥ããå ´åã«ã¯ï¼configureã®ç½®ããã¦ãããã£ã¬ã¯ããªã¨ãªãï¼
+		çç¥ããå ´åã«ã¯ï¼configure.rbã®ç½®ããã¦ãããã£ã¬ã¯ããªã¨ãªãï¼
 
 	-l <ãã­ã°ã©ãã³ã°è¨èª>
@@ -829,11 +897,10 @@
 		ã³ãã¤ã©ç­ï¼ãçµ¶å¯¾ãã¹ã§æå®ããå ´åã«ç¨ããï¼
 
-	-p <perlã®ãã¹å>
-		perlã®ãã¹åãæå®ããï¼çç¥ããå ´åã«ã¯ï¼åã«"perl"ã¨ãªãï¼
+	-R <rubyã®ãã¹å>
+		rubyã®ãã¹åãæå®ããï¼çç¥ããå ´åã«ã¯ï¼åã«"ruby"ã¨ãªãï¼
 
 	-g <ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹å>
 		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼cfgï¼ã®ãã¹åãæå®ããï¼çç¥ããå ´åã«ã¯ï¼
-		ããã©ã«ãã®ãã¹åï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã£ã¬ã¯ããªã®ä¸ã®
-		cfg/cfg/cfgï¼ã¨ãªãï¼
+		"ruby $(SRCDIR)/cfg/cfg.rb"ã¨ãªãï¼
 
 	-G <TECSã¸ã§ãã¬ã¼ã¿ã®ãã¹å>
@@ -841,26 +908,27 @@
 		ã¯ï¼"ruby $(SRCDIR)/tecsgen/tecsgen.rb"ã¨ãªãï¼
 
-	-P <ãã­ã»ããµæ°>
-		ãã«ããã­ã»ããµå¯¾å¿ã«ã¼ãã«ã®å ´åã«ï¼ãã­ã»ããµãæå®ããï¼
-
 	-o <ãªãã·ã§ã³æå­å>
 		ã³ã³ãã¤ã©ã«ä¸ãããªãã·ã§ã³æå­åã§ï¼ã·ã³ãã«å®ç¾©ä»¥å¤ã®ãã®ï¼
-		ã·ã³ãã«å®ç¾©ã®ãªãã·ã§ã³ã¯ï¼-Oãªãã·ã§ã³ãä½¿ç¨ããï¼ãªãã·ã§ã³
-		æå­åã«ã¹ãã¼ã¹ãå«ã¾ããå ´åã«ã¯ï¼"-O2 -Wall"ã®ããã«ï¼""ã§å²
-		ãã§è¨è¿°ããå¿
+		ã·ã³ãã«å®ç¾©ã®ãªãã·ã§ã³ã¯ï¼-Oãªãã·ã§ã³ã§æå®ããï¼ãªãã·ã§ã³
+		æå­åã«ã¹ãã¼ã¹ãå«ã¾ããå ´åã«ã¯ï¼ãã®ãªãã·ã§ã³ãè¤æ°è¨è¿°ã
+		ããï¼"-O2 -Wall"ã®ããã«ï¼""ã§å²ãã§è¨è¿°ããå¿
 è¦ãããï¼
 
 	-O <ãªãã·ã§ã³æå­å>
 		ã³ã³ãã¤ã©ã«ä¸ããã·ã³ãã«å®ç¾©ã®ããã®ãªãã·ã§ã³æå­åï¼ãªãã·ã§
-		ã³æå­åã«ã¹ãã¼ã¹ãå«ã¾ããå ´åã«ã¯ï¼"-DTEST -DPERF"ã®ããã«ï¼
-		""ã§å²ãã§è¨è¿°ããå¿
+		ã³æå­åã«ã¹ãã¼ã¹ãå«ã¾ããå ´åã«ã¯ï¼ãã®ãªãã·ã§ã³ãè¤æ°è¨è¿°
+		ãããï¼"-DTEST -DPERF"ã®ããã«ï¼""ã§å²ãã§è¨è¿°ããå¿
 è¦ãããï¼
 
 	-k <ãªãã·ã§ã³æå­å>
 		ãªã³ã«ã«ä¸ãããªãã·ã§ã³æå­åï¼ãªãã·ã§ã³æå­åã«ã¹ãã¼ã¹ãå«
-		ã¾ããå ´åã«ã¯ï¼""ã§å²ãã§è¨è¿°ããå¿
+		ã¾ããå ´åã«ã¯ï¼ãã®ãªãã·ã§ã³ãè¤æ°è¨è¿°ãããï¼""ã§å²ãã§è¨è¿°
+		ããå¿
 è¦ãããï¼
 
-ãªãï¼åä¸ã®ãªãã·ã§ã³ãè¤æ°æå®ãã¦ã¯ãªããªãï¼
+ã¾ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã«å¯¾ãããã©ã¡ã¼ã¿ã«ããï¼è¿½å ã®
+å®ç¾©ãè¡ããã¨ãã§ããï¼ä¾ãã°ï¼ãã«ããã­ã»ããµå¯¾å¿ã«ã¼ãã«ã§ãã­ã»ã
+ãµæ°ãæå®ããå ´åã«ã¯ï¼ãPRC_NUM=<ãã­ã»ããµæ°>ãããã©ã¡ã¼ã¿ã«æå®ã
+ãï¼
 
 ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªãããè¡ãå¦çã¯æ¬¡ã®éãã§ããï¼
@@ -883,5 +951,5 @@
 
 
-ï¼ï¼Makefileã®ä¿®æ­£æ¹æ³
+ï¼ï¼æ¨æºã®Makefileã®ä¿®æ­£æ¹æ³
 
 åã®ç« ã§èª¬æããããã«ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã«ä¸ãããªãã·ã§
@@ -942,6 +1010,6 @@
 APPL_ASMOBJSï¼APPL_COBJSï¼APPL_CXXOBJSã«åæããï¼ãã®å
 ï¼APPL_COBJSã
-APPL_CXXOBJSã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®-Aãªãã·ã§ã³ã§è¨­å®ã
-ãï¼-Uãªãã·ã§ã³ã§è¿½å è¨­å®ãããã¨ãã§ããï¼
+APPL_CXXOBJSã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®-Aãªãã·ã§ã³ã§è¨­å®ãï¼
+-Uãªãã·ã§ã³ã§è¿½å è¨­å®ãããã¨ãã§ããï¼
 
 (E) ã¢ããªã±ã¼ã·ã§ã³ã®ã³ã³ãã¤ã«ãªãã·ã§ã³
@@ -975,10 +1043,11 @@
 (I) ã¿ã¼ã²ãããã¡ã¤ã«ã®å®ç¾©
 
-ã¿ã¼ã²ãã"all"ã®ä¾å­ãã¡ã¤ã«ã¨ãã¦ï¼ã­ã¼ãã¢ã¸ã¥ã¼ã«ã®å½¢å¼ãæå®ããï¼
-å
-·ä½çã«ã¯ï¼ELFå½¢å¼ã®æã¯$(OBJFILE)ï¼ãã¤ããªå½¢å¼ã®æã¯$(OBJNAME).binï¼
-ã¢ãã­ã¼ã© Så½¢å¼ã®æã¯$(OBJNAME).srecãæå®ããï¼$(OBJFILE)ã¯ï¼OBJEXTã
-å®ç¾©ããå ´åã«ã¯$(OBJNAME).$(OBJEXT)ï¼ããã§ãªãå ´åã«ã¯$(OBJNAME)ã¨ãª
-ãï¼
+make allã«ããï¼ELFå½¢å¼ä»¥å¤ã®ã­ã¼ãã¢ã¸ã¥ã¼ã«ãä½ãããå ´åã«ã¯ï¼ä½ãã
+ãã­ã¼ãã¢ã¸ã¥ã¼ã«ã®å½¢å¼ãï¼allã«å¯¾ãã$(MAKE)ã³ãã³ãã®ãã©ã¡ã¼ã¿ã¾ã
+ã¯ä¾å­é¢ä¿ã«è¿½å æå®ããï¼å
+·ä½çã«ã¯ï¼ãã¤ããªå½¢å¼ã®æã¯$(OBJNAME).binï¼
+ã¢ãã­ã¼ã© Så½¢å¼ã®æã¯$(OBJNAME).srecãè¿½å æå®ããï¼ãªãï¼$(OBJFILE)ã¯ï¼
+OBJEXTãå®ç¾©ããå ´åã«ã¯$(OBJNAME).$(OBJEXT)ï¼ããã§ãªãå ´åã«ã¯
+$(OBJNAME)ã¨ãªãï¼
 
 6.2 ã³ã³ãã¤ã«ãªãã·ã§ã³
@@ -988,4 +1057,10 @@
 ãã«ã®ãããã°ãçµäºããã°ï¼-DNDEBUGãæå®ãã¦ã³ã³ãã¤ã«ããæ¹ãå¹çã
 ãããªãï¼
+
+ASP3ã«ã¼ãã«ã¯ï¼æ¨æºCã©ã¤ãã©ãªãä½¿ç¨ããã«è¨è¿°ãã¦ãããï¼ã¢ããªã±ã¼ã·ã§
+ã³ã§æ¨æºCã©ã¤ãã©ãªãä½¿ç¨ããå ´åã«ã¯ï¼ã«ã¼ãã«ãæ¨æºCã©ã¤ãã©ãªãä½¿ã£
+ãæ¹ãå¹çãè¯ãå ´åãããï¼ã«ã¼ãã«ãæ¨æºCã©ã¤ãã©ãªãä½¿ã£ã¦ããå ´åã«
+ã¯ï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ã«-DTOPPERS_USE_STDLIBãæå®ããï¼å¹æãããã
+ã©ããã¯ã¿ã¼ã²ããä¾å­ï¼ï¼
 
 ã¿ã¼ã²ããä¾å­é¨ã«ããã¦ï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ã«-Werrorï¼è­¦åãã¨ã©ã¼æ±
@@ -1001,42 +1076,52 @@
 ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä½¿ãæ¹
 
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼cfgï¼ã¯ï¼TOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ï¼ITRONç³»ï¼çµ±åä»æ§
-æ¸ã®2.12.5ç¯ã®è¨è¿°ã®éãï¼3ã¤ã®ãã¹ã§æ§æãããï¼
-
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«åããã©ã¡ã¼
-ã¿ã«åãï¼ä»¥ä¸ã®ãªãã·ã§ã³ãæã¤ï¼éè¦ãªãã®ã®ã¿ï¼ï¼
-
-	--help
-		ãªãã·ã§ã³ã®ãªã¹ãã¨èª¬æãè¡¨ç¤ºããï¼
-
-	-vï¼»--versionï¼½
-		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¼ã¸ã§ã³ãè¡¨ç¤ºããï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ï¼cfgï¼ã«ããå¦çã¯ï¼ãTOPPERSç¬¬3ä¸ä»£ã«ã¼ãã«ï¼ITRON
+ç³»ï¼çµ±åä»æ§æ¸ãã®ã2.12.5 ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å¦çã¢ãã«ãã®ç¯ã®è¨è¿°ã®
+éãï¼3ã¤ã®ãã¹ã§æ§æãããï¼
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä½¿ãæ¹ã«ã¤ãã¦ï¼æ¨æºã®Makefileãä½¿ç¨ãã¦ããå ´åã«
+ã¯ã»ã¨ãã©ç¥ãå¿
+è¦ããªãï¼ãã®ç« ã§ã¯ï¼æ¨æºã®Makefileãä¿®æ­£ããå ´åãç¬
+èªã®Makefileãç¨ããå ´åã®ããã«ï¼ASP3ã«ã¼ãã«ãä½¿ç¨ããä¸ã§å¿
+è¦ã¨ãªã
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä½¿ãæ¹ã«ã¤ãã¦èª¬æããï¼
+
+ãªãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä½¿ç¨æ¹æ³ã«é¢ããè©³ç´°ã¯ï¼ãTOPPERSç¬¬3ä¸ä»£ã«ã¼
+ãã«åã Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ããåç
+§ãããã¨ï¼
+
+7.1 ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®èµ·å
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«åï¼ãã¹1ã§
+ã®ã¿æå¹ï¼ããã©ã¡ã¼ã¿ã«åãï¼ä»¥ä¸ã®ãªãã·ã§ã³ãæã¤ï¼ä¸»ãªãã®ï¼ï¼
 
 	-kï¼»--kernelï¼½<ã«ã¼ãã«å>
-		ã«ã¼ãã«ã®åç§°ãæå®ããï¼ããã©ã«ãã¯aspï¼
+		ã«ã¼ãã«ã®åç§°ãæå®ããï¼ASP3ã«ã¼ãã«ã§ã¯ï¼aspãæå®ããï¼
 
 	-pï¼»--passï¼½<ãã¹çªå·>
 		ãã¹çªå·ãæå®ããï¼1ã3ã®ããããï¼
 
-	-Iï¼»--include-pathï¼½<ã¤ã³ã¯ã«ã¼ããã¹å>
-		INCLUDEãã£ã¬ã¯ãã£ãã«ããã¦ï¼ã¤ã³ã¯ã«ã¼ãããã³ã³ãã£ã®ã¥ã¬ã¼
-		ã·ã§ã³ãã¡ã¤ã«ãæ¢ããã¹åãæå®ããï¼
-
-	-Tï¼»--template-fileï¼½<ãã³ãã¬ã¼ããã¡ã¤ã«å>
-		ãã³ãã¬ã¼ããã¡ã¤ã«ã®åç§°ãæå®ããï¼ãã¹2ã¨ãã¹3ã§æå¹ï¼
+	-Iï¼»--include-directoryï¼½<ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ããªå>
+		INCLUDEãã£ã¬ã¯ãã£ãã«ããã¤ã³ã¯ã«ã¼ãããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
+		ã³ãã¡ã¤ã«ãæ¢ããã£ã¬ã¯ããªåãæå®ããï¼çæã¹ã¯ãªããï¼trbãã¡
+		ã¤ã«ï¼ãæ¢ãå ´åã«ãç¨ããï¼
+
+	-Tï¼»--trb-fileï¼½<çæã¹ã¯ãªããå>
+		çæã¹ã¯ãªããï¼trbãã¡ã¤ã«ï¼ã®åç§°ãæå®ããï¼ãã¹2ã¨ãã¹3ã§æ
+		å¹ï¼
 
 	--api-table <éçAPIãã¼ãã«ãã¡ã¤ã«å>
-		éçAPIãã¼ãã«ã®ãã¡ã¤ã«åãæå®ããï¼
-
-	--cfg1-def-table <å¤åå¾ã·ã³ãã«ãã¼ãã«ãã¡ã¤ã«å>
-		å¤åå¾ã·ã³ãã«ãã¼ãã«ã®ãã¡ã¤ã«åãæå®ããï¼
-
-	-rï¼»--rom-imageï¼½<ã­ã¼ãã¢ã¸ã¥ã¼ã«å>
+		éçAPIãã¼ãã«ã®ãã¡ã¤ã«åãæå®ããï¼ãã¹1ã§ã®ã¿æå¹ï¼
+
+	--symval-table <å¤åå¾ã·ã³ãã«ãã¼ãã«ãã¡ã¤ã«å>
+		å¤åå¾ã·ã³ãã«ãã¼ãã«ã®ãã¡ã¤ã«åãæå®ããï¼ãã¹1ã§ã®ã¿æå¹ï¼
+
+	-rï¼»--rom-imageï¼½<ã­ã¼ãã¢ã¸ã¥ã¼ã«ã®Sã¬ã³ã¼ããã¡ã¤ã«å>
 		ã­ã¼ãã¢ã¸ã¥ã¼ã«ãSã¬ã³ã¼ããã©ã¼ãããã®å½¢ã«å¤æãããã¡ã¤ã«ã®
-		åç§°ãæå®ããï¼ãã¹3ã§ã®ã¿æå¹ï¼
-
-	-s [--symbol-table] <ã·ã³ãã«ãã¡ã¤ã«å>
+		åç§°ãæå®ããï¼ãã¹2ã¨ãã¹3ã§æå¹ï¼
+
+	-s [--rom-symbol] <ã­ã¼ãã¢ã¸ã¥ã¼ã«ã®ã·ã³ãã«ãã¡ã¤ã«å>
 		ã­ã¼ãã¢ã¸ã¥ã¼ã«ä¸­ã®åã·ã³ãã«ã¨ã¢ãã¬ã¹ã®å¯¾å¿è¡¨ãå«ãã·ã³ãã«
-		ãã¡ã¤ã«ã®åç§°ãæå®ããï¼ãã¹3ã§ã®ã¿æå¹ï¼
+		ãã¡ã¤ã«ã®åç§°ãæå®ããï¼ãã¹2ã¨ãã¹3ã§æå¹ï¼
 
 	--id-output-file <IDçªå·åºåãã¡ã¤ã«å>
@@ -1049,35 +1134,109 @@
 		è¾¼ãï¼ãã¹2ã§ã®ã¿æå¹ï¼
 
-	--external-id
-		ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°ã®å®ç¾©ãçæããï¼ãã¹2ã§ã®ã¿
-		æå¹ï¼
-
-	-Mï¼»--print-dependenciesï¼½<ã¿ã¼ã²ããã·ã³ãã«>
-		ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ä¾å­é¢ä¿ãåºåããï¼
-		Makefileä¸­ã®ä¾å­é¢ä¿ãçæããéã«ç¨ããï¼
-
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®è©³ç´°ä»æ§ã«ã¤ãã¦ã¯ï¼å¥éPDFãã¡ã¤ã«ã®å½¢ã§é
-å¸ãã¦ã
-ããTOPPERSæ°ä¸ä»£ã«ã¼ãã«ç¨ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ä»æ§ããåç
-§ãããã¨ï¼
+	-Mï¼»--print-dependenciesï¼½<ä¾å­é¢ä¿ãã¡ã¤ã«å>
+		ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ä¾å­é¢ä¿ãåºåããï¼ã
+		ã¹1ã§ã®ã¿æå¹ï¼GCCã®-Mãªãã·ã§ã³ã¨ç°ãªãï¼-Mãªãã·ã§ã³ãä»ãã
+		å ´åãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯éå¸¸ã®å¦çãè¡ãï¼ä¾å­é¢ä¿ãåºåã
+		ãã ãã¨ããä½¿ãæ¹ã¯ã§ããªãï¼ï¼ä¾å­é¢ä¿ãã¡ã¤ã«åãæå®ããªã
+		å ´åï¼æ¨æºåºåã«åºåããï¼
+
+	-O [--omit-output-db]
+		æ¬¡ã®ãã¹ã«æ
+å ±ãå¼ãæ¸¡ãããã®ãã¼ã¿ãã¡ã¤ã«ãä½æããªãï¼
+
+7.2 ã¿ã¤ããã©ã¤ãã®çµè¾¼ã¿
+
+ã«ã¼ãã«ãå
+é¨çã«ä½¿ç¨ããå²è¾¼ã¿ãã³ãã©ï¼é«åè§£è½ã¿ã¤ããã©ã¤ãã®å²è¾¼
+ã¿ãã³ãã©ãªã©ï¼ãç»é²ããããã«ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹1ã«ï¼ã«ã¼ãã«
+å®è£
+ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼target_kernel.cfgï¼ãèª­ã¿è¾¼ã¾ãã
+å¿
+è¦ãããï¼
 
 
 ï¼ï¼ã·ã¹ãã ãµã¼ãã¹
 
+ASP3ã«ã¼ãã«ã®é
+å¸ããã±ã¼ã¸ã«ã¯ï¼ä»¥ä¸ã®ã·ã¹ãã ãµã¼ãã¹ãå«ã¾ãã¦ããï¼
+
+  ã»ã·ã¹ãã ã­ã°æ©è½
+  ã»ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+	  - ã¿ã¼ã²ããéä¾å­é¨
+	  - ã¿ã¼ã²ããä¾å­é¨
+  ã»ã·ã¹ãã ã­ã°ã¿ã¹ã¯
+  ã»ä½ã¬ãã«åºåï¼ã¿ã¼ã²ããä¾å­é¨ã®ã¿ï¼
+  ã»ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹
+  ã»å®è¡æéåå¸éè¨ãµã¼ãã¹
+  ã»ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºå
+
+ãããã®ã·ã¹ãã ãµã¼ãã¹ã¯ï¼TOPPERSçµè¾¼ã¿ã³ã³ãã¼ãã³ãã·ã¹ãã ï¼TECSï¼
+ãç¨ãã¦å®è£
+ãã¦ããï¼
+
+åèã®ããã«ï¼ã·ã¹ãã ã­ã°æ©è½ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãï¼ã¿ã¼ã²ã
+ãéä¾å­é¨ããã³ã¿ã¼ã²ããä¾å­é¨ï¼ï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ï¼ä½ã¬ãã«åºåã®
+éã®çµåé¢ä¿ãä¸ã®å³ã«ç¤ºãï¼
+
+    +----------------------+       +------------------------+
+    | TECSã¢ããªã±ã¼ã·ã§ã³ |       | éTECSã¢ããªã±ã¼ã·ã§ã³ |
+    +----------------------+       +------------------------+
+        |cSysLog    |cSerialPort              .
+        |           |                         .           ã¢ããªã±ã¼ã·ã§ã³
+  - - - | - - - - - | - - - - - - - - - - - - . - - - - - - - - - - - - -
+        |           +----------------------+  .          ã·ã¹ãã ãµã¼ãã¹
+		|                 . . . . . . . . .|. . . . . .
+        |                 .                |          .
+        |        +----------------+        |  +----------------+ 
+        | cSysLog| tSysLogAdapter |        |  | tSysLogAdapter |
+        +--------|  SysLogAdapter |        |  |  SysLogAdapter |
+        |        +----------------+        |  +----------------+
+        |                                  |          |cSerialPort
+        |        +----------+ cSerialPort  |          | 
+        |        |          |--------------+----------+
+        | cSysLog| tLogTask |                         |
+        +--------|  LogTask |-------------------+     |
+        |        |          |cnSerialPortManage |     |
+        |        +----------+                   |     |
+        |              |cPutLog                 |     |
+        |              |                        |     |
+        |eSysLog       |      enSerialPortManage|     |eSerialPort
+   +----v----+         |                    +---v-----v---+
+   | tSysLog |         |                    | tSerialPort |
+   |  SysLog |         |                    | SerialPort1 |
+   +---------+         |                    +---------^---+
+       |cPutLog        |                cSIOPort|     |eiSIOCBR
+       |               |                        |     | 
+       +-------+-------+                        |     | ã¿ã¼ã²ããéä¾å­é¨
+  - - - - - - -|- - - - - - - - - - - - - - - - | - - | - - - - - - - - -
+               |                                |     |   ã¿ã¼ã²ããä¾å­é¨
+               |                                |     |
+               |ePutLog                 eSIOPort|     |ciSIOCBR
+     +---------v--------+           +-----------v----------------+
+     |   ä½ã¬ãã«åºå   |           |   ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹   |
+     |   PutLogTarget   |           | ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ |
+     +------------------+           |        SIOPortTarget1      |
+                                    +----------------------------+
+
+ä»¥ä¸ã§ã¯ï¼ãããã®ã·ã¹ãã ãµã¼ãã¹ãï¼Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³
+ããä½¿ç¨ããæ¹æ³ã«ã¤ãã¦èª¬æããï¼ãã ãï¼ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã«
+ã¤ãã¦ã¯ï¼ã10.1 ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ãã®ç¯ã§è¿°ã¹ãï¼
+
+ã¾ãï¼ã¿ã¼ã²ããä¾å­ã®ä½ã¬ãã«åºåã¯ï¼ã¢ããªã±ã¼ã·ã§ã³ããç´æ¥å¼ã³åºã
+ãã¨ãæ³å®ãã¦ããªãããï¼ãã®ããã¥ã¢ã«ã§ã¯èª¬æããªãï¼ä½ã¬ãã«åºåã¯ï¼
+ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§ï¼ã¿ã¼ã²ããä¾å­é¨ã®target.cdlãã¤ã³ãã¼ã
+ãããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼
+
 8.1 ã·ã¹ãã ã­ã°æ©è½
 
-ã·ã¹ãã ã­ã°æ©è½ã¯ï¼ã«ã¼ãã«å
-ã§çºçããç°å¸¸äºè±¡ããã¬ã¼ã¹ã­ã°ï¼ã·ã¹ã
-ã ãµã¼ãã¹ãã¢ããªã±ã¼ã·ã§ã³ã§çºçããç°å¸¸äºè±¡ããã¬ã¼ã¹ã­ã°ãï¼ã­ã°æ
-
-å ±ã¨ãã¦è¨é²ããããã®æ©è½ã§ããï¼ã¾ãï¼è¨é²ããã­ã°æ
-å ±ãåãåºãæ©è½
-ãæã¤ï¼
-
-ã·ã¹ãã ã­ã°æ©è½ã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã§syslog.cfg
-ãã¤ã³ã¯ã«ã¼ããããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼ã·ã¹ãã ã­ã°
-åºåãè¡ãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼t_syslog.hãã¤ã³ã¯ã«ã¼ãããï¼ã¾ãï¼ã·ã¹
-ãã ã­ã°æ©è½ã®ãã®ä»ã®ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼
-syslog.hãã¤ã³ã¯ã«ã¼ãããï¼
+ã·ã¹ãã ã­ã°æ©è½ã¯ï¼ã·ã¹ãã å
+ã§çºçããç°å¸¸äºè±¡ç­ãï¼ã­ã°æ
+å ±ã¨ãã¦è¨
+é²ããããã®æ©è½ã§ããï¼ã¾ãï¼è¨é²ããã­ã°æ
+å ±ãåãåºãæ©è½ãæã¤ï¼
+
+ã·ã¹ãã ã­ã°åºåãè¡ãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼t_syslog.hãã¤ã³ã¯ã«ã¼ãããï¼
+ã¾ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ãã®ä»ã®ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«
+ã§ã¯ï¼syslog.hãã¤ã³ã¯ã«ã¼ãããï¼
 
 8.1.1 ã·ã¹ãã ã­ã°æ©è½ã®ä½ç½®ä»ã
@@ -1100,10 +1259,6 @@
 
 ä»¥ä¸ã®ããã«ï¼ã·ã¹ãã ã­ã°æ©è½ã¯ã«ã¼ãã«ããä¸ã®éå±¤ã®ã¢ã¸ã¥ã¼ã«ã§ãã
-ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ä¸­ã§ã­ã°æå»ãåãåºãããã«ï¼ã«ã¼ãã«ã®æ©è½ãå¿
-
-è¦ã¨ããï¼å®è£
-ä¸ã¯ï¼ã«ã¼ãã«ã®å
-é¨å¤æ°ãç´æ¥åç
-§ãã¦ããï¼ãã®ããï¼ã«ã¼
+ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ä¸­ã§ã­ã°æå»ãåãåºãããã«ï¼æ¨æºï¼ã¿ã¼ã²ããä¾
+å­é¨ã§å¤æ´ããªãå ´åï¼ã§ã¯ï¼ã«ã¼ãã«ã®æ©è½ãç¨ãã¦ããï¼ãã®ããï¼ã«ã¼
 ãã«ã®å®è¡éå§åãçµäºå¾ã¯ï¼ã­ã°æå»ã¯æ­£ããè¨é²ãããªãï¼
 
@@ -1125,25 +1280,22 @@
 ã²ããä¾å­ã«ç¨æããä½ã¬ãã«ã®æå­åºåé¢æ°ãç¨ãã¦ã­ã°æ
 å ±ãåºåããæ©
-è½ã§ããï¼ä½ã¬ãã«ã®æå­åºåé¢æ°ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ç¨æãããã¨ã¨ã
-ã¦ãããï¼æçµè£½åã«çµã¿è¾¼ã¾ããå ´åãªã©ã§ã¯ï¼æå­ãåºåããæ¹æ³ããªã
-ç¶æ³ãèããããï¼ãã®ãããªå ´åï¼ä½ã¬ãã«ã®æå­åºåé¢æ°ã«éãããæå­
-ã¯ï¼ã¡ã¢ãªä¸ã«æ®ãã¦ãããï¼æ¨ã¦ã¦ãã¾ããããªãï¼
+è½ã§ããï¼æçµè£½åã«çµã¿è¾¼ãå ´åãªã©ã§ï¼æå­ãåºåããæ¹æ³ããªãå ´åã®
+å¯¾å¿æ¹æ³ã«ã¤ãã¦ã¯ï¼ã11.3 ã·ã¹ãã ã­ã°æ©è½ã®æ±ããã®ç¯ãåç
+§ãããã¨ï¼
 
 ã­ã°æ
 å ±ãï¼ã­ã°ãããã¡ã¸è¨é²ãããä½ã¬ãã«åºåæ©è½ãç¨ãã¦åºåããã
-ã®è¨­å®ã¯ï¼ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«ï¼syslog_msk_logï¼ã«ãã£ã¦è¡
-ããã¨ãã§ããï¼syslog_msk_logã®ä½¿ãæ¹ã«ã¤ãã¦ã¯å¾è¿°ããï¼ããã©ã«ãã§
-ã¯ï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãåä½ãããï¼syslog_msk_logãå¼ã³åºããªãå ´åï¼ï¼
-ãã¹ã¦ã®ã­ã°æ
-å ±ãä½ã¬ãã«åºåæ©è½ãç¨ãã¦åºåãï¼ã­ã°ãããã¡ã«ã¯è¨é²
-ããªãï¼
+ã¯ï¼ã·ã¹ãã ã­ã°æ©è½ã®ã»ã«ã®çµä¸ãè¨è¿°ã§è¨­å®ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼
+ãã¹ã³ã¼ã«ï¼syslog_msk_logï¼ã§ã·ã¹ãã åä½ä¸­ã«å¤æ´ãããã¨ãã§ããï¼ã
+ããã®æ¹æ³ã«ã¤ãã¦ã¯å¾è¿°ããï¼
 
 ä½ã¬ãã«åºåæ©è½ãç¨ããã¨ï¼ã­ã°ã¡ãã»ã¼ã¸ã®ä½æå¦çï¼printfç¸å½ã®å¦çï¼
-ã¨ä½ã¬ãã«ã®æå­åºåå¦çãã«ã¼ãã«å
-ã§è¡ãããã«ï¼ã«ã¼ãã«ã®å¿ç­æ§ãæª
-ããªããã¨ã«æ³¨æããªããã°ãªããªãï¼ç¹ã«ï¼ä½ã¬ãã«ã®æå­åºåå¦çã¯ãã
-ã¤ã¹ããã¼ãªã³ã°ããå½¢ã§å®è£
-ããã®ãéå¸¸ã§ï¼ãã®å ´åã«ã¯ï¼ã«ã¼ãã«ã®å¿
-ç­æ§ã¯å®ç¨çã¨è¨ããªãç¨ã«æªããªãï¼
+ã¨ä½ã¬ãã«ã®æå­åºåå¦çãå
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§è¡ãããã«ï¼å²è¾¼ã¿å¿ç­æ§ã
+æªããªããã¨ã«æ³¨æããªããã°ãªããªãï¼ç¹ã«ï¼ä½ã¬ãã«ã®æå­åºåå¦çã¯ã
+ãã¤ã¹ããã¼ãªã³ã°ããå½¢ã§å®è£
+ããã®ãéå¸¸ã§ï¼ãã®å ´åã«ã¯ï¼å²è¾¼ã¿å¿ç­
+æ§ã¯å®ç¨çã¨è¨ããªãç¨ã«æªããªãï¼
 
 8.1.3 ã­ã°æ
@@ -1161,5 +1313,4 @@
 		LOG_TYPE_OVR		ãªã¼ãã©ã³ãã³ãã©
 		LOG_TYPE_EXC		CPUä¾å¤ãã³ãã©
-		LOG_TYPE_TEX		ã¿ã¹ã¯ä¾å¤å¦çã«ã¼ãã³
 		LOG_TYPE_TSKSTAT	ã¿ã¹ã¯ç¶æ
 å¤å
@@ -1169,6 +1320,5 @@
 ã­ã°æ
 å ±ã®ç¨®å¥ã®ä¸­ã§ï¼LOG_TYPE_COMMENTã¨LOG_TYPE_ASSERTä»¥å¤ã¯ï¼ã«ã¼ãã«
-ã®ãã¬ã¼ã¹ã­ã°ã«ç¨ããããã®ãã®ã§ãããï¼ä½¿ç¨ãããã©ããã¯ã¿ã¼ã²ãã
-ä¾å­é¨ã«ä»»ããã¦ããï¼
+ã®ãã¬ã¼ã¹ã­ã°ã«ç¨ããããã®ãã®ã§ï¼ã·ã¹ãã ã­ã°æ©è½ã§ã¯ç¨ãã¦ããªãï¼
 
 8.1.4 ã­ã°æ
@@ -1200,6 +1350,7 @@
 å ±ãã­ã°ãããã¡ã«è¨é²ãããã¨ï¼ã©ã®éè¦åº¦ã®ã­ã°æ
 å ±
-ãä½ã¬ãã«åºåæ©è½ãç¨ãã¦åºåãããã¯ï¼ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼
-ã«ï¼syslog_msk_logï¼ã«ãã£ã¦è¨­å®ãããã¨ãã§ããï¼
+ãä½ã¬ãã«åºåæ©è½ãç¨ãã¦åºåãããã¯ï¼ã·ã¹ãã ã­ã°æ©è½ã®ã»ã«ã®çµä¸ã
+è¨è¿°ã§è¨­å®ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«ï¼syslog_msk_logï¼ã§ã·ã¹
+ãã åä½ä¸­ã«å¤æ´ãããã¨ãã§ããï¼
 
 8.1.5 ã­ã°æ
@@ -1226,7 +1377,5 @@
 
 ã·ã¹ãã ã­ã°æ©è½ã®æä¾ãããµã¼ãã¹ã³ã¼ã«ã¯æ¬¡ã®éãã§ããï¼ãããã®ãµã¼
-ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼syslog.hãã¤ã³ã¯ã«ã¼ãããå¿
-è¦
-ãããï¼
+ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼syslog.hãã¤ã³ã¯ã«ã¼ãããï¼
 
 (1) ER syslog_wri_log(uint_t prio, const SYSLOG *p_syslog)
@@ -1383,15 +1532,45 @@
 syslog_msk_logã«æ¸¡ãå¼æ°ãä½ãããã«ç¨ããï¼
 
-8.1.8 ã·ã¹ãã ã­ã°æ©è½ã®ãã®ä»ã®ãµã¼ãã¹
-
-ã·ã¹ãã ã­ã°æ©è½ã¯ï¼åè¨ã®ãµã¼ãã¹ã³ã¼ã«ç­ã«å ãã¦ï¼åæåå¦çã®ããã®
-é¢æ°ãæã¤ï¼
-
-(1) void syslog_initialize(intptr_t exinf)
-
-ã·ã¹ãã ã­ã°æ©è½ãåæåããï¼ã­ã°ãããã¡ã«ã­ã°æ
-å ±ãè¨é²ããã¦ããå ´
-åã«ã¯ï¼æ¶å»ãããï¼syslog.cfgã«ãã£ã¦ï¼ã«ã¼ãã«ã«åæåã«ã¼ãã³ã¨ãã¦
-ç»é²ãããï¼exinfã¯ç¡è¦ãããï¼
+8.1.8 ã·ã¹ãã ã­ã°æ©è½ã®çµè¾¼ã¿ã¨åå¤ã
+
+ã·ã¹ãã ã­ã°æ©è½ã¯ï¼ã·ã¹ãã ã­ã°æ©è½ã®æ¬ä½ã¨ï¼ã·ã¹ãã ã­ã°æ©è½ãCè¨èªã§
+è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããå¼ã³åºãããã®ã¢ããã¿ã§æ§æãããï¼
+
+ã·ã¹ãã ã­ã°æ©è½ã®æ¬ä½ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§tSysLog.cdlãã¤ã³
+ãã¼ããï¼ä»¥ä¸ã®ãããªã»ã«ã®çµä¸ãè¨è¿°ãå«ãããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼
+ããã¨ãã§ããï¼sample1.cdlã«ã¯ï¼ãã®è¨è¿°ãå«ã¾ãã¦ããï¼ï¼
+
+----------------------------------------
+cell tSysLog SysLog {
+	logBufferSize = 32;					/* ã­ã°ãããã¡ã®ãµã¤ãº */
+	initLogMask = C_EXP("LOG_UPTO(LOG_NOTICE)");
+										/* ã­ã°ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ */
+	initLowMask = C_EXP("LOG_UPTO(LOG_EMERG)");
+									   	/* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ */
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+----------------------------------------
+
+ãã®è¨è¿°ãå¤æ´ãããã¨ã§ï¼ã·ã¹ãã ã­ã°æ©è½ã®ã­ã°ãããã¡ã®ãµã¤ãºï¼ã­ã°
+ãããã¡ã«è¨é²ãã¹ãéè¦åº¦ã®åæå¤ï¼ä½ã¬ãã«åºåãã¹ãéè¦åº¦ã®åæå¤ã
+å¤æ´ãããã¨ãã§ããï¼
+
+ã·ã¹ãã ã­ã°æ©è½ã®ã¢ããã¿ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§
+tSysLogAdapter.cdlãã¤ã³ãã¼ããï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãå«ãããã¨ã§ï¼
+ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼sample1.cdlã«ã¯ï¼ãã®è¨è¿°ãå«ã¾ãã¦ã
+ãï¼ï¼
+
+----------------------------------------
+cell tSysLogAdapter SysLogAdapter {
+	cSysLog = SysLog.eSysLog;
+};
+----------------------------------------
+
+ã·ã¹ãã ã­ã°æ©è½ãåãå¤ãå ´åã«ã¯ï¼ä¸ã®2ã¤ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ãï¼
+ã³ã³ãã¤ã«ãªãã·ã§ã³ã«-DTOPPERS_OMIT_SYSLOGãè¿½å ããã°ããï¼ãã ãï¼ã·
+ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ããããï¼ãããå¤ããã¨ãå¿
+è¦
+ã§ããï¼
 
 8.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
@@ -1400,22 +1579,16 @@
 ããï¼
 
-ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤
-ã«ã§serial.cfgãã¤ã³ã¯ã«ã¼ããããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼
-ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼serial.hã
-ã¤ã³ã¯ã«ã¼ãããï¼
-
-ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¯ï¼ãã¼ãæ¯ã«ã»ããã©ã2åãã¤ä½¿ç¨ããï¼
-ã»ããã©ãçæããéçAPIã¯ï¼serial.cfgã«å«ã¾ãã¦ããï¼
-
 8.2.1 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«
 
 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããå¼ã³åºããµã¼ãã¹ã³ã¼ã«ã®ä»æ§ã¯æ¬¡ã®éã
 ã§ããï¼ãã®ä¸­ã§ï¼ã·ãªã¢ã«ãã¼ãã®IDçªå·ï¼portidï¼ã®è§£éã¯ã¿ã¼ã²ããä¾
-å­ã¨ãªãï¼
-
-ãããã®ãµã¼ãã¹ã³ã¼ã«ã¯ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãããå¼ã³åºããã¨ã¯ã§ããª
-ãï¼ã¾ãï¼serial_rea_datã¨serial_wri_datã¯ï¼ãã£ã¹ãããä¿çç¶æ
-ã§å¼ã³
-åºããã¨ã¯ã§ããªãï¼ããããï¼å¼ã³åºããå ´åã«ã¯E_CTXã¨ã©ã¼ã¨ãªãï¼
+å­ã¨ãªãï¼ãããã®ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼serial.h
+ãã¤ã³ã¯ã«ã¼ãããï¼
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«ã¯ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ã
+ããå¼ã³åºããã¨ã¯ã§ããªãï¼ã¾ãï¼serial_rea_datã¨serial_wri_datã¯ï¼ãã£
+ã¹ãããä¿çç¶æ
+ã§å¼ã³åºããã¨ã¯ã§ããªãï¼ããããï¼å¼ã³åºããå ´åã«ã¯
+E_CTXã¨ã©ã¼ã¨ãªãï¼
 
 (1) ER serial_opn_por(ID portid)
@@ -1495,19 +1668,58 @@
 8.2.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãã®ä»ã®ãµã¼ãã¹
 
-ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¯ï¼åè¨ã®ãµã¼ãã¹ã³ã¼ã«ã«å ãã¦ï¼åæå
-å¦çã¨æªéä¿¡æå­ã®ååºãå¦çãæã¤ï¼åæåå¦çã¯ï¼ã«ã¼ãã«ã«åæåã«ã¼
-ãã³ã¨ãã¦ç»é²ããï¼ã¾ãï¼ã¿ã¼ã²ããä¾å­ã§ï¼åæåå¦çï¼çµäºå¦çï¼å²è¾¼
-ã¿ãµã¼ãã¹ã«ã¼ãã³ãæã¤ï¼ãããã®ç»é²å¦çã¯serial.cfgã«å«ã¾ããï¼
-
-(1) void serial_initialize(intptr_t exinf)
-
-ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããåæåããï¼ã«ã¼ãã«ã«åæåã«ã¼ãã³ã¨
-ãã¦ç»é²ããï¼exinfã¯ç¡è¦ããï¼
-
-(2) bool_t serial_get_chr(ID portid, char *p_c)
-
-portidã§æå®ãããã·ãªã¢ã«ãã¼ãã®éä¿¡ãããã¡ä¸­ã®æå­ãï¼p_cã®æãçªå°
-ã«åãåºãï¼trueãè¿ãé¢æ°ï¼æå­ããªãã£ãæã«ã¯ï¼falseãè¿ãï¼çµäºå¦ç
-ã«ã¼ãã³ä¸­ã§å¼ã³åºããã¨ãæ³å®ãã¦ããï¼
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¯ï¼åç¯ã®ãµã¼ãã¹ã³ã¼ã«ã«å ãã¦ï¼ã·ã¹ã
+ã ã®çµäºæã«æªéä¿¡ã®æå­ãåãåºãããã®æ©è½ï¼çµäºå¦çã«ã¼ãã³ããå¼ã³
+åºããã¨ãæ³å®ï¼ãæã¤ãï¼Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããå¼ã³åºã
+ãã¨ã¯æ³å®ãã¦ããªãï¼
+
+8.2.3 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®çµè¾¼ã¿ã¨åå¤ã
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¯ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼
+ã²ããéä¾å­é¨ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã¨ï¼ã·
+ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããCè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããå¼ã³
+åºãããã®ã¢ããã¿ã§æ§æãããï¼
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°
+ãã¡ã¤ã«ã§ï¼ã¿ã¼ã²ããä¾å­é¨ã®target.cdlãã¤ã³ãã¼ããããã¨ã§ï¼ã·ã¹ã
+ã ã«çµã¿è¾¼ããã¨ãã§ããï¼
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããéä¾å­é¨ã¯ï¼ã³ã³ãã¼ãã³ãè¨
+è¿°ãã¡ã¤ã«ã§tSerialPort.cdlãã¤ã³ãã¼ããï¼ä»¥ä¸ã®ãããªã»ã«ã®çµä¸ãè¨è¿°
+ãå«ãããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼SIOPortTarget1ã®çµä¸ã
+è¨è¿°ãï¼ã¿ã¼ã²ããä¾å­é¨ã«å«ã¾ãã¦ãããã¨ãæ³å®ï¼ã·ãªã¢ã«ãã¼ãæ¯ã«ï¼
+ã»ã«ã®çµä¸ãè¨è¿°ãå¿
+è¦ï¼sample1.cdlã«ã¯ï¼ãã®è¨è¿°ãå«ã¾ãã¦ããï¼ï¼
+
+----------------------------------------
+cell tSerialPort SerialPort1 {
+	receiveBufferSize = 256;			/* åä¿¡ãããã¡ã®ãµã¤ãº */
+	sendBufferSize    = 256;			/* éä¿¡ãããã¡ã®ãµã¤ãº */
+
+	/* ã¿ã¼ã²ããä¾å­é¨ã¨ã®çµå */
+	cSIOPort = SIOPortTarget1.eSIOPort;
+	eiSIOCBR <= SIOPortTarget1.ciSIOCBR;	/* ã³ã¼ã«ããã¯ */
+};
+----------------------------------------
+
+ãã®è¨è¿°ãå¤æ´ãããã¨ã§ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®åä¿¡ãããã¡
+ã®ãµã¤ãºã¨éä¿¡ãããã¡ã®ãµã¤ãºãå¤æ´ãããã¨ãã§ããï¼ã·ãªã¢ã«ãã¼ãæ¯
+ã«å¥ã
+ã«è¨­å®ãããã¨ãã§ããï¼ï¼
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¢ããã¿ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«
+ã§tSerialAdapter.cdlãã¤ã³ãã¼ããï¼ä»¥ä¸ã®ãããªã»ã«ã®çµä¸ãè¨è¿°ãå«ã
+ããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ã1ãã¼
+ãã®ã¿ãµãã¼ãããå ´åï¼sample1.cdlã«ã¯ï¼ãã®è¨è¿°ãå«ã¾ãã¦ããï¼ï¼
+
+----------------------------------------
+cell tSerialAdapter SerialAdapter {
+	cSerialPort[0] = SerialPort1.eSerialPort;
+};
+----------------------------------------
+
+ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ããåãå¤ãå ´åã«ã¯ï¼ä¸ã®2ã¤ã®ã»ã«ã®çµä¸ã
+è¨è¿°ãåé¤ããã°ããï¼ãã ãï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼
+ã¹ãã©ã¤ããä½¿ç¨ããããï¼ãããå¤ããã¨ãå¿
+è¦ã§ããï¼
 
 8.3 ã·ã¹ãã ã­ã°ã¿ã¹ã¯
@@ -1518,65 +1730,81 @@
 
 ASP3ã«ã¼ãã«ã®é
-å¸ããã±ã¼ã¸ã«å«ã¾ããã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ï¼ã·ãªã¢ã«ãã¼
-ãã«ã­ã°æ
-å ±ãæå­åã®å½¢ã§åºåãããã®ã§ï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ä¸ä¾ã¨ã
-ãä½ç½®ä»ãã§æä¾ãã¦ããï¼
-
-ãã®ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã§
-logtask.cfgãã¤ã³ã¯ã«ã¼ããããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼ã·
-ã¹ãã ã­ã°ã¿ã¹ã¯ã®ãµã¼ãã¹ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼logtask.hãã¤ã³
-ã¯ã«ã¼ãããï¼
-
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãå®è¡éå§ãããã¨ï¼éè¦åº¦ãLOG_EMERGã®ã­ã°æ
-å ±ãä½ã¬
-ãã«åºåæ©è½ãç¨ãã¦åºåãï¼éè¦åº¦ãLOG_NOTICEãããããé«ãã­ã°æ
-å ±ã
-ã­ã°ãããã¡ã«è¨é²ããããã«ï¼ã·ã¹ãã ã­ã°æ©è½ã®è¨­å®ãå¤æ´ãããï¼
-
-8.3.1 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ãµã¼ãã¹ã³ã¼ã«
-
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ãµã¼ãã¹ãå¼ã³åºããµã¼ãã¹ã³ã¼ã«ã®ä»æ§ã¯æ¬¡ã®éãã§
-ããï¼
-
-(1) ER logtask_flush(uint_t count)
-
-ã·ã¹ãã ã­ã°æ©è½ã®ã­ã°ãããã¡ä¸­ã®ã­ã°æ
-å ±ã®æ°ãcountä»¥ä¸ã«ãªãã¾ã§å¾
+å¸ããã±ã¼ã¸ã«å«ã¾ããã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ï¼ã·ãªã¢ã«ã¤
+ã³ã¿ãã§ã¼ã¹ãã©ã¤ããç¨ãã¦ã­ã°æ
+å ±ãæå­åã®å½¢ã§åºåãããã®ã§ï¼ã·ã¹
+ãã ã­ã°ã¿ã¹ã¯ã®ä¸ä¾ã¨ããä½ç½®ä»ãã§æä¾ãã¦ããï¼
+
+8.3.1 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®æ©è½
+
+ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ï¼å®è¡éå§ãããã¨ï¼ã¾ãï¼çµåãããã·ãªã¢ã«ã¤ã³ã¿
+ãã§ã¼ã¹ãã©ã¤ãã®ã·ãªã¢ã«ãã¼ãããªã¼ãã³ããï¼
+
+ãã®å¾ï¼ã·ã¹ãã ã­ã°æ©è½ãç¨ãã¦ã­ã°ãããã¡ããã­ã°æ
+å ±ãåãåºãï¼ã
+ããæå­åã«å¤æãã¦ï¼ã·ãªã¢ã«ãã¼ãã«åºåããï¼ã­ã°ãããã¡ãç©ºã®å ´å
+ã«ã¯ï¼ä¸å®æéï¼ããã©ã«ãã§ã¯1ããªç§ãã»ã«ã®çµä¸ãè¨è¿°ã§å¤æ´å¯è½ï¼å¾
 ã¤ï¼
-countã0ã®å ´åã«ã¯ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®éä¿¡ãããã¡ãç©ºã«
-ãªãã®ãå¾
-ã¤ï¼
+ãããã®å¦çãï¼ã«ã¼ãã«ã®çµäºã¾ã§ç¹°ãè¿ãï¼
+
+ã«ã¼ãã«ã®çµäºå¦çã§ã¯ï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®éä¿¡ãããã¡ã«
+èç©ããããã¼ã¿ã¨ï¼ã­ã°ãããã¡ã«è¨é²ãããã­ã°æ
+å ±ãï¼ä½ã¬ãã«åºåæ©
+è½ãç¨ãã¦åºåããï¼åºåãã¹ãã­ã°æ
+å ±ãããå ´åã«ã¯ï¼ãããåºåããå
+ã«ï¼"-- buffered messages --"ã¨ããæå­åãåºåããï¼
+
+ããã«ããï¼ã«ã¼ãã«çµäºæç¹ã§æªåºåã®ã­ã°æ
+å ±ã®ã»ã¨ãã©ãåºåãããã¨
+ãã§ããï¼ãã ãï¼ã«ã¼ãã«çµäºæç¹ã§ï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãã­ã°ãããã¡
+ããåãåºãããï¼ã¾ã ã·ãªã¢ã«ãã¼ãã«éã£ã¦ããªãã­ã°æ
+å ±ã¯ï¼åºåãã
+ãªãï¼
 
 8.3.2 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ãã®ä»ã®ãµã¼ãã¹
 
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ï¼åè¨ã®ãµã¼ãã¹ã³ã¼ã«ã«å ãã¦ï¼ã¡ã¤ã³å¦çã¨çµäºå¦
-çãæã¤ï¼ã¡ã¤ã³å¦çã¯ã¿ã¹ã¯ã¨ãã¦ï¼çµäºå¦çã¯çµäºå¦çã«ã¼ãã³ã¨ãã¦ç»
-é²ããï¼ãããã®ç»é²å¦çã¯logtask.cfgã«å«ã¾ããï¼
-
-(1) void logtask_main(intptr_t exinf)
-
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¡ã¤ã³å¦çï¼exinfã«ã¯ï¼ã­ã°æ
-å ±ãåºåããã·ãªã¢ã«ãã¼
-ãã®IDçªå·ãæ¸¡ãï¼
-
-(2) void logtask_terminate(intptr_t exinf)
-
-ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®çµäºå¦çï¼ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®éä¿¡ãã
-ãã¡ã«èç©ããããã¼ã¿ã¨ï¼ã­ã°ãããã¡ã«è¨é²ãããã­ã°æ
-å ±ãï¼ä½ã¬ãã«
-åºåæ©è½ãç¨ãã¦åºåããï¼åºåãã¹ãã­ã°æ
-å ±ãããå ´åã«ã¯ï¼ãããåºå
-ããåã«ï¼"-- buffered messages --"ã¨ããæå­åãåºåããï¼exinfã¯ç¡è¦
-ããï¼
-
-ãã®é¢æ°ãçµäºå¦çã«ã¼ãã³ã¨ãã¦ç»é²ãããã¨ã§ï¼ã«ã¼ãã«çµäºæç¹ã§æªåº
-åã®ã­ã°æ
-å ±ã®ã»ã¨ãã©ãåºåãããã¨ãã§ããï¼ãã ãï¼æªåºåã®ã­ã°æ
-å ±
-ã®å
-ï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¡ã¤ã³å¦çãï¼ã­ã°ãããã¡ããåãåºãããï¼
-ã¾ã ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã«éä¿¡ãã¦ããªãæ
-å ±ã¯ï¼ãã®é¢æ°ã§ã¯
-åºåã§ããªãï¼
+ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ï¼åç¯ã®æ©è½ã«å ãã¦ï¼ã·ã¹ãã ã­ã°æ©è½ã®ã­ã°ãããã¡
+ä¸­ã®ã­ã°æ
+å ±ãæå®ããæ°ä»¥ä¸ã«ãªãã¾ã§å¾
+ã¤ï¼æå®ããæ°ã0ã®å ´åã«ã¯ï¼ã·
+ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®éä¿¡ãããã¡ãç©ºã«ãªãã®ãå¾
+ã¤ï¼æ©è½ãæ
+ã¤ãï¼Cè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããå¼ã³åºããã¨ã¯æ³å®ãã¦ããªãï¼
+
+8.3.3 ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®çµè¾¼ã¿ã¨åå¤ã
+
+ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§tLogTask.cdlãã¤ã³ãã¼
+ããï¼ä»¥ä¸ã®ãããªã»ã«ã®çµä¸ãè¨è¿°ãå«ãããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ãã
+ã¨ãã§ããï¼sample1.cdlã«ã¯ï¼ãã®ãããªè¨è¿°ãå«ã¾ãã¦ããï¼ï¼
+
+----------------------------------------
+cell tLogTask LogTask {
+	priority  = 3;					/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åªå
+åº¦ */
+	stackSize = LogTaskStackSize;	/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+	interval = 10000;				/* ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åä½éé */
+	flushWait = 1000;				/* ãã©ãã·ã¥å¾
+ã¡ã®åä½æé */
+
+	/* ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã¨ã®çµå */
+	cSerialPort        = SerialPort1.eSerialPort;
+	cnSerialPortManage = SerialPort1.enSerialPortManage;
+
+	/* ã·ã¹ãã ã­ã°æ©è½ã¨ã®çµå */
+	cSysLog = SysLog.eSysLog;
+
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+----------------------------------------
+
+ãã®è¨è¿°ãå¤æ´ãããã¨ã§ï¼ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã®åªå
+åº¦ï¼ã¹ã¿ãã¯ãµã¤ãºï¼
+åä½ééï¼ã­ã°ãããã¡ãç©ºã®å ´åã«å¾
+ã¤æéï¼ï¼ãã©ãã·ã¥å¾
+ã¡ã®åä½æé
+ãå¤æ´ãããã¨ãã§ããï¼
+
+ã·ã¹ãã ã­ã°ã¿ã¹ã¯ãåãå¤ãå ´åã«ã¯ï¼ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãåé¤ããã°
+ããï¼
 
 8.4 å®è¡æéåå¸éè¨ãµã¼ãã¹
@@ -1586,15 +1814,10 @@
 ã ãµã¼ãã¹ã§ããï¼
 
-å®è¡æéåå¸éè¨ãµã¼ãã¹ãç¨ããå ´åã«ã¯ï¼histogram.hãã¤ã³ã¯ã«ã¼ããï¼
-histogram.cãã³ã³ãã¤ã«ã»ãªã³ã¯ããï¼
+8.4.1 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®æ¦è¦
 
 å®è¡æéåå¸éè¨ãµã¼ãã¹ã¯ï¼è¤æ°ã®ãã­ã°ã©ã åºéã®å®è¡æéãè¨æ¸¬ã»éè¨ã»
 è¡¨ç¤ºãããã¨ãã§ããï¼ãã­ã°ã©ã åºéæ¯ã«ï¼å®è¡æéåå¸ãè¨é²ããããã®
 ãã¼ã¿æ§é ãæã¤ï¼ã©ã®ãã¼ã¿æ§é ãç¨ããããï¼IDçªå·ï¼histidï¼ã§æå®ã
-ãï¼ä½¿ç¨ã§ãããã¼ã¿æ§é ã®æ°ã¯ï¼TNUM_HISTã§å®ç¾©ãããï¼ããªãã¡ï¼IDçªå·
-ã¨ãã¦ï¼1ãTNUM_HISTãæå®ãããã¨ãã§ããï¼TNUM_HISTã¯ï¼ããã©ã«ãå¤ã
-histgram.cã®ä¸­ã§å®ç¾©ããã¦ããï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ãã¿ã¼ã²ããä¾å­é¨
-ï¼target_test.hã¾ãã¯ããããã¤ã³ã¯ã«ã¼ãããããã¡ã¤ã«ï¼ã«ããå¤æ´ãã
-ãã¨ãã§ããï¼
+ãï¼
 
 ã¿ã¼ã²ããä¾å­é¨ã§è¨­å®ãå¤æ´ãã¦ããªãå ´åï¼å®è¡æéåå¸éè¨ãµã¼ãã¹ã¯ï¼
@@ -1609,15 +1832,13 @@
 §ãããã¨ï¼
 
-(1) void init_hist(ID histid, uint_t maxval, uint_t histarea[])
-
-histidã§æå®ããããã¼ã¿æ§é ãåæåããï¼maxvalã«ã¯è¨é²ããæå¤§æéãï¼
-histareaã«ã¯è¨é²é åã®å
-é ­çªå°ãæå®ããï¼histareaã§å§ã¾ãè¨æ¶é åã¯ï¼
-è¦ç´ æ°ãmaxvalã«æå®ããå¤+1ã®uint_tåã®é
-åã¨ãã¦ç¢ºä¿ããï¼ä¾ãã°ï¼
-maxvalã«1000ãæå®ããå ´åã«ã¯ï¼histareaã«ã¯è¦ç´ æ°ã1001ã®uint_tåã®é
-
-åã®å
-é ­çªå°ãæ¸¡ãï¼
+8.4.2 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ãµã¼ãã¹ã³ã¼ã«
+
+å®è¡æéåå¸éè¨ãµã¼ãã¹ãå¼ã³åºããµã¼ãã¹ã³ã¼ã«ã®ä»æ§ã¯æ¬¡ã®éãã§ããï¼
+ãããã®ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼histogram.hãã¤ã³ã¯
+ã«ã¼ãããï¼
+
+(1) void init_hist(ID histid)
+
+histidã§æå®ããããã¼ã¿æ§é ãåæåããï¼
 
 (2) void begin_measure(ID histid)
@@ -1632,24 +1853,59 @@
 åºéã®å®è¡æéãæ±ãï¼ãã®çµæãè¨é²ããï¼
 
-(4) void print_hist(ID histid, void (*flush)(void))
-
-ã·ã¹ãã ã­ã°æ©è½ãç¨ãã¦ï¼å®è¡æéåå¸ã®è¨æ¸¬çµæãåºåããï¼ã­ã°ãããã¡
-ãæº¢ããã®ãé²ãããã«ï¼è¨æ¸¬çµæã®åºåä¸­ããã³åºåå¾ã«ï¼flushã§æå®ãã
-ãé¢æ°ãå¼ã³åºãï¼
-
-8.5 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºå
-
-ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã¯ï¼ã«ã¼ãã«ã®èµ·åæã«ï¼ã«ã¼ãã«ã®åç§°ããã¼
+(4) void print_hist(ID histid)
+
+ã·ã¹ãã ã­ã°æ©è½ãç¨ãã¦ï¼å®è¡æéåå¸ã®è¨æ¸¬çµæãåºåããï¼
+
+8.4.3 å®è¡æéåå¸éè¨ãµã¼ãã¹ã®çµè¾¼ã¿ã¨åå¤ã
+
+å®è¡æéåå¸éè¨ãµã¼ãã¹ã¯ï¼å®è¡æéåå¸éè¨ãµã¼ãã¹ã®æ¬ä½ã¨ï¼å®è¡æé
+åå¸éè¨ãµã¼ãã¹ãCè¨èªã§è¨è¿°ãããã¢ããªã±ã¼ã·ã§ã³ããå¼ã³åºãããã®ã¢
+ããã¿ã§æ§æãããï¼
+
+å®è¡æéåå¸éè¨ãµã¼ãã¹ã®æ¬ä½ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§
+tHistogram.cdlãã¤ã³ãã¼ããï¼ä»¥ä¸ã®ãããªã»ã«ã®çµä¸ãè¨è¿°ãå«ãããã¨
+ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼perf_pf.cdlã«ã¯ï¼ãã®ãããªè¨è¿°ãå«
+ã¾ãã¦ããï¼ï¼ã»ã«ã®çµä¸ãè¨è¿°ã¯ï¼å®è¡æéåå¸ãè¨é²ããããã®ãã¼ã¿æ§
+é æ¯ã«å¿
+è¦ã§ããï¼
+
+----------------------------------------
+cell tHistogram Histogram1 { };
+cell tHistogram Histogram2 { maxTime = 2000 };
+----------------------------------------
+
+ããã§ï¼maxTimeã¯ï¼éè¨ã§ããæå¤§å®è¡æéã§ããï¼ä¸ã®ä¾ã®Histogram1ã®ã
+ãã«maxTimeã®æå®ãçç¥ããå ´åï¼ããã©ã«ãå¤ã¨ãã¦1000ãä½¿ãããï¼
+
+å®è¡æéåå¸éè¨ãµã¼ãã¹ã®ã¢ããã¿ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§
+tHistogramAdapter.cdlãã¤ã³ãã¼ããï¼ä»¥ä¸ã®ãããªã»ã«ã®çµä¸ãè¨è¿°ãå«ã
+ããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼å®è¡æéåå¸ãè¨é²ããããã®
+ãã¼ã¿æ§é ã2ã¤ãµãã¼ãããå ´åï¼perf_pf.cdlã«ã¯ï¼ãã®ãããªè¨è¿°ãå«ã¾
+ãã¦ããï¼ï¼
+
+----------------------------------------
+cell tHistogramAdapter HistogramAdapter {
+	cHistogram[0] = Histogram1.eHistogram;
+	cHistogram[1] = Histogram2.eHistogram;
+};
+----------------------------------------
+
+8.5 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºå
+
+ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã¯ï¼ã«ã¼ãã«ã®èµ·åæã«ï¼ã«ã¼ãã«ã®åç§°ããã¼
 ã¸ã§ã³çªå·ï¼èä½æ¨©è¡¨ç¤ºãªã©ãåºåããããã®æ©è½ã§ããï¼
 
-ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã¯ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
-ã§banner.cfgãã¤ã³ã¯ã«ã¼ããããã¨ã§ï¼ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼
-
-ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã¯ï¼æ¬¡ã®é¢æ°ã§æ§æãããï¼
-
-(1) void print_banner(intptr_t exinf)
-
-ã·ã¹ãã ã­ã°æ©è½ãç¨ãã¦ï¼ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ãåºåããï¼banner.cfg
-ã«ãã£ã¦ï¼ã«ã¼ãã«ã«åæåã«ã¼ãã³ã¨ãã¦ç»é²ãããï¼exinfã¯ç¡è¦ãããï¼
+ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸åºåã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§tBanner.cdlã
+ã¤ã³ãã¼ããï¼ä»¥ä¸ã®ãããªã»ã«ã®çµä¸ãè¨è¿°ãå«ãããã¨ã§ï¼ã·ã¹ãã ã«çµ
+ã¿è¾¼ããã¨ãã§ããï¼BannerTargetNameã¨BannerCopyrightNoticeã®å®ç¾©ãï¼ã¿ã¼
+ã²ããä¾å­é¨ã«å«ã¾ãã¦ãããã¨ãæ³å®ï¼sample1.cdlã«ã¯ï¼ãã®è¨è¿°ãå«ã¾ã
+ã¦ããï¼ï¼
+
+----------------------------------------
+cell tBanner Banner {
+	targetName      = BannerTargetName;
+	copyrightNotice = BannerCopyrightNotice;
+};
+----------------------------------------
 
 
@@ -1777,15 +2033,19 @@
 æ¤åºããå ´åã«ã¯ï¼ãã­ã°ã©ã ãçµäºãããï¼
 
-ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ãç¨ããå ´åã«ã¯ï¼test_svc.hãã¤ã³ã¯ã«ã¼ããï¼
-test_svc.cãã³ã³ãã¤ã«ã»ãªã³ã¯ããï¼
-
-(1) void test_start(char *progname)
+10.1.1 ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®ãµã¼ãã¹ã³ã¼ã«
+
+ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ãå¼ã³åºããµã¼ãã¹ã³ã¼ã«ã®ä»æ§ã¯æ¬¡ã®éãã§ã
+ãï¼ãããã®ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã§ã¯ï¼test_svc.hãã¤
+ã³ã¯ã«ã¼ãããï¼
+
+(1) void test_start(const char *progname)
 
 ãã¹ããã­ã°ã©ã ã®éå§æã«å¼ã³åºãé¢æ°ï¼prognameã«ã¯ï¼ãã¹ããã­ã°ã©ã 
 åãæ¸¡ãï¼
 
-(2) void set_bit_func(BIT_FUNC bit_func)
-
-ãã§ãã¯ãã¤ã³ãã«ããã¦å¼ã³åºãèªå·±è¨ºæ­é¢æ°ãè¨­å®ããããã®é¢æ°ï¼
+(2) void set_bit_func(const void *bit_func)
+
+ãã§ãã¯ãã¤ã³ãã«ããã¦å¼ã³åºãèªå·±è¨ºæ­é¢æ°ãè¨­å®ããããã®é¢æ°ï¼ãã®
+é¢æ°ãå¼ã³åºããªãå ´åï¼ãã§ãã¯ãã¤ã³ãã§èªå·±è¨ºæ­é¢æ°ãå¼ã³åºããªãï¼
 
 (3) void check_point(uint_t count)
@@ -1848,4 +2108,20 @@
 ä½ãã¦ããªãã¨è¦ãªãï¼ãã­ã°ã©ã ãçµäºãããï¼
 
+10.1.2 ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®çµè¾¼ã¿ã¨åå¤ã
+
+ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã§
+tTestService.cdlãã¤ã³ãã¼ããï¼ä»¥ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãå«ãããã¨ã§ï¼
+ã·ã¹ãã ã«çµã¿è¾¼ããã¨ãã§ããï¼test_pf.cdlã¨perf_pf.cdlã«ã¯ï¼ãã®è¨è¿°
+ãå«ã¾ãã¦ããï¼ï¼
+
+----------------------------------------
+cell tTestService TestService {
+	cSysLog = SysLog.eSysLog;
+};
+----------------------------------------
+
+ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ãåãå¤ãå ´åã«ã¯ï¼ä¸ã®ã»ã«ã®çµä¸ãè¨è¿°ãå
+é¤ããã°ããï¼
+
 10.2 ã«ã¼ãã«ã®æ´åæ§æ¤æ»
 
@@ -1881,33 +2157,36 @@
 
 æ©è½ãã¹ããã­ã°ã©ã ã¯ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ãä½¿ç¨ãã¦ããããï¼æ§
-ç¯ããå ´åã«ã¯ï¼Makefileã®SYSSVC_COBJSã«ï¼test_svc.oãè¿½å ããå¿
-è¦ãã
-ãï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªãããä½¿ç¨ããå ´åã«ã¯ï¼-Sãªãã·ã§ã³ã§
-test_svc.oãæå®ããï¼å
-·ä½çã«ã¯ï¼æ¬¡ã®ã³ãã³ããå®è¡ããã°ããï¼æ§ç¯ç¨
-ã®ãã£ã¬ã¯ããªãï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãå±éãããã£ã¬ã¯ããªã®
-ç´ä¸ã«ããã¨ä»®å®ãã¦ããï¼ï¼
-
-	% perl ../configure -T <ã¿ã¼ã²ããç¥ç§°> -A <ãã¹ããã­ã°ã©ã å> \
-											-a ../test -S test_svc.o
+ç¯ããå ´åã«ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã«test_pf.cdlãä½¿ç¨ããå¿
+è¦ã
+ããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªãããä½¿ç¨ããå ´åã«ã¯ï¼-Cãªãã·ã§ã³
+ã§test_pf.cdlãæå®ããï¼å
+·ä½çã«ã¯ï¼æ¬¡ã®ã³ãã³ããå®è¡ããã°ããï¼æ§ç¯
+ç¨ã®ãã£ã¬ã¯ããªãï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãå±éãããã£ã¬ã¯ããª
+ã®ç´ä¸ã«ããã¨ä»®å®ãã¦ããï¼ï¼
+
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°> -a ../test \
+						-A <ãã¹ããã­ã°ã©ã å> -C test_pf.cdl
 
 ãã ãï¼CPUä¾å¤å¦çã®ãã¹ã(1)ã(13)ã¯ï¼åä¸ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼
-ã·ã§ã³ãå
-±ç¨ãã¦ããããï¼test_cpuexc.cfgãæ¬¡ã®ããã«ã³ãã¼ãã¦ããå¿
-è¦
-ãããï¼
-
-	% cp ../test/test_cpuexc.cfg test_cpuexc<ãã¹ãçªå·>.cfg
+ã·ã§ã³ãã¡ã¤ã«ï¼test_cpuexc.cfgï¼ãå
+±ç¨ãã¦ããããï¼-cãªãã·ã§ã³ã§
+test_cpuexc.cfgãæå®ããå¿
+è¦ãããï¼
+
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°> -a ../test \
+						-A <ãã¹ããã­ã°ã©ã å> -C test_pf.cdl \
+						-c test_cpuexc.cfg
 
 ã¾ãï¼ããã¤ãã®ãã¹ããã­ã°ã©ã ã§ã¯ï¼ã«ã¼ãã«ã®æ´åæ§æ¤æ»ãå®æ½ãã¦ã
-ãï¼è©²å½ãããã¹ããã­ã°ã©ã ãæ§ç¯ããå ´åã«ã¯ï¼Makefileã®SYSSVC_COBJS
-ã«ï¼bit_kernel.oã¾ãã¯bit_mutex.oãè¿½å ããå¿
-è¦ãããï¼ã³ã³ãã£ã®ã¥ã¬ã¼
-ã·ã§ã³ã¹ã¯ãªãããä½¿ç¨ããå ´åã«ã¯ï¼-Sãªãã·ã§ã³ã§ãããã®ãã¡ã¤ã«ãæ
-å®ããï¼å
+ãï¼è©²å½ãããã¹ããã­ã°ã©ã ãæ§ç¯ããå ´åã«ã¯ï¼ã·ã¹ãã ãµã¼ãã¹ã®ãªã
+ã¸ã§ã¯ããã¡ã¤ã«åã«ï¼bit_kernel.oã¾ãã¯bit_mutex.oãè¿½å ããå¿
+è¦ãããï¼
+ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªãããä½¿ç¨ããå ´åã«ã¯ï¼-Sãªãã·ã§ã³ã§ãã
+ãã®ãã¡ã¤ã«ãæå®ããï¼å
 ·ä½çã«ã¯ï¼æ¬¡ã®ã³ãã³ããå®è¡ããã°ããï¼
 
-	% perl ../configure -T <ã¿ã¼ã²ããç¥ç§°> -A <ãã¹ããã­ã°ã©ã å> \
-				-a ../test -S "test_svc.o bit_kernel.o bit_mutex.o"
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°> -a ../test \
+						-A <ãã¹ããã­ã°ã©ã å> -C test_pf.cdl \
+						-S "bit_kernel.o bit_mutex.o"
 
 ç¾ãã¼ã¸ã§ã³ã§ç¨æãã¦ããæ©è½ãã¹ããã­ã°ã©ã ã¯æ¬¡ã®éãï¼
@@ -1924,24 +2203,26 @@
 (10) test_cpuexc10			CPUä¾å¤å¦çã®ãã¹ã(10)
 (11) test_dlynse			sil_dly_nseã«é¢ãããã¹ã
-(12) test_hrt1.c			fch_hrtã«é¢ãããã¹ã(1)
-(13) test_mutex1.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(1)
-(14) test_mutex2.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(2)
-(15) test_mutex3.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(3)
-(16) test_mutex4.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(4)
-(17) test_mutex5.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(5)
-(18) test_mutex6.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(6)
-(19) test_mutex7.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(7)
-(20) test_mutex8.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(8)
-(21) test_notify1.c			éç¥å¦çã®ãã¹ã(1)
-(22) test_raster1.c			ã¿ã¹ã¯çµäºè¦æ±æ©è½ã«é¢ãããã¹ã(1)
-(23) test_raster2.c			ã¿ã¹ã¯çµäºè¦æ±æ©è½ã«é¢ãããã¹ã(2)
-(24) test_sem1				ã»ããã©æ©è½ã®ãã¹ã(1)
-(25) test_sem2				ã»ããã©æ©è½ã®ãã¹ã(2)
-(26) test_sysman1			ã·ã¹ãã ç¶æ
+(12) test_flg1				ã¤ãã³ããã©ã°æ©è½ã®ãã¹ã(1)
+(13) test_dtq1				ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã¹ã(1)
+(14) test_hrt1.c			fch_hrtã«é¢ãããã¹ã(1)
+(15) test_mutex1.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(1)
+(16) test_mutex2.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(2)
+(17) test_mutex3.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(3)
+(18) test_mutex4.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(4)
+(19) test_mutex5.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(5)
+(20) test_mutex6.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(6)
+(21) test_mutex7.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(7)
+(22) test_mutex8.c			ãã¥ã¼ããã¯ã¹æ©è½ã®ãã¹ã(8)
+(23) test_notify1.c			éç¥å¦çã®ãã¹ã(1)
+(24) test_raster1.c			ã¿ã¹ã¯çµäºè¦æ±æ©è½ã«é¢ãããã¹ã(1)
+(25) test_raster2.c			ã¿ã¹ã¯çµäºè¦æ±æ©è½ã«é¢ãããã¹ã(2)
+(26) test_sem1				ã»ããã©æ©è½ã®ãã¹ã(1)
+(27) test_sem2				ã»ããã©æ©è½ã®ãã¹ã(2)
+(28) test_sysman1			ã·ã¹ãã ç¶æ
 ç®¡çæ©è½ã®ãã¹ã(1)
-(27) test_sysstat1			ã·ã¹ãã ç¶æ
+(29) test_sysstat1			ã·ã¹ãã ç¶æ
 ã«é¢ãããã¹ã(1)
-(28) test_task1				ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã¹ã(1)
-(29) test_tmevt1.c			ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«ã®ãã¹ã(1)
+(30) test_task1				ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã¹ã(1)
+(31) test_tmevt1.c			ã¿ã¤ã ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«ã®ãã¹ã(1)
 
 CPUä¾å¤å¦çã®ãã¹ããã­ã°ã©ã ã®ä¸é¨ã¯ï¼CPUä¾å¤ãã³ãã©ãããªã¿ã¼ã³ãã
@@ -1982,6 +2263,6 @@
 ãªã®ç´ä¸ã«ããã¨ä»®å®ãã¦ããï¼ï¼
 
-	% perl ../configure -T <ãã¹ãç¨ã®ã¿ã¼ã²ããç¥ç§°> \
-				 -A <ãã¹ããã­ã°ã©ã å> -a ../test -S test_svc.o \
+	% ruby ../configure.rb -T <ãã¹ãç¨ã®ã¿ã¼ã²ããç¥ç§°> -a ../test \
+				 -A <ãã¹ããã­ã°ã©ã å> -C test_pf.cdl \
 				-O -DHRT_CONFIG<1ã¾ãã¯2>
 
@@ -2021,15 +2302,14 @@
 
 æ§è½è©ä¾¡ãã­ã°ã©ã ã¯ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã¨å®è¡æéåå¸éè¨ãµã¼ã
-ã¹ãä½¿ç¨ãã¦ããããï¼æ§ç¯ããå ´åã«ã¯ï¼Makefileã®SYSSVC_COBJSã«ï¼
-test_svc.oã¨histogram.oãè¿½å ããå¿
-è¦ãããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯
-ãªãããä½¿ç¨ããå ´åã«ã¯ï¼-Sãªãã·ã§ã³ã§test_svc.oã¨histgram.oãæå®ã
-ãï¼å
-·ä½çã«ã¯ï¼æ¬¡ã®ã³ãã³ããå®è¡ããã°ããï¼æ§ç¯ç¨ã®ãã£ã¬ã¯ããªãï¼
-ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡ã¤ã«ãå±éãããã£ã¬ã¯ããªã®ç´ä¸ã«ããã¨ä»®å®ã
-ã¦ããï¼ï¼
-
-	% perl ../configure -T <ã¿ã¼ã²ããç¥ç§°> -A <æ§è½è©ä¾¡ãã­ã°ã©ã å> \
-									-a ../test -S "test_svc.o histogram.o"
+ã¹ãä½¿ç¨ãã¦ããããï¼æ§ç¯ããå ´åã«ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã«
+perf_pf.cdlãä½¿ç¨ããå¿
+è¦ãããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªãããä½¿ç¨
+ããå ´åã«ã¯ï¼-Cãªãã·ã§ã³ã§perf_pf.cdlãæå®ããï¼å
+·ä½çã«ã¯ï¼æ¬¡ã®ã³ã
+ã³ããå®è¡ããã°ããï¼æ§ç¯ç¨ã®ãã£ã¬ã¯ããªãï¼ASP3ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡
+ã¤ã«ãå±éãããã£ã¬ã¯ããªã®ç´ä¸ã«ããã¨ä»®å®ãã¦ããï¼ï¼
+
+	% ruby ../configure.rb -T <ã¿ã¼ã²ããç¥ç§°> -a ../test \
+						-A <æ§è½è©ä¾¡ãã­ã°ã©ã å> -C perf_pf.cdl
 
 ç¾ãã¼ã¸ã§ã³ã§ç¨æãã¦ããæ§è½è©ä¾¡ãã­ã°ã©ã ã¯æ¬¡ã®éãï¼
@@ -2112,10 +2392,98 @@
 ï¼ï¼ï¼ä½¿ç¨ä¸ã®æ³¨æã¨ãã³ã
 
-11.1 ã¿ã¤ããã©ã¤ãã®çµè¾¼ã¿
-
-ã¿ã¤ããã©ã¤ããã·ã¹ãã ã«çµã¿è¾¼ãããã«ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
-ã³ãã¡ã¤ã«ã®å
-é ­ã§target_timer.cfgãã¤ã³ã¯ã«ã¼ãããå¿
-è¦ãããï¼
+11.1 å®è¡æéã¨å²è¾¼ã¿ç¦æ­¢æéã«é¢ããæ³¨æäºé 
+
+
+ASP3ã«ã¼ãã«ã®åãµã¼ãã¹ã³ã¼ã«ã¯ï¼å¯è½ãªéãï¼æå¤§å®è¡æéãä¸å®å¤ã¨ãª
+ãããã«å®è£
+ãã¦ãããï¼ãã®ããã«å®è£
+ã§ããªãç¶æ³ãããï¼æå¤§å®è¡æé
+ãä½ããã®ãã©ã¡ã¼ã¿ã«ä¾å­ããå ´åãããï¼ã¾ãASP3ã«ã¼ãã«ã§ã¯ï¼ã«ã¼ã
+ã«ã®å¦çã®ã»ã¼å
+¨ä½ãã«ã¼ãã«ç®¡çã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+ï¼CPUã­ãã¯ç¶æ
+ã¨
+åç­ï¼ã§å®è¡ããããï¼ãã®ãããªå ´åã«ã¯ï¼æå¤§å²è¾¼ã¿ç¦æ­¢æéãä½ããã®
+ãã©ã¡ã¼ã¿ã«ä¾å­ãããã¨ã«ãªãï¼
+
+ä»¥ä¸ã§ã¯ï¼ãµã¼ãã¹ã³ã¼ã«ã®å®è¡æéããã³å²è¾¼ã¿ç¦æ­¢æéãï¼ä½ããã®ãã©
+ã¡ã¼ã¿ã«ä¾å­ããå ´åã«ã¤ãã¦èª¬æããï¼
+
+(1) set_flgã«ããè¤æ°ã®ã¿ã¹ã¯ãå¾
+ã¡è§£é¤ãããå ´å
+
+TA_WMULå±æ§ã§ããï¼TA_CLRå±æ§ã§ãªãã¤ãã³ããã©ã°ã«å¯¾ããset_flgã«ããï¼
+è¤æ°ã®ã¿ã¹ã¯ãå¾
+ã¡è§£é¤ãããå ´åãããï¼ãã®å ´åï¼ãµã¼ãã¹ã³ã¼ã«ã®å®è¡
+æéããã³ã«ã¼ãã«å
+ã§ã®å²è¾¼ã¿ç¦æ­¢æéãï¼å¾
+ã¡è§£é¤ãããã¿ã¹ã¯ã®æ°ã®æ°
+ã®ãªã¼ãã§é·ããªãï¼ãã®å®è¡æéã®ä¼¸ã³ãè¨æ¸¬ããããã«ï¼æ§è½è©ä¾¡ãã­ã°
+ã©ã perf3ãç¨æãã¦ããï¼
+
+ã¾ãï¼TA_WMULå±æ§ã®ã¤ãã³ããã©ã°ã«å¯¾ããset_flgã®å®è¡æéããã³ã«ã¼ã
+ã«å
+ã§ã®å²è¾¼ã¿ç¦æ­¢æéã¯ï¼å¯¾è±¡ã¤ãã³ããã©ã°å¾
+ã¡ç¶æ
+ã®ã¿ã¹ã¯ï¼å¾
+ã¡è§£é¤
+ãããªãã¿ã¹ã¯ãå«ãï¼ã®æ°ã®ãªã¼ãã§ãé·ããªããï¼ããã«ããå®è¡æéã
+ãã³å²è¾¼ã¿ç¦æ­¢æéã®å¤åã¯ãããã§ããï¼å®éã®å½±é¿ã¯å°ããï¼
+
+(2) ini_yyyã«ããè¤æ°ã®ã¿ã¹ã¯ãå¾
+ã¡è§£é¤ãããå ´å
+
+å¯¾è±¡ãªãã¸ã§ã¯ãå¾
+ã¡ç¶æ
+ã®ã¿ã¹ã¯ãè¤æ°ããã¨ï¼ini_yyyã«ããï¼è¤æ°ã®ã¿ã¹
+ã¯ãå¾
+ã¡è§£é¤ãããï¼ãã®å ´åï¼ãµã¼ãã¹ã³ã¼ã«ã®å®è¡æéããã³ã«ã¼ãã«å
+
+ã§ã®å²è¾¼ã¿ç¦æ­¢æéãï¼å¾
+ã¡è§£é¤ãããã¿ã¹ã¯ã®æ°ã®ãªã¼ãã§é·ããªãï¼
+
+(3) ã¿ã¹ã¯åªå
+åº¦é ã®å¾
+ã¡è¡åã«ã¿ã¹ã¯ãæ¿å
+¥ãããå ´å
+
+å¾
+ã¡è¡åãã¿ã¹ã¯ã®åªå
+åº¦é ã«ãªã£ã¦ããåæã»éä¿¡ãªãã¸ã§ã¯ãã«å¯¾ãã¦ï¼
+ã¿ã¹ã¯ãå¾
+ã¡ç¶æ
+ã«ãªãå ´åï¼ãµã¼ãã¹ã³ã¼ã«ã®å®è¡æéããã³ã«ã¼ãã«å
+ã§
+ã®å²è¾¼ã¿ç¦æ­¢æéãï¼ãã§ã«å¾
+ã£ã¦ããã¿ã¹ã¯ï¼ã®ä¸­ã§æ°ãã«å¾
+ã¡ç¶æ
+ã«ãªã
+ã¿ã¹ã¯ããåªå
+åº¦ãé«ããåããã®ï¼ã®æ°ã®ãªã¼ãã§é·ããªãï¼ãã ãï¼ãã
+ã«ããå®è¡æéããã³å²è¾¼ã¿ç¦æ­¢æéã®å¤åã¯ãããã§ããï¼å®éã®å½±é¿ã¯å°
+ããï¼
+
+(4) åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã«ãã¼ã¿ãéä¿¡ããå ´å
+
+åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ã«å¯¾ãã¦ãã¼ã¿ãéä¿¡ããå ´åï¼ãµã¼ãã¹ã³ã¼ã«ã®å®è¡æ
+éããã³ã«ã¼ãã«å
+ã§ã®å²è¾¼ã¿ç¦æ­¢æéãï¼ãã§ã«åªå
+åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé 
+åã«æ ¼ç´ããã¦ãããã¼ã¿ï¼ã®ä¸­ã§æ°ãã«éä¿¡ããããã¼ã¿ããåªå
+åº¦ãé«ã
+ãåããã®ï¼ã®æ°ã®ãªã¼ãã§é·ããªãï¼ãã ãï¼ããã«ããå®è¡æéããã³å²
+è¾¼ã¿ç¦æ­¢æéã®å¤åã¯ãããã§ããï¼å®éã®å½±é¿ã¯å°ããï¼
+
+(5) ã¿ã¤ã ã¤ãã³ãå¦çæé
+
+ã¿ã¤ã ã¤ãã³ããç»é²ã¾ãã¯ç»é²è§£é¤ããå ´åï¼ãµã¼ãã¹ã³ã¼ã«ã®å®è¡æéã
+ãã³ã«ã¼ãã«å
+ã§ã®å²è¾¼ã¿ç¦æ­¢æéãï¼ãã§ã«ç»é²ããã¦ããã¿ã¤ã ã¤ãã³ã
+ã®å¯¾æ°ãªã¼ãã§é·ããªãï¼ã¾ãï¼é«åè§£è½ã¿ã¤ãå²è¾¼ã¿ã®å®è¡æéããã³ãã®
+ä¸­ã§ã®å²è¾¼ã¿ç¦æ­¢æéãï¼åæ§ã«é·ããªãï¼ãã ãï¼æéã®ä¼¸ã³ãå¯¾æ°ãªã¼ã
+ã§ãããã¨ããï¼å®éã®å½±é¿ã¯éããã¦ããï¼ãã®å®è¡æéã®ä¼¸ã³ãè¨æ¸¬ãã
+ããã«ï¼æ§è½è©ä¾¡ãã­ã°ã©ã perf5ãç¨æãã¦ããï¼
 
 11.2 assertãã¯ã­ã®å¦ç
@@ -2148,7 +2516,8 @@
 
 ã·ã¹ãã ã­ã°æ©è½ãä¸åä½¿ç¨ããªãå ´åã«ã¯ï¼ã·ã¹ãã ã­ã°æ©è½ãã·ã¹ãã ã«
-çµã¿è¾¼ã¾ãï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã§syslog.cfgãã¤ã³ã¯
-ã«ã¼ãããªãï¼ï¼ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤
-ã«ãTOPPERS_OMIT_SYSLOGãå®ç¾©ãã¦ã³ã³ãã¤ã«ããã°ããï¼
+çµã¿è¾¼ã¾ãï¼ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãã½ã¼ã¹ãã¡ã¤ã«ã
+TOPPERS_OMIT_SYSLOGãå®ç¾©ãã¦ã³ã³ãã¤ã«ããã°ããï¼è©³ããã¯ï¼ã8.1.8 ã·
+ã¹ãã ã­ã°æ©è½ã®çµè¾¼ã¿ã¨åå¤ããã®ç¯ãåç
+§ãããã¨ï¼
 
 (2) ã­ã°æ
@@ -2215,11 +2584,11 @@
 
 ãã®æ¹æ³ã¯ï¼ãªãã¸ã§ã¯ãã³ã¼ãä¸­ã«IDçªå·ãç´æ¥åãè¾¼ã¾ããããã«å®è¡å¹
-çãè¯ãä¸æ¹ã§ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãå®è¡ããã¦kernel_cfg.hãæ¸ãæãã
-åº¦ã«ï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã®åã³ã³ãã¤ã«ãå¿
-è¦ã«ãªãã¨ããæ¬ ç¹ã
-ããï¼ãã®ããï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ãæ§æãããã¡ã¤ã«ã®ä¸­ã§ï¼ä¸
-é¨ã®ãã¡ã¤ã«ã®ã¿ã§ãªãã¸ã§ã¯ãè­å¥åãåç
-§ããæ§æã«ããã¨ãã£ãå·¥å¤«ã
-ãããã¨ãæã¾ããï¼
+çãè¯ãä¸æ¹ã§ï¼ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ãå¤æ´ããã¦
+kernel_cfg.hãæ¸ãæããåº¦ã«ï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã®åã³ã³ãã¤ã«
+ãå¿
+è¦ã«ãªãã¨ããæ¬ ç¹ãããï¼ãã®ããï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ãæ§
+æãããã¡ã¤ã«ã®ä¸­ã§ï¼ä¸é¨ã®ãã¡ã¤ã«ã®ã¿ã§ãªãã¸ã§ã¯ãè­å¥åãåç
+§ãã
+æ§æã«ããã¨ãã£ãå·¥å¤«ããããã¨ãæã¾ããï¼
 
 (2) ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°ãç¨ãã
@@ -2234,6 +2603,7 @@
 
 ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ä¸­ã§ã¯ï¼ãã®å¤æ°ï¼TASK1_idï¼ãç¨ãããã¨ã§ï¼
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãå®è¡ããã¦kernel_cfg.hãæ¸ãæããåº¦ã«ï¼ä¸è¨ã®å¤æ°
-å®ç¾©ãå«ãã ãã¡ã¤ã«ã®ã¿ãåã³ã³ãã¤ã«ããã°ãããã¨ã«ãªãï¼
+ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ãå¤æ´ããã¦kernel_cfg.hãæ¸ãæ
+ãã£ãæã«ãï¼ä¸è¨ã®å¤æ°å®ç¾©ãå«ãã ãã¡ã¤ã«ã®ã¿ãåã³ã³ãã¤ã«ããã°ã
+ããã¨ã«ãªãï¼
 
 ãã®æ¹æ³ã¯ï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã®åã³ã³ãã¤ã«ãæå°éã«ã§ããå©
@@ -2244,15 +2614,15 @@
 ãã¨ããå¶éãããï¼
 
-ãªãï¼ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼--external-idãªãã·ã§ã³ãä»å 
-ãããã¨ã«ããï¼ä¸è¨ã®å¤æ°å®ç¾©ãkernel_cfg.cä¸­ã«çæããæ©è½ãæã£ã¦ã
-ãã®ã§ï¼ãã¹ã¦ã®ãªãã¸ã§ã¯ãIDããã®æ¹æ³ã§åç
-§ããå ´åã«ã¯ï¼ãã®æ©è½ã
-ç¨ãããã¨ãæ¨å¥¨ããï¼
-
-ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ããIDçªå·å²ä»ãã®ãã1ã¤ã®èª²é¡ã¨ãã¦ï¼ã³ã³ãã£ã®ã¥
-ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ä¿®æ­£ã«ããï¼ãªãã¸ã§ã¯ãIDã®å²ä»ããå¤ãã£ã¦ãã¾ã
-ãã¨ãæããããï¼ããã¯ï¼ã¢ããªã±ã¼ã·ã§ã³ã½ããã¦ã§ã¢ã®è¨­è¨ä»æ§æ¸ã«ID
-çªå·ãè¨è¼ããã¦ããå ´åãï¼ãããã°ä½æ¥­ã«ããã¦IDçªå·ãç´æ¥æ±ã£ã¦ãã
-å ´åã«ï¼ä½æ¥­å¹çãä½ä¸ãããå¯è½æ§ãèããããï¼
+ãªãï¼ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã¯ï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ã«
+-DUSE_EXTERNAL_IDãæå®ãããã¨ã«ããï¼ä¸è¨ã®å¤æ°å®ç¾©ãkernel_cfg.cä¸­ã«
+çæããæ©è½ãæã£ã¦ããã®ã§ï¼ãã¹ã¦ã®ãªãã¸ã§ã¯ãIDããã®æ¹æ³ã§åç
+§ã
+ãå ´åã«ã¯ï¼ãã®æ©è½ãç¨ãããã¨ãæ¨å¥¨ããï¼
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ããIDçªå·å²ä»ãã®ãã1ã¤ã®èª²é¡ã¨ãã¦ï¼ã·ã¹ãã ã³ã³
+ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®ä¿®æ­£ã«ããï¼ãªãã¸ã§ã¯ãIDã®å²ä»ããå¤ãã£
+ã¦ãã¾ããã¨ãæããããï¼ããã¯ï¼ã¢ããªã±ã¼ã·ã§ã³ã½ããã¦ã§ã¢ã®è¨­è¨ä»
+æ§æ¸ã«IDçªå·ãè¨è¼ããã¦ããå ´åãï¼ãããã°ä½æ¥­ã«ããã¦IDçªå·ãç´æ¥æ±ã£
+ã¦ããå ´åã«ï¼ä½æ¥­å¹çãä½ä¸ãããå¯è½æ§ãèããããï¼
 
 ãã®åé¡ã«å¯¾å¿ããããã«ï¼ASP3ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«ï¼IDçªå·ã®
@@ -2280,11 +2650,10 @@
 ã³ã¼ãã¯èªç¶ãªååãç¨ãã¦è¨è¿°ãï¼Cè¨èªããªãã­ã»ããµã®ãã¯ã­å®ç¾©
 ï¼#defineï¼ãç¨ãã¦ï¼ããã"_kernel_"ã¾ãã¯"_KERNEL_"ã§å§ã¾ãååï¼èªç¶
-ãªååãyyyyyã®å ´åã«ã¯ï¼_kernel_yyyyyï¼ã«ãªãã¼ã ããä»çµã¿ãç¨ãã¦ã
-ãï¼
+ãªååãyyyã®å ´åã«ã¯ï¼_kernel_yyyï¼ã«ãªãã¼ã ããä»çµã¿ãç¨ãã¦ããï¼
 
 å
 ·ä½çã«ã¯ï¼é¢é£ãããã£ã¬ã¯ããªã«xxx_rename.defãç½®ãï¼ãããããªãã¼
 ã ã®ããã®ããããã¡ã¤ã«ï¼xxx_rename.hããã³xxx_unrename.hï¼ãçæãã
-ãã¼ã«ï¼utils/genrenameï¼ãç¨æãã¦ããï¼
+ãã¼ã«ï¼utils/genrename.rbï¼ãç¨æãã¦ããï¼
 
 ãã®ä»çµã¿ã¯ï¼ã½ã¼ã¹ã³ã¼ãã®å¯èª­æ§åä¸ã«å½¹ç«ã¤ä¸æ¹ã§ï¼å¼å®³ãããï¼ä¾ã
@@ -2294,6 +2663,6 @@
 
 ãã®ç¶æ³ã«å¯¾å¿ããããã«ï¼ASP3ã«ã¼ãã«ã§ã¯ï¼ã½ã¼ã¹ã³ã¼ãä¸­ã®è©²å½ããå
-ç§°ããªãã¼ã ããããã®ã¦ã¼ãã£ãªãã£ï¼utils/applyrenameï¼ãç¨æãã¦ããï¼
-applyrenameã¦ã¼ãã£ãªãã£ã«ï¼ãªãã¼ã å®ç¾©ãã¡ã¤ã«ï¼xxx_rename.defï¼ã®ã
+ç§°ããªãã¼ã ããããã®ã¦ã¼ãã£ãªãã£ï¼utils/applyrename.rbï¼ãç¨æãã¦
+ããï¼ãã®ã¦ã¼ãã£ãªãã£ã«ï¼ãªãã¼ã å®ç¾©ãã¡ã¤ã«ï¼xxx_rename.defï¼ã®ã
 ãªãã£ãã¯ã¹ï¼xxxã®é¨åï¼ã¨ï¼ãªãã¼ã ããããã¡ã¤ã«ãªã¹ããä¸ããã¨ï¼ãª
 ãã¼ã å¦çãè¡ãªãï¼ä¾ãã°ï¼kernelãã£ã¬ã¯ããªã®ãã¹ã¦ã®ãã¡ã¤ã«ã«å¯¾ã
@@ -2303,5 +2672,5 @@
 
 	% cd kernel
-	% ../utils/applyrename kernel *
+	% ruby ../utils/applyrename.rb kernel *
 
 ã¾ãï¼ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã®ãã¹ã¦ã®ãã¡ã¤ã«ã«å¯¾ãã¦ï¼ã«ã¼ã
@@ -2310,6 +2679,6 @@
 
 	% cd target/ct11mpcore_gcc/
-	% ../../utils/applyrename target *
-	% ../../utils/applyrename ../../kernel/kernel *
+	% ruby ../../utils/applyrename.rb target *
+	% ruby ../../utils/applyrename.rb ../../kernel/kernel *
 
 11.6 ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ãã®ä½¿ç¨æ¹æ³
@@ -2317,35 +2686,48 @@
 ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ããã¿ã¼ã²ããä¾å­é¨ã«çµã¿è¾¼ã¾ãã¦ããå ´
 åã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã«ãããä½¿ç¨ãããã¨ãæç¤ºãã
-ãªãã·ã§ã³ï¼-rï¼ãä»å ãããã¨ã§ï¼ã¡ã¢ãªä¸ã«ãã¬ã¼ã¹ã­ã°ãè¨é²ããæ©è½
-ãæå¹ã«ãªãï¼
-
-ãã¬ã¼ã¹ã­ã°è¨é²ã®ä½¿ç¨æ¹æ³ã®ä¸ä¾ã¨ãã¦ï¼ã·ã¹ãã èµ·åæã«ãã¬ã¼ã¹ã­ã°ã®
-è¨é²ãéå§ãï¼ã·ã¹ãã çµäºæã«è¨é²ãããã¬ã¼ã¹ã­ã°ããã³ãããããã«ã¯ï¼
-ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«æ¬¡ã®ãããªè¨è¿°ãè¿½å ããï¼
-
-	#include "arch/logtrace/trace_config.h"
-	ATT_INI({ TA_NULL, TRACE_AUTOSTOP, trace_initialize });
-	ATT_TER({ TA_NULL, target_fput_log, trace_dump });
-
-ããã§ï¼åæåã«ã¼ãã³ï¼trace_initializeï¼ã¸ã®å¼æ°ã¯ï¼åæåç´å¾ã®ãã¬ã¼
-ã¹ã­ã°ã®åä½ã¢ã¼ããæå®ãããã®ã§ããï¼æå®ã§ããåä½ã¢ã¼ãã«ã¤ãã¦ã¯ï¼
-arch/logtrace/trace_config.hä¸­ã®ã³ã¡ã³ãã«èª¬æãããï¼
-
-çµäºå¦çã«ã¼ãã³ï¼trace_dumpï¼ã¯ï¼è¨é²ããããã¬ã¼ã¹ã­ã°ãã¿ã¼ã²ããä¾
-å­ã®ä½ã¬ãã«åºåæ©è½ãå©ç¨ãã¦ãã³ãããããã®ãã®ã§ããï¼ãã¬ã¼ã¹ã­ã°
-ãå¥ã®æ¹æ³ã§åãåºãå ´åã«ã¯ï¼çµäºå¦çã«ã¼ãã³ãç»é²ããå¿
-è¦ã¯ãªãï¼
-
-ä»¥ä¸ã®æ¹æ³ã§ã¯ï¼trace_initializeãåæåã«ã¼ãã³ã§ï¼trace_dumpãçµäºå¦
-çã«ã¼ãã³ã§å¼ã³åºãã¦ããããï¼åæåã«ã¼ãã³ãå¼ã³åºãåãçµäºå¦çã«ã¼
-ãã³ãå¼ã³åºããå¾ã«ã¯ï¼ãã¬ã¼ã¹ã­ã°è¨é²ã®æ©è½ãå©ç¨ã§ããªãï¼åæåã«ã¼
-ãã³ãå¼ã³åºãåãçµäºå¦çã«ã¼ãã³ãå¼ã³åºããå¾ã«å®è¡ãããå¦çï¼ä¾ã
-ã°ï¼ã«ã¼ãã«ãªãã¸ã§ã¯ãã®åæåå¦çãï¼trace_initializeãããå
-ã«ç»é²
-ããåæåã«ã¼ãã³ï¼trace_dumpãããå
-ã«ç»é²ããçµäºå¦çã«ã¼ãã³ï¼ã§ã
-ã¬ã¼ã¹ã­ã°è¨é²ã®æ©è½ãå©ç¨ããããã«ã¯ï¼trace_initializeã¨trace_dumpã
-é©åãªå ´æã§å¼ã¶ããã«ä¿®æ­£ãããã¨ãå¿
-è¦ã§ããï¼
+ãªãã·ã§ã³ï¼-rï¼ãä»å ãï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã«ä»¥ä¸ã®è¨è¿°ãå«ã
+ããã¨ã§ï¼ã¡ã¢ãªä¸ã«ãã¬ã¼ã¹ã­ã°ãè¨é²ããæ©è½ãæå¹ã«ãªãï¼
+
+----------------------------------------
+/*
+ *  ãã¬ã¼ã¹ã­ã°æ©è½ã®çµä¸ãè¨è¿°
+ */
+import("arch/tracelog/tTraceLog.cdl");
+
+cell tTraceLog TraceLog {
+	logBufferSize = 1024;				/* ã­ã°ãããã¡ã®ãµã¤ãº */
+	initialMode = C_EXP("TRACE_RINGBUF");
+
+	/* ä½ã¬ãã«åºåã¨ã®çµå */
+	cPutLog = PutLogTarget.ePutLog;
+};
+----------------------------------------
+
+ãã®è¨è¿°ãå¤æ´ãããã¨ã§ï¼ãã¬ã¼ã¹ã­ã°æ©è½ã®ã­ã°ãããã¡ã®ãµã¤ãºãå¤æ´
+ãããã¨ãã§ããï¼
+
+initialModeãTRACE_RINGBUFã«ãããã¨ã§ï¼ã·ã¹ãã èµ·åæã«ãã¬ã¼ã¹ã­ã°ã®
+è¨é²ãéå§ããï¼ããã«æå®ã§ããåä½ã¢ã¼ãã¯ï¼ä»¥ä¸ã®ããããã§ããï¼
+
+	TRACE_STOP			ãã¬ã¼ã¹åæ­¢
+	TRACE_RINGBUF		ãªã³ã°ãããã¡ã¢ã¼ã
+	TRACE_AUTOSTOP		èªååæ­¢ã¢ã¼ã
+
+ã¾ãï¼ã·ã¹ãã çµäºæã«ï¼è¨é²ãããã¬ã¼ã¹ã­ã°ããã³ãããããã«ã¯ï¼ã³ã³
+ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«æ¬¡ã®è¨è¿°ãè¿½å ããï¼ãã¬ã¼ã¹ã­ã°ãå¥ã®æ¹æ³ã§åã
+åºãå ´åã«ã¯ï¼ãã®è¨è¿°ã¯ä¸è¦ï¼ï¼
+
+----------------------------------------
+cell tTerminateRoutine TraceLogTerminate {
+	cTerminateRoutineBody = TraceLog.eDump;
+};
+----------------------------------------
+
+ãã®æ¹æ³ã§ã¯ï¼ãã¬ã¼ã¹ã­ã°ã®ãã³ããçµäºå¦çã«ã¼ãã³ã§è¡ã£ã¦ã¦ããããï¼
+çµäºå¦çã«ã¼ãã³ãå¼ã³åºããå¾ã®ãã¬ã¼ã¹ã­ã°ã¯åºåãããªãï¼çµäºå¦çã«ã¼
+ãã³ãå¼ã³åºããå¾ã«å®è¡ãããå¦çã§ãã¬ã¼ã¹ã­ã°è¨é²ã®æ©è½ãå©ç¨ããã
+ãã«ã¯ï¼ãã¬ã¼ã¹ã­ã°ã®ãã³ããé©åãªå ´æã§è¡ãããã«ä¿®æ­£ãããã¨ãå¿
+è¦
+ã§ããï¼
 
 11.7 ã·ã¹ãã ã®èµ·åæã®åæåå¦ç
@@ -2401,16 +2783,16 @@
 ç½®ã¢ãã¬ã¹ãä¸è´ãã
 ããªã³ã«ã¹ã¯ãªããï¼æ¨æºã®ãªã³ã«ã¹ã¯ãªããã¯ãã®ããã«ãªã£ã¦ããï¼ãç¨
-ããï¼ãµã³ãã«ã®Makefileã§ã¯ï¼LDSCRIPTã«ãããªã³ã«ã¹ã¯ãªãããæå®ãã
-ã®ã§ã¯ãªãï¼LDFLAGSã¨CFG1_OUT_LDFLAGSã«ç°ãªããªã³ã«ã¹ã¯ãªãããç¨ãããª
-ãã·ã§ã³ãè¨­å®ããã°ããï¼
-
-ãã¹3ã§ã®ã¨ã©ã¼ãåé¿ããããã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®ãã³ãã¬ã¼
-ããã¡ã¤ã«ã«ããã¦ï¼rodataã»ã¯ã·ã§ã³ã®å
+ããï¼æ¨æºã®Makefileã§ã¯ï¼LDSCRIPTã«ãããªã³ã«ã¹ã¯ãªãããæå®ããã®ã§
+ã¯ãªãï¼LDFLAGSã¨CFG1_OUT_LDFLAGSã«ç°ãªããªã³ã«ã¹ã¯ãªãããç¨ãããªãã·ã§
+ã³ãè¨­å®ããã°ããï¼
+
+ãã¹3ã§ã®ã¨ã©ã¼ãåé¿ããããã«ã¯ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯
+ãªããã«ããã¦ï¼rodataã»ã¯ã·ã§ã³ã®å
 å®¹ãï¼é
-ç½®ã¢ãã¬ã¹ããã¢ã¯ã»ã¹
-ã¢ãã¬ã¹ã«ã³ãã¼ããï¼ãã®ããã«ã¯ï¼ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ã
-ãä¾å­é¨ã§ï¼LMA.ORDER_LISTç­ã®ãã³ãã¬ã¼ããã¡ã¤ã«å¤æ°ãè¨­å®ããã°ããï¼
-å
-·ä½çãªæ¹æ³ã¯ï¼ãã¿ã¼ã²ããä¾å­é¨ ãã¼ãã£ã³ã°ã¬ã¤ãããåç
+ç½®ã¢ãã¬ã¹ããã¢ã¯ã»ã¹ã¢ã
+ã¬ã¹ã«ã³ãã¼ããï¼ãã®ããã«ã¯ï¼ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
+ã§ï¼$lmaListãè¨­å®ããã°ããï¼å
+·ä½çãªæ¹æ³ã¯ï¼ãã¿ã¼ã²ããä¾å­é¨ ãã¼ãã£
+ã³ã°ã¬ã¤ãããåç
 §ãããã¨ï¼
 
@@ -2637,5 +3019,5 @@
 	ER ercd = get_tim(SYSTIM *p_systim)
 	ER ercd = adj_tim(int32_t adjtim)
-	HRTCNT ercd = fch_hrt(void)
+	HRTCNT hrtcnt = fch_hrt(void)
 
 	ER ercd = sta_cyc(ID cycid)
@@ -2721,8 +3103,10 @@
 13.3 ãã¼ã¸ã§ã³å±¥æ­´
 
-	2014å¹´11æ24æ¥	Release	3.A.0		æåã®ãªãªã¼ã¹
+	2014å¹´11æ24æ¥	Release 3.A.0		æåã®æ©æãªãªã¼ã¹ï¼Î±çï¼
 	2015å¹´8æ5æ¥	Release	3.B.0
-	2016å¹´ æ æ¥	Release	3.0.0		æåã®ä¸è¬å
+	2016å¹´2æ8æ¥	Release	3.0.0		æåã®ä¸è¬å
 ¬é
+	2016å¹´2æ14æ¥	Release	3.0.1
+	2016å¹´5æ15æ¥	Release	3.1.0
 
 ä»¥ä¸
Index: asp3_wo_tecs/trunk/doc/version.txt
===================================================================
--- asp3_wo_tecs/trunk/doc/version.txt	(revision 305)
+++ asp3_wo_tecs/trunk/doc/version.txt	(revision 306)
@@ -3,6 +3,6 @@
 		å¤æ´å±¥æ­´
 
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.0.0
-		æçµæ´æ°: 2016å¹´1æ10æ¥
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1.0
+		æçµæ´æ°: 2016å¹´5æ15æ¥
 
 ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã®å¤æ´å±¥æ­´ãï¼æ°ããæ¹ããé ã«
@@ -62,5 +62,158 @@
  ã®è²¬ä»»ãè² ããªãï¼
  
- $Id: version.txt 507 2016-01-12 01:58:33Z ertl-hiro $
+ $Id: version.txt 752 2016-05-14 15:06:22Z ertl-hiro $
+----------------------------------------------------------------------
+
+		TOPPERS/ASP3ã«ã¼ãã«
+		Release 3.0.1 ãã 3.1.0 ã¸ã®ä¸»ãªå¤æ´ç¹
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»éçAPIã®ãã©ã¡ã¼ã¿ã®çç¥
+	- CRE_TSKã®stkï¼CRE_DTQã®dtqmbï¼CRE_PDQã®pdqmbï¼CRE_MBFã®mbfmbï¼
+	  CRE_MPFã®mpfã¨mpfmbï¼DEF_ICSã®istkã®è¨è¿°ãçç¥å¯è½ã«ããï¼
+
+ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä»æ§å¤æ´ã«å¯¾å¿
+	- StrValã¯ã©ã¹ãNumStrã¯ã©ã¹ã«ç½®ãæãããã¨ã«å¯¾å¿ï¼
+	- ã·ã³ãã«åå¾ã·ã³ãã«ãã¼ãã«ã§boolåããµãã¼ãããã®ãæ´»ç¨ããã
+	  ãã«å¤æ´ï¼
+	- ã·ã³ãã«åå¾ã·ã³ãã«ãã¼ãã«ã«ããåå¾ããå¤ãï¼StrValã¯ã©ã¹ã®ãª
+	  ãã¸ã§ã¯ãã«ãã¦ã°ã­ã¼ãã«å¤æ°ã«è¨­å®ãã¦ããã®ãï¼å¤ã®ã¾ã¾ã§è¨­å®
+	  ããããã«å¤æ´ããã®ã«å¯¾å¿ï¼
+	- ä¸è¬å®æ°å¼ãã©ã¡ã¼ã¿ã®å¤ãï¼ï¼StrValã¯ã©ã¹ã§ã¯ãªãï¼Stringã¯ã©ã¹
+	  ã®ãªãã¸ã§ã¯ãã§ä¿æããããã«å¤æ´ããã®ã«å¯¾å¿ï¼
+
+ã»åççææ©è½æ¡å¼µããã±ã¼ã¸ã®ä¿®æ­£
+	- acre_yyyã§ï¼ãã±ããã®å
+å®¹ãã­ã¼ã«ã«å¤æ°ã«ã³ãã¼ããããã«ä¿®æ­£ï¼
+	- DEF_KMMã®kmmãã©ã¡ã¼ã¿ãçç¥å¯è½ã«ï¼
+
+ã»ãã°ãã£ãã¯ã¹
+	- ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã§ï¼ãªãã¸ã§ã¯ãã®IDçªå·ã®å²ä»ããå¤é¨ã
+	  ãåãè¾¼ãã§ããå ´åã«å¯¾å¿ï¼
+	- test_dlynse.cãï¼TCYC_HRTCNTãå®ç¾©ããã¦ããå ´åã«å¯¾å¿ï¼
+	- bit_kernel.cã®ãï¼p_schedtskã¨dspflgã®æ´åæ§ãæ¤æ»ããããã«ä¿®æ­£ï¼
+	- éçAPIã®ãã©ã¡ã¼ã¿æ«ã«æ¹è¡ãããå ´åã®ä¸å
+·åãä¿®æ­£ï¼
+
+ã»ARMã³ã¢ä¾å­é¨ã®ä¿®æ­£
+	- GR-PEACHåãã®ã¿ã¼ã²ããä¾å­é¨ã¨ï¼RZ/Aã·ãªã¼ãºã®ãããåãã®ã³ã¢
+	  ä¾å­é¨ãè¿½å ï¼
+	- ã¹ã¿ãã¯ãã¤ã³ã¿ã8ãã¤ãå¢çã§ã¢ã©ã¤ã³ãããããã«ä¿®æ­£ï¼
+	- sil_dly_nseãï¼åå²äºæ¸¬ãããå ´åã«å¯¾å¿ã§ããããã«ä¿®æ­£ï¼
+	- ãã¯ã¿ãã¼ãã«ãç½®ãã»ã¯ã·ã§ã³åã".vector"ã«å¤æ´ï¼32ãã¤ãå¢çã§
+	  ã¢ã©ã¤ã³ãããããã«ä¿®æ­£ï¼
+
+ã»ãã¹ããã­ã°ã©ã ã®ä¿®æ­£
+	- æéãã©ã¡ã¼ã¿ãï¼TEST_TIME_CPã¨TEST_TIME_PROCãç¨ãã¦è¨è¿°ï¼
+	- test_dlynse.cãï¼TCYC_HRTCNTãåç
+§ããããã«ä¿®æ­£ï¼
+
+ã»ãµã³ãã«ãã­ã°ã©ã ã®ä¿®æ­£
+	- å²è¾¼ã¿ã®åä½ç¢ºèªãè¡ããããã«ä¿®æ­£ï¼ã¿ã¼ã²ããä¾å­ï¼ï¼
+
+ã»ãã®ä»ã®ä¿®æ­£
+	- kernel_impl.hããCASTãã¯ã­ã®å®ç¾©ãåé¤ï¼
+	- ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã§ï¼æé©åã«ããå¤æ°ããªããªãã±ã¼ã¹ã«å¯¾
+	  å¿ï¼
+	- ç¬¦å·ç¡ãã®ãã©ã¡ã¼ã¿ã®ã¨ã©ã¼ãã§ãã¯ãï¼0ä»¥ä¸ã§ãã§ãã¯ããã®ã§ã¯
+	  ãªãï¼0ã¨ã®ä¸è´ã§ãã§ãã¯ããããã«ä¿®æ­£ï¼
+	- çæã¹ã¯ãªããã®è¨è¿°ã¹ã¿ã¤ã«ã®ä¿®æ­£ï¼
+	- ãã¹ããã¨ã©ã¼ã«ãªã£ãæã«'\007'ãåºåããããã«ä¿®æ­£ï¼
+	- libkernel.aã®ãªã³ã¯æ¹æ³ãå¤æ´ï¼HRP3ã®é½åï¼ï¼
+	- gentest.rbã®æ¹åï¼
+
+ã»ãã­ã¥ã¡ã³ãã®å
+
+å®ï¼ã³ã¡ã³ãã®ä¿®æ­£
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+	- ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå·ãæ´æ°ï¼
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼3.0.1 â 3.1.0ï¼
+
+(1) ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä»æ§å¤æ´ã«å¯¾å¿
+	- StrValã¯ã©ã¹ãNumStrã¯ã©ã¹ã«ç½®ãæãããã¨ã«å¯¾å¿ããï¼
+	- ã·ã³ãã«åå¾ã·ã³ãã«ãã¼ãã«ã§boolåããµãã¼ããããã¨ã«ä¼´ãï¼
+	  boolåã§åå¾ããããã«å¤æ´ããã·ã³ãã«ã«ã¤ãã¦ï¼çæã¹ã¯ãªããå
+
+	  ã§åç
+§ãã¦ããç®æãä¿®æ­£ããï¼ä¾ãã°ï¼ã$SYMBOL == 1ãã«ããå®ç¾©
+	  ã®æç¡ããã§ãã¯ãã¦ããå ´åã«ã¯ï¼åã«ã$SYMBOLãã«å¤æ´ããï¼
+	- ã·ã³ãã«åå¾ã·ã³ãã«ãã¼ãã«ã«ããåå¾ããå¤ãï¼StrValã¯ã©ã¹ã®ãª
+	  ãã¸ã§ã¯ãã«ãã¦ã°ã­ã¼ãã«å¤æ°ã«è¨­å®ãã¦ããã®ãï¼å¤ã®ã¾ã¾ã§è¨­å®
+	  ããããã«å¤æ´ããã®ã«å¯¾å¿ããï¼
+	- ä¸è¬å®æ°å¼ãã©ã¡ã¼ã¿ã®å¤ãï¼ï¼StrValã¯ã©ã¹ã§ã¯ãªãï¼Stringã¯ã©ã¹
+	  ã®ãªãã¸ã§ã¯ãã§ä¿æããããã«å¤æ´ããã®ã«å¯¾å¿ããï¼
+	- $bLittleEndianãåç
+§ãã¦ããã°ï¼$endianLittleã«å¤æ´ããï¼
+
+(2) CASTãã¯ã­ã®å®ç¾©æ¹æ³ã®å¤æ´ã¸ã®å¯¾å¿
+	- CASTãã¯ã­ãä½¿ç¨ãã¦ããããããã¡ã¤ã«ã®å
+é ­ã«ï¼CASTãã¯ã­ã®å®ç¾©
+	  ãå«ããï¼
+
+(3) ãã¹ããã­ã°ã©ã ã®æéãã©ã¡ã¼ã¿ã®å¤æ´ã¸ã®å¯¾å¿
+	- å¿
+è¦ã§ããã°ï¼target_test.hã«ï¼TEST_TIME_CPã¨TEST_TIME_PROCã®å®ç¾©
+	  ãå«ããï¼TEST_TIME_CPã®ããã©ã«ãã¯ï¼é·ãã®æéã«ãªã£ã¦ããï¼ï¼
+
+(4) init_tskinictxbé¢æ°ã®ãã©ã¡ã¼ã¿ã®å¤æ´ã¸ã®å¯¾å¿
+	- ã¿ã¼ã²ããä¾å­é¨ã§TSKINICTXBãå®ç¾©ãã¦ããï¼åççææ©è½æ¡å¼µãã
+	  ã±ã¼ã¸ããµãã¼ãããå ´åã«ã¯ï¼init_tskinictxbé¢æ°ã®ãã©ã¡ã¼ã¿ã®å¤
+	  æ´ã«å¯¾å¿ããï¼
+
+(5)ï¼»ARMä¾å­é¨ï¼½ã³ã¢å
+±éé¨ã®ä¿®æ­£ã¸ã®å¯¾å¿
+	- irc_begin_int/excããirc_end_int/excã«æ
+å ±ãæ¸¡ãæ¹æ³ãå¤æ´ããï¼1
+	  ã¯ã¼ãã§ããã°ï¼ã¹ã¿ãã¯ã®å
+é ­ãä½¿ããã¨ãã§ããï¼ï¼ã¾ãï¼ã¹ã¿ã
+	  ã¯ãã¤ã³ã¿ã8ãã¤ãå¢çã§ã¢ã©ã¤ã³ãããããã«ä¿®æ­£ããï¼
+	- ãã¯ã¿ãã¼ãã«ãç½®ãã»ã¯ã·ã§ã³åã".vector"ã«å¤æ´ããã®ã«å¯¾å¿ããï¼
+	- sil_dly_nseã®ãã©ã¡ã¼ã¿ãåèª¿æ´ããï¼
+
+----------------------------------------------------------------------
+
+		TOPPERS/ASP3ã«ã¼ãã«
+		Release 3.0.0 ãã 3.0.1 ã¸ã®ä¸»ãªå¤æ´ç¹
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ä¿®æ­£
+	- BCOPYã®ä¸å
+·åãä¿®æ­£ï¼SRecordã¯ã©ã¹ã®å®è£
+ãæ¹è¯ï¼ï¼
+	- ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®ä¿®æ­£ï¼
+	- DOMAINè¨è¿°ã¨CLASSè¨è¿°ãåãä»ããããã«ä¿®æ­£ï¼ASP3ã«ã¼ãã«ã«ã¯é¢ä¿
+	  ãªãï¼ï¼
+	- ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®å±éæ©è½ãæ´»ç¨ããè¨è¿°ã«ä¿®æ­£ï¼
+
+ã»TECSé¢é£ã®ä¿®æ­£
+	- å¤æ°åã®ä¿®æ­£ï¼dataqueueSentValueï¼ï¼
+	- tTimeEventHandlerã®ã¢ããã¿é¢æ°ãï¼ãã©ã°ã¤ã³ã§çæããããã«ãã
+	  ãã¨ã«å¯¾å¿ï¼tTimeEventHandler.cãåé¤ï¼
+
+ã»ãã°ãã£ãã¯ã¹
+	- kernel_check.trbã®LMAããVMAã¸ã®ã³ãã¼ã®ä¸å
+·åã®ä¿®æ­£ï¼
+	- ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ã¨ã©ã¼åºåã³ã¼ãã®ä¸å
+·åã®ä¿®æ­£ï¼
+	- ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãåºåããã¨ã©ã¼ã³ã¼ãã®èª¤ãã®ä¿®æ­£ï¼
+
+ã»ãã®ä»ã®ä¿®æ­£
+	- GetStackTskinictxbã®ç¬¬3ãã©ã¡ã¼ã¿ã«ï¼ã¿ã¹ã¯åæåãã­ãã¯ã®å
+é ­çª
+	  å°ãæ¸¡ãããã«ä¿®æ­£ï¼
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+	- ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå·ãæ´æ°ï¼
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼3.0.0 â 3.0.1ï¼
+
+(1) GetStackTskinictxbã®ä¿®æ­£
+	- ã¿ã¼ã²ããä¾å­é¨ã§GetStackTskinictxbãå®ç¾©ãã¦ããã°ï¼ç¬¬3ãã©ã¡ã¼
+	  ã¿ãåãåãããã«ä¿®æ­£ããï¼
+
 ----------------------------------------------------------------------
 
@@ -69,4 +222,29 @@
 
 âå¤æ´ç¹ã®ãªã¹ã
+
+ã»TECSã®å°å
+¥
+	- ã·ã¹ãã ãµã¼ãã¹ãï¼TECSãç¨ãã¦æ§ç¯ï¼
+	- ã·ã¹ãã ã­ã°æ©è½ã§ã­ã°ã®åºåå
+ã®åæå¤ãçµã¿ä¸ãè¨è¿°ã§æå®ã§ãã
+	  ããã«ãï¼ããã©ã«ãã®è¨­å®å¤ãå¤æ´ï¼ã­ã°ã¿ã¹ã¯ã®èµ·åæã«è¨­å®ãã
+	  ã®ããããï¼
+	- ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ãã®TECSåã«ä¼´ãï¼ãã£ã¬ã¯ããªã
+	  arch/tracelogã«å¤æ´ï¼
+
+ã»Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å°å
+¥
+	- ãã¹ã¦ã®ãã³ãã¬ã¼ããã¡ã¤ã«ãï¼Rubyã§è¨è¿°ãããçæã¹ã¯ãªããã«
+	  ç½®ãæããï¼
+	- kernel_api.csvãkernel_api.defã«ãªãã¼ã ãï¼ãã©ã¼ããããå¤æ´ï¼
+	- kernel_def.csvãkernel_sym.defã«ãªãã¼ã ãï¼ãã©ã¼ããããå¤æ´ï¼
+	- Makefileã®å¤æ´ï¼ä¾å­é¢ä¿ãã«ã¼ã«ã®æ´çãå®æ½ï¼ï¼
+	- ãµã³ãã«ãã­ã°ã©ã ããã³ãã¹ããã­ã°ã©ã ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼
+	  ã·ã§ã³ãã¡ã¤ã«ããï¼kernel_timer.cfgã®ã¤ã³ã¯ã«ã¼ããåé¤ï¼Makefile
+	  å´ã§å¯¾å¿ããï¼ï¼
+	- --external-idãå»æ­¢ï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ã§åããã¨ãã§ããããã«
+	  ä¿®æ­£ï¼
+
+ã»å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ãã«ããã¤ãã³ãï¼ã¨ã©ã¼éç¥ã®è¿½å 
 
 ã»lock_cpu_dspï¼unlock_cpu_dspã®å°å
@@ -83,8 +261,16 @@
 	  request_dispatchãå¼ã¶ããã«ä¿®æ­£ããï¼ARM Cortex-Må¯¾å¿ï¼ï¼
 
-ã»ãã®ä»ã®ãã°ãã£ãã¯ã¹
+ã»ã¿ã¤ã ã¤ãã³ãç®¡çã®æ¹è¯ï¼HRP3ã«ã¼ãã«ã¨ã®æ´åæ§ã®ããï¼
+	- ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã§ã®ä½ç½®ã®è¡¨ç¾ãï¼ã¤ã³ããã¯ã¹ãããã¤ã³ã¿
+	  ã«å¤æ´ï¼
+	- ã¿ã¤ã ã¤ãã³ãã®çºçæå»ãï¼ã¿ã¤ã ã¤ãã³ããã­ãã¯ä¸­ã«æã¤ããã«
+	  å¤æ´ï¼
+
+ã»ãã°ãã£ãã¯ã¹
 	- éç¥ãã³ãã©ã®ããã®å¤æ°ã«staticãä»ããã®ããããï¼
 
 ã»ãã¹ããã­ã°ã©ã ã®è¿½å 
+	- ã¤ãã³ããã©ã°æ©è½ã®ãã¹ã(1)ï¼flg1ï¼ãè¿½å ï¼
+	- ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã¹ã(1)ï¼dtq1ï¼ãè¿½å ï¼
 	- ã«ã¼ãã«æ§è½è©ä¾¡ãã­ã°ã©ã (5)ï¼perf5ï¼ãè¿½å ï¼
 
@@ -99,31 +285,44 @@
 	- APPLDIRï¼APPL_DIRï¼SYSSVC_DIRï¼KERNEL_DIRãï¼ããããï¼â¦DIRSï¼è¤
 	  æ°å½¢ï¼ã«ãªãã¼ã ï¼
+	- DEVTOOLDIRã®æ°è¨­ï¼
+	- SYSSVC_LIBSã®å»æ­¢ï¼
 	- DBGENVã®å»æ­¢ï¼
 	- ä¸è¦ã«ãªã£ãå¤æ°ç­ã®åé¤ï¼
 
-ã»configureã®å¤§å¹
+ã»ã¦ã¼ãã£ãªãã£ã®Rubyå
+	- ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼configureï¼ã¨4ã¤ã®ã¦ã¼ãã£ãªãã£
+	  ãã­ã°ã©ã ãï¼PerlããRubyã«ãã¼ãã£ã³ã°ï¼
+
+ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããï¼configure.rbï¼ã®å¤§å¹
 ãªä»æ§å¤æ´
 	- ãµã³ãã«ãã­ã°ã©ã ãçæããå¦çãåé¤ï¼
+	- ãã©ã¡ã¼ã¿ããã·ã³ãã«å®ç¾©ãåãè¾¼ãæ©è½ãè¿½å ï¼
 	- -uãªãã·ã§ã³ãå»æ­¢ï¼-aãªãã·ã§ã³ã«çµ±åï¼ï¼
 	- -tãªãã·ã§ã³ã¨-dãªãã·ã§ã³ã®å½¹å²ãå¤æ´ï¼
 	- -cãªãã·ã§ã³ï¼-Cãªãã·ã§ã³ï¼-wãªãã·ã§ã³ï¼-Vãªãã·ã§ã³ï¼-Gãªãã·ã§
 	  ã³ãè¿½å ï¼
-	- perlã®ãã­ã°ã©ã ã®å ´æãæ¤ç´¢ããå¦çãåé¤ï¼
+	- -pãªãã·ã§ã³ï¼-Pãªãã·ã§ã³ãå»æ­¢ï¼
 	- ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãç¨æã§ãã¦ãããã®ãã§ãã¯ãåé¤ï¼
 
 ã»ãã®ä»ã®ä¿®æ­£
 	- OVRTIMåãPRCTIMåã«ãªãã¼ã ï¼
+	- ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®ä¿®æ­£ï¼
 	- bit_kernel.cï¼bit_mutex.cãè¦ç´ãï¼ASP3å¯¾å¿ãèæ
-®ï¼ï¼
+®ï¼ã¿ã¹ã¯åªå
+åº¦æ¡
+	  å¼µããã±ã¼ã¸ã«å¯¾å¿ï¼ï¼
 	- test_raster1ãï¼bit_kernelãä½¿ç¨ããããã«ä¿®æ­£ï¼
 	- æ§è½è©ä¾¡ãã­ã°ã©ã ã§å®è¡æéåå¸ãè¡¨ç¤ºããéã«ï¼ã·ã¹ãã ã­ã°æ©è½
 	  ã®ãã©ãã·ã¥ãå¼ã¶ã®ããããï¼ä½ã¬ãã«åºåãä½¿ãã®ã§ä¸è¦ï¼ï¼
 	- ãã¹ããã­ã°ã©ã ç¨ãµã¼ãã¹ã®é¢æ°å®ç¾©æ¹æ³ãå¤æ´ï¼
+	- ãªã¼ãã©ã³ãã³ãã©æ¡å¼µããã±ã¼ã¸ã®ãã¹ããã­ã°ã©ã ã®ä¿®æ­£ï¼
 	- ãã¬ã¼ã¹ã­ã°æ©è½ã®ã­ã°æå»ãåãåºããã¯ã­åãå¤æ´ï¼
 	- ãã¬ã¼ã¹ã­ã°æ©è½ã®ã¢ã¼ãã®æ±ãã®è¦ç´ãï¼
+	- TOPPERS_LABEL_ASMã®å»æ­¢ï¼
 
 ã»ãã­ã¥ã¡ã³ãã®å
 
 å®ï¼ã³ã¡ã³ãã®ä¿®æ­£
+	- ãã¤ã°ã¬ã¼ã·ã§ã³ã¬ã¤ãï¼migration.txtï¼ãè¿½å ï¼
 
 ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
@@ -132,31 +331,65 @@
 âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼3.B.0 â 3.0.0ï¼
 
-(1) lock_cpu_dspï¼unlock_cpu_dspã®å®ç¾©ãè¿½å 
+(1) TECSã®å°å
+¥ã¸ã®å¯¾å¿
+	- ãã¼ãã£ã³ã°ã¬ã¤ãã®ï¼ç« ãåç
+§ãï¼ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾
+	  å­é¨ã®å®è£
+ãå
+¨é¢çã«è¦ç´ãï¼ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®æ
+	  å­åºåé¢æ°ãã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­ã¢ã¸ã¥ã¼ã«ã«è¨è¿°ããã¦ã
+	  ãå ´åï¼åé¤ããã®ãå¿ããªãããã«ãããã¨ï¼ï¼
+	- ãã¼ãã£ã³ã°ã¬ã¤ãã®6.11ç¯ãåç
+§ãï¼ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼
+	  ãã«é¢ããè¨­å®ãè¦ç´ãï¼
+
+(2) Rubyçã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®å°å
+¥ã¸ã®å¯¾å¿
+	- ã¿ã¼ã²ããä¾å­é¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«ï¼tfãã¡ã¤ã«ï¼ãï¼Rubyã§è¨
+	  è¿°ãããçæã¹ã¯ãªããã«ç½®ãæããï¼trbãã¡ã¤ã«ï¼ï¼ãã®éã«ï¼
+	  target.tfã«å¯¾å¿ãããã¡ã¤ã«ã®ååã¯ï¼target_kernel.trbã¨ããï¼
+	- target_def.csvãtarget_sym.defã«ãªãã¼ã ãï¼ãã©ã¼ããããå¤æ´ã
+	  ãï¼
+	- target_kernel.cfgãä½æããï¼ASP3ã«ã¼ãã«ã§ã¯ï¼target_timer.cfgã
+	  ã¤ã³ã¯ã«ã¼ãããã ãã®å
+å®¹ã«ãªãï¼ï¼
+	- Makefileã®ã¿ã¼ã²ããä¾å­é¨ã®--cfg1-def-tableãªãã·ã§ã³ãï¼
+	  --symval-tableãªãã·ã§ã³ã«å¤æ´ããï¼æå®ãããã¡ã¤ã«ãå¤æ´ï¼ï¼
+	- Makefileã®ã¿ã¼ã²ããä¾å­é¨ã§ï¼OFFSET_TFï¼TARGET_TFï¼
+	  TERGET_CHECK_TFãè¨­å®ãã¦ããè¨è¿°ãããã°ï¼ããããï¼OFFSET_TRBï¼
+	  TARGET_KERNEL_TRBï¼TARGET_CHECK_TRBã«å¤æ´ããï¼æå®ãããã¡ã¤ã«ã
+	  å¤æ´ï¼ï¼ã¾ãï¼å¿
+è¦ã«å¿ãã¦ï¼TARGET_KERNEL_CFGã®è¨­å®ãè¿½å ããï¼
+
+(3) lock_cpu_dspï¼unlock_cpu_dspã®å®ç¾©ãè¿½å 
 	- lock_cpu_dspï¼unlock_cpu_dspã®å®ç¾©ãè¿½å ããï¼æé©åãããªãã®ã§
 	  ããã°ï¼lock_cpuï¼unlock_cpuã«å®ç¾©ããã°ããï¼
 
-(2) request_dispatchã®å®ç¾©ãè¿½å 
+(4) request_dispatchã®å®ç¾©ãè¿½å 
 	- request_dispatchã®å®ç¾©ãè¿½å ããï¼æ¨æºéãã®å®è£
 ã®å ´åã¯ï¼ç©ºã«å®
 	  ç¾©ããã°ããï¼
 
-(3) OVRTIMåãPRCTIMåã«ãªãã¼ã 
+(5) OVRTIMåãPRCTIMåã«ãªãã¼ã 
 	- ã¿ã¼ã²ããä¾å­é¨ã§OVRTIMåãä½¿ã£ã¦ããç®æãããã°ï¼PRCTIMåã«ä¿®
 	  æ­£ããï¼
 
-(4) kernel_cfg.hã¨offset.hã®ãã¡ã¤ã«å
-	- ã¿ã¼ã²ããä¾å­é¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã§ï¼åºåå
-ãkernel_cfg.hã
-	  offset.hã«ããFILEè¨è¿°ãããã°ï¼ããããï¼kernel_cfg.h.newã¨
-	  offset.h.newã«ãã¡ã¤ã«åãå¤æ´ããï¼
-
-(5) ãã£ã¬ã¯ããªãæå®ããå¤æ°åã®ãªãã¼ã 
-	- Makefileã®ã¿ã¼ã²ããä¾å­é¨ã§ï¼APPL_DIRï¼SYSSVC_DIRï¼KERNEL_DIRã
-	  è¨­å®ãã¦ããè¨è¿°ãããã°ï¼ããããï¼APPL_DIRSï¼SYSSVC_DIRSï¼
-	  KERNEL_DIRSã«ãªãã¼ã ããï¼
-
-(6) éçºç°å¢ä¾å­ã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+(6) Makefileã®ã¿ã¼ã²ããä¾å­é¨ã®ä¿®æ­£
+	- APPL_DIRï¼SYSSVC_DIRï¼KERNEL_DIRãè¨­å®ãã¦ããè¨è¿°ãããã°ï¼ãã
+	  ããï¼APPL_DIRSï¼SYSSVC_DIRSï¼KERNEL_DIRSã«ãªãã¼ã ããï¼
+	- SYSSVC_LIBSãä½¿ç¨ãã¦ããã°ï¼LIBSãä½¿ç¨ããããã«ä¿®æ­£ããï¼
+	- ä¾å­é¢ä¿ãä½æããã«ã¼ã«ãåé¤ããï¼
+
+(7) éçºç°å¢ä¾å­ã®ã³ã³ãã¤ã«ãªãã·ã§ã³
 	- Makefileã®ã¿ã¼ã²ããä¾å­é¨ã§ï¼DBGENVãè¨­å®ãã¦ããè¨è¿°ãããã°ï¼
 	  COPTSãç¨ããè¨­å®ã«å¤æ´ããï¼
+
+(8) TOPPERS_LABEL_ASMã®å»æ­¢ã¸ã®å¯¾å¿
+	- ã¢ã»ã³ããªè¨èªã¬ãã«ã®è­å¥åãï¼Cè¨èªã¬ãã«ã®è­å¥åã®å
+é ­ã«"_"ã
+	  ä»ãããã®ã«ãªãå ´åï¼ã¢ã»ã³ããªè¨èªã§å®ç¾©ï¼åç
+§ããé¢æ°ãå¤æ°ãª
+	  ã©ã«ã¤ãã¦ï¼ã¿ã¼ã²ããä¾å­é¨ã®ãªãã¼ã è¨è¿°ã«ãªã¹ãã¢ããããï¼
 
 ----------------------------------------------------------------------
@@ -356,5 +589,5 @@
 	- WINFO_FLGä¸­ã®waiptnã¨flgptnãå
 ±ç¨ï¼flgptnãå»æ­¢ï¼ï¼
-	- WINFO_SDTQã¨WINFO_RDTQãåºå¥ãã¦æ±ãããã«ä¿®æ­£ï¼
+	- WINFO_SDTQï¼SPDQã¨WINFO_RDTQï¼RPDQãåºå¥ãã¦æ±ãããã«ä¿®æ­£ï¼
 
 ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
Index: asp3_wo_tecs/trunk/extension/MANIFEST
===================================================================
--- asp3_wo_tecs/trunk/extension/MANIFEST	(revision 305)
+++ asp3_wo_tecs/trunk/extension/MANIFEST	(revision 306)
@@ -23,15 +23,15 @@
 messagebuf/kernel/allfunc.h
 messagebuf/kernel/check.h
-messagebuf/kernel/kernel.tf
-messagebuf/kernel/kernel_api.csv
-messagebuf/kernel/kernel_def.csv
+messagebuf/kernel/kernel.trb
+messagebuf/kernel/kernel_api.def
 messagebuf/kernel/kernel_impl.h
 messagebuf/kernel/kernel_int.h
 messagebuf/kernel/kernel_rename.def
 messagebuf/kernel/kernel_rename.h
+messagebuf/kernel/kernel_sym.def
 messagebuf/kernel/kernel_unrename.h
 messagebuf/kernel/messagebuf.c
 messagebuf/kernel/messagebuf.h
-messagebuf/kernel/messagebuf.tf
+messagebuf/kernel/messagebuf.trb
 messagebuf/kernel/task.h
 messagebuf/kernel/task_refer.c
@@ -55,15 +55,15 @@
 ovrhdr/kernel/check.h
 ovrhdr/kernel/interrupt.c
-ovrhdr/kernel/kernel.tf
-ovrhdr/kernel/kernel_api.csv
-ovrhdr/kernel/kernel_check.tf
-ovrhdr/kernel/kernel_def.csv
+ovrhdr/kernel/kernel.trb
+ovrhdr/kernel/kernel_api.def
+ovrhdr/kernel/kernel_check.trb
 ovrhdr/kernel/kernel_int.h
 ovrhdr/kernel/kernel_rename.def
 ovrhdr/kernel/kernel_rename.h
+ovrhdr/kernel/kernel_sym.def
 ovrhdr/kernel/kernel_unrename.h
 ovrhdr/kernel/overrun.c
 ovrhdr/kernel/overrun.h
-ovrhdr/kernel/overrun.tf
+ovrhdr/kernel/overrun.trb
 ovrhdr/kernel/sys_manage.c
 ovrhdr/kernel/task.c
@@ -90,7 +90,7 @@
 
 rstr_task/kernel/check.h
-rstr_task/kernel/kernel_def.csv
+rstr_task/kernel/kernel_sym.def
 rstr_task/kernel/sys_manage.c
-rstr_task/kernel/task.tf
+rstr_task/kernel/task.trb
 rstr_task/kernel/task_manage.c
 rstr_task/kernel/task_sync.c
@@ -107,13 +107,13 @@
 subprio/kernel/Makefile.kernel
 subprio/kernel/allfunc.h
-subprio/kernel/kernel_api.csv
+subprio/kernel/kernel_api.def
 subprio/kernel/kernel_rename.def
 subprio/kernel/kernel_rename.h
 subprio/kernel/kernel_unrename.h
-subprio/kernel/mutex.tf
+subprio/kernel/mutex.trb
 subprio/kernel/sys_manage.c
 subprio/kernel/task.c
 subprio/kernel/task.h
-subprio/kernel/task.tf
+subprio/kernel/task.trb
 subprio/kernel/task_manage.c
 subprio/kernel/task_refer.c
@@ -131,43 +131,37 @@
 dcre/kernel/alarm.c
 dcre/kernel/alarm.h
-dcre/kernel/alarm.tf
+dcre/kernel/alarm.trb
 dcre/kernel/allfunc.h
 dcre/kernel/check.h
 dcre/kernel/cyclic.c
 dcre/kernel/cyclic.h
-dcre/kernel/cyclic.tf
+dcre/kernel/cyclic.trb
 dcre/kernel/dataqueue.c
 dcre/kernel/dataqueue.h
-dcre/kernel/dataqueue.tf
 dcre/kernel/eventflag.c
 dcre/kernel/eventflag.h
-dcre/kernel/eventflag.tf
 dcre/kernel/interrupt.c
 dcre/kernel/interrupt.h
-dcre/kernel/interrupt.tf
-dcre/kernel/kernel.tf
-dcre/kernel/kernel_api.csv
-dcre/kernel/kernel_check.tf
-dcre/kernel/kernel_def.csv
+dcre/kernel/interrupt.trb
+dcre/kernel/kernel.trb
+dcre/kernel/kernel_api.def
+dcre/kernel/kernel_check.trb
 dcre/kernel/kernel_impl.h
 dcre/kernel/kernel_rename.def
 dcre/kernel/kernel_rename.h
+dcre/kernel/kernel_sym.def
 dcre/kernel/kernel_unrename.h
 dcre/kernel/mempfix.c
 dcre/kernel/mempfix.h
-dcre/kernel/mempfix.tf
 dcre/kernel/mutex.c
 dcre/kernel/mutex.h
-dcre/kernel/mutex.tf
 dcre/kernel/pridataq.c
 dcre/kernel/pridataq.h
-dcre/kernel/pridataq.tf
 dcre/kernel/semaphore.c
 dcre/kernel/semaphore.h
-dcre/kernel/semaphore.tf
 dcre/kernel/startup.c
 dcre/kernel/task.c
 dcre/kernel/task.h
-dcre/kernel/task.tf
+dcre/kernel/task.trb
 dcre/kernel/task_manage.c
 dcre/kernel/task_refer.c
Index: asp3_wo_tecs/trunk/extension/dcre/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/include/kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -723,6 +723,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/Makefile.kernel	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 333 2015-06-21 13:23:37Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -135,23 +135,23 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: alarm.c 451 2015-08-14 15:29:07Z ertl-hiro $
+ *  $Id: alarm.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -179,11 +179,16 @@
 	ALMCB		*p_almcb;
 	ALMINIB		*p_alminib;
-	T_NFYINFO	*p_nfyinfo;
+	ATR			almatr;
+	T_NFYINFO	nfyinfo, *p_nfyinfo;
 	ER			ercd, rercd;
 
 	LOG_ACRE_ALM_ENTER(pk_calm);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_calm->almatr, TA_NULL);
-	rercd = check_nfyinfo(&(pk_calm->nfyinfo));
+
+	almatr = pk_calm->almatr;
+	nfyinfo = pk_calm->nfyinfo;
+
+	CHECK_RSATR(almatr, TA_NULL);
+	rercd = check_nfyinfo(&nfyinfo);
 	if (rercd != E_OK) {
 		ercd = rercd;
@@ -199,12 +204,12 @@
 												- offsetof(ALMCB, tmevtb)));
 		p_alminib = (ALMINIB *)(p_almcb->p_alminib);
-		p_alminib->almatr = pk_calm->almatr;
-		if (pk_calm->nfyinfo.nfymode == TNFY_HANDLER) {
-			p_alminib->exinf = pk_calm->nfyinfo.nfy.handler.exinf;
-			p_alminib->nfyhdr = (NFYHDR)(pk_calm->nfyinfo.nfy.handler.tmehdr);
+		p_alminib->almatr = almatr;
+		if (nfyinfo.nfymode == TNFY_HANDLER) {
+			p_alminib->exinf = nfyinfo.nfy.handler.exinf;
+			p_alminib->nfyhdr = (NFYHDR)(nfyinfo.nfy.handler.tmehdr);
 		}
 		else {
 			p_nfyinfo = &aalm_nfyinfo_table[p_alminib - aalminib_table];
-			*p_nfyinfo = pk_calm->nfyinfo;
+			*p_nfyinfo = nfyinfo;
 			p_alminib->exinf = (intptr_t) p_nfyinfo;
 			p_alminib->nfyhdr = notify_handler;
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.tf	(revision 305)
+++ 	(revision )
@@ -1,174 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: alarm.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¢ã©ã¼ã éç¥æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_ALMã®å¦ç
-$
-$num_aalmid = 0$
-$FOREACH i AALM.ORDER_LIST$
-$	// noalmãè² ã®å ´åï¼E_PARï¼
-	$IF AALM.NOALM[i] < 0$
-		$ERROR AALM.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"noalm", AALM.NOALM[i], "AID_ALM")$
-		$END$
-	$END$
-	$num_aalmid = num_aalmid + AALM.NOALM[i]$
-$END$
-$num_almid = LENGTH(ALM.ID_LIST) + num_aalmid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_ALMID	$num_almid$$NL$
-$FOREACH id ALM.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Alarm Handler Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¢ã©ã¼ã éç¥ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id ALM.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããã¢ã©ã¼ã éç¥ã®æ°
-$
-#define TNUM_SALMID	$LENGTH(ALM.ID_LIST)$$NL$
-$NL$
-
-$
-$  ã¢ã©ã¼ã éç¥IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_almid = (TMIN_ALMID + TNUM_ALMID - 1);$NL$
-const ID _kernel_tmax_salmid = (TMIN_ALMID + TNUM_SALMID - 1);$NL$
-$NL$
-
-$
-$  ã¢ã©ã¼ã éç¥åæåãã­ãã¯
-$
-$IF LENGTH(ALM.ID_LIST)$
-	$FOREACH almid ALM.ID_LIST$
-$		// almatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2491ï¼½
-$		//ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF ALM.ALMATR[almid] != 0$
-			$ERROR ALM.TEXT_LINE[almid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"almatr", ALM.ALMATR[almid], almid, "CRE_ALM")$
-			$END$
-		$END$
-
-$		// éç¥æ
-å ±ã®å¦ç
-		$ALM.NFYHDR[almid] = GENERATE_NFYHDR(ALM.NFYMODE[almid],
-								ALM.PAR1[almid], ALM.PAR2[almid],
-								ALM.PAR3[almid], ALM.PAR4[almid],
-								ALM.TEXT_LINE[almid], almid, "CRE_ALM")$
-	$END$
-
-$	// ã¢ã©ã¼ã éç¥åæåãã­ãã¯
-	const ALMINIB _kernel_alminib_table[TNUM_SALMID] = {$NL$
-	$JOINEACH almid ALM.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($ALM.ALMATR[almid]$),$SPC$
-			(intptr_t)($ALM.PAR1[almid]$),$SPC$
-			$ALM.NFYHDR[almid]$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const ALMINIB, _kernel_alminib_table);$NL$
-$END$$NL$
-
-$
-$  åççæã¢ã©ã¼ã éç¥ç¨ã®ã¢ã©ã¼ã éç¥åæåãã­ãã¯ã¨éç¥æ¹æ³ã®æ ¼ç´
-$  ã¨ãªã¢
-$
-$IF num_aalmid > 0$
-	ALMINIB _kernel_aalminib_table[$num_aalmid$];$NL$
-	T_NFYINFO _kernel_aalm_nfyinfo_table[$num_aalmid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(ALMINIB, _kernel_aalminib_table);$NL$
-	TOPPERS_EMPTY_LABEL(T_NFYINFO, _kernel_aalm_nfyinfo_table);$NL$
-$END$$NL$
-
-$
-$  ã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯ã¨ã¢ã©ã¼ã éç¥æ©è½åæåé¢æ°
-$
-$IF num_almid > 0$
-	ALMCB _kernel_almcb_table[TNUM_ALMID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_alarm();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(ALMCB, _kernel_almcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.trb	(revision 306)
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: alarm.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		ã¢ã©ã¼ã éç¥æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class AlarmObject < KernelObject
+  def initialize()
+    super("alm", "alarm")
+    @inibList["T_NFYINFO"] = "aalm_nfyinfo_table"
+  end
+
+  def prepare(key, params)
+    # almatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2491ï¼½
+    #ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:almatr] & ~($TA_STA)) != 0
+      error_illegal_id("E_RSATR", params, :almatr, :almid)
+    end
+
+    # éç¥æ
+å ±ã®å¦ç
+    params[:nfyhdr] = generateNotifyHandler(key, params, :almid)
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:almatr]}), (intptr_t)(#{params[:par1]}), " \
+												"#{params[:nfyhdr]}")
+  end
+end
+
+#
+#  ã¢ã©ã¼ã éç¥ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Alarm Notification Functions")
+AlarmObject.new.generate()
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/check.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/check.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/check.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: check.h 356 2015-07-25 10:44:32Z ertl-hiro $
+ *  $Id: check.h 580 2016-02-03 11:03:59Z ertl-hiro $
  */
 
@@ -237,5 +237,5 @@
 
 /*
- *  äºç´å±æ§ã¨ã©ã¼ã®ãã§ãã¯ï¼E_PARï¼
+ *  äºç´å±æ§ã¨ã©ã¼ã®ãã§ãã¯ï¼E_RSATRï¼
  */
 #define CHECK_RSATR(atr, valid_atr) do {					\
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: cyclic.c 451 2015-08-14 15:29:07Z ertl-hiro $
+ *  $Id: cyclic.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -190,17 +190,26 @@
 	CYCCB		*p_cyccb;
 	CYCINIB		*p_cycinib;
-	T_NFYINFO	*p_nfyinfo;
+	ATR			cycatr;
+	T_NFYINFO	nfyinfo, *p_nfyinfo;
+	RELTIM		cyctim;
+	RELTIM		cycphs;
 	ER			ercd, rercd;
 
 	LOG_ACRE_CYC_ENTER(pk_ccyc);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_ccyc->cycatr, TA_STA);
-	rercd = check_nfyinfo(&(pk_ccyc->nfyinfo));
+
+	cycatr = pk_ccyc->cycatr;
+	nfyinfo = pk_ccyc->nfyinfo;
+	cyctim = pk_ccyc->cyctim;
+	cycphs = pk_ccyc->cycphs;
+
+	CHECK_RSATR(cycatr, TA_STA);
+	rercd = check_nfyinfo(&nfyinfo);
 	if (rercd != E_OK) {
 		ercd = rercd;
 		goto error_exit;
 	}
-	CHECK_PAR(0 < pk_ccyc->cyctim && pk_ccyc->cyctim <= TMAX_RELTIM);
-	CHECK_PAR(0 <= pk_ccyc->cycphs && pk_ccyc->cycphs <= TMAX_RELTIM);
+	CHECK_PAR(0 < cyctim && cyctim <= TMAX_RELTIM);
+	CHECK_PAR(0 <= cycphs && cycphs <= TMAX_RELTIM);
 
 	lock_cpu();
@@ -212,17 +221,17 @@
 												- offsetof(CYCCB, tmevtb)));
 		p_cycinib = (CYCINIB *)(p_cyccb->p_cycinib);
-		p_cycinib->cycatr = pk_ccyc->cycatr;
-		if (pk_ccyc->nfyinfo.nfymode == TNFY_HANDLER) {
-			p_cycinib->exinf = pk_ccyc->nfyinfo.nfy.handler.exinf;
-			p_cycinib->nfyhdr = (NFYHDR)(pk_ccyc->nfyinfo.nfy.handler.tmehdr);
+		p_cycinib->cycatr = cycatr;
+		if (nfyinfo.nfymode == TNFY_HANDLER) {
+			p_cycinib->exinf = nfyinfo.nfy.handler.exinf;
+			p_cycinib->nfyhdr = (NFYHDR)(nfyinfo.nfy.handler.tmehdr);
 		}
 		else {
 			p_nfyinfo = &acyc_nfyinfo_table[p_cycinib - acycinib_table];
-			*p_nfyinfo = pk_ccyc->nfyinfo;
+			*p_nfyinfo = nfyinfo;
 			p_cycinib->exinf = (intptr_t) p_nfyinfo;
 			p_cycinib->nfyhdr = notify_handler;
 		}
-		p_cycinib->cyctim = pk_ccyc->cyctim;
-		p_cycinib->cycphs = pk_ccyc->cycphs;
+		p_cycinib->cyctim = cyctim;
+		p_cycinib->cycphs = cycphs;
 
 		if ((p_cyccb->p_cycinib->cycatr & TA_STA) != 0U) {
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.tf	(revision 305)
+++ 	(revision )
@@ -1,191 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: cyclic.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		å¨æéç¥æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_CYCã®å¦ç
-$
-$num_acycid = 0$
-$FOREACH i ACYC.ORDER_LIST$
-$	// nocycãè² ã®å ´åï¼E_PARï¼
-	$IF ACYC.NOCYC[i] < 0$
-		$ERROR ACYC.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nocyc", ACYC.NOCYC[i], "AID_CYC")$
-		$END$
-	$END$
-	$num_acycid = num_acycid + ACYC.NOCYC[i]$
-$END$
-$num_cycid = LENGTH(CYC.ID_LIST) + num_acycid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_CYCID	$num_cycid$$NL$
-$FOREACH id CYC.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Cyclic Handler Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  å¨æéç¥ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id CYC.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããå¨æéç¥ã®æ°
-$
-#define TNUM_SCYCID	$LENGTH(CYC.ID_LIST)$$NL$
-$NL$
-
-$
-$  å¨æéç¥IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_cycid = (TMIN_CYCID + TNUM_CYCID - 1);$NL$
-const ID _kernel_tmax_scycid = (TMIN_CYCID + TNUM_SCYCID - 1);$NL$
-$NL$
-
-$
-$  å¨æéç¥åæåãã­ãã¯
-$
-$IF LENGTH(CYC.ID_LIST)$
-	$FOREACH cycid CYC.ID_LIST$
-$		// cycatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2383ï¼½
-$		//ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (CYC.CYCATR[cycid] & ~TA_STA) != 0$
-			$ERROR CYC.TEXT_LINE[cycid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-					"cycatr", CYC.CYCATR[cycid], cycid, "CRE_CYC")$
-			$END$
-		$END$
-
-$		// (0 < cyctim && cyctim <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2397ï¼½
-		$IF !(0 < CYC.CYCTIM[cycid] && CYC.CYCTIM[cycid] <= TMAX_RELTIM)$
-			$ERROR CYC.TEXT_LINE[cycid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"cyctim", CYC.CYCTIM[cycid], cycid, "CRE_CYC")$
-			$END$
-		$END$
-
-$		// (0 <= cycphs && cycphs <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2399ï¼½
-		$IF !(0 <= CYC.CYCPHS[cycid] && CYC.CYCPHS[cycid] <= TMAX_RELTIM)$
-			$ERROR CYC.TEXT_LINE[cycid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"cycphs", CYC.CYCPHS[cycid], cycid, "CRE_CYC")$
-			$END$
-		$END$
-
-$		// éç¥æ
-å ±ã®å¦ç
-		$CYC.NFYHDR[cycid] = GENERATE_NFYHDR(CYC.NFYMODE[cycid],
-								CYC.PAR1[cycid], CYC.PAR2[cycid],
-								CYC.PAR3[cycid], CYC.PAR4[cycid],
-								CYC.TEXT_LINE[cycid], cycid, "CRE_CYC")$
-	$END$
-
-$	// å¨æéç¥åæåãã­ãã¯
-	const CYCINIB _kernel_cycinib_table[TNUM_SCYCID] = {$NL$
-	$JOINEACH cycid CYC.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($CYC.CYCATR[cycid]$),$SPC$
-			(intptr_t)($CYC.PAR1[cycid]$),$SPC$
-			$CYC.NFYHDR[cycid]$,$SPC$
-			($CYC.CYCTIM[cycid]$),$SPC$
-			($CYC.CYCPHS[cycid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const CYCINIB, _kernel_cycinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæå¨æéç¥ç¨ã®å¨æéç¥åæåãã­ãã¯
-$
-$IF num_acycid > 0$
-	CYCINIB _kernel_acycinib_table[$num_acycid$];$NL$
-	T_NFYINFO _kernel_acyc_nfyinfo_table[$num_acycid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(CYCINIB, _kernel_acycinib_table);$NL$
-	TOPPERS_EMPTY_LABEL(T_NFYINFO, _kernel_acyc_nfyinfo_table);$NL$
-$END$$NL$
-
-$
-$  å¨æéç¥ç®¡çãã­ãã¯ã¨å¨æéç¥æ©è½åæåé¢æ°
-$
-$IF num_cycid > 0$
-	CYCCB _kernel_cyccb_table[TNUM_CYCID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_cyclic();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(CYCCB, _kernel_cyccb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.trb	(revision 306)
@@ -0,0 +1,101 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: cyclic.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		å¨æéç¥æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class CyclicObject < KernelObject
+  def initialize()
+    super("cyc", "cyclic")
+    @inibList["T_NFYINFO"] = "acyc_nfyinfo_table"
+  end
+
+  def prepare(key, params)
+    # cycatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2383ï¼½
+    #ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:cycatr] & ~($TA_STA)) != 0
+      error_illegal_id("E_RSATR", params, :cycatr, :cycid)
+    end
+
+    # (0 < cyctim && cyctim <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2397ï¼½
+    if !(0 < params[:cyctim] && params[:cyctim] <= $TMAX_RELTIM)
+      error_illegal_id("E_PAR", params, :cyctim, :cycid)
+    end
+
+    # (0 <= cycphs && cycphs <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2399ï¼½
+    if !(0 <= params[:cycphs] && params[:cycphs] <= $TMAX_RELTIM)
+      error_illegal_id("E_PAR", params, :cycphs, :cycid)
+    end
+
+    # éç¥æ
+å ±ã®å¦ç
+    params[:nfyhdr] = generateNotifyHandler(key, params, :cycid)
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:cycatr]}), (intptr_t)(#{params[:par1]}), " \
+			"#{params[:nfyhdr]}, (#{params[:cyctim]}), (#{params[:cycphs]})")
+  end
+end
+
+#
+#  å¨æéç¥ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Cyclic Notification Functions")
+CyclicObject.new.generate()
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: dataqueue.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: dataqueue.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -360,4 +360,5 @@
 	DTQINIB		*p_dtqinib;
 	ATR			dtqatr;
+	uint_t		dtqcnt;
 	DTQMB		*p_dtqmb;
 	ER			ercd;
@@ -365,7 +366,10 @@
 	LOG_ACRE_DTQ_ENTER(pk_cdtq);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cdtq->dtqatr, TA_TPRI);
+
 	dtqatr = pk_cdtq->dtqatr;
+	dtqcnt = pk_cdtq->dtqcnt;
 	p_dtqmb = pk_cdtq->dtqmb;
+
+	CHECK_RSATR(dtqatr, TA_TPRI);
 
 	lock_cpu();
@@ -374,9 +378,9 @@
 	}
 	else {
-		if (pk_cdtq->dtqcnt != 0 && p_dtqmb == NULL) {
-			p_dtqmb = kernel_malloc(sizeof(DTQMB) * pk_cdtq->dtqcnt);
+		if (dtqcnt != 0 && p_dtqmb == NULL) {
+			p_dtqmb = kernel_malloc(sizeof(DTQMB) * dtqcnt);
 			dtqatr |= TA_MBALLOC;
 		}
-		if (pk_cdtq->dtqcnt != 0 && p_dtqmb == NULL) {
+		if (dtqcnt != 0 && p_dtqmb == NULL) {
 			ercd = E_NOMEM;
 		}
@@ -385,5 +389,5 @@
 			p_dtqinib = (DTQINIB *)(p_dtqcb->p_dtqinib);
 			p_dtqinib->dtqatr = dtqatr;
-			p_dtqinib->dtqcnt = pk_cdtq->dtqcnt;
+			p_dtqinib->dtqcnt = dtqcnt;
 			p_dtqinib->p_dtqmb = p_dtqmb;
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.tf	(revision 305)
+++ 	(revision )
@@ -1,189 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: dataqueue.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_DTQã®å¦ç
-$
-$num_adtqid = 0$
-$FOREACH i ADTQ.ORDER_LIST$
-$	// nodtqãè² ã®å ´åï¼E_PARï¼
-	$IF ADTQ.NODTQ[i] < 0$
-		$ERROR ADTQ.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nodtq", ADTQ.NODTQ[i], "AID_DTQ")$
-		$END$
-	$END$
-	$num_adtqid = num_adtqid + ADTQ.NODTQ[i]$
-$END$
-$num_dtqid = LENGTH(DTQ.ID_LIST) + num_adtqid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_DTQID	$num_dtqid$$NL$
-$FOREACH id DTQ.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Dataqueue Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ãã¼ã¿ã­ã¥ã¼ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id DTQ.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæããããã¼ã¿ã­ã¥ã¼ã®æ°
-$
-#define TNUM_SDTQID	$LENGTH(DTQ.ID_LIST)$$NL$
-$NL$
-
-$
-$  ãã¼ã¿ã­ã¥ã¼IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_dtqid = (TMIN_DTQID + TNUM_DTQID - 1);$NL$
-const ID _kernel_tmax_sdtqid = (TMIN_DTQID + TNUM_SDTQID - 1);$NL$
-$NL$
-
-$
-$  ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-$
-$IF LENGTH(DTQ.ID_LIST)$
-	$FOREACH dtqid DTQ.ID_LIST$
-$		// dtqatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1669ï¼½
-$		//ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (DTQ.DTQATR[dtqid] & ~TA_TPRI) != 0$
-			$ERROR DTQ.TEXT_LINE[dtqid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"dtqatr", DTQ.DTQATR[dtqid], dtqid, "CRE_DTQ")$
-			$END$
-		$END$
-
-$		// dtqcntãè² ã®å ´åï¼E_PARï¼ï¼»NGKI3288ï¼½
-		$IF DTQ.DTQCNT[dtqid] < 0$
-			$ERROR DTQ.TEXT_LINE[dtqid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"dtqcnt", DTQ.DTQCNT[dtqid], dtqid, "CRE_DTQ")$
-			$END$
-		$END$
-
-$		// dtqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0132ï¼½
-		$IF !EQ(DTQ.DTQMB[dtqid], "NULL")$
-			$ERROR DTQ.TEXT_LINE[dtqid]$E_NOSPT:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"dtqmb", DTQ.DTQMB[dtqid], dtqid, "CRE_DTQ")$
-			$END$
-		$END$
-
-$		// ãã¼ã¿ã­ã¥ã¼ç®¡çé å
-		$IF DTQ.DTQCNT[dtqid]$
-			static DTQMB _kernel_dtqmb_$dtqid$[$DTQ.DTQCNT[dtqid]$];$NL$
-		$END$
-	$END$
-
-$	// ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-	const DTQINIB _kernel_dtqinib_table[TNUM_SDTQID] = {$NL$
-	$JOINEACH dtqid DTQ.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($DTQ.DTQATR[dtqid]$),$SPC$
-			($DTQ.DTQCNT[dtqid]$),$SPC$
-			$IF DTQ.DTQCNT[dtqid]$
-				_kernel_dtqmb_$dtqid$
-			$ELSE$
-				NULL
-			$END$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const DTQINIB, _kernel_dtqinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæãã¼ã¿ã­ã¥ã¼ç¨ã®ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯ã®çæ
-$
-$IF num_adtqid > 0$
-	DTQINIB _kernel_adtqinib_table[$num_adtqid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(DTQINIB, _kernel_adtqinib_table);$NL$
-$END$$NL$
-
-$
-$  ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã¨ãã¼ã¿ã­ã¥ã¼æ©è½åæåé¢æ°
-$
-$IF num_dtqid > 0$
-	DTQCB _kernel_dtqcb_table[TNUM_DTQID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_dataqueue();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(DTQCB, _kernel_dtqcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: eventflag.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: eventflag.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -212,4 +212,10 @@
 /*
  *  ã¤ãã³ããã©ã°ã®çæ
+ *
+ *  pk_cflg->iflgptnã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼
+ *  ã­ã¼ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããª
+ *  ãï¼ï¼
  */
 #ifdef TOPPERS_acre_flg
@@ -220,9 +226,13 @@
 	FLGCB	*p_flgcb;
 	FLGINIB	*p_flginib;
+	ATR		flgatr;
 	ER		ercd;
 
 	LOG_ACRE_FLG_ENTER(pk_cflg);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cflg->flgatr, TA_TPRI|TA_WMUL|TA_CLR);
+
+	flgatr = pk_cflg->flgatr;
+
+	CHECK_RSATR(flgatr, TA_TPRI|TA_WMUL|TA_CLR);
 
 	lock_cpu();
@@ -233,5 +243,5 @@
 		p_flgcb = ((FLGCB *) queue_delete_next(&free_flgcb));
 		p_flginib = (FLGINIB *)(p_flgcb->p_flginib);
-		p_flginib->flgatr = pk_cflg->flgatr;
+		p_flginib->flgatr = flgatr;
 		p_flginib->iflgptn = pk_cflg->iflgptn;
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.tf	(revision 305)
+++ 	(revision )
@@ -1,171 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: eventflag.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¤ãã³ããã©ã°æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_FLGã®å¦ç
-$
-$num_aflgid = 0$
-$FOREACH i AFLG.ORDER_LIST$
-$	// noflgãè² ã®å ´åï¼E_PARï¼
-	$IF AFLG.NOFLG[i] < 0$
-		$ERROR AFLG.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"noflg", AFLG.NOFLG[i], "AID_FLG")$
-		$END$
-	$END$
-	$num_aflgid = num_aflgid + AFLG.NOFLG[i]$
-$END$
-$num_flgid = LENGTH(FLG.ID_LIST) + num_aflgid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_FLGID	$num_flgid$$NL$
-$FOREACH id FLG.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Eventflag Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¤ãã³ããã©ã°ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id FLG.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããã¤ãã³ããã©ã°ã®æ°
-$
-#define TNUM_SFLGID	$LENGTH(FLG.ID_LIST)$$NL$
-$NL$
-
-$
-$  ã¤ãã³ããã©ã°IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_flgid = (TMIN_FLGID + TNUM_FLGID - 1);$NL$
-const ID _kernel_tmax_sflgid = (TMIN_FLGID + TNUM_SFLGID - 1);$NL$
-$NL$
-
-$
-$  ã¤ãã³ããã©ã°åæåãã­ãã¯
-$
-$IF LENGTH(FLG.ID_LIST)$
-	$FOREACH flgid FLG.ID_LIST$
-$		// flgatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1562ï¼½
-$		//ï¼TA_TPRIï¼TA_WMULï¼TA_CLRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (FLG.FLGATR[flgid] & ~(TA_TPRI|TA_WMUL|TA_CLR)) != 0$
-			$ERROR FLG.TEXT_LINE[flgid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"flgatr", FLG.FLGATR[flgid], flgid, "CRE_FLG")$
-			$END$
-		$END$
-
-$		// iflgptnãFLGPTNã«æ ¼ç´ã§ããªãå ´åï¼E_PARï¼ï¼»NGKI3275ï¼½
-		$IF (FLG.IFLGPTN[flgid] & ~((1 << TBIT_FLGPTN) - 1)) != 0$
-			$ERROR FLG.TEXT_LINE[flgid]$E_PAR:$SPC$
-				$FORMAT(_("too large %1% `%2%\' of `%3%\' in %4%"),
-							"iflgptn", FLG.IFLGPTN[flgid], flgid, "CRE_FLG")$
-			$END$
-		$END$
-	$END$
-
-$	// ã¤ãã³ããã©ã°åæåãã­ãã¯
-	const FLGINIB _kernel_flginib_table[TNUM_SFLGID] = {$NL$
-	$JOINEACH flgid FLG.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($FLG.FLGATR[flgid]$),$SPC$
-			($FLG.IFLGPTN[flgid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const FLGINIB, _kernel_flginib_table);$NL$
-$END$$NL$
-
-$
-$  åççæã¤ãã³ããã©ã°ç¨ã®ã¤ãã³ããã©ã°åæåãã­ãã¯
-$
-$IF num_aflgid > 0$
-	FLGINIB _kernel_aflginib_table[$num_aflgid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(FLGINIB, _kernel_aflginib_table);$NL$
-$END$$NL$
-
-$
-$  ã¤ãã³ããã©ã°ç®¡çãã­ãã¯ã¨ã¤ãã³ããã©ã°æ©è½åæåé¢æ°
-$
-$IF num_flgid > 0$
-	FLGCB _kernel_flgcb_table[TNUM_FLGID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_eventflag();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(FLGCB, _kernel_flgcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: interrupt.c 275 2014-11-03 14:26:05Z ertl-hiro $
+ *  $Id: interrupt.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -176,6 +176,7 @@
 	}
 	for (i = 0; i < tnum_sisr; i++) {
-		p_isrcb = &(isrcb_table[i]);
-		p_isrcb->p_isrinib = &(isrinib_table[i]);
+		j = INDEX_ISR(isrorder_table[i]);
+		p_isrcb = &(isrcb_table[j]);
+		p_isrcb->p_isrinib = &(isrinib_table[j]);
 		enqueue_isr(p_isrcb->p_isrinib->p_isr_queue, p_isrcb);
 	}
@@ -255,4 +256,9 @@
 /*
  *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®çæ
+ *
+ *  pk_cisr->exinfã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼ã­ã¼
+ *  ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããªãï¼ï¼
  */
 #ifdef TOPPERS_acre_isr
@@ -261,18 +267,28 @@
 acre_isr(const T_CISR *pk_cisr)
 {
-	ISRCB	*p_isrcb;
-	ISRINIB	*p_isrinib;
-	QUEUE	*p_isr_queue;
-	ER		ercd;
+	ISRCB		*p_isrcb;
+	ISRINIB		*p_isrinib;
+	QUEUE		*p_isr_queue;
+	ATR			isratr;
+	INTNO		intno;
+	ISR			isr;
+	PRI			isrpri;
+	ER			ercd;
 
 	LOG_ACRE_ISR_ENTER(pk_cisr);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cisr->isratr, TARGET_ISRATR);
-	CHECK_PAR(VALID_INTNO_CREISR(pk_cisr->intno));
-	CHECK_PAR(FUNC_ALIGN(pk_cisr->isr));
-	CHECK_PAR(FUNC_NONNULL(pk_cisr->isr));
-	CHECK_PAR(VALID_ISRPRI(pk_cisr->isrpri));
-
-	p_isr_queue = search_isr_queue(pk_cisr->intno);
+
+	isratr = pk_cisr->isratr;
+	intno = pk_cisr->intno;
+	isr = pk_cisr->isr;
+	isrpri = pk_cisr->isrpri;
+
+	CHECK_RSATR(isratr, TARGET_ISRATR);
+	CHECK_PAR(VALID_INTNO_CREISR(intno));
+	CHECK_PAR(FUNC_ALIGN(isr));
+	CHECK_PAR(FUNC_NONNULL(isr));
+	CHECK_PAR(VALID_ISRPRI(isrpri));
+
+	p_isr_queue = search_isr_queue(intno);
 	CHECK_OBJ(p_isr_queue != NULL);
 
@@ -284,9 +300,9 @@
 		p_isrcb = ((ISRCB *) queue_delete_next(&free_isrcb));
 		p_isrinib = (ISRINIB *)(p_isrcb->p_isrinib);
-		p_isrinib->isratr = pk_cisr->isratr;
+		p_isrinib->isratr = isratr;
 		p_isrinib->exinf = pk_cisr->exinf;
 		p_isrinib->p_isr_queue = p_isr_queue;
-		p_isrinib->isr = pk_cisr->isr;
-		p_isrinib->isrpri = pk_cisr->isrpri;
+		p_isrinib->isr = isr;
+		p_isrinib->isrpri = isrpri;
 		enqueue_isr(p_isr_queue, p_isrcb);
 		ercd = ISRID(p_isrcb);
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: interrupt.h 356 2015-07-25 10:44:32Z ertl-hiro $
+ *  $Id: interrupt.h 613 2016-02-08 04:29:27Z ertl-hiro $
  */
 
@@ -130,4 +130,9 @@
 
 /*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³çæé åºãã¼ãã«ï¼kernel_cfg.cï¼
+ */
+extern const ID	isrorder_table[];
+
+/*
  *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
  */
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.tf	(revision 305)
+++ 	(revision )
@@ -1,556 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: interrupt.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		å²è¾¼ã¿ç®¡çæ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_ISRã®å¦ç
-$
-$num_aisrid = 0$
-$FOREACH i AISR.ORDER_LIST$
-$	// noisrãè² ã®å ´åï¼E_PARï¼
-	$IF AISR.NOISR[i] < 0$
-		$ERROR AISR.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"noisr", AISR.NOISR[i], "AID_ISR")$
-		$END$
-	$END$
-	$num_aisrid = num_aisrid + AISR.NOISR[i]$
-$END$
-$num_isrid = LENGTH(ISR.ID_LIST) + num_aisrid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_ISRID	$num_isrid$$NL$
-$FOREACH id ISR.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Interrupt Management Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·ã®ããã©
-$  ã«ãå®ç¾©
-$
-$IF !LENGTH(INTNO_CREISR_VALID)$
-	$INTNO_CREISR_VALID = INTNO_VALID$
-$END$
-$IF !LENGTH(INHNO_CREISR_VALID)$
-	$INHNO_CREISR_VALID = INHNO_VALID$
-$END$
-
-$
-$  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿åªå
-åº¦ã®ããã©ã«ãå®ç¾©
-$ 
-$IF !LENGTH(INTPRI_CFGINT_VALID)$
-	$INTPRI_CFGINT_VALID = RANGE(TMIN_INTPRI, TMAX_INTPRI)$
-$END$
-
-$
-$  å²è¾¼ã¿çªå·ã¨å²è¾¼ã¿ãã³ãã©çªå·ã®å¤æãã¼ãã«ã®ä½æ
-$
-$IF LENGTH(INTNO_CREISR_VALID) != LENGTH(INHNO_CREISR_VALID)$
-	$ERROR$length of `INTNO_CREISR_VALID' is different from length of `INHNO_CREISR_VALID'$END$
-$END$
-$i = 0$
-$FOREACH intno INTNO_CREISR_VALID$
-	$inhno = AT(INHNO_CREISR_VALID, i)$
-	$INHNO[intno] = inhno$
-	$INTNO[inhno] = intno$
-	$i = i + 1$
-$END$
-
-$
-$  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$ INTNO_LISTï¼å¦çæ¸ã¿ã®å²è¾¼ã¿çªå·ã®ãªã¹ãï¼ããã§ã®ã¿ä½¿ç¨ï¼
-$
-$FOREACH intno INT.ORDER_LIST$
-$	// intnoãå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI2972ï¼½
-	$IF !LENGTH(FIND(INTNO_VALID, INT.INTNO[intno]))$
-		$ERROR INT.TEXT_LINE[intno]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"intno", INT.INTNO[intno], "CFG_INT")$
-		$END$
-	$END$
-
-$	// intnoãCFG_INTã«ãã£ã¦è¨­å®æ¸ã¿ã®å ´åï¼E_OBJï¼ï¼»NGKI2976ï¼½
-	$IF LENGTH(FIND(INTNO_LIST, INT.INTNO[intno]))$
-		$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is duplicated"),
-						"intno", INT.INTNO[intno], "CFG_INT")$
-		$END$
-	$END$
-
-$	// intatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2969ï¼½
-$	//ï¼TA_ENAINTï¼TA_EDGEï¼TARGET_INTATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (INT.INTATR[intno] & ~(TA_ENAINT|TA_EDGE|TARGET_INTATR)) != 0$
-		$ERROR INT.TEXT_LINE[intno]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"intatr", INT.INTATR[intno], "intno",
-						INT.INTNO[intno], "CFG_INT")$
-		$END$
-	$END$
-
-$	// intpriãCFG_INTã«å¯¾ããå²è¾¼ã¿åªå
-åº¦ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
-$	// ï¼»NGKI2973ï¼½
-	$IF !LENGTH(FIND(INTPRI_CFGINT_VALID, INT.INTPRI[intno]))$
-		$ERROR INT.TEXT_LINE[intno]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"intpri", INT.INTPRI[intno], "CFG_INT")$
-		$END$
-	$END$
-
-$	// ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRI
-$	// ãããå°ããå¤ãæå®ãããªãã£ãå ´åï¼E_OBJï¼ï¼»NGKI2983ï¼½
-	$IF LENGTH(FIND(INTNO_FIX_NONKERNEL, intno))$
-		$IF INT.INTPRI[intno] >= TMIN_INTPRI$
-			$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' must have higher priority than %3%"),
-							"intno", INT.INTNO[intno], "TMIN_INTPRI")$
-			$END$
-		$END$
-	$END$
-
-$	// ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRI
-$	// ãããå°ããå¤ãæå®ãããå ´åï¼E_OBJï¼ï¼»NGKI2984ï¼½
-	$IF LENGTH(FIND(INTNO_FIX_KERNEL, intno))$
-		$IF INT.INTPRI[intno] < TMIN_INTPRI$
-			$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' must not have higher priority than %3%"),
-							"intno", INT.INTNO[intno], "TMIN_INTPRI")$
-			$END$
-		$END$
-	$END$
-
-	$INTNO_LIST = APPEND(INTNO_LIST, INT.INTNO[intno])$
-$END$
-
-$
-$  å²è¾¼ã¿ãã³ãã©ã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$ INHNO_LISTï¼å¦çæ¸ã¿ã®å²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ãï¼ããã§ã®ã¿ä½¿ç¨ï¼
-$
-$FOREACH inhno INH.ORDER_LIST$
-$	// inhnoãå²è¾¼ã¿ãã³ãã©çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3055ï¼½
-	$IF !LENGTH(FIND(INHNO_VALID, INH.INHNO[inhno]))$
-		$ERROR INH.TEXT_LINE[inhno]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"inhno", INH.INHNO[inhno], "DEF_INH")$
-		$END$
-	$END$
-
-$	// inhnoãDEF_INHã«ãã£ã¦è¨­å®æ¸ã¿ã®å ´åï¼E_OBJï¼ï¼»NGKI3063ï¼½
-	$IF LENGTH(FIND(INHNO_LIST, INH.INHNO[inhno]))$
-		$ERROR INH.TEXT_LINE[inhno]$E_OBJ:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is duplicated"),
-						"inhno", INH.INHNO[inhno], "DEF_INH")$
-		$END$
-	$END$
-
-$	// inhatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3052ï¼½
-$	//ï¼TARGET_INHATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (INH.INHATR[inhno] & ~TARGET_INHATR) != 0$
-		$ERROR INH.TEXT_LINE[inhno]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"inhatr", INH.INHATR[inhno], "inhno",
-						INH.INHNO[inhno], "DEF_INH")$
-		$END$
-	$END$
-
-$	// ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNEL
-$	// ãæå®ããã¦ããªãå ´åï¼E_RSATRï¼ï¼»NGKI3067ï¼½
-	$IF LENGTH(FIND(INHNO_FIX_NONKERNEL, inhno))$
-		$IF (INH.INHATR[inhno] & TA_NONKERNEL) == 0$
-			$ERROR INH.TEXT_LINE[inhno]$E_RSATR:$SPC$
-				$FORMAT(_("%1% `%2%\' must be non-kernel interrupt"),
-							"inhno", INH.INHNO[inhno])$
-			$END$
-		$END$
-	$END$
-
-$	// ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNEL
-$	//ããæå®ããã¦ããå ´åï¼E_RSATRï¼ï¼»NGKI3068ï¼½
-	$IF LENGTH(FIND(INHNO_FIX_KERNEL, inhno))$
-		$IF (INH.INHATR[inhno] & TA_NONKERNEL) != 0$
-			$ERROR INH.TEXT_LINE[inhno]$E_RSATR:$SPC$
-				$FORMAT(_("%1% `%2%\' must not be non-kernel interrupt"),
-							"inhno", INH.INHNO[inhno])$
-			$END$
-		$END$
-	$END$
-
-	$IF LENGTH(INTNO[INH.INHNO[inhno]])$
-		$intno = INTNO[INH.INHNO[inhno]]$
-$		// inhnoã«å¯¾å¿ããintnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3062ï¼½
-		$IF !LENGTH(INT.INTNO[intno])$
-			$ERROR INH.TEXT_LINE[inhno]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' corresponding to %3% `%4%\' is not configured with %5%"),
-						"intno", intno, "inhno", INH.INHNO[inhno], "CFG_INT")$
-			$END$
-		$ELSE$
-			$IF (INH.INHATR[inhno] & TA_NONKERNEL) == 0$
-$				// inhatrã«TA_NONKERNELãæå®ããã¦ãããï¼inhnoã«å¯¾å¿
-$				// ããintnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
-åº¦ã
-$				// TMIN_INTPRIãããå°ããå ´åï¼E_OBJï¼ï¼»NGKI3065ï¼½
-				$IF INT.INTPRI[intno] < TMIN_INTPRI$
-					$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-						$FORMAT(_("%1% `%2%\' configured for %3% `%4%\' is higher than %5%"),
-									"intpri", INT.INTPRI[intno], "inhno",
-									INH.INHNO[inhno], "TMIN_INTPRI")$
-					$END$
-				$END$
-			$ELSE$
-$				// inhatrã«TA_NONKERNELãæå®ããã¦ããï¼inhnoã«å¯¾å¿
-$				// ããintnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
-åº¦ã
-$				// TMIN_INTPRIä»¥ä¸ã§ããå ´åï¼E_OBJï¼ï¼»NGKI3066ï¼½
-				$IF INT.INTPRI[intno] >= TMIN_INTPRI$
-					$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-						$FORMAT(_("%1% `%2%\' configured for %3% `%4%\' is lower than or equal to %5%"),
-									"intpri", INT.INTPRI[intno], "inhno",
-									INH.INHNO[inhno], "TMIN_INTPRI")$
-					$END$
-				$END$
-			$END$
-		$END$
-	$END$
-
-	$INHNO_LIST = APPEND(INHNO_LIST, INH.INHNO[inhno])$
-$END$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH id ISR.ID_LIST$
-$	// isratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2998ï¼½
-$	//ï¼TARGET_ISRATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (ISR.ISRATR[id] & ~TARGET_ISRATR) != 0$
-		$ERROR ISR.TEXT_LINE[id]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"isratr", ISR.ISRATR[id], "CRE_ISR")$
-		$END$
-	$END$
-
-$	// intnoãCRE_ISRã«å¯¾ããå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
-$	// ï¼»NGKI3003ï¼½
-	$IF !LENGTH(FIND(INTNO_CREISR_VALID, ISR.INTNO[id]))$
-		$ERROR ISR.TEXT_LINE[id]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"intno", ISR.INTNO[id], "CRE_ISR")$
-		$END$
-	$END$
-
-$	// (TMIN_ISRPRI <= isrpri && isrpri <= TMAX_ISRPRI)ã§ãªãå ´åï¼E_PARï¼
-$	// ï¼»NGKI3005ï¼½
-	$IF !(TMIN_ISRPRI <= ISR.ISRPRI[id] && ISR.ISRPRI[id] <= TMAX_ISRPRI)$
-		$ERROR ISR.TEXT_LINE[id]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"isrpri", ISR.ISRPRI[id], "CRE_ISR")$
-		$END$
-	$END$
-$END$
-
-$FOREACH intno INTNO_CREISR_VALID$
-	$inhno = INHNO[intno]$
-
-$	// å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRã®ãªã¹ãã®ä½æ
-	$isrid_list = {}$
-	$FOREACH id ISR.ID_LIST$
-		$IF ISR.INTNO[id] == intno$
-			$isrid_list = APPEND(isrid_list, id)$
-			$id_for_error = id$
-		$END$
-	$END$
-
-$	// å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRãå­å¨ããå ´å
-	$IF LENGTH(isrid_list) > 0$
-$		// intnoã«å¯¾å¿ããinhnoã«å¯¾ãã¦DEF_INHãããå ´åï¼E_OBJï¼ï¼»NGKI3013ï¼½
-		$IF LENGTH(INH.INHNO[inhno])$
-			$ERROR ISR.TEXT_LINE[id_for_error]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' in %3% is duplicated with %4% `%5%\'"),
-							"intno", ISR.INTNO[id_for_error],
-							"CRE_ISR", "inhno", INH.INHNO[inhno])$
-			$END$
-		$END$
-
-$		// intnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3012ï¼½
-		$IF !LENGTH(INT.INTNO[intno])$
-			$ERROR ISR.TEXT_LINE[id_for_error]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' is not configured with %3%"),
-							"intno", ISR.INTNO[id_for_error], "CFG_INT")$
-			$END$
-		$ELSE$
-$			// intnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
-åº¦ãTMIN_INTPRI
-$			// ãããå°ããå ´åï¼E_OBJï¼ï¼»NGKI3014ï¼½
-			$IF INT.INTPRI[intno] < TMIN_INTPRI$
-				$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-					$FORMAT(_("%1% `%2%\' configured for %3% `%4%\' is higher than %5%"),
-								"intpri", INT.INTPRI[intno], "intno",
-								ISR.INTNO[id_for_error], "TMIN_INTPRI")$
-				$END$
-			$END$
-		$END$
-	$END$
-$END$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ç®¡çã®ãã¼ã¿æ§é 
-$
-$intno_isr_list = {}$
-$FOREACH intno INTNO_CREISR_VALID$
-	$inhno = INHNO[intno]$
-	$IF LENGTH(INT.INTNO[intno]) && !LENGTH(INH.INHNO[inhno])$
-		$intno_isr_list = APPEND(intno_isr_list, intno)$
-	$END$
-$END$
-
-$INTNO_ISR = {}$
-$i = 0$
-$FOREACH intno SORT(intno_isr_list, "INT.INTNO")$
-	$INTNO_ISR = APPEND(INTNO_ISR, intno)$
-	$ISR_QUEUE_HEADER[intno] = FORMAT("&(_kernel_isr_queue_table[%d])", i)$
-	$i = i + 1$
-$END$
-
-const uint_t _kernel_tnum_isr_queue = $LENGTH(INTNO_ISR)$;$NL$
-$NL$
-
-$IF LENGTH(INTNO_ISR)$
-	const ISR_ENTRY _kernel_isr_queue_list[$LENGTH(INTNO_ISR)$] = {$NL$
-	$JOINEACH intno INTNO_ISR ",\n"$
-		$TAB${ $intno$, $ISR_QUEUE_HEADER[intno]$ }
-	$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(QUEUE, _kernel_isr_queue_table);$NL$
-$END$$NL$
-
-$IF LENGTH(INTNO_ISR)$
-	QUEUE _kernel_isr_queue_table[$LENGTH(INTNO_ISR)$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(QUEUE, _kernel_isr_queue_table);$NL$
-$END$$NL$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼å¼åºãã®ããã®å²è¾¼ã¿ãã³ãã©
-$
-$FOREACH intno INTNO_ISR$
-	$inhno = INHNO[intno]$
-
-$	// DEF_INH(inhno, { TA_NULL, _kernel_inthdr_<intno> } );
-	$INH.INHNO[inhno] = inhno$
-	$INH.INHATR[inhno] = VALUE("TA_NULL", 0)$
-	$INH.INTHDR[inhno] = CONCAT("_kernel_inthdr_", intno)$
-	$INH.ORDER_LIST = APPEND(INH.ORDER_LIST, inhno)$
-
-$	// ISRç¨ã®å²è¾¼ã¿ãã³ãã©
-	void$NL$
-	_kernel_inthdr_$intno$(void)$NL$
-	{$NL$
-	$TAB$_kernel_call_isr($ISR_QUEUE_HEADER[intno]$);$NL$
-	}$NL$
-	$NL$
-$END$
-
-$
-$  éçã«çæãããå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®æ°
-$
-#define TNUM_SISRID	$LENGTH(ISR.ID_LIST)$$NL$
-$NL$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_isrid = (TMIN_ISRID + TNUM_ISRID - 1);$NL$
-const ID _kernel_tmax_sisrid = (TMIN_ISRID + TNUM_SISRID - 1);$NL$
-$NL$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åæåãã­ãã¯ã®çæ
-$
-$IF LENGTH(ISR.ID_LIST)$
-	const ISRINIB _kernel_isrinib_table[TNUM_SISRID] = {$NL$
-	$JOINEACH id ISR.ID_LIST ",\n"$
-		$TAB${$SPC$
-		($ISR.ISRATR[id]$), ($ISR.EXINF[id]$),$SPC$
-		($ISR_QUEUE_HEADER[ISR.INTNO[id]]$),$SPC$
-		(ISR)($ISR.ISR[id]$), ($ISR.ISRPRI[id]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const ISRINIB, _kernel_isrinib_table);$NL$
-$END$
-$NL$
-
-$
-$  åççæå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç¨ã®å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åæåãã­ãã¯
-$
-$IF num_aisrid > 0$
-	ISRINIB _kernel_aisrinib_table[$num_aisrid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(ISRINIB, _kernel_aisrinib_table);$NL$
-$END$
-$NL$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯
-$
-$IF num_isrid > 0$
-	ISRCB _kernel_isrcb_table[TNUM_ISRID];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(ISRCB, _kernel_isrcb_table);$NL$
-$END$
-$NL$
-
-$
-$  å²è¾¼ã¿ãã³ãã©ã®ããã®æ¨æºçãªåæåæ
-å ±ã®çæ
-$
-$IF !OMIT_INITIALIZE_INTERRUPT || USE_INHINIB_TABLE$
-
-$
-$  å®ç¾©ããå²è¾¼ã¿ãã³ãã©ã®æ°
-$
-#define TNUM_DEF_INHNO	$LENGTH(INH.ORDER_LIST)$$NL$
-const uint_t _kernel_tnum_def_inhno = TNUM_DEF_INHNO;$NL$
-$NL$
-
-$
-$  å²è¾¼ã¿ãã³ãã©ã®ã¨ã³ããª
-$
-$FOREACH inhno INH.ORDER_LIST$
-	$IF (INH.INHATR[inhno] & TA_NONKERNEL) == 0$
-		INTHDR_ENTRY($INH.INHNO[inhno]$, $+INH.INHNO[inhno]$,$SPC$
-												$INH.INTHDR[inhno]$)$NL$
-	$END$
-$END$$NL$
-
-$
-$  å²è¾¼ã¿ãã³ãã©åæåãã­ãã¯
-$
-$IF LENGTH(INH.ORDER_LIST)$
-	const INHINIB _kernel_inhinib_table[TNUM_DEF_INHNO] = {$NL$
-	$JOINEACH inhno INH.ORDER_LIST ",\n"$
-		$TAB${$SPC$
-			($INH.INHNO[inhno]$),$SPC$
-			($INH.INHATR[inhno]$),$SPC$
-			$IF (INH.INHATR[inhno] & TA_NONKERNEL) == 0$
-				(FP)(INT_ENTRY($INH.INHNO[inhno]$, $INH.INTHDR[inhno]$))
-			$ELSE$
-				(FP)($INH.INTHDR[inhno]$)
-			$END$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const INHINIB, _kernel_inhinib_table);$NL$
-$END$$NL$
-$END$
-
-$
-$  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ããã®æ¨æºçãªåæåæ
-å ±ã®çæ
-$
-$IF !OMIT_INITIALIZE_INTERRUPT || USE_INTINIB_TABLE$
-
-$
-$  è¨­å®ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°
-$
-#define TNUM_CFG_INTNO	$LENGTH(INT.ORDER_LIST)$$NL$
-const uint_t _kernel_tnum_cfg_intno = TNUM_CFG_INTNO;$NL$
-$NL$
-
-$
-$  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯
-$
-$IF LENGTH(INT.ORDER_LIST)$
-	const INTINIB _kernel_intinib_table[TNUM_CFG_INTNO] = {$NL$
-	$JOINEACH intno INT.ORDER_LIST ",\n"$
-		$TAB${$SPC$
-			($INT.INTNO[intno]$),$SPC$
-			($INT.INTATR[intno]$),$SPC$
-			($INT.INTPRI[intno]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const INTINIB, _kernel_intinib_table);$NL$
-$END$$NL$
-$END$
-
-$
-$  å²è¾¼ã¿ç®¡çæ©è½åæåé¢æ°
-$
-$initfuncs = APPEND(initfuncs, "_kernel_initialize_interrupt();")$
-$IF num_isrid > 0$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_isr();")$
-$END$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.trb	(revision 306)
@@ -0,0 +1,448 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: interrupt.trb 678 2016-03-06 02:36:09Z ertl-hiro $
+# 
+
+#
+#		å²è¾¼ã¿ç®¡çæ©è½ã®çæã¹ã¯ãªãã
+#
+
+#
+#  kernel_cfg.cã®çæ
+#
+$kernelCfgC.comment_header("Interrupt Management Functions")
+
+#
+#  CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·ã®ã
+#  ãã©ã«ãå®ç¾©
+#
+if $INTNO_CREISR_VALID.nil?
+  $INTNO_CREISR_VALID = $INTNO_VALID
+end
+if $INHNO_CREISR_VALID.nil?
+  $INHNO_CREISR_VALID = $INHNO_VALID
+end
+
+#
+#  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿åªå
+åº¦ã®ããã©ã«ãå®ç¾©
+# 
+if $INTPRI_CFGINT_VALID.nil?
+  $INTPRI_CFGINT_VALID = $TMIN_INTPRI.upto($TMAX_INTPRI).to_a
+end
+
+#
+#  å²è¾¼ã¿çªå·ã¨å²è¾¼ã¿ãã³ãã©çªå·ã®å¤æãã¼ãã«ã®ä½æ
+#
+if $INTNO_CREISR_VALID.length != $INHNO_CREISR_VALID.length
+  error_exit("length of `INTNO_CREISR_VALID' is different from" \
+									" length of `INHNO_CREISR_VALID'")
+end
+$toInhnoVal = {}
+$toIntnoVal = {}
+inhno_creisr_valid = $INHNO_CREISR_VALID.dup
+$INTNO_CREISR_VALID.each do |intnoVal|
+  inhnoVal = inhno_creisr_valid.shift
+  $toInhnoVal[intnoVal] = inhnoVal
+  $toIntnoVal[inhnoVal] = intnoVal
+end
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:CFG_INT].each do |key, params|
+  #	intnoãå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI2972ï¼½
+  if $INTNO_VALID.index(params[:intno]).nil?
+    error_illegal("E_PAR", params, :intno)
+  end
+
+  #	intatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2969ï¼½
+  #ï¼TA_ENAINTï¼TA_EDGEï¼TARGET_INTATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:intatr] & ~($TA_ENAINT|$TA_EDGE|$TARGET_INTATR)) != 0
+    error_illegal_sym("E_RSATR", params, :intatr, :intno)
+  end
+
+  #	intpriãCFG_INTã«å¯¾ããå²è¾¼ã¿åªå
+åº¦ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI2973ï¼½
+  if $INTPRI_CFGINT_VALID.index(params[:intpri]).nil?
+    error_illegal_sym("E_OBJ", params, :intpri, :intno)
+  end
+
+  # ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRIã
+  #	ããå°ããå¤ãæå®ãããªãã£ãå ´åï¼E_OBJï¼ï¼»NGKI2983ï¼½
+  if !$INTNO_FIX_NONKERNEL.nil?
+    if !$INTNO_FIX_NONKERNEL.index(params[:intno]).nil?
+      if params[:intpri] >= $TMIN_INTPRI
+        error_ercd("E_OBJ", params, "%%intno must have higher priority " \
+											"than TMIN_INTPRI in %apiname")
+      end
+    end
+  end
+
+  #	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRIãã
+  #	ãå°ããå¤ãæå®ãããå ´åï¼E_OBJï¼ï¼»NGKI2984ï¼½
+  if !$INTNO_FIX_KERNEL.nil?
+    if !$INTNO_FIX_KERNEL.index(params[:intno]).nil?
+      if params[:intpri] < $TMIN_INTPRI
+        error_ercd("E_OBJ", params, "%%intno must have lower or equal " \
+									"priority to TMIN_INTPRI in %apiname")
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãã³ãã©ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:DEF_INH].each do |key, params|
+  # inhnoãå²è¾¼ã¿ãã³ãã©çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3055ï¼½
+  if $INHNO_VALID.index(params[:inhno]).nil?
+    error_illegal("E_PAR", params, :inhno)
+  end
+
+  # inhatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3052ï¼½
+  #ï¼TARGET_INHATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:inhatr] & ~($TARGET_INHATR)) != 0
+    error_illegal_sym("E_RSATR", params, :inhatr, :inhno)
+  end
+
+  #	ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNELã
+  #	æå®ããã¦ããªãå ´åï¼E_RSATRï¼ï¼»NGKI3067ï¼½
+  if !$INHNO_FIX_NONKERNEL.nil?
+    if !$INHNO_FIX_NONKERNEL.index(params[:inhno]).nil?
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        error_ercd("E_RSATR", params, "%%inhno must be " \
+								"non-kernel interrupt in %apiname")
+      end
+    end
+  end
+
+  #	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNELãæ
+  #	å®ããã¦ããå ´åï¼E_RSATRï¼ï¼»NGKI3068ï¼½
+  if !$INHNO_FIX_KERNEL.nil?
+    if !$INHNO_FIX_KERNEL.index(params[:inhno]).nil?
+      if (params[:inhatr] & $TA_NONKERNEL) != 0
+        error_ercd("E_RSATR", params, "%%inhno must not be " \
+								"non-kernel interrupt in %apiname")
+      end
+    end
+  end
+
+  if $toIntnoVal.has_key?(params[:inhno].val)
+    intnoVal = $toIntnoVal[params[:inhno].val]
+
+    # inhnoã«å¯¾å¿ããintnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3062ï¼½
+    if !$cfgData[:CFG_INT].has_key?(intnoVal)
+      error_ercd("E_OBJ", params, "intno `#{intnoVal}' corresponding to " \
+					"%%inhno in %apiname is not configured with CFG_INT")
+    else
+      intnoParams = $cfgData[:CFG_INT][intnoVal]
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        # inhatrã«TA_NONKERNELãæå®ããã¦ãããï¼inhnoã«å¯¾å¿ããintno
+        # ã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIãããå°
+        # ããå ´åï¼E_OBJï¼ï¼»NGKI3065ï¼½
+        if intnoParams[:intpri] < $TMIN_INTPRI
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+				"configured for %%inhno must be lower or equal to TMIN_INTPRI")
+        end
+      else
+        # inhatrã«TA_NONKERNELãæå®ããã¦ããï¼inhnoã«å¯¾å¿ããintnoã«
+        # å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIä»¥ä¸ã§ãã
+        # å ´åï¼E_OBJï¼ï¼»NGKI3066ï¼½
+        if intnoParams[:intpri] >= $TMIN_INTPRI
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+					"configured for %%inhno must be higher than TMIN_INTPRI")
+        end
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:CRE_ISR].sort.each do |key, params|
+  #	isratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2998ï¼½
+  #ï¼TARGET_ISRATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:isratr] & ~($TARGET_ISRATR)) != 0
+    error_illegal("E_RSATR", params, "isratr")
+  end
+
+  #	intnoãCRE_ISRã«å¯¾ããå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI3003ï¼½
+  if $INTNO_CREISR_VALID.index(params[:intno]).nil?
+    error_illegal("E_PAR", params, "intno")
+  end
+
+  #	(TMIN_ISRPRI <= isrpri && isrpri <= TMAX_ISRPRI)ã§ãªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI3005ï¼½
+  if !($TMIN_ISRPRI <= params[:isrpri] && params[:isrpri] <= $TMAX_ISRPRI)
+    error_illegal("E_PAR", params, "isrpri")
+  end
+end
+
+$INTNO_CREISR_VALID.each do |intnoVal|
+  # å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRã®ãªã¹ãã®ä½æ
+  isrParamsList = []
+  $cfgData[:CRE_ISR].sort.each do |key, params|
+    if params[:intno] == intnoVal
+      isrParamsList.push(params)
+    end
+  end
+
+  #	å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRãå­å¨ããå ´å
+  if isrParamsList.size > 0
+    inhnoVal = $toInhnoVal[intnoVal]
+
+    # intnoã«å¯¾å¿ããinhnoã«å¯¾ãã¦DEF_INHãããå ´åï¼E_OBJï¼ï¼»NGKI3013ï¼½
+    if $cfgData[:DEF_INH].has_key?(inhnoVal)
+      inhnoParams = $cfgData[:DEF_INH][inhnoVal]
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+					"is duplicated with inhno #{inhnoParams[:inhno]}")
+    end
+
+    # intnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3012ï¼½
+    if !$cfgData[:CFG_INT].has_key?(intnoVal)
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+									"is not configured with CFG_INT")
+    else
+      intnoParams = $cfgData[:CFG_INT][intnoVal]
+
+      #	intnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIããã
+      #	å°ããå ´åï¼E_OBJï¼ï¼»NGKI3014ï¼½
+      if intnoParams[:intpri] < $TMIN_INTPRI
+        error_ercd("E_OBJ", isrParamsList[0],
+						"intpri `#{intnoParams[:intpri]}' configured for " \
+						"%%intno with CFG_INT in higher than TMIN_INTPRI")
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ç®¡çã®ãã¼ã¿æ§é 
+#
+intnoIsrList = []
+$INTNO_CREISR_VALID.each do |intnoVal|
+  inhnoVal = $toInhnoVal[intnoVal]
+  if $cfgData[:CFG_INT].has_key?(intnoVal) \
+							&& !$cfgData[:DEF_INH].has_key?(inhnoVal)
+    intnoIsrList.push(intnoVal)
+  end
+end
+
+intnoIsrList.sort!
+$isrQueueHeader = {}
+intnoIsrList.each_with_index do |intnoVal, index|
+  $isrQueueHeader[intnoVal] = "&(_kernel_isr_queue_table[#{index}])"
+end
+
+$kernelCfgC.add2("const uint_t _kernel_tnum_isr_queue = #{intnoIsrList.size};")
+
+if intnoIsrList.size > 0
+  $kernelCfgC.add("const ISR_ENTRY _kernel_isr_queue_list" \
+										"[#{intnoIsrList.size}] = {")
+  intnoIsrList.each_with_index do |intnoVal, index|
+    $kernelCfgC.add(",") if index > 0
+    $kernelCfgC.append("\t{ #{intnoVal}, #{$isrQueueHeader[intnoVal]} }")
+  end
+  $kernelCfgC.add
+  $kernelCfgC.add2("};")
+  $kernelCfgC.add2("QUEUE _kernel_isr_queue_table[#{intnoIsrList.size}];")
+else
+  $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ISR_ENTRY, " \
+											"_kernel_isr_queue_list);")
+  $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(QUEUE, _kernel_isr_queue_table);")
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼å¼åºãã®ããã®å²è¾¼ã¿ãã³ãã©
+#
+intnoIsrList.each do |intnoVal|
+  inhnoVal = $toInhnoVal[intnoVal]
+
+  # æ¬¡ã®DEF_INHã«ç¸å½ãããã¼ã¿ãçæ
+  # DEF_INH(inhno, { TA_NULL, _kernel_inthdr_<intno> } );
+  $cfgData[:DEF_INH][inhnoVal] = {
+    inhno: NumStr.new(inhnoVal),
+    inhatr: NumStr.new($TA_NULL, "TA_NULL"),
+    inthdr: "_kernel_inthdr_#{intnoVal}"
+  }
+
+  # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç¨ã®å²è¾¼ã¿ãã³ãã©
+  $kernelCfgC.add("void")
+  $kernelCfgC.add("_kernel_inthdr_#{intnoVal}(void)")
+  $kernelCfgC.add("{")
+  $kernelCfgC.add("\t_kernel_call_isr(#{$isrQueueHeader[intnoVal]});");
+  $kernelCfgC.add2("}")
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ããä¸è¬çãªæ
+å ±ã®çæ
+#
+class IsrObject < KernelObject
+  def initialize()
+    super("isr", "isr")
+  end
+
+  def prepare(key, params)
+    # ã¨ã©ã¼ãã§ãã¯ã¯å®æ½æ¸ã¿ãªã®ã§ï¼ããã§ã®å¦çã¯ä¸è¦
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:isratr]}), (intptr_t)(#{params[:exinf]}), " \
+						"(#{$isrQueueHeader[params[:intno].val]}), " \
+						"(ISR)(#{params[:isr]}), (#{params[:isrpri]})")
+  end
+end
+IsrObject.new.generate()
+
+# å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_isrorder_table[TNUM_SISRID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_ISR].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:isrid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  å²è¾¼ã¿ãã³ãã©ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INHINIB_TABLE
+  #
+  #  å®ç¾©ããå²è¾¼ã¿ãã³ãã©ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_DEF_INHNO	#{$cfgData[:DEF_INH].size}
+const uint_t _kernel_tnum_def_inhno = TNUM_DEF_INHNO;
+EOS
+
+  if $cfgData[:DEF_INH].size != 0
+    #
+    #  å²è¾¼ã¿ãã³ãã©ã®ã¨ã³ããª
+    #
+    $cfgData[:DEF_INH].each do |key, params|
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        $kernelCfgC.add("INTHDR_ENTRY(#{params[:inhno]}, " \
+						"#{params[:inhno].val}, #{params[:inthdr]})")
+      end
+    end
+    $kernelCfgC.add("")
+
+    #
+    #  å²è¾¼ã¿ãã³ãã©åæåãã­ãã¯
+    #
+    $kernelCfgC.add("const INHINIB _kernel_inhinib_table[TNUM_DEF_INHNO] = {")
+    $cfgData[:DEF_INH].each_with_index do |(key, params), index|
+      $kernelCfgC.add(",") if index > 0
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        inthdr = "(FP)(INT_ENTRY(#{params[:inhno]}, #{params[:inthdr]}))"
+      else
+        inthdr = "(FP)(#{params[:inthdr]})"
+      end
+      $kernelCfgC.append("\t{ (#{params[:inhno]}), (#{params[:inhatr]}), " \
+															"#{inthdr} }")
+    end
+    $kernelCfgC.add
+    $kernelCfgC.add2("};")
+  else
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const INHINIB, " \
+										"_kernel_inhinib_table);")
+  end
+end
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INTINIB_TABLE
+  #
+  #  è¨­å®ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_CFG_INTNO	#{$cfgData[:CFG_INT].size}
+const uint_t _kernel_tnum_cfg_intno = TNUM_CFG_INTNO;
+EOS
+
+  #
+  #  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯
+  #
+  if $cfgData[:CFG_INT].size != 0
+    $kernelCfgC.add("const INTINIB _kernel_intinib_table[TNUM_CFG_INTNO] = {")
+    $cfgData[:CFG_INT].each_with_index do |(key, params), index|
+      $kernelCfgC.add(",") if index > 0
+      $kernelCfgC.append("\t{ (#{params[:intno]}), (#{params[:intatr]}), " \
+													"(#{params[:intpri]}) }")
+    end
+    $kernelCfgC.add
+    $kernelCfgC.add2("};")
+  else
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const INTINIB, " \
+										"_kernel_intinib_table);")
+  end
+end
+
+#
+#  å²è¾¼ã¿ç®¡çæ©è½åæåé¢æ°ã®è¿½å 
+#
+$initializeFunctions.push("_kernel_initialize_interrupt();")
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.tf	(revision 305)
+++ 	(revision )
@@ -1,483 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-/* kernel_cfg.h */$NL$
-#ifndef TOPPERS_KERNEL_CFG_H$NL$
-#define TOPPERS_KERNEL_CFG_H$NL$
-
-$
-$  kernel_cfg.cã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/* kernel_cfg.c */$NL$
-#include "kernel/kernel_int.h"$NL$
-#include "kernel_cfg.h"$NL$
-$NL$
-
-#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)$NL$
-#error The kernel does not match this configuration file.$NL$
-#endif$NL$
-$NL$
-
-$ 
-$  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
-$ 
-/*$NL$
-$SPC$*  Include Directives (#include)$NL$
-$SPC$*/$NL$
-$NL$
-$INCLUDES$
-$NL$
-
-$
-$  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
-$
-$IF !ISFUNCTION("ALLOC_STACK")$
-$FUNCTION ALLOC_STACK$
-$	// å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
-	static STK_T $ARGV[1]$[COUNT_STK_T($ARGV[2]$)];$NL$
-	$RESULT = FORMAT("ROUND_STK_T(%1%)", ARGV[2])$
-$END$
-$END$
-
-$
-$  éç¥ãã³ãã©ã®çæé¢æ°
-$
-$FUNCTION GENERATE_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$par1 = ARGV[2]$
-	$par2 = ARGV[3]$
-	$text_line = ARGV[6]$
-	$objid = ARGV[7]$
-	$apiname = ARGV[8]$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode == TNFY_HANDLER || nfymode1 == TNFY_SETVAR
-								|| nfymode1 == TNFY_SETFLG
-								|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$numpar = 2$
-		$epar1 = ARGV[4]$
-		$epar2 = ARGV[5]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$numpar = 1$
-		$epar1 = ARGV[3]$
-		$epar2 = ARGV[4]$
-	$END$
-
-$	// ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
-	$IF (numpar == 2 && !LENGTH(par2))
-					|| (nfymode2 != 0 && !LENGTH(epar1))
-					|| (nfymode2 == TENFY_SETFLG && !LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
-		$ERROR text_line$
-			$FORMAT(_("too few parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF (nfymode2 == 0 && LENGTH(epar1))
-					|| (nfymode2 != TENFY_SETFLG && LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãå¤ãããå ´å
-		$ERROR text_line$
-			$FORMAT(_("too many parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF nfymode == TNFY_HANDLER$
-$		// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
-		$funcname = FORMAT("(NFYHDR)(%s)", par2)$
-	$ELSE$
-$		// éç¥ãã³ãã©ã®é¢æ°å
-		$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$		// ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
-$		// å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
-è¦ï¼
-		$IF nfymode2 == TENFY_SETVAR ||  nfymode2 == TENFY_INCVAR$
-			intptr_t *const $funcname$_p_evar =
-			$SPC$(intptr_t *)($epar1$);$NL$$NL$
-		$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-			const ID $funcname$_etskid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SIGSEM$
-			const ID $funcname$_esemid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SETFLG$
-			const ID $funcname$_eflgid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SNDDTQ$
-			const ID $funcname$_edtqid = $epar1$;$NL$$NL$
-		$END$
-
-$		// é¢æ°ã®å
-é ­é¨åã®çæ
-		static void$NL$
-		$funcname$(intptr_t exinf)$NL$
-		{$NL$
-
-		$IF nfymode2 == 0$
-$			// ã¨ã©ã¼éç¥ããªãå ´å
-			$error_code = "(void) "$
-		$ELSE$
-$			// ã¨ã©ã¼éç¥ãããå ´å
-			$TAB$ER		ercd;$NL$
-			$NL$
-			$error_code = "ercd = "$
-		$END$
-
-$		// ã¤ãã³ãéç¥å¦çã®å¦ç
-		$IF nfymode1 == TNFY_SETVAR && nfymode2 == 0$
-$			// å¤æ°ã®è¨­å®
-			$TAB$*((intptr_t *) exinf) = ($par2$);$NL$
-		$ELIF nfymode1 == TNFY_INCVAR && nfymode2 == 0$
-$			// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-			$TAB$*((intptr_t *) exinf) += 1;$NL$
-		$ELIF nfymode1 == TNFY_ACTTSK$
-$			// ã¿ã¹ã¯ã®èµ·å
-			$TAB$$error_code$act_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_WUPTSK$
-$			// ã¿ã¹ã¯ã®èµ·åº
-			$TAB$$error_code$wup_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SIGSEM$
-$			// ã»ããã©ã®è¿å´
-			$TAB$$error_code$sig_sem((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SETFLG$
-$			// ã¤ãã³ããã©ã°ã®ã»ãã
-			$TAB$$error_code$set_flg(((ID) exinf), $par2$);$NL$
-		$ELIF nfymode1 == TNFY_SNDDTQ$
-$			// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-			$TAB$$error_code$psnd_dtq(((ID) exinf), $par2$);$NL$
-		$ELSE$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-									"nfymode", nfymode, objid, apiname)$
-			$END$
-		$END$
-
-		$IF nfymode2 != 0$
-$			// ã¨ã©ã¼éç¥å¦çã®å¦ç
-			$TAB$if (ercd != E_OK) {$NL$
-
-			$IF nfymode2 == TENFY_SETVAR$
-$				// å¤æ°ã®è¨­å®
-				$TAB$$TAB$*$funcname$_p_evar = (intptr_t) ercd;$NL$
-			$ELIF nfymode2 == TENFY_INCVAR$
-$				// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-				$TAB$$TAB$*$funcname$_p_evar += 1;$NL$
-			$ELIF nfymode2 == TENFY_ACTTSK$
-$				// ã¿ã¹ã¯ã®èµ·å
-				$TAB$$TAB$(void) act_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_WUPTSK$
-$				// ã¿ã¹ã¯ã®èµ·åº
-				$TAB$$TAB$(void) wup_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_SIGSEM$
-$				// ã»ããã©ã®è¿å´
-				$TAB$$TAB$(void) sig_sem($funcname$_esemid);$NL$
-			$ELIF nfymode2 == TENFY_SETFLG$
-$				// ã¤ãã³ããã©ã°ã®ã»ãã
-				$TAB$$TAB$(void) set_flg($funcname$_eflgid, $epar2$);$NL$
-			$ELIF nfymode2 == TENFY_SNDDTQ$
-$				// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-				$TAB$$TAB$(void) psnd_dtq
-								($funcname$_edtqid, (intptr_t) ercd);$NL$
-			$ELSE$
-				$ERROR text_line$E_PAR:$SPC$
-					$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-				$END$
-			$END$
-
-			$TAB$}$NL$
-		$END$
-
-$		// é¢æ°ã®æ«å°¾é¨åã®çæ
-		}$NL$
-		$NL$
-	$END$
-	$RESULT = funcname$
-$END$
-
-$
-$  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
-$
-$INCLUDE "kernel/task.tf"$
-$INCLUDE "kernel/semaphore.tf"$
-$INCLUDE "kernel/eventflag.tf"$
-$INCLUDE "kernel/dataqueue.tf"$
-$INCLUDE "kernel/pridataq.tf"$
-$INCLUDE "kernel/mutex.tf"$
-$INCLUDE "kernel/mempfix.tf"$
-$INCLUDE "kernel/cyclic.tf"$
-$INCLUDE "kernel/alarm.tf"$
-$INCLUDE "kernel/interrupt.tf"$
-$INCLUDE "kernel/exception.tf"$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-$ 
-/*$NL$
-$SPC$*  Stack Area for Non-task Context$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF !LENGTH(ICS.ORDER_LIST)$
-$	// DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
-	#ifdef DEFAULT_ISTK$NL$
-	$NL$
-	#define TOPPERS_ISTKSZ		DEFAULT_ISTKSZ$NL$
-	#define TOPPERS_ISTK		DEFAULT_ISTK$NL$
-	$NL$
-	#else /* DEAULT_ISTK */$NL$
-	$NL$
-	$istksz = ALLOC_STACK("_kernel_istack", "DEFAULT_ISTKSZ")$$NL$
-	#define TOPPERS_ISTKSZ		$istksz$$NL$
-	#define TOPPERS_ISTK		_kernel_istack$NL$
-	$NL$
-	#endif /* DEAULT_ISTK */$NL$
-$ELSE$
-
-$	// éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
-	$IF LENGTH(ICS.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_ICS")$$END$
-	$END$
-
-$	// istkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼ããã
-$	// å°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
-	$IF ICS.ISTKSZ[1] <= 0 || (TARGET_MIN_ISTKSZ
-									&& ICS.ISTKSZ[1] < TARGET_MIN_ISTKSZ)$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' in %3%"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-$ 	// istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
-	$IF !EQ(ICS.ISTK[1], "NULL") && CHECK_STKSZ_ALIGN
-							&& (ICS.ISTKSZ[1] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-	$IF EQ(ICS.ISTK[1], "NULL")$
-$		// ã¹ã¿ãã¯é åã®èªåå²ä»ã
-		$istksz = ALLOC_STACK("_kernel_istack", ICS.ISTKSZ[1])$$NL$
-		#define TOPPERS_ISTKSZ		$istksz$$NL$
-		#define TOPPERS_ISTK		_kernel_istack$NL$
-	$ELSE$
-		#define TOPPERS_ISTKSZ		($ICS.ISTKSZ[1]$)$NL$
-		#define TOPPERS_ISTK		(void *)($ICS.ISTK[1]$)$NL$
-	$END$
-$END$
-$NL$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-const size_t	_kernel_istksz = TOPPERS_ISTKSZ;$NL$
-STK_T *const	_kernel_istk = TOPPERS_ISTK;$NL$
-$NL$
-#ifdef TOPPERS_ISTKPT$NL$
-STK_T *const	_kernel_istkpt = TOPPERS_ISTKPT(TOPPERS_ISTK, TOPPERS_ISTKSZ);$NL$
-#endif /* TOPPERS_ISTKPT */$NL$
-$NL$
-
-$ 
-$  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé å
-$ 
-/*$NL$
-$SPC$*  Memory Area Allocated by Kernel$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF !LENGTH(KMM.ORDER_LIST)$
-$	// DEF_KMMããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
-	#define TOPPERS_KMMSZ		0$NL$
-	#define TOPPERS_KMM			NULL$NL$
-$ELSE$
-
-$	// éçAPIãDEF_KMMããè¤æ°ããï¼E_OBJï¼
-	$IF LENGTH(KMM.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_KMM")$$END$
-	$END$
-
-$	// kmmszã0ä»¥ä¸ã®å ´åï¼E_PARï¼
-	$IF KMM.KMMSZ[1] <= 0$
-		$ERROR KMM.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' is zero in %3%"),
-									"kmmsz", KMM.KMMSZ[1], "DEF_KMM")$
-		$END$
-	$END$
-
-$ 	// kmmszãã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´
-$	// åï¼E_PARï¼
-	$IF !EQ(KMM.KMM[1], "NULL") && CHECK_MB_ALIGN
-							&& (KMM.KMMSZ[1] & (CHECK_MB_ALIGN - 1))$
-		$ERROR KMM.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-									"kmmsz", KMM.KMMSZ[1], "DEF_KMM")$
-			$END$
-	$END$
-
-	$IF EQ(KMM.KMM[1], "NULL")$
-$		// ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®èªåå²ä»ã
-		static MB_T					_kernel_memory[TOPPERS_COUNT_SZ($KMM.KMMSZ[1]$, sizeof(MB_T))];$NL$
-		#define TOPPERS_KMMSZ		TOPPERS_ROUND_SZ($KMM.KMMSZ[1]$, sizeof(MB_T))$NL$
-		#define TOPPERS_KMM			_kernel_memory$NL$
-	$ELSE$
-		#define TOPPERS_KMMSZ		($KMM.KMMSZ[1]$)$NL$
-		#define TOPPERS_KMM			(void *)($KMM.KMM[1]$)$NL$
-	$END$
-$END$
-$NL$
-
-$ ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé å
-const size_t	_kernel_kmmsz = TOPPERS_KMMSZ;$NL$
-MB_T *const		_kernel_kmm = TOPPERS_KMM;$NL$
-$NL$
-
-$ 
-$  ã¿ã¤ã ã¤ãã³ãç®¡ç
-$ 
-/*$NL$
-$SPC$*  Time Event Management$NL$
-$SPC$*/$NL$
-$NL$
-TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];$NL$
-$NL$
-
-$ 
-$  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
-$ 
-/*$NL$
-$SPC$*  Module Initialization Function$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_initialize_object(void)$NL$
-{$NL$
-$FOREACH func (initfuncs)$
-	$TAB$$func$$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  åæåã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Initialization Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_inirtn(void)$NL$
-{$NL$
-$FOREACH order INI.ORDER_LIST$
-$ 	// iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF INI.INIATR[order] != 0$
-		$ERROR INI.TEXT_LINE[order]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"iniatr", INI.INIATR[order], "inirtn",
-						INI.INIRTN[order], "ATT_INI")$
-		$END$
-	$END$
-	$TAB$((INIRTN)($INI.INIRTN[order]$))((intptr_t)($INI.EXINF[order]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Termination Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_terrtn(void)$NL$
-{$NL$
-$FOREACH rorder TER.RORDER_LIST$
-$ 	// teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF TER.TERATR[rorder] != 0$
-		$ERROR TER.TEXT_LINE[rorder]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"teratr", TER.TERATR[rorder], "terrtn",
-						TER.TERRTN[rorder], "ATT_TER")$
-		$END$
-	$END$
-	$TAB$((TERRTN)($TER.TERRTN[rorder]$))((intptr_t)($TER.EXINF[rorder]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$
-$  kernel_cfg.hã®æ«å°¾é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#endif /* TOPPERS_KERNEL_CFG_H */$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.trb	(revision 306)
@@ -0,0 +1,563 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel.trb 716 2016-03-31 06:16:23Z ertl-hiro $
+# 
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+#
+$timeStampFileName = "kernel_cfg.timestamp"
+
+#
+#  kernel_cfg.hã®å
+é ­é¨åã®çæ
+#
+$kernelCfgH = GenFile.new("kernel_cfg.h")
+$kernelCfgH.add(<<EOS)
+/* kernel_cfg.h */
+#ifndef TOPPERS_KERNEL_CFG_H
+#define TOPPERS_KERNEL_CFG_H
+EOS
+
+#
+#  kernel_cfg.cã®å
+é ­é¨åã®çæ
+#
+$kernelCfgC = GenFile.new("kernel_cfg.c")
+$kernelCfgC.add(<<EOS)
+/* kernel_cfg.c */
+#include "kernel/kernel_int.h"
+#include "kernel_cfg.h"
+
+#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)
+#error The kernel does not match this configuration file.
+#endif
+EOS
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+#
+$kernelCfgC.comment_header("Include Directives")
+$includeFiles.each do |file|
+  $kernelCfgC.add("#include #{file}")
+end
+$kernelCfgC.add()
+
+#
+#  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+#
+#  ã¹ã¿ãã¯é åã®å®ç¾©åã¨ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºè¨è¿°ãé
+åã§è¿ãï¼
+#
+unless defined? AllocStack()
+  def AllocStack(stack, size)
+    # å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
+    $kernelCfgC.add("static STK_T #{stack}[COUNT_STK_T(#{size})];")
+    return("ROUND_STK_T(#{size})")
+  end
+end
+
+#
+#  ã«ã¼ãã«ãªãã¸ã§ã¯ãã«é¢ããæ
+å ±ã®çæï¼ä»®æ³ã¯ã©ã¹ï¼
+#
+class KernelObject
+  def initialize(obj, object, obj_s = obj)
+    @obj = obj
+    @OBJ = obj.tr("a-z", "A-Z")
+    @object = object
+    @obj_s = obj_s
+    @OBJ_S = obj_s.tr("a-z", "A-Z")
+    @objid = (obj + "id").to_sym
+    @api = "CRE_#{@OBJ}".to_sym
+    @inibList = { "#{@OBJ_S}INIB" => "a#{@obj_s}inib_table"}
+  end
+
+  def generate()
+    # AID_@OBJã®å¦ç
+    numAutoObjid = 0
+    $cfgData["AID_#{@OBJ}".to_sym].each do |key, params|
+      numAutoObjid += params["no#{@obj}".to_sym]
+    end
+    numObjid = $cfgData[@api].size + numAutoObjid
+
+    # kernel_cfg.hã®çæ
+    $kernelCfgH.add("#define TNUM_#{@OBJ}ID\t#{numObjid}")
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+    $cfgData[@api].sort.each do |key, params|
+      $kernelCfgH.add("#define #{params[@objid]}\t#{params[@objid].val}")
+    end
+    $kernelCfgH.add()
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
+    if $USE_EXTERNAL_ID
+      $cfgData[@api].sort.each do |key, params|
+        $kernelCfgC.add("const ID #{params[@objid]}_id" \
+										" = #{params[@objid].val};")
+      end
+      $kernelCfgC.add()
+    end
+
+    # éçã«çæããããªãã¸ã§ã¯ãã®æ°
+    $kernelCfgC.add("#define TNUM_S#{@OBJ}ID\t#{$cfgData[@api].size}")
+
+    # ãªãã¸ã§ã¯ãIDçªå·ã®æå¤§å¤
+    $kernelCfgC.add("const ID _kernel_tmax_#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_#{@OBJ}ID - 1);")
+    $kernelCfgC.add2("const ID _kernel_tmax_s#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_S#{@OBJ}ID - 1);")
+
+    # ãã¼ã¿æ§é 
+    if $cfgData[@api].size > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      $cfgData[@api].sort.each do |key, params|
+        prepare(key, params)
+      end
+
+      # ãªãã¸ã§ã¯ãå
+¨ä½ã«å¯¾ãã¦å¿
+è¦ãªã¡ã¢ãªé åã®çæï¼ãªãã·ã§ã³ï¼
+      if respond_to?(:generateData)
+        generateData()
+      end
+
+      # ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+      $kernelCfgC.add("const #{@OBJ_S}INIB _kernel_#{@obj_s}inib_table" \
+													"[TNUM_S#{@OBJ}ID] = {")
+      $cfgData[@api].sort.each_with_index do |(key, params), index|
+        $kernelCfgC.add(",") if index > 0
+        $kernelCfgC.append("\t{ " + generateInib(key, params) + " }")
+      end
+      $kernelCfgC.add
+      $kernelCfgC.add2("};")
+    else
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const #{@OBJ_S}INIB, " \
+										"_kernel_#{@obj_s}inib_table);")
+    end
+
+    # åççæãªãã¸ã§ã¯ãç¨ã®ãªãã¸ã§ã¯ãåæåãã­ãã¯
+    @inibList.each do |type, array|
+      if numAutoObjid > 0
+        $kernelCfgC.add2("#{type} _kernel_#{array}[#{numAutoObjid}];")
+      else
+        $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{type}, _kernel_#{array});")
+      end
+    end
+
+    if numObjid > 0
+      # ãªãã¸ã§ã¯ãç®¡çãã­ãã¯ã®çæ
+      $kernelCfgC.add2("#{@OBJ_S}CB _kernel_#{@obj_s}cb_table" \
+													"[TNUM_#{@OBJ}ID];")
+
+      # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+      $initializeFunctions.push("_kernel_initialize_#{@object}();")
+    else
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{@OBJ_S}CB, " \
+										"_kernel_#{@obj_s}cb_table);")
+    end
+  end
+end
+
+#
+#  éç¥ãã³ãã©ã®çæé¢æ°
+#
+def generateNotifyHandler(key, params, objid)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode == $TNFY_HANDLER || nfymode1 == $TNFY_SETVAR \
+								|| nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+	numpar = 2
+	epar1 = params[:par3]
+	epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    numpar = 1
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  # ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
+  if (numpar == 2 && par2.nil?) || (nfymode2 != 0 && epar1.nil?) \
+								|| (nfymode2 == $TENFY_SETFLG && epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
+    error_api(params, "too few parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif (nfymode2 == 0 && !epar1.nil?) \
+					|| (nfymode2 != $TENFY_SETFLG && !epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãå¤ãããå ´å
+    error_api(params, "too many parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif nfymode == $TNFY_HANDLER
+    # ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
+    funcname = "(NFYHDR)(#{par2})"
+  else
+    # éç¥ãã³ãã©ã®é¢æ°å
+    funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+    # ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
+    # å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
+è¦ï¼
+    if nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR
+      $kernelCfgC.add2("intptr_t *const #{funcname}_p_evar =" \
+											" (intptr_t *)(#{epar1});")
+    elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+      $kernelCfgC.add2("const ID #{funcname}_etskid = #{epar1};")
+    elsif nfymode2 == $TENFY_SIGSEM
+      $kernelCfgC.add2("const ID #{funcname}_esemid = #{epar1};")
+    elsif nfymode2 == $TENFY_SETFLG
+      $kernelCfgC.add2("const ID #{funcname}_eflgid = #{epar1};")
+    elsif nfymode2 == $TENFY_SNDDTQ
+      $kernelCfgC.add2("const ID #{funcname}_edtqid = #{epar1};")
+    end
+
+    # é¢æ°ã®å
+é ­é¨åã®çæ
+    $kernelCfgC.add("static void")
+    $kernelCfgC.add("#{funcname}(intptr_t exinf)")
+    $kernelCfgC.add("{")
+
+    if nfymode2 == 0
+      # ã¨ã©ã¼éç¥ããªãå ´å
+      errorCode = "(void) "
+    else
+      # ã¨ã©ã¼éç¥ãããå ´å
+      $kernelCfgC.add2("\tER\tercd;")
+      errorCode = "ercd = "
+    end
+
+    # ã¤ãã³ãéç¥å¦çã®å¦ç
+    if nfymode1 == $TNFY_SETVAR && nfymode2 == 0
+      # å¤æ°ã®è¨­å®
+      $kernelCfgC.add("\t*((intptr_t *) exinf) = (#{par2});")
+    elsif nfymode1 == $TNFY_INCVAR && nfymode2 == 0
+      # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+      $kernelCfgC.add("\t(void) loc_cpu();")
+      $kernelCfgC.add("\t*((intptr_t *) exinf) += 1;")
+      $kernelCfgC.add("\t(void) unl_cpu();")
+    elsif nfymode1 == $TNFY_ACTTSK
+      # ã¿ã¹ã¯ã®èµ·å
+      $kernelCfgC.add("\t#{errorCode}act_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_WUPTSK
+      # ã¿ã¹ã¯ã®èµ·åº
+      $kernelCfgC.add("\t#{errorCode}wup_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_SIGSEM
+      # ã»ããã©ã®è¿å´
+      $kernelCfgC.add("\t#{errorCode}sig_sem((ID) exinf);")
+    elsif nfymode1 == $TNFY_SETFLG
+      # ã¤ãã³ããã©ã°ã®ã»ãã
+      $kernelCfgC.add("\t#{errorCode}set_flg(((ID) exinf), #{par2});")
+    elsif nfymode1 == $TNFY_SNDDTQ
+      # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+      $kernelCfgC.add("\t#{errorCode}psnd_dtq(((ID) exinf), #{par2});")
+    else
+      error_illegal_id("E_PAR", params, :nfymode, objid)
+    end
+			
+    if nfymode2 != 0
+      # ã¨ã©ã¼éç¥å¦çã®å¦ç
+      $kernelCfgC.add("\tif (ercd != E_OK) {")
+
+
+      if nfymode2 == $TENFY_SETVAR
+        # å¤æ°ã®è¨­å®
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar = (intptr_t) ercd;")
+      elsif nfymode2 == $TENFY_INCVAR
+        # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+        $kernelCfgC.add("\t\t(void) loc_cpu();")
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar += 1;")
+        $kernelCfgC.add("\t\t(void) unl_cpu();")
+      elsif nfymode2 == $TENFY_ACTTSK
+        # ã¿ã¹ã¯ã®èµ·å
+        $kernelCfgC.add("\t\t(void) act_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_WUPTSK
+        # ã¿ã¹ã¯ã®èµ·åº
+        $kernelCfgC.add("\t\t(void) wup_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_SIGSEM
+        # ã»ããã©ã®è¿å´
+        $kernelCfgC.add("\t\t(void) sig_sem(#{funcname}_esemid);")
+      elsif nfymode2 == $TENFY_SETFLG
+        # ã¤ãã³ããã©ã°ã®ã»ãã
+        $kernelCfgC.add("\t\t(void) set_flg(#{funcname}_eflgid, #{epar2});")
+      elsif nfymode2 == $TENFY_SNDDTQ
+        # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+        $kernelCfgC.add("\t\t(void) psnd_dtq(#{funcname}_edtqid," \
+													" (intptr_t) ercd);")
+      else
+        error_illegal_id("E_PAR", params, :nfymode, objid)
+      end
+      $kernelCfgC.add("\t}")
+    end
+
+    # é¢æ°ã®æ«å°¾é¨åã®çæ
+    $kernelCfgC.add2("}")
+  end
+  return(funcname)
+end
+
+#
+#  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+#
+$initializeFunctions = []
+IncludeTrb("kernel/task.trb")
+IncludeTrb("kernel/semaphore.trb")
+IncludeTrb("kernel/eventflag.trb")
+IncludeTrb("kernel/dataqueue.trb")
+IncludeTrb("kernel/pridataq.trb")
+IncludeTrb("kernel/mutex.trb")
+IncludeTrb("kernel/mempfix.trb")
+IncludeTrb("kernel/cyclic.trb")
+IncludeTrb("kernel/alarm.trb")
+IncludeTrb("kernel/interrupt.trb")
+IncludeTrb("kernel/exception.trb")
+
+#
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.comment_header("Stack Area for Non-task Context")
+
+if $cfgData[:DEF_ICS].size == 0
+  # DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  if $DEFAULT_ISTK.nil?
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", "DEFAULT_ISTKSZ")
+    istk = "_kernel_istack"
+  else
+    istksz = "DEFAULT_ISTKSZ"
+    istk = "DEFAULT_ISTK"
+  end
+else
+  # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
+  if $cfgData[:DEF_ICS].size > 1
+    error("E_OBJ: too many DEF_ICS")
+  end
+
+  # DEF_ICSãããå ´åã®å¦ç
+  params = $cfgData[:DEF_ICS][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:istk] ||= "NULL"
+
+  # istkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+  # ãããå°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
+  if params[:istksz] < $TARGET_MIN_ISTKSZ
+    error_wrong("E_PAR", params, :istksz, "too small")
+  end
+
+  if params[:istk] == "NULL"
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", params[:istksz])
+    istk = "_kernel_istack"
+  else
+    # istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
+    if (params[:istksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :istksz, "not aligned")
+    end
+
+    istksz = "(#{params[:istksz]})"
+    istk = "(void *)(#{params[:istk]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_istksz = #{istksz};
+STK_T *const _kernel_istk = #{istk};
+
+#ifdef TOPPERS_ISTKPT
+STK_T *const _kernel_istkpt = TOPPERS_ISTKPT(#{istk}, #{istksz});
+#endif /* TOPPERS_ISTKPT */
+EOS
+
+#
+#  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé å
+#
+$kernelCfgC.comment_header("Memory Area Allocated by Kernel")
+
+if $cfgData[:DEF_KMM].size == 0
+  # DEF_KMMããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  kmmsz = "0"
+  kmm = "NULL"
+else
+  # éçAPIãDEF_KMMããè¤æ°ããï¼E_OBJï¼
+  if ($cfgData[:DEF_KMM].size > 1)
+    error("E_OBJ: too many DEF_KMM")
+  end
+
+  # DEF_KMMãããå ´åã®å¦ç
+  params = $cfgData[:DEF_KMM][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:kmm] ||= "NULL"
+
+  # kmmszã0ã®å ´åï¼E_PARï¼
+  if params[:kmmsz] == 0
+    error_wrong("E_PAR", params, :kmmsz, "zero")
+  end
+
+  if params[:kmm] == "NULL"
+    # ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®èªåå²ä»ã
+    $kernelCfgC.add("static MB_T _kernel_memory" \
+					"[TOPPERS_COUNT_SZ(#{params[:kmmsz]}, sizeof(MB_T))];")
+    kmmsz = "TOPPERS_ROUND_SZ(#{params[:kmmsz]}, sizeof(MB_T))"
+    kmm = "_kernel_memory"
+  else
+    # kmmszãã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´å
+    # ï¼E_PARï¼
+    if (params[:kmmsz] & ($CHECK_MB_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :kmmsz, "not aligned")
+    end
+
+    kmmsz = "(#{params[:kmmsz]})"
+    kmm = "(void *)(#{params[:kmm]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_kmmsz = #{kmmsz};
+MB_T *const _kernel_kmm = #{kmm};
+EOS
+
+#
+#  ã¿ã¤ã ã¤ãã³ãç®¡ç
+#
+$kernelCfgC.comment_header("Time Event Management")
+$kernelCfgC.add(<<EOS)
+TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];
+EOS
+
+#
+#  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
+#
+$kernelCfgC.comment_header("Module Initialization Function")
+$kernelCfgC.append(<<EOS)
+void
+_kernel_initialize_object(void)
+{
+EOS
+$initializeFunctions.each do |func|
+  $kernelCfgC.add("\t#{func}")
+end
+$kernelCfgC.add2("}")
+
+#
+#  åæåã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Initialization Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_INI].each do |key, params|
+  # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:iniatr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
+  end
+end
+
+# åæåã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_inirtn(void)
+{
+EOS
+$cfgData[:ATT_INI].each do |key, params|
+  $kernelCfgC.add("\t((INIRTN)(#{params[:inirtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  çµäºå¦çã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Termination Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_TER].each do |key, params|
+  # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:teratr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
+  end
+end
+
+# çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_terrtn(void)
+{
+EOS
+$cfgData[:ATT_TER].reverse_each do |key, params|
+  $kernelCfgC.add("\t((TERRTN)(#{params[:terrtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  kernel_cfg.hã®æ«å°¾é¨åã®çæ
+#
+$kernelCfgH.append(<<EOS)
+#endif /* TOPPERS_KERNEL_CFG_H */
+EOS
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.csv	(revision 305)
+++ 	(revision )
@@ -1,27 +1,0 @@
-tsk,CRE_TSK,#tskid { .tskatr &exinf &task +itskpri .stksz &stk },,
-atsk,AID_TSK,.notsk,,
-sem,CRE_SEM,#semid { .sematr .isemcnt .maxsem },,
-asem,AID_SEM,.nosem,,
-flg,CRE_FLG,#flgid { .flgatr .iflgptn },,
-aflg,AID_FLG,.nosem,,
-dtq,CRE_DTQ,#dtqid { .dtqatr .dtqcnt &dtqmb },,
-adtq,AID_DTQ,.nodtq,,
-pdq,CRE_PDQ,#pdqid { .pdqatr .pdqcnt +maxdpri &pdqmb },,
-apdq,AID_PDQ,.nopdq,,
-mtx,CRE_MTX,#mtxid { .mtxatr +ceilpri? },,
-amtx,AID_MTX,.nomtx,,
-mpf,CRE_MPF,#mpfid { .mpfatr .blkcnt .blksz &mpf &mpfmb },,
-ampf,AID_MPF,.nompf,,
-cyc,CRE_CYC,#cycid { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs },,
-acyc,AID_CYC,.nocyc,,
-alm,CRE_ALM,#almid { .almatr { .nfymode &par1 &par2? &par3? &par4? } },,
-aalm,AID_ALM,.noalm,,
-int,CFG_INT,.intno { .intatr +intpri },,
-isr,CRE_ISR,#isrid { .isratr &exinf .intno &isr +isrpri },,
-aisr,AID_ISR,.noisr,,
-inh,DEF_INH,.inhno { .inhatr &inthdr },,
-exc,DEF_EXC,.excno { .excatr &exchdr },,
-ics,DEF_ICS,{ .istksz &istk },-1,
-kmm,DEF_KMM,{ .kmmsz &kmm },-1,
-ini,ATT_INI,{ .iniatr &exinf &inirtn },-1,
-ter,ATT_TER,{ .teratr &exinf &terrtn },-1,
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.def	(revision 306)
@@ -0,0 +1,27 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+AID_TSK .notsk
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+AID_SEM .nosem
+CRE_FLG #flgid* { .flgatr .iflgptn }
+AID_FLG .noflg
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+AID_DTQ .nodtq
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+AID_PDQ .nopdq
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+AID_MTX .nomtx
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+AID_MPF .nompf
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+AID_CYC .nocyc
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+AID_ALM .noalm
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+AID_ISR .noisr
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+DEF_KMM { .kmmsz &kmm? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.tf	(revision 305)
+++ 	(revision )
@@ -1,422 +1,0 @@
-$ 
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2008-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$  
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$  
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel_check.tf 463 2015-10-18 14:25:55Z ertl-hiro $
-$  
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
-$
-$FOREACH lma LMA.ORDER_LIST$
-	$start_data = SYMBOL(LMA.START_DATA[lma])$
-	$end_data = SYMBOL(LMA.END_DATA[lma])$
-	$start_idata = SYMBOL(LMA.START_IDATA[lma])$
-	$IF !LENGTH(start_data)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.START_DATA[lma])$$END$
-	$ELIF !LENGTH(end_data)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.END_DATA[lma])$$END$
-	$ELIF !LENGTH(start_idata)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.START_IDATA[lma])$$END$
-	$ELSE$
-		$BCOPY(start_idata, start_data, end_data - start_data)$
-	$END$
-$END$
-
-$
-$  éç¥æ
-å ±ã®ãã§ãã¯é¢æ°
-$
-$tmax_tskid = PEEK(SYMBOL("_kernel_tmax_tskid"), sizeof_ID)$
-$tmax_semid = PEEK(SYMBOL("_kernel_tmax_semid"), sizeof_ID)$
-$tmax_flgid = PEEK(SYMBOL("_kernel_tmax_flgid"), sizeof_ID)$
-$tmax_dtqid = PEEK(SYMBOL("_kernel_tmax_dtqid"), sizeof_ID)$
-
-$FUNCTION CHECK_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$exinf = ARGV[2]$
-	$nfyhdr = ARGV[3]$
-	$par1 = ARGV[4]$
-	$par2 = ARGV[5]$
-	$text_line = ARGV[8]$
-	$objid = ARGV[9]$
-	$apiname = ARGV[10]$
-	$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode1 == TNFY_SETVAR || nfymode1 == TNFY_SETFLG
-											|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$epar1 = ARGV[6]$
-		$epar2 = ARGV[7]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$epar1 = ARGV[5]$
-		$epar2 = ARGV[6]$
-	$END$
-
-$	// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
-	$IF nfymode == TNFY_HANDLER$
-		$tmehdr = nfyhdr$
-		$IF CHECK_FUNC_ALIGN && (tmehdr & (CHECK_FUNC_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"tmehdr", par2, objid, apiname)$
-				$END$
-		$END$
-		$IF CHECK_FUNC_NONNULL && tmehdr == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"tmehdr", par2, objid, apiname)$
-			$END$
-		$END$
-	$END$
-
-$	// ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
-	$IF nfymode1 == TNFY_SETVAR || nfymode1 == TNFY_INCVAR$
-$		// å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$p_var = exinf$
-
-$		// å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
-		$IF CHECK_INTPTR_ALIGN && (p_var & (CHECK_INTPTR_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"p_var", par1, objid, apiname)$
-			$END$
-		$END$
-		$IF CHECK_INTPTR_NONNULL && p_var == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"p_var", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_ACTTSK || nfymode1 == TNFY_WUPTSK$
-$		// ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$tskid = exinf$
-
-$		// ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
-		$IF !(TMIN_TSKID <= tskid && tskid <= tmax_tskid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"tskid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SIGSEM$
-$		// ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$semid = exinf$
-
-$		// ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
-		$IF !(TMIN_SEMID <= semid && semid <= tmax_semid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"semid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SETFLG$
-$		// ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$flgid = exinf$
-
-$		// ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
-		$IF !(TMIN_FLGID <= flgid && flgid <= tmax_flgid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"flgid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SNDDTQ$
-$		// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$dtqid = exinf$
-
-$		// ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
-		$IF !(TMIN_DTQID <= dtqid && dtqid <= tmax_dtqid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"dtqid", par1, objid, apiname)$
-			$END$
-		$END$
-	$END$
-
-$	// ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
-	$IF nfymode2 == TENFY_SETVAR || nfymode2 == TENFY_INCVAR$
-$		// å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
-		$p_var = PEEK(SYMBOL(CONCAT(funcname, "_p_evar")), sizeof_intptr_t)$
-
-$		// å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
-		$IF CHECK_INTPTR_ALIGN && (p_var & (CHECK_INTPTR_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"p_var", epar1, objid, apiname)$
-			$END$
-		$END$
-		$IF CHECK_INTPTR_NONNULL && p_var == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"p_var", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-$		// ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
-		$tskid = PEEK(SYMBOL(CONCAT(funcname, "_etskid")), sizeof_ID)$
-
-$		// ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
-		$IF !(TMIN_TSKID <= tskid && tskid <= tmax_tskid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"tskid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SIGSEM$
-$		// ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
-		$semid = PEEK(SYMBOL(CONCAT(funcname, "_esemid")), sizeof_ID)$
-
-$		// ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
-		$IF !(TMIN_SEMID <= semid && semid <= tmax_semid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"semid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SETFLG$
-$		// ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
-		$flgid = PEEK(SYMBOL(CONCAT(funcname, "_eflgid")), sizeof_ID)$
-
-$		// ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
-		$IF !(TMIN_FLGID <= flgid && flgid <= tmax_flgid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"flgid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SNDDTQ$
-$		// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
-		$dtqid = PEEK(SYMBOL(CONCAT(funcname, "_edtqid")), sizeof_ID)$
-
-$		// ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
-		$IF !(TMIN_DTQID <= dtqid && dtqid <= tmax_dtqid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"dtqid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$END$
-$END$
-
-$ 
-$  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
-$ 
-$tinib = SYMBOL("_kernel_tinib_table")$
-$FOREACH tskid TSK.ID_LIST$
-$	// ã¿ã¹ã¯ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
-	$task = PEEK(tinib + offsetof_TINIB_task, sizeof_FP)$
-	$IF CHECK_FUNC_ALIGN && (task & (CHECK_FUNC_ALIGN - 1)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"task", TSK.TASK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-	$IF CHECK_FUNC_NONNULL && task == 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"task", TSK.TASK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
-	$IF USE_TSKINICTXB$
-		$stk = GET_STK_TSKINICTXB(tinib)$
-	$ELSE$
-		$stk = PEEK(tinib + offsetof_TINIB_stk, sizeof_void_ptr)$
-	$END$
-	$IF CHECK_STACK_ALIGN && (stk & (CHECK_STACK_ALIGN - 1)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"stk", TSK.STK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-	$IF CHECK_STACK_NONNULL && stk == 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"stk", TSK.STK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-	$tinib = tinib + sizeof_TINIB$
-$END$
-
-$ 
-$  å¨æéç¥ã«é¢ãããã§ãã¯
-$ 
-$cycinib = SYMBOL("_kernel_cycinib_table")$
-$FOREACH cycid CYC.ID_LIST$
-	$exinf = PEEK(cycinib + offsetof_CYCINIB_exinf, sizeof_intptr_t)$
-	$nfyhdr = PEEK(cycinib + offsetof_CYCINIB_nfyhdr, sizeof_FP)$
-
-$	// éç¥æ
-å ±ã®ãã§ãã¯
-	$CHECK_NFYHDR(CYC.NFYMODE[cycid], exinf, nfyhdr,
-						CYC.PAR1[cycid], CYC.PAR2[cycid],
-						CYC.PAR3[cycid], CYC.PAR4[cycid],
-						CYC.TEXT_LINE[cycid], cycid, "CRE_CYC")$
-
-	$cycinib = cycinib + sizeof_CYCINIB$
-$END$
-
-$ 
-$  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
-$ 
-$alminib = SYMBOL("_kernel_alminib_table")$
-$FOREACH almid ALM.ID_LIST$
-	$exinf = PEEK(alminib + offsetof_ALMINIB_exinf, sizeof_intptr_t)$
-	$nfyhdr = PEEK(alminib + offsetof_ALMINIB_nfyhdr, sizeof_FP)$
-
-$	// éç¥æ
-å ±ã®ãã§ãã¯
-	$CHECK_NFYHDR(ALM.NFYMODE[almid], exinf, nfyhdr,
-						ALM.PAR1[almid], ALM.PAR2[almid],
-						ALM.PAR3[almid], ALM.PAR4[almid],
-						ALM.TEXT_LINE[almid], almid, "CRE_ALM")$
-
-	$alminib = alminib + sizeof_ALMINIB$
-$END$
-
-$ 
-$  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
-$ 
-$mpfinib = SYMBOL("_kernel_mpfinib_table")$
-$FOREACH mpfid MPF.ID_LIST$
-	$mpf = PEEK(mpfinib + offsetof_MPFINIB_mpf, sizeof_void_ptr)$
-
-$	// åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
-	$IF CHECK_MPF_ALIGN && (mpf & (CHECK_MPF_ALIGN - 1)) != 0$
-		$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"mpf", MPF.MPF[mpfid], mpfid, "CRE_MPF")$
-		$END$
-	$END$
-	$IF CHECK_MPF_NONNULL && mpf == 0$
-		$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"mpf", MPF.MPF[mpfid], mpfid, "CRE_MPF")$
-		$END$
-	$END$
-
-	$mpfinib = mpfinib + sizeof_MPFINIB$
-$END$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ãããã§ãã¯
-$
-$isrinib = SYMBOL("_kernel_isrinib_table")$
-$FOREACH order ISR.ORDER_LIST$
-	$isr = PEEK(isrinib + offsetof_ISRINIB_isr, sizeof_FP)$
-
-$	// å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3004ï¼½
-	$IF CHECK_FUNC_ALIGN && (isr & (CHECK_FUNC_ALIGN - 1)) != 0$
-		$ERROR ISR.TEXT_LINE[order]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %4% is not aligned"),
-						"isr", ISR.ISR[order], "CRE_ISR")$
-		$END$
-	$END$
-	$IF CHECK_FUNC_NONNULL && isr == 0$
-		$ERROR ISR.TEXT_LINE[order]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %4% is null"),
-						"isr", ISR.ISR[order], "CRE_ISR")$
-		$END$
-	$END$
-
-	$isrinib = isrinib + sizeof_ISRINIB$
-$END$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
-$ 
-$istk = PEEK(SYMBOL("_kernel_istk"), sizeof_void_ptr)$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
-$IF CHECK_STACK_ALIGN && (istk & (CHECK_STACK_ALIGN - 1)) != 0$
-	$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-							"istk", ICS.ISTK[1], "DEF_ICS")$
-	$END$
-$END$
-$IF CHECK_STACK_NONNULL && istk == 0$
-	$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is null"),
-							"istk", ICS.ISTK[1], "DEF_ICS")$
-	$END$
-$END$
-
-$ 
-$  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã«é¢ãããã§ãã¯
-$ 
-$kmm = PEEK(SYMBOL("_kernel_kmm"), sizeof_void_ptr)$
-
-$ ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®å
-é ­çªå°ã®ãã§ãã¯
-$IF CHECK_MB_ALIGN && (kmm & (CHECK_MB_ALIGN - 1)) != 0$
-	$ERROR KMM.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-							"kmm", KMM.KMM[1], "DEF_KMM")$
-	$END$
-$END$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.trb	(revision 306)
@@ -0,0 +1,374 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel_check.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+#  
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯ãªãã
+#
+
+# 
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+# 
+$timeStampFileName = "check.timestamp"
+
+#
+#  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
+#
+if !$lmaList.nil?
+  $lmaList.each do |lma|
+    startData = SYMBOL(lma[:START_DATA])
+    endData = SYMBOL(lma[:END_DATA])
+    startIdata = SYMBOL(lma[:START_IDATA])
+    if startData.nil?
+      error_exit("symbol `lma[:START_DATA]' not found")
+    elsif endData.nil?
+      error_exit("symbol `lma[:END_DATA]' not found")
+    elsif startIdata.nil?
+      error_exit("symbol `lma[:START_IDATA]' not found")
+    else
+      BCOPY(startIdata, startData, endData - startData)
+    end
+  end
+end
+
+#
+#  éç¥æ
+å ±ã®ãã§ãã¯é¢æ°
+#
+$tmax_tskid = $TMIN_TSKID + $cfgData[:CRE_TSK].size - 1
+$tmax_semid = $TMIN_SEMID + $cfgData[:CRE_SEM].size - 1
+$tmax_flgid = $TMIN_FLGID + $cfgData[:CRE_FLG].size - 1
+$tmax_dtqid = $TMIN_DTQID + $cfgData[:CRE_DTQ].size - 1
+
+def checkNotifyHandler(key, params, objid, exinf, nfyhdr)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+  funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+    epar1 = params[:par3]
+    epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  #	ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
+  if nfymode == $TNFY_HANDLER
+    tmehdr = nfyhdr
+    params1 = params.dup
+    params1[:tmehdr] = par2
+    if (tmehdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "not aligned")
+    end
+    if $CHECK_FUNC_NONNULL && tmehdr == 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "null")
+    end
+  end
+
+  #	ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_INCVAR
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+	p_var = exinf
+    params1 = params.dup
+    params1[:p_var] = par1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif (nfymode1 == $TNFY_ACTTSK || nfymode1 == $TNFY_WUPTSK)
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    tskid = exinf
+    params1 = params.dup
+    params1[:tskid] = par1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode1 == $TNFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    semid = exinf
+    params1 = params.dup
+    params1[:semid] = par1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode1 == $TNFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    flgid = exinf
+    params1 = params.dup
+    params1[:flgid] = par1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode1 == $TNFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    dtqid = exinf
+    params1 = params.dup
+    params1[:dtqid] = par1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+
+  # ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if (nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR)
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
+    p_var = PEEK(SYMBOL(funcname + "_p_evar"), $sizeof_intptr_t)
+    params1 = params.dup
+    params1[:p_var] = epar1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
+    tskid = PEEK(SYMBOL(funcname + "_etskid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:tskid] = epar1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode2 == $TENFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
+	semid = PEEK(SYMBOL(funcname + "_esemid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:semid] = epar1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode2 == $TENFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
+    flgid = PEEK(SYMBOL(funcname + "_eflgid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:flgid] = epar1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode2 == $TENFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
+    dtqid = PEEK(SYMBOL(funcname + "_edtqid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:dtqid] = epar1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+end
+
+# 
+#  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
+# 
+tinib = SYMBOL("_kernel_tinib_table")
+$cfgData[:CRE_TSK].sort.each do |key, params|
+  task = PEEK(tinib + $offsetof_TINIB_task, $sizeof_TASK)
+
+  # ã¿ã¹ã¯ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
+  if (task & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && task == 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "null")
+  end
+
+  # ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
+  if $USE_TSKINICTXB
+    stk = GetStackTskinictxb(key, params, tinib)
+  else
+    stk = PEEK(tinib + $offsetof_TINIB_stk, $sizeof_void_ptr)
+  end
+  if (stk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && stk == 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "null")
+  end
+
+  tinib += $sizeof_TINIB
+end
+
+# 
+#  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
+# 
+mpfinib = SYMBOL("_kernel_mpfinib_table")
+$cfgData[:CRE_MPF].sort.each do |key, params|
+  mpf = PEEK(mpfinib + $offsetof_MPFINIB_mpf, $sizeof_void_ptr)
+
+  # åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
+  if (mpf & ($CHECK_MPF_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "not aligned")
+  end
+  if $CHECK_MPF_NONNULL && mpf == 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "null")
+  end
+
+  mpfinib += $sizeof_MPFINIB
+end
+
+# 
+#  å¨æéç¥ã«é¢ãããã§ãã¯
+# 
+cycinib = SYMBOL("_kernel_cycinib_table")
+$cfgData[:CRE_CYC].sort.each do |key, params|
+  exinf = PEEK(cycinib + $offsetof_CYCINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(cycinib + $offsetof_CYCINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :cycid, exinf, nfyhdr)
+
+  cycinib += $sizeof_CYCINIB
+end
+
+# 
+#  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
+# 
+alminib = SYMBOL("_kernel_alminib_table")
+$cfgData[:CRE_ALM].sort.each do |key, params|
+  exinf = PEEK(alminib + $offsetof_ALMINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(alminib + $offsetof_ALMINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :almid, exinf, nfyhdr)
+
+  alminib += $sizeof_ALMINIB
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ãããã§ãã¯
+#
+isrinib = SYMBOL("_kernel_isrinib_table")
+$cfgData[:CRE_ISR].sort.each do |key, params|
+  isr = PEEK(isrinib + $offsetof_ISRINIB_isr, $sizeof_ISR)
+
+  # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3004ï¼½
+  if (isr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :isr, :isrid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && isr == 0
+    error_wrong_id("E_PAR", params, :isr, :isrid, "null")
+  end
+
+  isrinib += $sizeof_ISRINIB
+end
+
+# 
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
+# 
+istkAddr = SYMBOL("_kernel_istk")
+if !istkAddr.nil?
+  istk = PEEK(istkAddr, $sizeof_void_ptr)
+
+  # éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
+  if (istk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && istk == 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "null")
+  end
+end
+
+# 
+#  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã«é¢ãããã§ãã¯
+# 
+kmmAddr = SYMBOL("_kernel_kmm")
+if !kmmAddr.nil?
+  kmm = PEEK(kmmAddr, $sizeof_void_ptr)
+
+  # ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®å
+é ­çªå°ã®ãã§ãã¯
+  if (kmm & ($CHECK_MB_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_KMM][1], :kmm, "not aligned")
+  end
+end
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_def.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_def.csv	(revision 305)
+++ 	(revision )
@@ -1,140 +1,0 @@
-SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
-TA_NULL,TA_NULL
-TA_ACT,TA_ACT
-TA_NOACTQUE,TA_NOACTQUE
-TA_TPRI,TA_TPRI
-TA_WMUL,TA_WMUL
-TA_CLR,TA_CLR
-TA_CEILING,TA_CEILING
-TA_STA,TA_STA
-TA_NONKERNEL,TA_NONKERNEL
-TA_ENAINT,TA_ENAINT
-TA_EDGE,TA_EDGE
-TNFY_HANDLER,TNFY_HANDLER
-TNFY_SETVAR,TNFY_SETVAR
-TNFY_INCVAR,TNFY_INCVAR
-TNFY_ACTTSK,TNFY_ACTTSK
-TNFY_WUPTSK,TNFY_WUPTSK
-TNFY_SIGSEM,TNFY_SIGSEM
-TNFY_SETFLG,TNFY_SETFLG
-TNFY_SNDDTQ,TNFY_SNDDTQ
-TENFY_SETVAR,TENFY_SETVAR
-TENFY_INCVAR,TENFY_INCVAR
-TENFY_ACTTSK,TENFY_ACTTSK
-TENFY_WUPTSK,TENFY_WUPTSK
-TENFY_SIGSEM,TENFY_SIGSEM
-TENFY_SETFLG,TENFY_SETFLG
-TENFY_SNDDTQ,TENFY_SNDDTQ
-TMIN_TPRI,TMIN_TPRI,signed
-TMAX_TPRI,TMAX_TPRI,signed
-TMIN_DPRI,TMIN_DPRI,signed
-TMAX_DPRI,TMAX_DPRI,signed
-TMIN_ISRPRI,TMIN_ISRPRI,signed
-TMAX_ISRPRI,TMAX_ISRPRI,signed
-TBIT_FLGPTN,TBIT_FLGPTN
-TMAX_MAXSEM,TMAX_MAXSEM
-TMAX_RELTIM,TMAX_RELTIM
-TMIN_INTPRI,TMIN_INTPRI,signed
-TMAX_INTPRI,TMAX_INTPRI,signed
-TMIN_TSKID,TMIN_TSKID,signed
-TMIN_SEMID,TMIN_SEMID,signed
-TMIN_FLGID,TMIN_FLGID,signed
-TMIN_DTQID,TMIN_DTQID,signed
-TMIN_PDQID,TMIN_PDQID,signed
-TMIN_MTXID,TMIN_MTXID,signed
-TMIN_MPFID,TMIN_MPFID,signed
-TMIN_CYCID,TMIN_CYCID,signed
-TMIN_ALMID,TMIN_ALMID,signed
-OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,#defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,#defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,#defined(OMIT_INITIALIZE_EXCEPTION)
-USE_TSKINICTXB,#defined(USE_TSKINICTXB)
-TARGET_TSKATR,#defined(TARGET_TSKATR),,TARGET_TSKATR
-TARGET_INTATR,#defined(TARGET_INTATR),,TARGET_INTATR
-TARGET_INHATR,#defined(TARGET_INHATR),,TARGET_INHATR
-TARGET_ISRATR,#defined(TARGET_ISRATR),,TARGET_ISRATR
-TARGET_EXCATR,#defined(TARGET_EXCATR),,TARGET_EXCATR
-TARGET_MIN_STKSZ,#defined(TARGET_MIN_STKSZ),,TARGET_MIN_STKSZ
-TARGET_MIN_ISTKSZ,#defined(TARGET_MIN_ISTKSZ),,TARGET_MIN_ISTKSZ
-CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
-CHECK_INTPTR_ALIGN,#defined(CHECK_INTPTR_ALIGN),,CHECK_INTPTR_ALIGN
-CHECK_INTPTR_NONNULL,#defined(CHECK_INTPTR_NONNULL)
-CHECK_FUNC_ALIGN,#defined(CHECK_FUNC_ALIGN),,CHECK_FUNC_ALIGN
-CHECK_FUNC_NONNULL,#defined(CHECK_FUNC_NONNULL)
-CHECK_STACK_ALIGN,#defined(CHECK_STACK_ALIGN),,CHECK_STACK_ALIGN
-CHECK_STACK_NONNULL,#defined(CHECK_STACK_NONNULL)
-CHECK_MPF_ALIGN,#defined(CHECK_MPF_ALIGN),,CHECK_MPF_ALIGN
-CHECK_MPF_NONNULL,#defined(CHECK_MPF_NONNULL)
-CHECK_MB_ALIGN,#defined(CHECK_MB_ALIGN),,CHECK_MB_ALIGN
-sizeof_void_ptr,sizeof(void*)
-sizeof_uint_t,sizeof(uint_t)
-sizeof_size_t,sizeof(size_t)
-sizeof_intptr_t,sizeof(intptr_t)
-sizeof_ID,sizeof(ID)
-sizeof_FP,sizeof(FP)
-sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
-sizeof_EXCNO,sizeof(EXCNO)
-sizeof_TINIB,sizeof(TINIB)
-offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
-offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
-offsetof_TINIB_task,"offsetof(TINIB,task)"
-offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
-offsetof_TINIB_stksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stksz)"
-offsetof_TINIB_stk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stk)"
-sizeof_SEMINIB,sizeof(SEMINIB)
-offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
-offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
-offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
-sizeof_FLGPTN,sizeof(FLGPTN)
-sizeof_FLGINIB,sizeof(FLGINIB)
-offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
-offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
-sizeof_DTQINIB,sizeof(DTQINIB)
-offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
-offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
-offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
-sizeof_PDQINIB,sizeof(PDQINIB)
-offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
-offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
-offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
-offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
-sizeof_MTXINIB,sizeof(MTXINIB)
-offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
-offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
-sizeof_MPFINIB,sizeof(MPFINIB)
-offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
-offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
-offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
-offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
-offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
-sizeof_CYCINIB,sizeof(CYCINIB)
-offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
-offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
-offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
-offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
-offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
-sizeof_ALMINIB,sizeof(ALMINIB)
-offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
-offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
-offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
-sizeof_ISRINIB,sizeof(ISRINIB)
-offsetof_ISRINIB_isratr,"offsetof(ISRINIB,isratr)"
-offsetof_ISRINIB_exinf,"offsetof(ISRINIB,exinf)"
-offsetof_ISRINIB_p_isr_queue,"offsetof(ISRINIB,p_isr_queue)"
-offsetof_ISRINIB_isr,"offsetof(ISRINIB,isr)"
-offsetof_ISRINIB_isrpri,"offsetof(ISRINIB,isrpri)"
-sizeof_INHINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INHINIB)
-offset_INHINIB_inhno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhno)"
-offset_INHINIB_inhatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhatr)"
-offset_INHINIB_int_entry,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,int_entry)"
-sizeof_INTINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INTINIB)
-offset_INTINIB_intno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intno)"
-offset_INTINIB_intatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intatr)"
-offset_INTINIB_intpri,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intpri)"
-sizeof_EXCINIB,#!defined(OMIT_INITIALIZE_EXCEPTION),,sizeof(EXCINIB)
-offset_EXCINIB_excno,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excno)"
-offset_EXCINIB_excatr,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excatr)"
-offset_EXCINIB_exc_entry,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,exc_entry)"
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_impl.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_impl.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel_impl.h 333 2015-06-21 13:23:37Z ertl-hiro $
+ *  $Id: kernel_impl.h 748 2016-05-14 14:30:06Z ertl-hiro $
  */
 
@@ -88,11 +88,4 @@
  */
 #include <t_syslog.h>
-
-/*
- *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
- */
-#ifndef CAST
-#define CAST(type, val)		((type)(val))
-#endif /* CAST */
 
 /*
@@ -189,4 +182,9 @@
 
 /*
+ *  TECSã®åæåï¼init_tecs.cï¼
+ */
+extern void initialize_tecs(void);
+
+/*
  *  åã¢ã¸ã¥ã¼ã«ã®åæåï¼kernel_cfg.cï¼
  */
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.def
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.def	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.def	(revision 306)
@@ -181,4 +181,5 @@
 isrinib_table
 aisrinib_table
+isrorder_table
 isrcb_table
 tnum_def_inhno
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.h	(revision 306)
@@ -220,4 +220,5 @@
 #define isrinib_table				_kernel_isrinib_table
 #define aisrinib_table				_kernel_aisrinib_table
+#define isrorder_table				_kernel_isrorder_table
 #define isrcb_table					_kernel_isrcb_table
 #define tnum_def_inhno				_kernel_tnum_def_inhno
@@ -235,239 +236,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-#define _initialize_kmm				__kernel_initialize_kmm
-#define _kernel_malloc				__kernel_kernel_malloc
-#define _kernel_free				__kernel_kernel_free
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _free_tcb					__kernel_free_tcb
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _free_semcb					__kernel_free_semcb
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _free_flgcb					__kernel_free_flgcb
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _free_dtqcb					__kernel_free_dtqcb
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _free_pdqcb					__kernel_free_pdqcb
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _free_mtxcb					__kernel_free_mtxcb
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _free_mpfcb					__kernel_free_mpfcb
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  time_manage.c
- */
-#define _check_nfyinfo				__kernel_check_nfyinfo
-#define _notify_handler				__kernel_notify_handler
-
-/*
- *  cyclic.c
- */
-#define _free_cyccb					__kernel_free_cyccb
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _free_almcb					__kernel_free_almcb
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _free_isrcb					__kernel_free_isrcb
-#define _initialize_isr				__kernel_initialize_isr
-#define _call_isr					__kernel_call_isr
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tmax_stskid				__kernel_tmax_stskid
-#define _tinib_table				__kernel_tinib_table
-#define _atinib_table				__kernel_atinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _tmax_ssemid				__kernel_tmax_ssemid
-#define _seminib_table				__kernel_seminib_table
-#define _aseminib_table				__kernel_aseminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _tmax_sflgid				__kernel_tmax_sflgid
-#define _flginib_table				__kernel_flginib_table
-#define _aflginib_table				__kernel_aflginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _tmax_sdtqid				__kernel_tmax_sdtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _adtqinib_table				__kernel_adtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _tmax_spdqid				__kernel_tmax_spdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _apdqinib_table				__kernel_apdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _tmax_smtxid				__kernel_tmax_smtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _amtxinib_table				__kernel_amtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _tmax_smpfid				__kernel_tmax_smpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _ampfinib_table				__kernel_ampfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _tmax_scycid				__kernel_tmax_scycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _acycinib_table				__kernel_acycinib_table
-#define _acyc_nfyinfo_table			__kernel_acyc_nfyinfo_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _tmax_salmid				__kernel_tmax_salmid
-#define _alminib_table				__kernel_alminib_table
-#define _aalminib_table				__kernel_aalminib_table
-#define _aalm_nfyinfo_table			__kernel_aalm_nfyinfo_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_isr_queue				__kernel_tnum_isr_queue
-#define _isr_queue_list				__kernel_isr_queue_list
-#define _isr_queue_table			__kernel_isr_queue_table
-#define _tmax_isrid					__kernel_tmax_isrid
-#define _tmax_sisrid				__kernel_tmax_sisrid
-#define _isrinib_table				__kernel_isrinib_table
-#define _aisrinib_table				__kernel_aisrinib_table
-#define _isrcb_table				__kernel_isrcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-#define _kmmsz						__kernel_kmmsz
-#define _kmm						__kernel_kmm
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_sym.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_sym.def	(revision 306)
@@ -0,0 +1,150 @@
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+CHECK_MB_ALIGN,,,defined(CHECK_MB_ALIGN),1
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_ISRINIB,sizeof(ISRINIB)
+offsetof_ISRINIB_isratr,"offsetof(ISRINIB,isratr)"
+offsetof_ISRINIB_exinf,"offsetof(ISRINIB,exinf)"
+offsetof_ISRINIB_p_isr_queue,"offsetof(ISRINIB,p_isr_queue)"
+offsetof_ISRINIB_isr,"offsetof(ISRINIB,isr)"
+offsetof_ISRINIB_isrpri,"offsetof(ISRINIB,isrpri)"
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_unrename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_unrename.h	(revision 306)
@@ -221,4 +221,5 @@
 #undef isrinib_table
 #undef aisrinib_table
+#undef isrorder_table
 #undef isrcb_table
 #undef tnum_def_inhno
@@ -236,239 +237,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-#undef _initialize_kmm
-#undef _kernel_malloc
-#undef _kernel_free
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _free_tcb
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _free_semcb
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _free_flgcb
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _free_dtqcb
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _free_pdqcb
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _free_mtxcb
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _free_mpfcb
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  time_manage.c
- */
-#undef _check_nfyinfo
-#undef _notify_handler
-
-/*
- *  cyclic.c
- */
-#undef _free_cyccb
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _free_almcb
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _free_isrcb
-#undef _initialize_isr
-#undef _call_isr
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tmax_stskid
-#undef _tinib_table
-#undef _atinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _tmax_ssemid
-#undef _seminib_table
-#undef _aseminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _tmax_sflgid
-#undef _flginib_table
-#undef _aflginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _tmax_sdtqid
-#undef _dtqinib_table
-#undef _adtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _tmax_spdqid
-#undef _pdqinib_table
-#undef _apdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _tmax_smtxid
-#undef _mtxinib_table
-#undef _amtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _tmax_smpfid
-#undef _mpfinib_table
-#undef _ampfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _tmax_scycid
-#undef _cycinib_table
-#undef _acycinib_table
-#undef _acyc_nfyinfo_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _tmax_salmid
-#undef _alminib_table
-#undef _aalminib_table
-#undef _aalm_nfyinfo_table
-#undef _almcb_table
-#undef _tnum_isr_queue
-#undef _isr_queue_list
-#undef _isr_queue_table
-#undef _tmax_isrid
-#undef _tmax_sisrid
-#undef _isrinib_table
-#undef _aisrinib_table
-#undef _isrcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-#undef _kmmsz
-#undef _kmm
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: mempfix.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: mempfix.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -226,5 +226,7 @@
 	MPFINIB	*p_mpfinib;
 	ATR		mpfatr;
-	void	*mpf;
+	uint_t	blkcnt;
+	uint_t	blksz;
+	MPF_T	*mpf;
 	MPFMB	*p_mpfmb;
 	ER		ercd;
@@ -232,16 +234,20 @@
 	LOG_ACRE_MPF_ENTER(pk_cmpf);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cmpf->mpfatr, TA_TPRI);
-	CHECK_PAR(pk_cmpf->blkcnt != 0);
-	CHECK_PAR(pk_cmpf->blksz != 0);
-	if (pk_cmpf->mpf != NULL) {
-		CHECK_PAR(MPF_ALIGN(pk_cmpf->mpf));
-	}
-	if (pk_cmpf->mpfmb != NULL) {
-		CHECK_PAR(MB_ALIGN(pk_cmpf->mpfmb));
-	}
+
 	mpfatr = pk_cmpf->mpfatr;
+	blkcnt = pk_cmpf->blkcnt;
+	blksz = pk_cmpf->blksz;
 	mpf = pk_cmpf->mpf;
 	p_mpfmb = pk_cmpf->mpfmb;
+
+	CHECK_RSATR(mpfatr, TA_TPRI);
+	CHECK_PAR(blkcnt != 0);
+	CHECK_PAR(blksz != 0);
+	if (mpf != NULL) {
+		CHECK_PAR(MPF_ALIGN(mpf));
+	}
+	if (p_mpfmb != NULL) {
+		CHECK_PAR(MB_ALIGN(p_mpfmb));
+	}
 
 	lock_cpu();
@@ -251,5 +257,5 @@
 	else {
 		if (mpf == NULL) {
-			mpf = kernel_malloc(ROUND_MPF_T(pk_cmpf->blksz) * pk_cmpf->blkcnt);
+			mpf = kernel_malloc(ROUND_MPF_T(blksz) * blkcnt);
 			mpfatr |= TA_MEMALLOC;
 		}
@@ -259,9 +265,9 @@
 		else {
 			if (p_mpfmb == NULL) {
-				p_mpfmb = kernel_malloc(sizeof(MPFMB) * pk_cmpf->blkcnt);
+				p_mpfmb = kernel_malloc(sizeof(MPFMB) * blkcnt);
 				mpfatr |= TA_MBALLOC;
 			}
 			if (p_mpfmb == NULL) {
-				if (pk_cmpf->mpf == NULL) {
+				if (mpf == NULL) {
 					kernel_free(mpf);
 				}
@@ -272,6 +278,6 @@
 				p_mpfinib = (MPFINIB *)(p_mpfcb->p_mpfinib);
 				p_mpfinib->mpfatr = mpfatr;
-				p_mpfinib->blkcnt = pk_cmpf->blkcnt;
-				p_mpfinib->blksz = ROUND_MPF_T(pk_cmpf->blksz);
+				p_mpfinib->blkcnt = blkcnt;
+				p_mpfinib->blksz = ROUND_MPF_T(blksz);
 				p_mpfinib->mpf = mpf;
 				p_mpfinib->p_mpfmb = p_mpfmb;
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.tf	(revision 305)
+++ 	(revision )
@@ -1,203 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: mempfix.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		åºå®é·ã¡ã¢ãªãã¼ã«æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_MPFã®å¦ç
-$
-$num_ampfid = 0$
-$FOREACH i AMPF.ORDER_LIST$
-$	// nompfãè² ã®å ´åï¼E_PARï¼
-	$IF AMPF.NOMPF[i] < 0$
-		$ERROR AMPF.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nompf", AMPF.NOMPF[i], "AID_MPF")$
-		$END$
-	$END$
-	$num_ampfid = num_ampfid + AMPF.NOMPF[i]$
-$END$
-$num_mpfid = LENGTH(MPF.ID_LIST) + num_ampfid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_MPFID	$num_mpfid$$NL$
-$FOREACH id MPF.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Fixed-sized Memorypool Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  åºå®é·ã¡ã¢ãªãã¼ã«ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id MPF.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããåºå®é·ã¡ã¢ãªãã¼ã«ã®æ°
-$
-#define TNUM_SMPFID	$LENGTH(MPF.ID_LIST)$$NL$
-$NL$
-
-$
-$  åºå®é·ã¡ã¢ãªãã¼ã«IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_mpfid = (TMIN_MPFID + TNUM_MPFID - 1);$NL$
-const ID _kernel_tmax_smpfid = (TMIN_MPFID + TNUM_SMPFID - 1);$NL$
-$NL$
-
-$
-$  åºå®é·ã¡ã¢ãªãã¼ã«åæåãã­ãã¯
-$
-$IF LENGTH(MPF.ID_LIST)$
-	$FOREACH mpfid MPF.ID_LIST$
-$		// mpfatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2225ï¼½
-$		//ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (MPF.MPFATR[mpfid] & ~TA_TPRI) != 0$
-			$ERROR MPF.TEXT_LINE[mpfid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mpfatr", MPF.MPFATR[mpfid], mpfid, "CRE_MPF")$
-			$END$
-		$END$
-
-$		// blkcntã0ä»¥ä¸ã®å ´åï¼E_PARï¼ï¼»NGKI2229ï¼½
-		$IF MPF.BLKCNT[mpfid] <= 0$
-			$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"blkcnt", MPF.BLKCNT[mpfid], mpfid, "CRE_MPF")$
-			$END$
-		$END$
-
-$		// blkszã0ä»¥ä¸ã®å ´åï¼E_PARï¼ï¼»NGKI2230ï¼½
-		$IF MPF.BLKSZ[mpfid] <= 0$
-			$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"blksz", MPF.BLKSZ[mpfid], mpfid, "CRE_MPF")$
-			$END$
-		$END$
-
-$		// åºå®é·ã¡ã¢ãªãã¼ã«é å
-		$IF EQ(MPF.MPF[mpfid], "NULL")$
-			static MPF_T _kernel_mpf_$mpfid$[($MPF.BLKCNT[mpfid]$)$SPC$
-									* COUNT_MPF_T($MPF.BLKSZ[mpfid]$)];$NL$
-		$END$
-
-$		// mpfmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0166ï¼½
-		$IF !EQ(MPF.MPFMB[mpfid], "NULL")$
-			$ERROR MPF.TEXT_LINE[mpfid]$E_NOSPT:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mpfmb", MPF.MPFMB[mpfid], mpfid, "CRE_MPF")$
-			$END$
-		$END$
-
-$		// åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çé å
-		static MPFMB _kernel_mpfmb_$mpfid$[$MPF.BLKCNT[mpfid]$];$NL$
-	$END$
-
-$	// åºå®é·ã¡ã¢ãªãã¼ã«åæåãã­ãã¯
-	const MPFINIB _kernel_mpfinib_table[TNUM_SMPFID] = {$NL$
-	$JOINEACH mpfid MPF.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($MPF.MPFATR[mpfid]$),$SPC$
-			($MPF.BLKCNT[mpfid]$),$SPC$
-			ROUND_MPF_T($MPF.BLKSZ[mpfid]$),$SPC$
-			$IF EQ(MPF.MPF[mpfid],"NULL")$
-				_kernel_mpf_$mpfid$
-			$ELSE$
-				(void *)($MPF.MPF[mpfid]$)
-			$END$,$SPC$
-			_kernel_mpfmb_$mpfid$$SPC$
-	}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const MPFINIB, _kernel_mpfinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæåºå®é·ã¡ã¢ãªãã¼ã«ç¨ã®åºå®é·ã¡ã¢ãªãã¼ã«åæåãã­ãã¯
-$
-$IF num_ampfid > 0$
-	MPFINIB _kernel_ampfinib_table[$num_ampfid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MPFINIB, _kernel_ampfinib_table);$NL$
-$END$$NL$
-
-$
-$  åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çãã­ãã¯ã¨åºå®é·ã¡ã¢ãªãã¼ã«æ©è½åæåé¢æ°
-$
-$IF num_mpfid > 0$
-	MPFCB _kernel_mpfcb_table[TNUM_MPFID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_mempfix();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MPFCB, _kernel_mpfcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.c	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: mutex.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: mutex.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -319,5 +319,5 @@
 	if (MTX_CEILING(p_mtxcb)
 					&& p_mtxcb->p_mtxinib->ceilpri < p_tcb->priority) {
-		(void) change_priority(p_tcb, p_mtxcb->p_mtxinib->ceilpri, true);
+		change_priority(p_tcb, p_mtxcb->p_mtxinib->ceilpri, true);
 	}
 }
@@ -391,13 +391,19 @@
 	MTXCB	*p_mtxcb;
 	MTXINIB	*p_mtxinib;
+	ATR		mtxatr;
+	PRI		ceilpri;
 	ER		ercd;
 
 	LOG_ACRE_MTX_ENTER(pk_cmtx);
 	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2023ï¼½ï¼»NGKI2024ï¼½*/
-	if (pk_cmtx->mtxatr == TA_CEILING) {
-		CHECK_PAR(VALID_TPRI(pk_cmtx->ceilpri));	/*ï¼»NGKI2037ï¼½*/
-	}
-	else {
-		CHECK_RSATR(pk_cmtx->mtxatr, TA_TPRI);	/*ï¼»NGKI2025ï¼½*/
+
+	mtxatr = pk_cmtx->mtxatr;
+	ceilpri = pk_cmtx->ceilpri;
+
+	if (mtxatr == TA_CEILING) {
+		CHECK_PAR(VALID_TPRI(ceilpri));			/*ï¼»NGKI2037ï¼½*/
+	}
+	else {
+		CHECK_RSATR(mtxatr, TA_TPRI);			/*ï¼»NGKI2025ï¼½*/
 	}
 
@@ -409,6 +415,6 @@
 		p_mtxcb = ((MTXCB *) queue_delete_next(&free_mtxcb));
 		p_mtxinib = (MTXINIB *)(p_mtxcb->p_mtxinib);
-		p_mtxinib->mtxatr = pk_cmtx->mtxatr;
-		p_mtxinib->ceilpri = INT_PRIORITY(pk_cmtx->ceilpri);
+		p_mtxinib->mtxatr = mtxatr;
+		p_mtxinib->ceilpri = INT_PRIORITY(ceilpri);
 
 		queue_initialize(&(p_mtxcb->wait_queue));
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.tf	(revision 305)
+++ 	(revision )
@@ -1,180 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: mutex.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ãã¥ã¼ããã¯ã¹æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_MTXã®å¦ç
-$
-$num_amtxid = 0$
-$FOREACH i AMTX.ORDER_LIST$
-$	// nomtxãè² ã®å ´åï¼E_PARï¼
-	$IF AMTX.NOMTX[i] < 0$
-		$ERROR AMTX.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nomtx", AMTX.NOMTX[i], "AID_MTX")$
-		$END$
-	$END$
-	$num_amtxid = num_amtxid + AMTX.NOMTX[i]$
-$END$
-$num_mtxid = LENGTH(MTX.ID_LIST) + num_amtxid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_MTXID	$num_mtxid$$NL$
-$FOREACH id MTX.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Mutex Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id MTX.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæããããã¥ã¼ããã¯ã¹ã®æ°
-$
-#define TNUM_SMTXID	$LENGTH(MTX.ID_LIST)$$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_mtxid = (TMIN_MTXID + TNUM_MTXID - 1);$NL$
-const ID _kernel_tmax_smtxid = (TMIN_MTXID + TNUM_SMTXID - 1);$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-$
-$IF LENGTH(MTX.ID_LIST)$
-	$FOREACH mtxid MTX.ID_LIST$
-$		// mtxatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2025ï¼½
-$		//ï¼TA_NULLï¼TA_TPRIï¼TA_CEILINGã®ãããã§ããªãå ´åï¼
-		$IF !(MTX.MTXATR[mtxid] == 0 || MTX.MTXATR[mtxid] == TA_TPRI
-										|| MTX.MTXATR[mtxid] == TA_CEILING)$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mtxatr", MTX.MTXATR[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-
-$		// ceilpriãæªæå®ã®å ´åã¯0ã¨è¦ãªã
-		$IF !LENGTH(MTX.CEILPRI[mtxid])$
-			$MTX.CEILPRI[mtxid] = 0$
-		$END$
-
-$		// åªå
-åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ï¼(TMIN_TPRI <= ceilpri && ceilpri <=
-$		// TMAX_TPRI)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2037ï¼½
-		$IF MTX.MTXATR[mtxid] == TA_CEILING && (MTX.CEILPRI[mtxid] < TMIN_TPRI
-											|| TMAX_TPRI < MTX.CEILPRI[mtxid])$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"ceilpri", MTX.CEILPRI[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-	$END$
-
-$	// ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-	const MTXINIB _kernel_mtxinib_table[TNUM_SMTXID] = {$NL$
-	$JOINEACH mtxid MTX.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($MTX.MTXATR[mtxid]$),$SPC$
-			INT_PRIORITY($MTX.CEILPRI[mtxid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const MTXINIB, _kernel_mtxinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæãã¥ã¼ããã¯ã¹ç¨ã®ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-$
-$IF num_amtxid > 0$
-	MTXINIB _kernel_amtxinib_table[$num_amtxid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MTXINIB, _kernel_amtxinib_table);$NL$
-$END$$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ã¨ãã¥ã¼ããã¯ã¹æ©è½åæåé¢æ°
-$
-$IF num_mtxid > 0$
-	MTXCB _kernel_mtxcb_table[TNUM_MTXID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_mutex();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MTXCB, _kernel_mtxcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: pridataq.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: pridataq.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -348,4 +348,6 @@
 	PDQINIB	*p_pdqinib;
 	ATR		pdqatr;
+	uint_t	pdqcnt;
+	PRI		maxdpri;
 	PDQMB	*p_pdqmb;
 	ER		ercd;
@@ -353,8 +355,12 @@
 	LOG_ACRE_PDQ_ENTER(pk_cpdq);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cpdq->pdqatr, TA_TPRI);
-	CHECK_PAR(VALID_DPRI(pk_cpdq->maxdpri));
+
 	pdqatr = pk_cpdq->pdqatr;
+	pdqcnt = pk_cpdq->pdqcnt;
+	maxdpri = pk_cpdq->maxdpri;
 	p_pdqmb = pk_cpdq->pdqmb;
+
+	CHECK_RSATR(pdqatr, TA_TPRI);
+	CHECK_PAR(VALID_DPRI(maxdpri));
 
 	lock_cpu();
@@ -363,9 +369,9 @@
 	}
 	else {
-		if (pk_cpdq->pdqcnt != 0 && p_pdqmb == NULL) {
-			p_pdqmb = kernel_malloc(sizeof(PDQMB) * pk_cpdq->pdqcnt);
+		if (pdqcnt != 0 && p_pdqmb == NULL) {
+			p_pdqmb = kernel_malloc(sizeof(PDQMB) * pdqcnt);
 			pdqatr |= TA_MBALLOC;
 		}
-		if (pk_cpdq->pdqcnt != 0 && p_pdqmb == NULL) {
+		if (pdqcnt != 0 && p_pdqmb == NULL) {
 			ercd = E_NOMEM;
 		}
@@ -374,6 +380,6 @@
 			p_pdqinib = (PDQINIB *)(p_pdqcb->p_pdqinib);
 			p_pdqinib->pdqatr = pdqatr;
-			p_pdqinib->pdqcnt = pk_cpdq->pdqcnt;
-			p_pdqinib->maxdpri = pk_cpdq->maxdpri;
+			p_pdqinib->pdqcnt = pdqcnt;
+			p_pdqinib->maxdpri = maxdpri;
 			p_pdqinib->p_pdqmb = p_pdqmb;
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.tf	(revision 305)
+++ 	(revision )
@@ -1,211 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: pridataq.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		åªå
-åº¦ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_PDQã®å¦ç
-$
-$num_apdqid = 0$
-$FOREACH i APDQ.ORDER_LIST$
-$	// nopdqãè² ã®å ´åï¼E_PARï¼
-	$IF APDQ.NOPDQ[i] < 0$
-		$ERROR APDQ.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nopdq", APDQ.NOPDQ[i], "AID_PDQ")$
-		$END$
-	$END$
-	$num_apdqid = num_apdqid + APDQ.NOPDQ[i]$
-$END$
-$num_pdqid = LENGTH(PDQ.ID_LIST) + num_apdqid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_PDQID	$num_pdqid$$NL$
-$FOREACH id PDQ.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Priority Dataqueue Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  åªå
-åº¦ãã¼ã¿ã­ã¥ã¼ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id PDQ.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããåªå
-åº¦ãã¼ã¿ã­ã¥ã¼ã®æ°
-$
-#define TNUM_SPDQID	$LENGTH(PDQ.ID_LIST)$$NL$
-$NL$
-
-$
-$  åªå
-åº¦ãã¼ã¿ã­ã¥ã¼IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_pdqid = (TMIN_PDQID + TNUM_PDQID - 1);$NL$
-const ID _kernel_tmax_spdqid = (TMIN_PDQID + TNUM_SPDQID - 1);$NL$
-$NL$
-
-$
-$  åªå
-åº¦ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-$
-$IF LENGTH(PDQ.ID_LIST)$
-	$FOREACH pdqid PDQ.ID_LIST$
-$		// pdqatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1804ï¼½
-$		//ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (PDQ.PDQATR[pdqid] & ~TA_TPRI) != 0$
-			$ERROR PDQ.TEXT_LINE[pdqid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"pdqatr", PDQ.PDQATR[pdqid], pdqid, "CRE_PDQ")$
-			$END$
-		$END$
-
-$		// pdqcntãè² ã®å ´åï¼E_PARï¼ï¼»NGKI3289ï¼½
-		$IF PDQ.PDQCNT[pdqid] < 0$
-			$ERROR PDQ.TEXT_LINE[pdqid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"pdqcnt", PDQ.PDQCNT[pdqid], pdqid, "CRE_PDQ")$
-			$END$
-		$END$
-
-$		// (TMIN_DPRI <= maxdpri && maxdpri <= TMAX_DPRI)ã§ãªãå ´åï¼E_PARï¼
-$		// ï¼»NGKI1819ï¼½
-		$IF !(TMIN_DPRI <= PDQ.MAXDPRI[pdqid]
-								&& PDQ.MAXDPRI[pdqid] <= TMAX_DPRI)$
-			$ERROR PDQ.TEXT_LINE[pdqid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"maxdpri", PDQ.MAXDPRI[pdqid], pdqid, "CRE_PDQ")$
-			$END$
-		$END$
-
-$		// pdqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0142ï¼½
-		$IF !EQ(PDQ.PDQMB[pdqid], "NULL")$
-			$ERROR PDQ.TEXT_LINE[pdqid]$E_NOSPT:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"pdqmb", PDQ.PDQMB[pdqid], pdqid, "CRE_PDQ")$
-			$END$
-		$END$
-
-$		// åªå
-åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé å
-		$IF PDQ.PDQCNT[pdqid]$
-			static PDQMB _kernel_pdqmb_$pdqid$[$PDQ.PDQCNT[pdqid]$];$NL$
-		$END$
-	$END$
-
-$	// åªå
-åº¦ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-	const PDQINIB _kernel_pdqinib_table[TNUM_SPDQID] = {$NL$
-	$JOINEACH pdqid PDQ.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($PDQ.PDQATR[pdqid]$),$SPC$
-			($PDQ.PDQCNT[pdqid]$),$SPC$
-			($PDQ.MAXDPRI[pdqid]$),$SPC$
-			$IF PDQ.PDQCNT[pdqid]$
-				_kernel_pdqmb_$pdqid$
-			$ELSE$
-				NULL
-			$END$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const PDQINIB, _kernel_pdqinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæåªå
-åº¦ãã¼ã¿ã­ã¥ã¼ç¨ã®åªå
-åº¦ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-$
-$IF num_apdqid > 0$
-	PDQINIB _kernel_apdqinib_table[$num_apdqid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(PDQINIB, _kernel_apdqinib_table);$NL$
-$END$$NL$
-
-$
-$  åªå
-åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã¨åªå
-åº¦ãã¼ã¿ã­ã¥ã¼æ©è½åæåé¢æ°
-$
-$IF num_pdqid > 0$
-	PDQCB _kernel_pdqcb_table[TNUM_PDQID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_pridataq();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(PDQCB, _kernel_pdqcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: semaphore.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: semaphore.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -190,11 +190,18 @@
 	SEMCB	*p_semcb;
 	SEMINIB	*p_seminib;
+	ATR		sematr;
+	uint_t	isemcnt, maxsem;
 	ER		ercd;
 
 	LOG_ACRE_SEM_ENTER(pk_csem);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_csem->sematr, TA_TPRI);
-	CHECK_PAR(0 <= pk_csem->isemcnt && pk_csem->isemcnt <= pk_csem->maxsem);
-	CHECK_PAR(1 <= pk_csem->maxsem && pk_csem->maxsem <= TMAX_MAXSEM);
+
+	sematr = pk_csem->sematr;
+	isemcnt = pk_csem->isemcnt;
+	maxsem = pk_csem->maxsem;
+
+	CHECK_RSATR(sematr, TA_TPRI);
+	CHECK_PAR(0 <= isemcnt && isemcnt <= maxsem);
+	CHECK_PAR(1 <= maxsem && maxsem <= TMAX_MAXSEM);
 
 	lock_cpu();
@@ -205,7 +212,7 @@
 		p_semcb = ((SEMCB *) queue_delete_next(&free_semcb));
 		p_seminib = (SEMINIB *)(p_semcb->p_seminib);
-		p_seminib->sematr = pk_csem->sematr;
-		p_seminib->isemcnt = pk_csem->isemcnt;
-		p_seminib->maxsem = pk_csem->maxsem;
+		p_seminib->sematr = sematr;
+		p_seminib->isemcnt = isemcnt;
+		p_seminib->maxsem = maxsem;
 
 		queue_initialize(&(p_semcb->wait_queue));
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.tf	(revision 305)
+++ 	(revision )
@@ -1,181 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: semaphore.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã»ããã©æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_SEMã®å¦ç
-$
-$num_asemid = 0$
-$FOREACH i ASEM.ORDER_LIST$
-$	// nosemãè² ã®å ´åï¼E_PARï¼
-	$IF ASEM.NOSEM[i] < 0$
-		$ERROR ASEM.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nosem", ASEM.NOSEM[i], "AID_SEM")$
-		$END$
-	$END$
-	$num_asemid = num_asemid + ASEM.NOSEM[i]$
-$END$
-$num_semid = LENGTH(SEM.ID_LIST) + num_asemid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_SEMID	$num_semid$$NL$
-$FOREACH id SEM.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Semaphore Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã»ããã©ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id SEM.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$$NL$
-$END$
-
-$
-$  éçã«çæãããã»ããã©ã®æ°
-$
-#define TNUM_SSEMID	$LENGTH(SEM.ID_LIST)$$NL$
-$NL$
-
-$
-$  ã»ããã©IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_semid = (TMIN_SEMID + TNUM_SEMID - 1);$NL$
-const ID _kernel_tmax_ssemid = (TMIN_SEMID + TNUM_SSEMID - 1);$NL$
-$NL$
-
-$
-$  ã»ããã©åæåãã­ãã¯
-$
-$IF LENGTH(SEM.ID_LIST)$
-	$FOREACH semid SEM.ID_LIST$
-$		// sematrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1456ï¼½
-$		//ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (SEM.SEMATR[semid] & ~TA_TPRI) != 0$
-			$ERROR SEM.TEXT_LINE[semid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"sematr", SEM.SEMATR[semid], semid, "CRE_SEM")$
-			$END$
-		$END$
-
-$		// (1 <= maxsem && maxsem <= TMAX_MAXSEM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI1468ï¼½
-		$IF !(1 <= SEM.MAXSEM[semid] && SEM.MAXSEM[semid] <= TMAX_MAXSEM)$
-			$ERROR SEM.TEXT_LINE[semid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"maxsem", SEM.MAXSEM[semid], semid, "CRE_SEM")$
-			$END$
-		$END$
-
-$		// (0 <= isemcnt && isemcnt <= maxsem)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI1466ï¼½
-		$IF !(0 <= SEM.ISEMCNT[semid]
-								&& SEM.ISEMCNT[semid] <= SEM.MAXSEM[semid])$
-			$ERROR SEM.TEXT_LINE[semid]$E_PAR:$SPC$
-				$FORMAT(_("too large %1% `%2%\' of `%3%\' in %4%"),
-							"isemcnt", SEM.ISEMCNT[semid], semid, "CRE_SEM")$
-			$END$
-		$END$
-	$END$
-
-$	// ã»ããã©åæåãã­ãã¯
-	const SEMINIB _kernel_seminib_table[TNUM_SSEMID] = {$NL$
-	$JOINEACH semid SEM.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($SEM.SEMATR[semid]$),$SPC$
-			($SEM.ISEMCNT[semid]$),$SPC$
-			($SEM.MAXSEM[semid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const SEMINIB, _kernel_seminib_table);$NL$
-$END$$NL$
-
-$
-$  åççæã»ããã©ç¨ã®ã»ããã©åæåãã­ãã¯
-$
-$IF num_asemid > 0$
-	SEMINIB _kernel_aseminib_table[$num_asemid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(SEMINIB, _kernel_aseminib_table);$NL$
-$END$$NL$
-
-$
-$  ã»ããã©ç®¡çãã­ãã¯ã¨ã»ããã©æ©è½åæåé¢æ°
-$
-$IF num_semid > 0$
-	SEMCB _kernel_semcb_table[TNUM_SEMID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_semaphore();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(SEMCB, _kernel_semcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/startup.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/startup.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/startup.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: startup.c 189 2014-06-22 10:49:57Z ertl-hiro $
+ *  $Id: startup.c 509 2016-01-12 06:06:14Z ertl-hiro $
  */
 
@@ -101,4 +101,11 @@
 sta_ker(void)
 {
+	/*
+	 *  TECSã®åæå
+	 */
+#ifndef TOPPERS_OMIT_TECS
+	initialize_tecs();
+#endif /* TOPPERS_OMIT_TECS */
+
 	/*
 	 *  ã¿ã¼ã²ããä¾å­ã®åæå
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/task.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/task.tf	(revision 305)
+++ 	(revision )
@@ -1,234 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: task.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_TSKã®å¦ç
-$
-$num_atskid = 0$
-$FOREACH i ATSK.ORDER_LIST$
-$	// notskãè² ã®å ´åï¼E_PARï¼
-	$IF ATSK.NOTSK[i] < 0$
-		$ERROR ATSK.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"notsk", ATSK.NOTSK[i], "AID_TSK")$
-		$END$
-	$END$
-	$num_atskid = num_atskid + ATSK.NOTSK[i]$
-$END$
-$num_tskid = LENGTH(TSK.ID_LIST) + num_atskid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_TSKID	$num_tskid$$NL$
-$FOREACH id TSK.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Task Management Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id TSK.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$$NL$
-$END$
-
-$
-$  ã¿ã¹ã¯ã1ã¤ãç»é²ããã¦ããªãå ´åï¼»NGKI0033ï¼½
-$
-$IF !LENGTH(TSK.ID_LIST)$
-	$ERROR$$FORMAT(_("no task is registered"))$$END$
-$END$
-
-$
-$  éçã«çæãããã¿ã¹ã¯ã®æ°
-$
-#define TNUM_STSKID	$LENGTH(TSK.ID_LIST)$$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1);$NL$
-const ID _kernel_tmax_stskid = (TMIN_TSKID + TNUM_STSKID - 1);$NL$
-$NL$
-
-$
-$  ã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
-$	//ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (TSK.TSKATR[tskid] & ~(TA_ACT|TA_NOACTQUE|TARGET_TSKATR)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"tskatr", TSK.TSKATR[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
-	$IF !(TMIN_TPRI <= TSK.ITSKPRI[tskid] && TSK.ITSKPRI[tskid] <= TMAX_TPRI)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"itskpri", TSK.ITSKPRI[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-$END$
-
-$
-$  ã¹ã¿ãã¯é åã®çæã¨ããã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// stkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼ããã
-$	// å°ããå ´åï¼»NGKI1042ï¼½
-	$IF TSK.STKSZ[tskid] <= 0 || (TARGET_MIN_STKSZ
-									&& TSK.STKSZ[tskid] < TARGET_MIN_STKSZ)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' of `%3%\' in %4%"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$ 	// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
-	$IF !EQ(TSK.STK[tskid], "NULL") && CHECK_STKSZ_ALIGN
-							&& (TSK.STKSZ[tskid] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
-	$IF EQ(TSK.STK[tskid],"NULL")$
-$		// ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
-		$TSK.TINIB_STKSZ[tskid] = ALLOC_STACK(CONCAT("_kernel_stack_",
-												tskid), TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = CONCAT("_kernel_stack_", tskid)$
-	$ELSE$
-		$TSK.TINIB_STKSZ[tskid] = FORMAT("(%1%)", TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = FORMAT("(void *)(%1%)", TSK.STK[tskid])$
-	$END$
-$END$
-$NL$
-
-$
-$  ã¿ã¹ã¯åæåãã­ãã¯ã®çæï¼ã¿ã¹ã¯ã¯1åä»¥ä¸å­å¨ããï¼
-$
-const TINIB _kernel_tinib_table[TNUM_STSKID] = {$NL$
-$JOINEACH tskid TSK.ID_LIST ",\n"$
-	$TAB${$SPC$
-$		// ã¿ã¹ã¯å±æ§ï¼æ¡å¼µæ
-å ±ï¼èµ·åçªå°ï¼èµ·åæåªå
-åº¦
-		($TSK.TSKATR[tskid]$),$SPC$
-		(intptr_t)($TSK.EXINF[tskid]$),$SPC$
-		(TASK)($TSK.TASK[tskid]$),$SPC$
-		INT_PRIORITY($TSK.ITSKPRI[tskid]$),$SPC$
-
-$		// ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ï¼ã¹ã¿ãã¯é å
-		$IF USE_TSKINICTXB$
-			$GENERATE_TSKINICTXB(tskid)$
-		$ELSE$
-			$TSK.TINIB_STKSZ[tskid]$, $TSK.TINIB_STK[tskid]$
-		$END$$SPC$
-	}$END$$NL$
-};$NL$
-$NL$
-
-$
-$  åççæã¿ã¹ã¯ç¨ã®ã¿ã¹ã¯åæåãã­ãã¯ã®çæ
-$
-$IF num_atskid > 0$
-	TINIB _kernel_atinib_table[$num_atskid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(TINIB, _kernel_atinib_table);$NL$
-$END$$NL$
-
-$
-$  ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
-$
-const ID _kernel_torder_table[TNUM_STSKID] = {$NL$
-$TAB$$JOINEACH tskid TSK.ORDER_LIST ", "$$tskid$$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çãã­ãã¯ã®çæ
-$
-TCB _kernel_tcb_table[TNUM_TSKID];$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«åæåé¢æ°
-$
-$initfuncs = "_kernel_initialize_task();"$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/task.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/task.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/task.trb	(revision 306)
@@ -0,0 +1,135 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: task.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+#
+
+class TaskObject < KernelObject
+  def initialize()
+    super("tsk", "task", "t")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:stk] ||= "NULL"
+
+    # tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
+    #ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:tskatr] & ~($TA_ACT|$TA_NOACTQUE|$TARGET_TSKATR)) != 0
+      error_illegal_id("E_RSATR", params, :tskatr, :tskid)
+    end
+
+    # (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
+    if !($TMIN_TPRI <= params[:itskpri] && params[:itskpri] <= $TMAX_TPRI)
+      error_illegal_id("E_PAR", params, :itskpri, :tskid)
+    end
+
+    # stkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+    # ãããå°ããå ´åï¼»NGKI1042ï¼½
+    if params[:stksz] < $TARGET_MIN_STKSZ
+      error_wrong_id("E_PAR", params, :stksz, :tskid, "too small")
+    end
+
+    # ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
+    if params[:stk] == "NULL"
+      # ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
+      stkName = "_kernel_stack_#{params[:tskid]}"
+      params[:tinib_stksz] = AllocStack(stkName, params[:stksz])
+      params[:tinib_stk] = stkName
+    else
+      # stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
+      if (params[:stksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+        error_wrong_id("E_PAR", params, :stksz, :tskid, "not aligned")
+      end
+
+      params[:tinib_stksz] = params[:stksz]
+      params[:tinib_stk] = "(void *)(#{params[:stk]})"
+    end
+  end
+
+  def generateInib(key, params)
+    if $USE_TSKINICTXB
+      tskinictxb = GenerateTskinictxb(key, params)
+    else
+      tskinictxb = "#{params[:tinib_stksz]}, #{params[:tinib_stk]}"
+    end
+    return("(#{params[:tskatr]}), (intptr_t)(#{params[:exinf]}), " \
+			"(TASK)(#{params[:task]}), INT_PRIORITY(#{params[:itskpri]}), " \
+			+ tskinictxb)
+  end
+end
+
+#
+#  ã¿ã¹ã¯ç®¡çã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Task Management Functions")
+if $cfgData[:CRE_TSK].size() == 0
+  error("no task is registered")
+end
+TaskObject.new.generate()
+
+# ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_torder_table[TNUM_STSKID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_TSK].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:tskid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/task_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/task_manage.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/task_manage.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: task_manage.c 470 2015-12-30 09:50:36Z ertl-hiro $
+ *  $Id: task_manage.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -135,4 +135,9 @@
 /*
  *  ã¿ã¹ã¯ã®çæ
+ *
+ *  pk_ctsk->exinfã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼ã­ã¼
+ *  ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããªãï¼ï¼
  */
 #ifdef TOPPERS_acre_tsk
@@ -148,20 +153,28 @@
 	TINIB	*p_tinib;
 	ATR		tskatr;
-	void	*stk;
+	TASK	task;
+	PRI		itskpri;
+	size_t	stksz;
+	STK_T	*stk;
 	ER		ercd;
 
 	LOG_ACRE_TSK_ENTER(pk_ctsk);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_ctsk->tskatr, TA_ACT|TARGET_TSKATR);
-	CHECK_PAR(FUNC_ALIGN(pk_ctsk->task));
-	CHECK_PAR(FUNC_NONNULL(pk_ctsk->task));
-	CHECK_PAR(VALID_TPRI(pk_ctsk->itskpri));
-	CHECK_PAR(pk_ctsk->stksz >= TARGET_MIN_STKSZ);
-	if (pk_ctsk->stk != NULL) {
-		CHECK_PAR(STKSZ_ALIGN(pk_ctsk->stksz));
-		CHECK_PAR(STACK_ALIGN(pk_ctsk->stk));
-	}
+
 	tskatr = pk_ctsk->tskatr;
+	task = pk_ctsk->task;
+	itskpri = pk_ctsk->itskpri;
+	stksz = pk_ctsk->stksz;
 	stk = pk_ctsk->stk;
+
+	CHECK_RSATR(tskatr, TA_ACT|TA_NOACTQUE|TARGET_TSKATR);
+	CHECK_PAR(FUNC_ALIGN(task));
+	CHECK_PAR(FUNC_NONNULL(task));
+	CHECK_PAR(VALID_TPRI(itskpri));
+	CHECK_PAR(stksz >= TARGET_MIN_STKSZ);
+	if (stk != NULL) {
+		CHECK_PAR(STKSZ_ALIGN(stksz));
+		CHECK_PAR(STACK_ALIGN(stk));
+	}
 
 	lock_cpu();
@@ -171,5 +184,5 @@
 	else {
 		if (stk == NULL) {
-			stk = kernel_malloc(ROUND_STK_T(pk_ctsk->stksz));
+			stk = kernel_malloc(ROUND_STK_T(stksz));
 			tskatr |= TA_MEMALLOC;
 		}
@@ -182,10 +195,10 @@
 			p_tinib->tskatr = tskatr;
 			p_tinib->exinf = pk_ctsk->exinf;
-			p_tinib->task = pk_ctsk->task;
-			p_tinib->ipriority = INT_PRIORITY(pk_ctsk->itskpri);
+			p_tinib->task = task;
+			p_tinib->ipriority = INT_PRIORITY(itskpri);
 #ifdef USE_TSKINICTXB
-			init_tskinictxb(&(p_tinib->tskinictxb), stk, pk_ctsk);
+			init_tskinictxb(&(p_tinib->tskinictxb), stksz, stk);
 #else /* USE_TSKINICTXB */
-			p_tinib->stksz = pk_ctsk->stksz;
+			p_tinib->stksz = stksz;
 			p_tinib->stk = stk;
 #endif /* USE_TSKINICTXB */
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/time_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/time_manage.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/time_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: time_manage.c 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: time_manage.c 542 2016-01-16 04:42:51Z ertl-hiro $
  */
 
@@ -333,5 +333,7 @@
 		break;
 	case TNFY_INCVAR:
+		(void) loc_cpu();
 		*(p_nfyinfo->nfy.incvar.p_var) += 1;
+		(void) unl_cpu();
 		ercd = E_OK;
 		break;
@@ -364,5 +366,7 @@
 			break;
 		case TENFY_INCVAR:
+			(void) loc_cpu();
 			*(p_nfyinfo->enfy.incvar.p_var) += 1;
+			(void) unl_cpu();
 			break;
 		case TENFY_ACTTSK:
Index: asp3_wo_tecs/trunk/extension/dcre/sample/sample1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/sample/sample1.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/sample/sample1.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sample1.c 333 2015-06-21 13:23:37Z ertl-hiro $
+ *  $Id: sample1.c 725 2016-04-02 21:50:49Z ertl-hiro $
  */
 
@@ -241,4 +241,19 @@
 
 /*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+#ifdef INTNO1
+
+void intno1_isr(intptr_t exinf)
+{
+	intno1_clear();
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+#endif /* INTNO1 */
+
+/*
  *  CPUä¾å¤ãã³ãã©
  */
@@ -268,6 +283,13 @@
 	}
 
+#ifdef PREPARE_RETURN_CPUEXC
+	PREPARE_RETURN_CPUEXC;
 	SVC_PERROR(get_tid(&cpuexc_tskid));
 	SVC_PERROR(act_tsk(EXC_TASK));
+#else /* PREPARE_RETURN_CPUEXC */
+	syslog(LOG_NOTICE, "Sample program ends with exception.");
+	SVC_PERROR(ext_ker());
+	assert(0);
+#endif /* PREPARE_RETURN_CPUEXC */
 }
 
Index: asp3_wo_tecs/trunk/extension/dcre/sample/sample1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/sample/sample1.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/sample/sample1.cfg	(revision 306)
@@ -1,14 +1,8 @@
 /*
- *  $Id: sample1.cfg 333 2015-06-21 13:23:37Z ertl-hiro $
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id: sample1.cfg 725 2016-04-02 21:50:49Z ertl-hiro $
  */
-
-/*
- *  ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
- */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
-INCLUDE("syssvc/logtask.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "sample1.h"
@@ -20,4 +14,8 @@
 CRE_CYC(CYCHDR1, { TA_NULL, { TNFY_HANDLER, 0, cyclic_handler }, 2000000, 0 });
 AID_ALM(1);
+#ifdef INTNO1
+CFG_INT(INTNO1, { INTNO1_INTATR, INTNO1_INTPRI });
+CRE_ISR(INTNO1_ISR, { TA_NULL, 0, INTNO1, intno1_isr, 1 });
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 DEF_EXC(CPUEXC1, { TA_NULL, cpuexc_handler });
Index: asp3_wo_tecs/trunk/extension/dcre/sample/sample1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/sample/sample1.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/dcre/sample/sample1.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  *
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  *
- *  $Id: sample1.h 410 2015-08-03 21:54:44Z ertl-hiro $
+ *  $Id: sample1.h 725 2016-04-02 21:50:49Z ertl-hiro $
  */
 
@@ -112,4 +112,7 @@
 extern void	main_task(intptr_t exinf);
 extern void exc_task(intptr_t exinf);
+#ifdef INTNO1
+extern void intno1_isr(intptr_t exinf);
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 extern void	cpuexc_handler(void *p_excinf);
Index: asp3_wo_tecs/trunk/extension/drift/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/include/kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/drift/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -550,6 +550,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/drift/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/kernel/Makefile.kernel	(revision 305)
+++ asp3_wo_tecs/trunk/extension/drift/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 236 2014-09-28 16:24:33Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -132,23 +132,23 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/drift/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/kernel/kernel_rename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/drift/kernel/kernel_rename.h	(revision 306)
@@ -188,192 +188,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_evttim_frac		__kernel_current_evttim_frac
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _drift_rate					__kernel_drift_rate
-#define _evttim_step				__kernel_evttim_step
-#define _evttim_step_frac			__kernel_evttim_step_frac
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/drift/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/kernel/kernel_unrename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/drift/kernel/kernel_unrename.h	(revision 306)
@@ -189,192 +189,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_evttim_frac
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _drift_rate
-#undef _evttim_step
-#undef _evttim_step_frac
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/drift/kernel/time_event.c
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/kernel/time_event.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/drift/kernel/time_event.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: time_event.c 451 2015-08-14 15:29:07Z ertl-hiro $
+ *  $Id: time_event.c 532 2016-01-15 14:48:04Z ertl-hiro $
  */
 
@@ -85,22 +85,9 @@
 /*
  *  ã¿ã¤ã ã¤ãã³ããã¼ãæä½ãã¯ã­
- *
- *  PARENTã¨CHILDã®ç´ ç´ãªå®ç¾©ã¯æ¬¡ã®éãã§ãããï¼ããå®è¡å¹çã®è¯ããã¯
- *  ã­å®ç¾©ã¨ãã¦ããï¼
- *  #define PARENT(p_tmevtn) (tmevt_heap + (((p_tmevtn) - tmevt_heap) >> 1))
- *  #define LCHILD(p_tmevtn) (tmevt_heap + (((p_tmevtn) - tmevt_heap) << 1))
- *
- *  ä¸ã®PARENTã®å®ç¾©ã¯ï¼TMEVTNã®é
-åãï¼sizeof(TMEVTN)ã®åä½ã§ã¢ã©ã¤ã³
- *  ããã¦ãããã¨ãæ³å®ãã¦ããï¼ãã®åæãæç«ããªãå ´åã¯ï¼ä¸ã®å®ç¾©
- *  ãä½¿ç¨ããå¿
-è¦ãããï¼
- */
-#define PARENT(p_tmevtn)				/* è¦ªãã¼ããæ±ãã */		\
-		((TMEVTN *)(((((uintptr_t) tmevt_heap)						\
-				+ ((uintptr_t)(p_tmevtn))) >> 1) & ~(sizeof(TMEVTN) - 1)))
-#define LCHILD(p_tmevtn)				/* å·¦ã®å­ãã¼ããæ±ãã */	\
-		((TMEVTN *)((((uintptr_t)(p_tmevtn)) << 1) - ((uintptr_t) tmevt_heap)))
-
+ */
+#define PARENT(p_tmevtn)	(tmevt_heap + (((p_tmevtn) - tmevt_heap) >> 1))
+													/* è¦ªãã¼ããæ±ãã */
+#define LCHILD(p_tmevtn)	(tmevt_heap + (((p_tmevtn) - tmevt_heap) << 1))
+													/* å·¦ã®å­ãã¼ããæ±ãã */
 /*
  *  ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã®å
Index: asp3_wo_tecs/trunk/extension/drift/test/hrt_drift1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/test/hrt_drift1.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/drift/test/hrt_drift1.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		ããªããèª¿æ´æ©è½ã®ãã¹ã(1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: hrt_drift1.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: hrt_drift1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "hrt_drift1.h"
Index: asp3_wo_tecs/trunk/extension/messagebuf/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/include/kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -577,6 +577,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/Makefile.kernel	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 236 2014-09-28 16:24:33Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -137,24 +137,24 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(messagebuf) $(messagebuf:.o=.s) $(messagebuf:.o=.d): messagebuf.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(messagebuf) $(messagebuf:.o=.s): messagebuf.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.tf	(revision 305)
+++ 	(revision )
@@ -1,430 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-/* kernel_cfg.h */$NL$
-#ifndef TOPPERS_KERNEL_CFG_H$NL$
-#define TOPPERS_KERNEL_CFG_H$NL$
-
-$
-$  kernel_cfg.cã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/* kernel_cfg.c */$NL$
-#include "kernel/kernel_int.h"$NL$
-#include "kernel_cfg.h"$NL$
-$NL$
-
-#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)$NL$
-#error The kernel does not match this configuration file.$NL$
-#endif$NL$
-$NL$
-
-$ 
-$  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
-$ 
-/*$NL$
-$SPC$*  Include Directives (#include)$NL$
-$SPC$*/$NL$
-$NL$
-$INCLUDES$
-$NL$
-
-$
-$  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
-$
-$IF !ISFUNCTION("ALLOC_STACK")$
-$FUNCTION ALLOC_STACK$
-$	// å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
-	static STK_T $ARGV[1]$[COUNT_STK_T($ARGV[2]$)];$NL$
-	$RESULT = FORMAT("ROUND_STK_T(%1%)", ARGV[2])$
-$END$
-$END$
-
-$
-$  éç¥ãã³ãã©ã®çæé¢æ°
-$
-$FUNCTION GENERATE_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$par1 = ARGV[2]$
-	$par2 = ARGV[3]$
-	$text_line = ARGV[6]$
-	$objid = ARGV[7]$
-	$apiname = ARGV[8]$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode == TNFY_HANDLER || nfymode1 == TNFY_SETVAR
-								|| nfymode1 == TNFY_SETFLG
-								|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$numpar = 2$
-		$epar1 = ARGV[4]$
-		$epar2 = ARGV[5]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$numpar = 1$
-		$epar1 = ARGV[3]$
-		$epar2 = ARGV[4]$
-	$END$
-
-$	// ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
-	$IF (numpar == 2 && !LENGTH(par2))
-					|| (nfymode2 != 0 && !LENGTH(epar1))
-					|| (nfymode2 == TENFY_SETFLG && !LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
-		$ERROR text_line$
-			$FORMAT(_("too few parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF (nfymode2 == 0 && LENGTH(epar1))
-					|| (nfymode2 != TENFY_SETFLG && LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãå¤ãããå ´å
-		$ERROR text_line$
-			$FORMAT(_("too many parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF nfymode == TNFY_HANDLER$
-$		// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
-		$funcname = FORMAT("(NFYHDR)(%s)", par2)$
-	$ELSE$
-$		// éç¥ãã³ãã©ã®é¢æ°å
-		$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$		// ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
-$		// å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
-è¦ï¼
-		$IF nfymode2 == TENFY_SETVAR ||  nfymode2 == TENFY_INCVAR$
-			intptr_t *const $funcname$_p_evar =
-			$SPC$(intptr_t *)($epar1$);$NL$$NL$
-		$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-			const ID $funcname$_etskid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SIGSEM$
-			const ID $funcname$_esemid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SETFLG$
-			const ID $funcname$_eflgid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SNDDTQ$
-			const ID $funcname$_edtqid = $epar1$;$NL$$NL$
-		$END$
-
-$		// é¢æ°ã®å
-é ­é¨åã®çæ
-		static void$NL$
-		$funcname$(intptr_t exinf)$NL$
-		{$NL$
-
-		$IF nfymode2 == 0$
-$			// ã¨ã©ã¼éç¥ããªãå ´å
-			$error_code = "(void) "$
-		$ELSE$
-$			// ã¨ã©ã¼éç¥ãããå ´å
-			$TAB$ER		ercd;$NL$
-			$NL$
-			$error_code = "ercd = "$
-		$END$
-
-$		// ã¤ãã³ãéç¥å¦çã®å¦ç
-		$IF nfymode1 == TNFY_SETVAR && nfymode2 == 0$
-$			// å¤æ°ã®è¨­å®
-			$TAB$*((intptr_t *) exinf) = ($par2$);$NL$
-		$ELIF nfymode1 == TNFY_INCVAR && nfymode2 == 0$
-$			// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-			$TAB$*((intptr_t *) exinf) += 1;$NL$
-		$ELIF nfymode1 == TNFY_ACTTSK$
-$			// ã¿ã¹ã¯ã®èµ·å
-			$TAB$$error_code$act_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_WUPTSK$
-$			// ã¿ã¹ã¯ã®èµ·åº
-			$TAB$$error_code$wup_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SIGSEM$
-$			// ã»ããã©ã®è¿å´
-			$TAB$$error_code$sig_sem((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SETFLG$
-$			// ã¤ãã³ããã©ã°ã®ã»ãã
-			$TAB$$error_code$set_flg(((ID) exinf), $par2$);$NL$
-		$ELIF nfymode1 == TNFY_SNDDTQ$
-$			// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-			$TAB$$error_code$psnd_dtq(((ID) exinf), $par2$);$NL$
-		$ELSE$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-									"nfymode", nfymode, objid, apiname)$
-			$END$
-		$END$
-
-		$IF nfymode2 != 0$
-$			// ã¨ã©ã¼éç¥å¦çã®å¦ç
-			$TAB$if (ercd != E_OK) {$NL$
-
-			$IF nfymode2 == TENFY_SETVAR$
-$				// å¤æ°ã®è¨­å®
-				$TAB$$TAB$*$funcname$_p_evar = (intptr_t) ercd;$NL$
-			$ELIF nfymode2 == TENFY_INCVAR$
-$				// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-				$TAB$$TAB$*$funcname$_p_evar += 1;$NL$
-			$ELIF nfymode2 == TENFY_ACTTSK$
-$				// ã¿ã¹ã¯ã®èµ·å
-				$TAB$$TAB$(void) act_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_WUPTSK$
-$				// ã¿ã¹ã¯ã®èµ·åº
-				$TAB$$TAB$(void) wup_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_SIGSEM$
-$				// ã»ããã©ã®è¿å´
-				$TAB$$TAB$(void) sig_sem($funcname$_esemid);$NL$
-			$ELIF nfymode2 == TENFY_SETFLG$
-$				// ã¤ãã³ããã©ã°ã®ã»ãã
-				$TAB$$TAB$(void) set_flg($funcname$_eflgid, $epar2$);$NL$
-			$ELIF nfymode2 == TENFY_SNDDTQ$
-$				// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-				$TAB$$TAB$(void) psnd_dtq
-								($funcname$_edtqid, (intptr_t) ercd);$NL$
-			$ELSE$
-				$ERROR text_line$E_PAR:$SPC$
-					$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-				$END$
-			$END$
-
-			$TAB$}$NL$
-		$END$
-
-$		// é¢æ°ã®æ«å°¾é¨åã®çæ
-		}$NL$
-		$NL$
-	$END$
-	$RESULT = funcname$
-$END$
-
-$
-$  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
-$
-$INCLUDE "kernel/task.tf"$
-$INCLUDE "kernel/semaphore.tf"$
-$INCLUDE "kernel/eventflag.tf"$
-$INCLUDE "kernel/dataqueue.tf"$
-$INCLUDE "kernel/pridataq.tf"$
-$INCLUDE "kernel/mutex.tf"$
-$INCLUDE "kernel/messagebuf.tf"$
-$INCLUDE "kernel/mempfix.tf"$
-$INCLUDE "kernel/cyclic.tf"$
-$INCLUDE "kernel/alarm.tf"$
-$INCLUDE "kernel/interrupt.tf"$
-$INCLUDE "kernel/exception.tf"$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-$ 
-/*$NL$
-$SPC$*  Stack Area for Non-task Context$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF !LENGTH(ICS.ORDER_LIST)$
-$	// DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
-	#ifdef DEFAULT_ISTK$NL$
-	$NL$
-	#define TOPPERS_ISTKSZ		DEFAULT_ISTKSZ$NL$
-	#define TOPPERS_ISTK		DEFAULT_ISTK$NL$
-	$NL$
-	#else /* DEAULT_ISTK */$NL$
-	$NL$
-	$istksz = ALLOC_STACK("_kernel_istack", "DEFAULT_ISTKSZ")$$NL$
-	#define TOPPERS_ISTKSZ		$istksz$$NL$
-	#define TOPPERS_ISTK		_kernel_istack$NL$
-	$NL$
-	#endif /* DEAULT_ISTK */$NL$
-$ELSE$
-
-$	// éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
-	$IF LENGTH(ICS.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_ICS")$$END$
-	$END$
-
-$	// istkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼ããã
-$	// å°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
-	$IF ICS.ISTKSZ[1] <= 0 || (TARGET_MIN_ISTKSZ
-									&& ICS.ISTKSZ[1] < TARGET_MIN_ISTKSZ)$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' in %3%"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-$ 	// istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
-	$IF !EQ(ICS.ISTK[1], "NULL") && CHECK_STKSZ_ALIGN
-							&& (ICS.ISTKSZ[1] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-	$IF EQ(ICS.ISTK[1], "NULL")$
-$		// ã¹ã¿ãã¯é åã®èªåå²ä»ã
-		$istksz = ALLOC_STACK("_kernel_istack", ICS.ISTKSZ[1])$$NL$
-		#define TOPPERS_ISTKSZ		$istksz$$NL$
-		#define TOPPERS_ISTK		_kernel_istack$NL$
-	$ELSE$
-		#define TOPPERS_ISTKSZ		($ICS.ISTKSZ[1]$)$NL$
-		#define TOPPERS_ISTK		(void *)($ICS.ISTK[1]$)$NL$
-	$END$
-$END$
-$NL$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-const size_t	_kernel_istksz = TOPPERS_ISTKSZ;$NL$
-STK_T *const	_kernel_istk = TOPPERS_ISTK;$NL$
-$NL$
-#ifdef TOPPERS_ISTKPT$NL$
-STK_T *const	_kernel_istkpt = TOPPERS_ISTKPT(TOPPERS_ISTK, TOPPERS_ISTKSZ);$NL$
-#endif /* TOPPERS_ISTKPT */$NL$
-$NL$
-
-$ 
-$  ã¿ã¤ã ã¤ãã³ãç®¡ç
-$ 
-/*$NL$
-$SPC$*  Time Event Management$NL$
-$SPC$*/$NL$
-$NL$
-TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];$NL$
-$NL$
-
-$ 
-$  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
-$ 
-/*$NL$
-$SPC$*  Module Initialization Function$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_initialize_object(void)$NL$
-{$NL$
-$FOREACH func (initfuncs)$
-	$TAB$$func$$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  åæåã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Initialization Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_inirtn(void)$NL$
-{$NL$
-$FOREACH order INI.ORDER_LIST$
-$ 	// iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF INI.INIATR[order] != 0$
-		$ERROR INI.TEXT_LINE[order]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"iniatr", INI.INIATR[order], "inirtn",
-						INI.INIRTN[order], "ATT_INI")$
-		$END$
-	$END$
-	$TAB$((INIRTN)($INI.INIRTN[order]$))((intptr_t)($INI.EXINF[order]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Termination Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_terrtn(void)$NL$
-{$NL$
-$FOREACH rorder TER.RORDER_LIST$
-$ 	// teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF TER.TERATR[rorder] != 0$
-		$ERROR TER.TEXT_LINE[rorder]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"teratr", TER.TERATR[rorder], "terrtn",
-						TER.TERRTN[rorder], "ATT_TER")$
-		$END$
-	$END$
-	$TAB$((TERRTN)($TER.TERRTN[rorder]$))((intptr_t)($TER.EXINF[rorder]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$
-$  kernel_cfg.hã®æ«å°¾é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#endif /* TOPPERS_KERNEL_CFG_H */$NL$
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.trb	(revision 306)
@@ -0,0 +1,491 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel.trb 670 2016-03-03 15:08:11Z ertl-hiro $
+# 
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+#
+$timeStampFileName = "kernel_cfg.timestamp"
+
+#
+#  kernel_cfg.hã®å
+é ­é¨åã®çæ
+#
+$kernelCfgH = GenFile.new("kernel_cfg.h")
+$kernelCfgH.add(<<EOS)
+/* kernel_cfg.h */
+#ifndef TOPPERS_KERNEL_CFG_H
+#define TOPPERS_KERNEL_CFG_H
+EOS
+
+#
+#  kernel_cfg.cã®å
+é ­é¨åã®çæ
+#
+$kernelCfgC = GenFile.new("kernel_cfg.c")
+$kernelCfgC.add(<<EOS)
+/* kernel_cfg.c */
+#include "kernel/kernel_int.h"
+#include "kernel_cfg.h"
+
+#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)
+#error The kernel does not match this configuration file.
+#endif
+EOS
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+#
+$kernelCfgC.comment_header("Include Directives")
+$includeFiles.each do |file|
+  $kernelCfgC.add("#include #{file}")
+end
+$kernelCfgC.add()
+
+#
+#  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+#
+#  ã¹ã¿ãã¯é åã®å®ç¾©åã¨ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºè¨è¿°ãé
+åã§è¿ãï¼
+#
+unless defined? AllocStack()
+  def AllocStack(stack, size)
+    # å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
+    $kernelCfgC.add("static STK_T #{stack}[COUNT_STK_T(#{size})];")
+    return("ROUND_STK_T(#{size})")
+  end
+end
+
+#
+#  ã«ã¼ãã«ãªãã¸ã§ã¯ãã«é¢ããæ
+å ±ã®çæï¼ä»®æ³ã¯ã©ã¹ï¼
+#
+class KernelObject
+  def initialize(obj, object, obj_s = obj)
+    @obj = obj
+    @OBJ = obj.tr("a-z", "A-Z")
+    @object = object
+    @obj_s = obj_s
+    @OBJ_S = obj_s.tr("a-z", "A-Z")
+    @objid = (obj + "id").to_sym
+    @api = "CRE_#{@OBJ}".to_sym
+  end
+
+  def generate()
+    # kernel_cfg.hã®çæ
+    $kernelCfgH.add("#define TNUM_#{@OBJ}ID\t#{$cfgData[@api].size}")
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+    $cfgData[@api].sort.each do |key, params|
+      $kernelCfgH.add("#define #{params[@objid]}\t#{params[@objid].val}")
+    end
+    $kernelCfgH.add()
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
+    if $USE_EXTERNAL_ID
+      $cfgData[@api].sort.each do |key, params|
+        $kernelCfgC.add("const ID #{params[@objid]}_id" \
+										" = #{params[@objid].val};")
+      end
+      $kernelCfgC.add()
+    end
+
+    # ãªãã¸ã§ã¯ãIDçªå·ã®æå¤§å¤
+    $kernelCfgC.add2("const ID _kernel_tmax_#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_#{@OBJ}ID - 1);")
+
+    # ãã¼ã¿æ§é 
+    if $cfgData[@api].size > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      $cfgData[@api].sort.each do |key, params|
+        prepare(key, params)
+      end
+
+      # ãªãã¸ã§ã¯ãå
+¨ä½ã«å¯¾ãã¦å¿
+è¦ãªã¡ã¢ãªé åã®çæï¼ãªãã·ã§ã³ï¼
+      if respond_to?(:generateData)
+        generateData()
+      end
+
+      # ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+      $kernelCfgC.add("const #{@OBJ_S}INIB _kernel_#{@obj_s}inib_table" \
+													"[TNUM_#{@OBJ}ID] = {")
+      $cfgData[@api].sort.each_with_index do |(key, params), index|
+        $kernelCfgC.add(",") if index > 0
+        $kernelCfgC.append("\t{ " + generateInib(key, params) + " }")
+      end
+      $kernelCfgC.add
+      $kernelCfgC.add2("};")
+
+      # ãªãã¸ã§ã¯ãç®¡çãã­ãã¯ã®çæ
+      $kernelCfgC.add2("#{@OBJ_S}CB _kernel_#{@obj_s}cb_table" \
+													"[TNUM_#{@OBJ}ID];")
+
+      # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+      $initializeFunctions.push("_kernel_initialize_#{@object}();")
+    else
+      # ãªãã¸ã§ã¯ãã1ã¤ããªãå ´å
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const #{@OBJ_S}INIB, " \
+										"_kernel_#{@obj_s}inib_table);")
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{@OBJ_S}CB, " \
+										"_kernel_#{@obj_s}cb_table);")
+    end
+  end
+end
+
+#
+#  éç¥ãã³ãã©ã®çæé¢æ°
+#
+def generateNotifyHandler(key, params, objid)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode == $TNFY_HANDLER || nfymode1 == $TNFY_SETVAR \
+								|| nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+	numpar = 2
+	epar1 = params[:par3]
+	epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    numpar = 1
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  # ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
+  if (numpar == 2 && par2.nil?) || (nfymode2 != 0 && epar1.nil?) \
+								|| (nfymode2 == $TENFY_SETFLG && epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
+    error_api(params, "too few parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif (nfymode2 == 0 && !epar1.nil?) \
+					|| (nfymode2 != $TENFY_SETFLG && !epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãå¤ãããå ´å
+    error_api(params, "too many parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif nfymode == $TNFY_HANDLER
+    # ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
+    funcname = "(NFYHDR)(#{par2})"
+  else
+    # éç¥ãã³ãã©ã®é¢æ°å
+    funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+    # ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
+    # å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
+è¦ï¼
+    if nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR
+      $kernelCfgC.add2("intptr_t *const #{funcname}_p_evar =" \
+											" (intptr_t *)(#{epar1});")
+    elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+      $kernelCfgC.add2("const ID #{funcname}_etskid = #{epar1};")
+    elsif nfymode2 == $TENFY_SIGSEM
+      $kernelCfgC.add2("const ID #{funcname}_esemid = #{epar1};")
+    elsif nfymode2 == $TENFY_SETFLG
+      $kernelCfgC.add2("const ID #{funcname}_eflgid = #{epar1};")
+    elsif nfymode2 == $TENFY_SNDDTQ
+      $kernelCfgC.add2("const ID #{funcname}_edtqid = #{epar1};")
+    end
+
+    # é¢æ°ã®å
+é ­é¨åã®çæ
+    $kernelCfgC.add("static void")
+    $kernelCfgC.add("#{funcname}(intptr_t exinf)")
+    $kernelCfgC.add("{")
+
+    if nfymode2 == 0
+      # ã¨ã©ã¼éç¥ããªãå ´å
+      errorCode = "(void) "
+    else
+      # ã¨ã©ã¼éç¥ãããå ´å
+      $kernelCfgC.add2("\tER\tercd;")
+      errorCode = "ercd = "
+    end
+
+    # ã¤ãã³ãéç¥å¦çã®å¦ç
+    if nfymode1 == $TNFY_SETVAR && nfymode2 == 0
+      # å¤æ°ã®è¨­å®
+      $kernelCfgC.add("\t*((intptr_t *) exinf) = (#{par2});")
+    elsif nfymode1 == $TNFY_INCVAR && nfymode2 == 0
+      # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+      $kernelCfgC.add("\t(void) loc_cpu();")
+      $kernelCfgC.add("\t*((intptr_t *) exinf) += 1;")
+      $kernelCfgC.add("\t(void) unl_cpu();")
+    elsif nfymode1 == $TNFY_ACTTSK
+      # ã¿ã¹ã¯ã®èµ·å
+      $kernelCfgC.add("\t#{errorCode}act_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_WUPTSK
+      # ã¿ã¹ã¯ã®èµ·åº
+      $kernelCfgC.add("\t#{errorCode}wup_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_SIGSEM
+      # ã»ããã©ã®è¿å´
+      $kernelCfgC.add("\t#{errorCode}sig_sem((ID) exinf);")
+    elsif nfymode1 == $TNFY_SETFLG
+      # ã¤ãã³ããã©ã°ã®ã»ãã
+      $kernelCfgC.add("\t#{errorCode}set_flg(((ID) exinf), #{par2});")
+    elsif nfymode1 == $TNFY_SNDDTQ
+      # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+      $kernelCfgC.add("\t#{errorCode}psnd_dtq(((ID) exinf), #{par2});")
+    else
+      error_illegal_id("E_PAR", params, :nfymode, objid)
+    end
+			
+    if nfymode2 != 0
+      # ã¨ã©ã¼éç¥å¦çã®å¦ç
+      $kernelCfgC.add("\tif (ercd != E_OK) {")
+
+
+      if nfymode2 == $TENFY_SETVAR
+        # å¤æ°ã®è¨­å®
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar = (intptr_t) ercd;")
+      elsif nfymode2 == $TENFY_INCVAR
+        # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+        $kernelCfgC.add("\t\t(void) loc_cpu();")
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar += 1;")
+        $kernelCfgC.add("\t\t(void) unl_cpu();")
+      elsif nfymode2 == $TENFY_ACTTSK
+        # ã¿ã¹ã¯ã®èµ·å
+        $kernelCfgC.add("\t\t(void) act_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_WUPTSK
+        # ã¿ã¹ã¯ã®èµ·åº
+        $kernelCfgC.add("\t\t(void) wup_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_SIGSEM
+        # ã»ããã©ã®è¿å´
+        $kernelCfgC.add("\t\t(void) sig_sem(#{funcname}_esemid);")
+      elsif nfymode2 == $TENFY_SETFLG
+        # ã¤ãã³ããã©ã°ã®ã»ãã
+        $kernelCfgC.add("\t\t(void) set_flg(#{funcname}_eflgid, #{epar2});")
+      elsif nfymode2 == $TENFY_SNDDTQ
+        # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+        $kernelCfgC.add("\t\t(void) psnd_dtq(#{funcname}_edtqid," \
+													" (intptr_t) ercd);")
+      else
+        error_illegal_id("E_PAR", params, :nfymode, objid)
+      end
+      $kernelCfgC.add("\t}")
+    end
+
+    # é¢æ°ã®æ«å°¾é¨åã®çæ
+    $kernelCfgC.add2("}")
+  end
+  return(funcname)
+end
+
+#
+#  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+#
+$initializeFunctions = []
+IncludeTrb("kernel/task.trb")
+IncludeTrb("kernel/semaphore.trb")
+IncludeTrb("kernel/eventflag.trb")
+IncludeTrb("kernel/dataqueue.trb")
+IncludeTrb("kernel/pridataq.trb")
+IncludeTrb("kernel/mutex.trb")
+IncludeTrb("kernel/messagebuf.trb")
+IncludeTrb("kernel/mempfix.trb")
+IncludeTrb("kernel/cyclic.trb")
+IncludeTrb("kernel/alarm.trb")
+IncludeTrb("kernel/interrupt.trb")
+IncludeTrb("kernel/exception.trb")
+
+#
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.comment_header("Stack Area for Non-task Context")
+
+if $cfgData[:DEF_ICS].size == 0
+  # DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  if $DEFAULT_ISTK.nil?
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", "DEFAULT_ISTKSZ")
+    istk = "_kernel_istack"
+  else
+    istksz = "DEFAULT_ISTKSZ"
+    istk = "DEFAULT_ISTK"
+  end
+else
+  # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
+  if $cfgData[:DEF_ICS].size > 1
+    error("E_OBJ: too many DEF_ICS")
+  end
+
+  # DEF_ICSãããå ´åã®å¦ç
+  params = $cfgData[:DEF_ICS][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:istk] ||= "NULL"
+
+  # istkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+  # ãããå°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
+  if params[:istksz] < $TARGET_MIN_ISTKSZ
+    error_wrong("E_PAR", params, :istksz, "too small")
+  end
+
+  if params[:istk] == "NULL"
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", params[:istksz])
+    istk = "_kernel_istack"
+  else
+    # istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
+    if (params[:istksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :istksz, "not aligned")
+    end
+
+    istksz = "(#{params[:istksz]})"
+    istk = "(void *)(#{params[:istk]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_istksz = #{istksz};
+STK_T *const _kernel_istk = #{istk};
+
+#ifdef TOPPERS_ISTKPT
+STK_T *const _kernel_istkpt = TOPPERS_ISTKPT(#{istk}, #{istksz});
+#endif /* TOPPERS_ISTKPT */
+EOS
+
+#
+#  ã¿ã¤ã ã¤ãã³ãç®¡ç
+#
+$kernelCfgC.comment_header("Time Event Management")
+$kernelCfgC.add(<<EOS)
+TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];
+EOS
+
+#
+#  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
+#
+$kernelCfgC.comment_header("Module Initialization Function")
+$kernelCfgC.append(<<EOS)
+void
+_kernel_initialize_object(void)
+{
+EOS
+$initializeFunctions.each do |func|
+  $kernelCfgC.add("\t#{func}")
+end
+$kernelCfgC.add2("}")
+
+#
+#  åæåã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Initialization Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_INI].each do |key, params|
+  # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:iniatr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
+  end
+end
+
+# åæåã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_inirtn(void)
+{
+EOS
+$cfgData[:ATT_INI].each do |key, params|
+  $kernelCfgC.add("\t((INIRTN)(#{params[:inirtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  çµäºå¦çã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Termination Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_TER].each do |key, params|
+  # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:teratr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
+  end
+end
+
+# çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_terrtn(void)
+{
+EOS
+$cfgData[:ATT_TER].reverse_each do |key, params|
+  $kernelCfgC.add("\t((TERRTN)(#{params[:terrtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  kernel_cfg.hã®æ«å°¾é¨åã®çæ
+#
+$kernelCfgH.append(<<EOS)
+#endif /* TOPPERS_KERNEL_CFG_H */
+EOS
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.csv	(revision 305)
+++ 	(revision )
@@ -1,17 +1,0 @@
-tsk,CRE_TSK,#tskid { .tskatr &exinf &task +itskpri .stksz &stk },,
-sem,CRE_SEM,#semid { .sematr .isemcnt .maxsem },,
-flg,CRE_FLG,#flgid { .flgatr .iflgptn },,
-dtq,CRE_DTQ,#dtqid { .dtqatr .dtqcnt &dtqmb },,
-pdq,CRE_PDQ,#pdqid { .pdqatr .pdqcnt +maxdpri &pdqmb },,
-mtx,CRE_MTX,#mtxid { .mtxatr +ceilpri? },,
-mbf,CRE_MBF,#mbfid { .mbfatr .maxmsz .mbfsz &mbfmb },,
-mpf,CRE_MPF,#mpfid { .mpfatr .blkcnt .blksz &mpf &mpfmb },,
-cyc,CRE_CYC,#cycid { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs },,
-alm,CRE_ALM,#almid { .almatr { .nfymode &par1 &par2? &par3? &par4? } },,
-int,CFG_INT,.intno { .intatr +intpri },,
-isr,CRE_ISR,#isrid { .isratr &exinf .intno &isr +isrpri },,
-inh,DEF_INH,.inhno { .inhatr &inthdr },,
-exc,DEF_EXC,.excno { .excatr &exchdr },,
-ics,DEF_ICS,{ .istksz &istk },-1,
-ini,ATT_INI,{ .iniatr &exinf &inirtn },-1,
-ter,ATT_TER,{ .teratr &exinf &terrtn },-1,
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.def	(revision 306)
@@ -0,0 +1,17 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+CRE_FLG #flgid* { .flgatr .iflgptn }
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+CRE_MBF #mbfid* { .mbfatr .maxmsz .mbfsz &mbfmb? }
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_def.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_def.csv	(revision 305)
+++ 	(revision )
@@ -1,139 +1,0 @@
-SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
-TA_NULL,TA_NULL
-TA_ACT,TA_ACT
-TA_NOACTQUE,TA_NOACTQUE
-TA_TPRI,TA_TPRI
-TA_WMUL,TA_WMUL
-TA_CLR,TA_CLR
-TA_CEILING,TA_CEILING
-TA_STA,TA_STA
-TA_NONKERNEL,TA_NONKERNEL
-TA_ENAINT,TA_ENAINT
-TA_EDGE,TA_EDGE
-TNFY_HANDLER,TNFY_HANDLER
-TNFY_SETVAR,TNFY_SETVAR
-TNFY_INCVAR,TNFY_INCVAR
-TNFY_ACTTSK,TNFY_ACTTSK
-TNFY_WUPTSK,TNFY_WUPTSK
-TNFY_SIGSEM,TNFY_SIGSEM
-TNFY_SETFLG,TNFY_SETFLG
-TNFY_SNDDTQ,TNFY_SNDDTQ
-TENFY_SETVAR,TENFY_SETVAR
-TENFY_INCVAR,TENFY_INCVAR
-TENFY_ACTTSK,TENFY_ACTTSK
-TENFY_WUPTSK,TENFY_WUPTSK
-TENFY_SIGSEM,TENFY_SIGSEM
-TENFY_SETFLG,TENFY_SETFLG
-TENFY_SNDDTQ,TENFY_SNDDTQ
-TMIN_TPRI,TMIN_TPRI,signed
-TMAX_TPRI,TMAX_TPRI,signed
-TMIN_DPRI,TMIN_DPRI,signed
-TMAX_DPRI,TMAX_DPRI,signed
-TMIN_ISRPRI,TMIN_ISRPRI,signed
-TMAX_ISRPRI,TMAX_ISRPRI,signed
-TBIT_FLGPTN,TBIT_FLGPTN
-TMAX_MAXSEM,TMAX_MAXSEM
-TMAX_RELTIM,TMAX_RELTIM
-TMIN_INTPRI,TMIN_INTPRI,signed
-TMAX_INTPRI,TMAX_INTPRI,signed
-TMIN_TSKID,TMIN_TSKID,signed
-TMIN_SEMID,TMIN_SEMID,signed
-TMIN_FLGID,TMIN_FLGID,signed
-TMIN_DTQID,TMIN_DTQID,signed
-TMIN_PDQID,TMIN_PDQID,signed
-TMIN_MTXID,TMIN_MTXID,signed
-TMIN_MBFID,TMIN_MBFID,signed
-TMIN_MPFID,TMIN_MPFID,signed
-TMIN_CYCID,TMIN_CYCID,signed
-TMIN_ALMID,TMIN_ALMID,signed
-OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,#defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,#defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,#defined(OMIT_INITIALIZE_EXCEPTION)
-USE_TSKINICTXB,#defined(USE_TSKINICTXB)
-TARGET_TSKATR,#defined(TARGET_TSKATR),,TARGET_TSKATR
-TARGET_INTATR,#defined(TARGET_INTATR),,TARGET_INTATR
-TARGET_INHATR,#defined(TARGET_INHATR),,TARGET_INHATR
-TARGET_ISRATR,#defined(TARGET_ISRATR),,TARGET_ISRATR
-TARGET_EXCATR,#defined(TARGET_EXCATR),,TARGET_EXCATR
-TARGET_MIN_STKSZ,#defined(TARGET_MIN_STKSZ),,TARGET_MIN_STKSZ
-TARGET_MIN_ISTKSZ,#defined(TARGET_MIN_ISTKSZ),,TARGET_MIN_ISTKSZ
-CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
-CHECK_INTPTR_ALIGN,#defined(CHECK_INTPTR_ALIGN),,CHECK_INTPTR_ALIGN
-CHECK_INTPTR_NONNULL,#defined(CHECK_INTPTR_NONNULL)
-CHECK_FUNC_ALIGN,#defined(CHECK_FUNC_ALIGN),,CHECK_FUNC_ALIGN
-CHECK_FUNC_NONNULL,#defined(CHECK_FUNC_NONNULL)
-CHECK_STACK_ALIGN,#defined(CHECK_STACK_ALIGN),,CHECK_STACK_ALIGN
-CHECK_STACK_NONNULL,#defined(CHECK_STACK_NONNULL)
-CHECK_MPF_ALIGN,#defined(CHECK_MPF_ALIGN),,CHECK_MPF_ALIGN
-CHECK_MPF_NONNULL,#defined(CHECK_MPF_NONNULL)
-sizeof_void_ptr,sizeof(void*)
-sizeof_uint_t,sizeof(uint_t)
-sizeof_size_t,sizeof(size_t)
-sizeof_intptr_t,sizeof(intptr_t)
-sizeof_ID,sizeof(ID)
-sizeof_FP,sizeof(FP)
-sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
-sizeof_EXCNO,sizeof(EXCNO)
-sizeof_TINIB,sizeof(TINIB)
-offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
-offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
-offsetof_TINIB_task,"offsetof(TINIB,task)"
-offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
-offsetof_TINIB_stksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stksz)"
-offsetof_TINIB_stk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stk)"
-sizeof_SEMINIB,sizeof(SEMINIB)
-offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
-offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
-offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
-sizeof_FLGPTN,sizeof(FLGPTN)
-sizeof_FLGINIB,sizeof(FLGINIB)
-offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
-offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
-sizeof_DTQINIB,sizeof(DTQINIB)
-offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
-offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
-offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
-sizeof_PDQINIB,sizeof(PDQINIB)
-offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
-offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
-offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
-offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
-sizeof_MTXINIB,sizeof(MTXINIB)
-offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
-offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
-sizeof_MBFINIB,sizeof(MBFINIB)
-offsetof_MBFINIB_mbfatr,"offsetof(MBFINIB,mbfatr)"
-offsetof_MBFINIB_maxmsz,"offsetof(MBFINIB,maxmsz)"
-offsetof_MBFINIB_mbfsz,"offsetof(MBFINIB,mbfsz)"
-offsetof_MBFINIB_mbfmb,"offsetof(MBFINIB,mbfmb)"
-sizeof_MPFINIB,sizeof(MPFINIB)
-offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
-offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
-offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
-offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
-offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
-sizeof_CYCINIB,sizeof(CYCINIB)
-offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
-offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
-offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
-offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
-offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
-sizeof_ALMINIB,sizeof(ALMINIB)
-offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
-offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
-offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
-sizeof_INHINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INHINIB)
-offset_INHINIB_inhno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhno)"
-offset_INHINIB_inhatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhatr)"
-offset_INHINIB_int_entry,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,int_entry)"
-sizeof_INTINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INTINIB)
-offset_INTINIB_intno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intno)"
-offset_INTINIB_intatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intatr)"
-offset_INTINIB_intpri,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intpri)"
-sizeof_EXCINIB,#!defined(OMIT_INITIALIZE_EXCEPTION),,sizeof(EXCINIB)
-offset_EXCINIB_excno,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excno)"
-offset_EXCINIB_excatr,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excatr)"
-offset_EXCINIB_exc_entry,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,exc_entry)"
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_impl.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_impl.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel_impl.h 332 2015-06-21 13:20:37Z ertl-hiro $
+ *  $Id: kernel_impl.h 748 2016-05-14 14:30:06Z ertl-hiro $
  */
 
@@ -88,11 +88,4 @@
  */
 #include <t_syslog.h>
-
-/*
- *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
- */
-#ifndef CAST
-#define CAST(type, val)		((type)(val))
-#endif /* CAST */
 
 /*
@@ -164,4 +157,9 @@
 
 /*
+ *  TECSã®åæåï¼init_tecs.cï¼
+ */
+extern void initialize_tecs(void);
+
+/*
  *  åã¢ã¸ã¥ã¼ã«ã®åæåï¼kernel_cfg.cï¼
  */
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.def
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.def	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.def	(revision 306)
@@ -88,5 +88,4 @@
 
 # messagebuf.c
-mbfhook_dequeue_wobj
 initialize_messagebuf
 enqueue_message
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.h	(revision 306)
@@ -115,5 +115,4 @@
  *  messagebuf.c
  */
-#define mbfhook_dequeue_wobj		_kernel_mbfhook_dequeue_wobj
 #define initialize_messagebuf		_kernel_initialize_messagebuf
 #define enqueue_message				_kernel_enqueue_message
@@ -201,205 +200,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-#define _mbfhook_dequeue_wobj		__kernel_mbfhook_dequeue_wobj
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_dequeue_wobj			__kernel_wait_dequeue_wobj
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  messagebuf.c
- */
-#define _mbfhook_dequeue_wobj		__kernel_mbfhook_dequeue_wobj
-#define _initialize_messagebuf		__kernel_initialize_messagebuf
-#define _enqueue_message			__kernel_enqueue_message
-#define _dequeue_message			__kernel_dequeue_message
-#define _send_message				__kernel_send_message
-#define _messagebuf_signal			__kernel_messagebuf_signal
-#define _receive_message			__kernel_receive_message
-#define _messagebuf_dequeue_wobj	__kernel_messagebuf_dequeue_wobj
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mbfid					__kernel_tmax_mbfid
-#define _mbfinib_table				__kernel_mbfinib_table
-#define _mbfcb_table				__kernel_mbfcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_sym.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_sym.def	(revision 306)
@@ -0,0 +1,149 @@
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MBFID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MBFINIB,sizeof(MBFINIB)
+offsetof_MBFINIB_mbfatr,"offsetof(MBFINIB,mbfatr)"
+offsetof_MBFINIB_maxmsz,"offsetof(MBFINIB,maxmsz)"
+offsetof_MBFINIB_mbfsz,"offsetof(MBFINIB,mbfsz)"
+offsetof_MBFINIB_mbfmb,"offsetof(MBFINIB,mbfmb)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_unrename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_unrename.h	(revision 306)
@@ -116,5 +116,4 @@
  *  messagebuf.c
  */
-#undef mbfhook_dequeue_wobj
 #undef initialize_messagebuf
 #undef enqueue_message
@@ -202,205 +201,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-#undef _mbfhook_dequeue_wobj
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_dequeue_wobj
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  messagebuf.c
- */
-#undef _mbfhook_dequeue_wobj
-#undef _initialize_messagebuf
-#undef _enqueue_message
-#undef _dequeue_message
-#undef _send_message
-#undef _messagebuf_signal
-#undef _receive_message
-#undef _messagebuf_dequeue_wobj
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mbfid
-#undef _mbfinib_table
-#undef _mbfcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.tf	(revision 305)
+++ 	(revision )
@@ -1,167 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: messagebuf.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¡ãã»ã¼ã¸ãããã¡æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_MBFID	$LENGTH(MBF.ID_LIST)$$NL$
-$FOREACH id MBF.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Message Buffer Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¡ãã»ã¼ã¸ãããã¡ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id MBF.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  ã¡ãã»ã¼ã¸ãããã¡IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_mbfid = (TMIN_MBFID + TNUM_MBFID - 1);$NL$
-$NL$
-
-$
-$  ã¡ãã»ã¼ã¸ãããã¡åæåãã­ãã¯
-$
-$IF LENGTH(MBF.ID_LIST)$
-	$FOREACH mbfid MBF.ID_LIST$
-$		// mbfatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3303ï¼½
-$		//ï¼TA_NULLã§ãªãå ´åï¼
-		$IF MBF.MBFATR[mbfid] != TA_NULL$
-			$ERROR MBF.TEXT_LINE[mbfid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mbfatr", MBF.MBFATR[mbfid], mbfid, "CRE_MBF")$
-			$END$
-		$END$
-
-$		// maxmszã0ä»¥ä¸ã®å ´åï¼E_PARï¼ï¼»NGKI3307ï¼½
-		$IF MBF.MAXMSZ[mbfid] <= 0$
-			$ERROR MBF.TEXT_LINE[mbfid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"maxmsz", MBF.MAXMSZ[mbfid], mbfid, "CRE_MBF")$
-			$END$
-		$END$
-
-$		// mbfszãè² ã®å ´åï¼E_PARï¼ï¼»NGKI3308ï¼½
-		$IF MBF.MBFSZ[mbfid] < 0$
-			$ERROR MBF.TEXT_LINE[mbfid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mbfsz", MBF.MBFSZ[mbfid], mbfid, "CRE_MBF")$
-			$END$
-		$END$
-
-$		// mbfmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0205ï¼½
-		$IF !EQ(MBF.MBFMB[mbfid], "NULL")$
-			$ERROR MBF.TEXT_LINE[mbfid]$E_NOSPT:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mbfmb", MBF.MBFMB[mbfid], mbfid, "CRE_MBF")$
-			$END$
-		$END$
-
-$		// ã¡ãã»ã¼ã¸ãããã¡ç®¡çé å
-		$IF MBF.MBFSZ[mbfid]$
-			static uint_t _kernel_mbfmb_$mbfid$
-					[TOPPERS_COUNT_SZ($MBF.MBFSZ[mbfid]$, sizeof(uint_t))];$NL$
-		$END$
-	$END$
-
-$	// ã¡ãã»ã¼ã¸ãããã¡åæåãã­ãã¯
-	const MBFINIB _kernel_mbfinib_table[TNUM_MBFID] = {$NL$
-	$JOINEACH mbfid MBF.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($MBF.MBFATR[mbfid]$),$SPC$
-			($MBF.MAXMSZ[mbfid]$),$SPC$
-			TOPPERS_ROUND_SZ($MBF.MBFSZ[mbfid]$, sizeof(uint_t)),$SPC$
-			$IF MBF.MBFSZ[mbfid]$
-				_kernel_mbfmb_$mbfid$
-			$ELSE$
-				NULL
-			$END$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const MBFINIB, _kernel_mbfinib_table);$NL$
-$END$$NL$
-
-$
-$  ã¡ãã»ã¼ã¸ãããã¡ç®¡çãã­ãã¯ã¨ã¡ãã»ã¼ã¸ãããã¡æ©è½åæåé¢æ°
-$
-$IF LENGTH(MBF.ID_LIST)$
-	MBFCB _kernel_mbfcb_table[TNUM_MBFID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_messagebuf();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MBFCB, _kernel_mbfcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.trb	(revision 306)
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: messagebuf.trb 672 2016-03-05 15:33:08Z ertl-hiro $
+# 
+
+#
+#		ã¡ãã»ã¼ã¸ãããã¡æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class MessagebufObject < KernelObject
+  def initialize()
+    super("mbf", "messagebuf")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:mbfmb] ||= "NULL"
+
+    # mbfatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3303ï¼½
+    #ï¼TA_NULLã§ãªãå ´åï¼
+    if params[:mbfatr] != $TA_NULL
+      error_illegal_id("E_RSATR", params, :mbfatr, :mbfid)
+    end
+
+    # maxmszã0ã®å ´åï¼E_PARï¼ï¼»NGKI3307ï¼½
+    if params[:maxmsz] == 0
+      error_illegal_id("E_PAR", params, :maxmsz, :mbfid)
+    end
+
+    # mbfmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0205ï¼½
+    if params[:mbfmb] != "NULL"
+      error_illegal_id("E_NOSPT", params, :mbfmb, :mbfid)
+    end
+
+    # ã¡ãã»ã¼ã¸ãããã¡ç®¡çé å
+    if params[:mbfsz] > 0
+      mbfmbName = "_kernel_mbfmb_#{params[:mbfid]}"
+      $kernelCfgC.add("static uint_t #{mbfmbName}" \
+				"[TOPPERS_COUNT_SZ(#{params[:mbfsz]}, sizeof(uint_t))];")
+      params[:mbfinib_mbfmb] = mbfmbName
+    else
+      params[:mbfinib_mbfmb] = "NULL"
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:mbfatr]}), (#{params[:maxmsz]}), " \
+				"TOPPERS_ROUND_SZ(#{params[:mbfsz]}, sizeof(uint_t)), " \
+				"#{params[:mbfinib_mbfmb]}")
+  end
+end
+
+#
+#  ãã¼ã¿ã­ã¥ã¼ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Message Buffer Functions")
+MessagebufObject.new.generate()
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/bit_kernel.c
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/bit_kernel.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/bit_kernel.c	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: bit_kernel.c 53 2014-04-26 18:58:00Z ertl-hiro $
+ *  $Id: bit_kernel.c 741 2016-04-05 15:51:59Z ertl-hiro $
  */
 
@@ -69,4 +69,5 @@
 #include "kernel/mempfix.h"
 #include "kernel/time_event.h"
+#include "kernel/check.h"
 
 /*
@@ -149,9 +150,117 @@
 on_stack(void *addr, const TINIB *p_tinib)
 {
+#ifdef USE_TSKINICTXB
+	/*
+	 *  ãã®é¢æ°ã®å®è£
+ã¯ã¿ã¼ã²ããä¾å­ã«ãªãï¼
+	 */
+	return(true);
+#else /* USE_TSKINICTXB */
 	if (p_tinib->stk <= addr
-				&& addr < (void *)((char *)(p_tinib->stk) + p_tinib->stksz)) {
+			&& addr < (void *)((char *)(p_tinib->stk) + p_tinib->stksz)) {
 		return(true);
 	}
 	return(false);
+#endif /* USE_TSKINICTXB */
+}
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ãªã³ã°ã®ããã®ãã¼ã¿æ§é ã®æ¤æ»
+ */
+#ifndef PRIMAP_BIT
+#define	PRIMAP_BIT(pri)		(1U << (pri))
+#endif /* PRIMAP_BIT */
+
+Inline bool_t
+primap_empty(void)
+{
+#ifndef PRIMAP_LEVEL_2
+	return(ready_primap == 0U);
+#else /* PRIMAP_LEVEL_2 */
+	return(ready_primap1 == 0U);
+#endif /* PRIMAP_LEVEL_2 */
+}
+
+Inline uint16_t
+primap_extract_bit(uint_t pri)
+{
+#ifndef PRIMAP_LEVEL_2
+	return(ready_primap & PRIMAP_BIT(pri));
+#else /* PRIMAP_LEVEL_2 */
+	return(ready_primap2[pri / TBIT_PRIMAP] & PRIMAP_BIT(pri % TBIT_PRIMAP));
+#endif /* PRIMAP_LEVEL_2 */
+}
+
+static ER
+bit_schedcb(void)
+{
+	uint_t	pri;
+	QUEUE	*p_queue;
+	TCB		*p_tcb;
+
+	/*
+	 *  dspflgã¨p_schedtskã®æ´åæ§ã®æ¤æ»
+	 */
+	if (dspflg) {
+		if (primap_empty()) {
+			if (p_schedtsk != NULL) {
+				return(E_SYS_LINENO);
+			}
+		}
+		else {
+			if (p_schedtsk != search_schedtsk()) {
+				return(E_SYS_LINENO);
+			}
+		}
+	}
+
+#ifdef PRIMAP_LEVEL_2
+	/*
+	 *  ready_primap1ã¨ready_primap2ã®æ´åæ§ã®æ¤æ»
+	 */
+	for (pri = 0; pri < TNUM_TPRI; pri += TBIT_PRIMAP) {
+		if (ready_primap2[pri / TBIT_PRIMAP] == 0U) {
+			if ((ready_primap1 & PRIMAP_BIT(pri / TBIT_PRIMAP)) != 0U) {
+				return(E_SYS_LINENO);
+			}
+		}
+		else {
+			if ((ready_primap1 & PRIMAP_BIT(pri / TBIT_PRIMAP)) == 0U) {
+				return(E_SYS_LINENO);
+			}
+		}
+	}
+#endif /* PRIMAP_LEVEL_2 */
+
+	/*
+	 *  ready_queueã¨ready_primapã®æ´åæ§ã®æ¤æ»
+	 */
+	for (pri = 0; pri < TNUM_TPRI; pri++) {
+		p_queue = ready_queue[pri].p_next;
+		if (p_queue == &ready_queue[pri]) {
+			if (primap_extract_bit(pri) != 0U) {
+				return(E_SYS_LINENO);
+			}
+		}
+		else {
+			if (primap_extract_bit(pri) == 0U) {
+				return(E_SYS_LINENO);
+			}
+		}
+		while (p_queue != &ready_queue[pri]) {
+			p_tcb = (TCB *) p_queue;
+			if (!VALID_TCB(p_tcb)) {
+				return(E_SYS_LINENO);
+			}
+			if (!TSTAT_RUNNABLE(p_tcb->tstat)) {
+				return(E_SYS_LINENO);
+			}
+			if (p_tcb->priority != pri) {
+				return(E_SYS_LINENO);
+			}
+			p_queue = p_queue->p_next;
+		}
+	}
+	return(E_OK);
 }
 
@@ -162,17 +271,17 @@
 bit_task(ID tskid)
 {
-	TCB			*p_tcb;
-	const TINIB	*p_tinib;
-	uint_t		tstat, pri;
-	TMEVTB		*p_tmevtb;
-	SEMCB		*p_semcb;
-	FLGCB		*p_flgcb;
-	DTQCB		*p_dtqcb;
-	PDQCB		*p_pdqcb;
-	MTXCB		*p_mtxcb;
-	MBFCB		*p_mbfcb;
-	MPFCB		*p_mpfcb;
-
-	if (!(TMIN_TSKID <= (tskid) && (tskid) <= tmax_tskid)) {
+	TCB				*p_tcb;
+	const TINIB		*p_tinib;
+	uint_t			tstat, bpri, pri;
+	TMEVTB			*p_tmevtb;
+	SEMCB			*p_semcb;
+	FLGCB			*p_flgcb;
+	DTQCB			*p_dtqcb;
+	PDQCB			*p_pdqcb;
+	MTXCB			*p_mtxcb;
+	MBFCB			*p_mbfcb;
+	MPFCB			*p_mpfcb;
+
+	if (!VALID_TSKID(tskid)) {
 		return(E_ID);
 	}
@@ -180,8 +289,9 @@
 	p_tinib = p_tcb->p_tinib;
 	tstat = p_tcb->tstat;
+	bpri = p_tcb->bpriority;
 	pri = p_tcb->priority;
 
 	/*
-	 *  åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ã®æ¤æ»
+	 *  ã¿ã¹ã¯åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ã®æ¤æ»
 	 */
 	if (p_tinib != &(tinib_table[INDEX_TSK(tskid)])) {
@@ -214,15 +324,16 @@
 
 	/*
-	 *  actqueã®æ¤æ»
-	 */
-	if (TSTAT_DORMANT(tstat) && p_tcb->actque) {
+	 *  ãã¼ã¹åªå
+åº¦ã®æ¤æ»
+	 */
+	if (bpri >= TNUM_TPRI) {
 		return(E_SYS_LINENO);
 	}
 
 	/*
-	 *  ã¿ã¹ã¯åªå
+	 *  ç¾å¨ã®åªå
 åº¦ã®æ¤æ»
 	 */
-	if (pri >= TNUM_TPRI) {
+	if (pri > bpri) {
 		return(E_SYS_LINENO);
 	}
@@ -241,8 +352,11 @@
 	 */
 	if (TSTAT_DORMANT(tstat)) {
-		if (!(pri == p_tinib->ipriority)
-					&& (p_tcb->wupque == false)
-					&& (p_tcb->raster == false)
-					&& (p_tcb->enater == true)) {
+		if (!(bpri == p_tinib->ipriority
+			  		&& pri == p_tinib->ipriority
+					&& p_tcb->actque == false
+					&& p_tcb->wupque == false
+					&& p_tcb->raster == false
+					&& p_tcb->enater == true
+					&& p_tcb->p_lastmtx == NULL)) {
 			return(E_SYS_LINENO);
 		}
@@ -394,4 +508,13 @@
 			return(E_SYS_LINENO);
 			break;
+		}
+	}
+
+	/*
+	 *  p_lastmtxã®æ¤æ»
+	 */
+	if (p_tcb->p_lastmtx != NULL) {
+		if (!VALID_MTXCB(p_tcb->p_lastmtx)) {
+			return(E_SYS_LINENO);
 		}
 	}
@@ -424,9 +547,9 @@
 	SEMCB			*p_semcb;
 	const SEMINIB	*p_seminib;
-	uint_t			semcnt;
+	uint_t			semcnt, pri;
 	QUEUE			*p_queue;
 	TCB				*p_tcb;
 
-	if (!(TMIN_SEMID <= (semid) && (semid) <= tmax_semid)) {
+	if (!VALID_SEMID(semid)) {
 		return(E_ID);
 	}
@@ -436,5 +559,5 @@
 
 	/*
-	 *  åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ã®æ¤æ»
+	 *  ã»ããã©åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ã®æ¤æ»
 	 */
 	if (p_seminib != &(seminib_table[INDEX_SEM(semid)])) {
@@ -454,16 +577,33 @@
 	if (semcnt == 0) {
 		p_queue = p_semcb->wait_queue.p_next;
+		pri = TMIN_TPRI;
 		while (p_queue != &(p_semcb->wait_queue)) {
 			p_tcb = (TCB *) p_queue;
+			if (!VALID_TCB(p_tcb)) {
+				return(E_SYS_LINENO);
+			}
+
+			/*
+			 *  ã­ã¥ã¼ãã¿ã¹ã¯åªå
+åº¦é ã«ãªã£ã¦ãããã®æ¤æ»
+			 */
+			if ((p_seminib->sematr & TA_TPRI) != 0U) {
+				if (p_tcb->priority < pri) {
+					return(E_SYS_LINENO);
+				}
+			}
+			pri = p_tcb->priority;
+
+			/*
+			 *  ã¿ã¹ã¯ç¶æ
+ã®æ¤æ»
+			 */
+			if (p_tcb->tstat != TS_WAITING_SEM) {
+				return(E_SYS_LINENO);
+			}
+			if (p_semcb != ((WINFO_SEM *)(p_tcb->p_winfo))->p_semcb) {
+				return(E_SYS_LINENO);
+			}
 			p_queue = p_queue->p_next;
-			if (!VALID_TCB(p_tcb)) {
-				return(E_SYS_LINENO);
-			}
-			if (p_tcb->tstat != TS_WAITING_SEM) {
-				return(E_SYS_LINENO);
-			}
-			if (p_semcb != ((WINFO_SEM *)(p_tcb->p_winfo))->p_semcb) {
-				return(E_SYS_LINENO);
-			}
 		}
 	}
@@ -485,4 +625,12 @@
 	ID		semid;
 	ER		ercd;
+
+	/*
+	 *  ã¹ã±ã¸ã¥ã¼ãªã³ã°ã®ããã®ãã¼ã¿æ§é ã®æ¤æ»
+	 */
+	ercd = bit_schedcb();
+	if (ercd != E_OK) {
+		return(ercd);
+	}
 
 	/*
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_messagebuf1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_messagebuf1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -178,5 +178,5 @@
  *		assert(strncmp(buf1, string3, 11) == 0)
  *		snd_mbf(MBF1, string1, 16)		... (A-3)(C-3)ï¼ä½¿ç¨ï¼16ã27,0ã7
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2ï¼ç¶ãï¼==
  *	15:	slp_tsk()
@@ -185,5 +185,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	17:	wup_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2ï¼ç¶ãï¼==
  *	18:	snd_mbf(MBF1, string3, 4)		... (A-4)
@@ -285,5 +285,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -292,5 +292,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		ã¡ãã»ã¼ã¸ãããã¡ã®ãã¹ã(1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_messagebuf1.cfg 263 2014-10-05 13:30:34Z ertl-hiro $
+ *  $Id: test_messagebuf1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_messagebuf1.h"
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_messagebuf1.h 2 2014-01-11 03:50:35Z ertl-hiro $
+ *  $Id: test_messagebuf1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.c
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_messagebuf2.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_messagebuf2.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -132,5 +132,5 @@
  *	1:	act_tsk(TASK2)
  *		act_tsk(TASK3)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-1ï¼åªå
 åº¦ï¼ä¸­ï¼1åã ==
@@ -141,10 +141,10 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	4:	ter_tsk(TASK2)									... (A-1)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_PROC) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK1ï¼ç¶ãï¼==
  *	5:	rcv_mbf(MBF1, buf1) -> 26
  *		assert(strncmp(buf1, string2, 26) == 0)
  *		act_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-2ï¼åªå
 åº¦ï¼ä¸­ï¼2åã ==
@@ -172,5 +172,5 @@
  *		assert(strncmp(buf1, string3, 10) == 0)
  *		act_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼åªå
 åº¦ï¼ä¸­ï¼4åã ==
@@ -180,5 +180,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	18:	rel_wai(TASK2)									... (B-1)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	19:	slp_tsk()
@@ -187,5 +187,5 @@
  *		assert(strncmp(buf1, string2, 26) == 0)
  *		wup_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	21:	snd_mbf(MBF1, string1, 26) -> E_RLWAI
@@ -212,5 +212,5 @@
  *	31:	rcv_mbf(MBF1, buf1) -> 10
  *		assert(strncmp(buf1, string3, 10) == 0)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	32:	snd_mbf(MBF1, string1, 26) -> E_RLWAI
@@ -218,5 +218,5 @@
  *	33:	snd_mbf(MBF1, string2, 26)
  *	== TASK1ï¼ç¶ãï¼==
- *	34:	sta_alm(ALM1, 1000U)
+ *	34:	sta_alm(ALM1, TEST_TIME_PROC) ...  ALM1-1ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-1 ==
@@ -225,5 +225,5 @@
  *		RETURN
  *	== TASK1ï¼ç¶ãï¼==
- *	36:	tslp_tsk(1000U) -> E_TMOUT
+ *	36:	tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	37:	slp_tsk()
@@ -232,5 +232,5 @@
  *		assert(strncmp(buf1, string2, 26) == 0)
  *		wup_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	39:	snd_mbf(MBF1, string1, 26) -> E_RLWAI
@@ -238,5 +238,5 @@
  *	40:	snd_mbf(MBF1, string3, 10)
  *	== TASK1ï¼ç¶ãï¼==
- *	41:	sta_alm(ALM1, 1000U)
+ *	41:	sta_alm(ALM1, TEST_TIME_PROC) ...  ALM1-2ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-2 ==
@@ -256,5 +256,5 @@
  *	48:	snd_mbf(MBF1, string3, 10)
  *	== TASK3ï¼ç¶ãï¼==
- *	49:	sta_alm(ALM1, 1000U)
+ *	49:	sta_alm(ALM1, TEST_TIME_PROC) ...  ALM1-3ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-3 ==
@@ -267,13 +267,15 @@
  *		slp_tsk()
  *	== TASK2-4ï¼ç¶ãï¼==
-  *	52:	tsnd_mbf(MBF1, string1, 26, 1000U) -> E_TMOUT	... (D-1)
+ *	52:	tsnd_mbf(MBF1, string1, 26, TEST_TIME_CP) -> E_TMOUT	... (D-1)
+ *											... TASK2-4ãå®è¡åéããã¾ã§
  *	== TASK3ï¼ç¶ãï¼==
  *	53:	snd_mbf(MBF1, string2, 26)
  *	== TASK2-4ï¼ç¶ãï¼==
- *	54:	tslp_tsk(1000U) -> E_TMOUT
+ *	54:	tslp_tsk(2 * TEST_TIME_PROC) -> E_TMOUT ... TASK2-4ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	55:	rcv_mbf(MBF1, buf1) -> 26
  *		assert(strncmp(buf1, string2, 26) == 0)
- *	56:	tsnd_mbf(MBF1, string1, 26, 1000U) -> E_TMOUT	... (D-2)
+ *	56:	tsnd_mbf(MBF1, string1, 26, TEST_TIME_CP) -> E_TMOUT	... (D-2)
+ *											... TASK2-4ãå®è¡åéããã¾ã§
  *	== TASK3ï¼ç¶ãï¼==
  *	57:	snd_mbf(MBF1, string3, 10)
@@ -285,5 +287,6 @@
  *	60:	wup_tsk(TASK2)
  *	== TASK2-4ï¼ç¶ãï¼==
- *	61:	tsnd_mbf(MBF1, string1, 26, 1000U) -> E_TMOUT	... (D-3)
+ *	61:	tsnd_mbf(MBF1, string1, 26, 4 * TEST_TIME_CP) -> E_TMOUT	... (D-3)
+ *											... TASK2-4ãå®è¡åéããã¾ã§
  *	== TASK3ï¼ç¶ãï¼==
  *	62:	wup_tsk(TASK1)
@@ -377,5 +380,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -384,5 +387,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(TEST_TIME_PROC);
 	check_ercd(ercd, E_TMOUT);
 
@@ -396,5 +399,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -419,5 +422,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -426,5 +429,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -438,5 +441,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -458,9 +461,9 @@
 	check_assert(strncmp(buf1, string3, 10) == 0);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
 	check_point(34);
-	ercd = sta_alm(ALM1, 1000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -469,5 +472,5 @@
 
 	check_point(36);
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -481,9 +484,9 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
 	check_point(41);
-	ercd = sta_alm(ALM1, 1000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -594,9 +597,9 @@
 
 		check_point(52);
-		ercd = tsnd_mbf(MBF1, string1, 26, 1000U);
+		ercd = tsnd_mbf(MBF1, string1, 26, TEST_TIME_CP);
 		check_ercd(ercd, E_TMOUT);
 
 		check_point(54);
-		ercd = tslp_tsk(1000U);
+		ercd = tslp_tsk(TEST_TIME_PROC);
 		check_ercd(ercd, E_TMOUT);
 
@@ -608,5 +611,5 @@
 
 		check_point(56);
-		ercd = tsnd_mbf(MBF1, string1, 26, 1000U);
+		ercd = tsnd_mbf(MBF1, string1, 26, TEST_TIME_CP);
 		check_ercd(ercd, E_TMOUT);
 
@@ -616,5 +619,5 @@
 
 		check_point(61);
-		ercd = tsnd_mbf(MBF1, string1, 26, 1000U);
+		ercd = tsnd_mbf(MBF1, string1, 26, 4 * TEST_TIME_CP);
 		check_ercd(ercd, E_TMOUT);
 
@@ -708,5 +711,5 @@
 
 	check_point(49);
-	ercd = sta_alm(ALM1, 1000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		ã¡ãã»ã¼ã¸ãããã¡ã®ãã¹ã(2)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_messagebuf2.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: test_messagebuf2.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_messagebuf2.h"
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_messagebuf2.h 2 2014-01-11 03:50:35Z ertl-hiro $
+ *  $Id: test_messagebuf2.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/ovrhdr/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/include/kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -567,6 +567,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/Makefile.kernel	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 236 2014-09-28 16:24:33Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -134,24 +134,24 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(overrun) $(overrun:.o=.s) $(overrun:.o=.d): overrun.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(overrun) $(overrun:.o=.s): overrun.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.tf	(revision 305)
+++ 	(revision )
@@ -1,430 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-/* kernel_cfg.h */$NL$
-#ifndef TOPPERS_KERNEL_CFG_H$NL$
-#define TOPPERS_KERNEL_CFG_H$NL$
-
-$
-$  kernel_cfg.cã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/* kernel_cfg.c */$NL$
-#include "kernel/kernel_int.h"$NL$
-#include "kernel_cfg.h"$NL$
-$NL$
-
-#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)$NL$
-#error The kernel does not match this configuration file.$NL$
-#endif$NL$
-$NL$
-
-$ 
-$  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
-$ 
-/*$NL$
-$SPC$*  Include Directives (#include)$NL$
-$SPC$*/$NL$
-$NL$
-$INCLUDES$
-$NL$
-
-$
-$  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
-$
-$IF !ISFUNCTION("ALLOC_STACK")$
-$FUNCTION ALLOC_STACK$
-$	// å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
-	static STK_T $ARGV[1]$[COUNT_STK_T($ARGV[2]$)];$NL$
-	$RESULT = FORMAT("ROUND_STK_T(%1%)", ARGV[2])$
-$END$
-$END$
-
-$
-$  éç¥ãã³ãã©ã®çæé¢æ°
-$
-$FUNCTION GENERATE_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$par1 = ARGV[2]$
-	$par2 = ARGV[3]$
-	$text_line = ARGV[6]$
-	$objid = ARGV[7]$
-	$apiname = ARGV[8]$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode == TNFY_HANDLER || nfymode1 == TNFY_SETVAR
-								|| nfymode1 == TNFY_SETFLG
-								|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$numpar = 2$
-		$epar1 = ARGV[4]$
-		$epar2 = ARGV[5]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$numpar = 1$
-		$epar1 = ARGV[3]$
-		$epar2 = ARGV[4]$
-	$END$
-
-$	// ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
-	$IF (numpar == 2 && !LENGTH(par2))
-					|| (nfymode2 != 0 && !LENGTH(epar1))
-					|| (nfymode2 == TENFY_SETFLG && !LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
-		$ERROR text_line$
-			$FORMAT(_("too few parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF (nfymode2 == 0 && LENGTH(epar1))
-					|| (nfymode2 != TENFY_SETFLG && LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãå¤ãããå ´å
-		$ERROR text_line$
-			$FORMAT(_("too many parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF nfymode == TNFY_HANDLER$
-$		// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
-		$funcname = FORMAT("(NFYHDR)(%s)", par2)$
-	$ELSE$
-$		// éç¥ãã³ãã©ã®é¢æ°å
-		$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$		// ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
-$		// å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
-è¦ï¼
-		$IF nfymode2 == TENFY_SETVAR ||  nfymode2 == TENFY_INCVAR$
-			intptr_t *const $funcname$_p_evar =
-			$SPC$(intptr_t *)($epar1$);$NL$$NL$
-		$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-			const ID $funcname$_etskid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SIGSEM$
-			const ID $funcname$_esemid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SETFLG$
-			const ID $funcname$_eflgid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SNDDTQ$
-			const ID $funcname$_edtqid = $epar1$;$NL$$NL$
-		$END$
-
-$		// é¢æ°ã®å
-é ­é¨åã®çæ
-		static void$NL$
-		$funcname$(intptr_t exinf)$NL$
-		{$NL$
-
-		$IF nfymode2 == 0$
-$			// ã¨ã©ã¼éç¥ããªãå ´å
-			$error_code = "(void) "$
-		$ELSE$
-$			// ã¨ã©ã¼éç¥ãããå ´å
-			$TAB$ER		ercd;$NL$
-			$NL$
-			$error_code = "ercd = "$
-		$END$
-
-$		// ã¤ãã³ãéç¥å¦çã®å¦ç
-		$IF nfymode1 == TNFY_SETVAR && nfymode2 == 0$
-$			// å¤æ°ã®è¨­å®
-			$TAB$*((intptr_t *) exinf) = ($par2$);$NL$
-		$ELIF nfymode1 == TNFY_INCVAR && nfymode2 == 0$
-$			// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-			$TAB$*((intptr_t *) exinf) += 1;$NL$
-		$ELIF nfymode1 == TNFY_ACTTSK$
-$			// ã¿ã¹ã¯ã®èµ·å
-			$TAB$$error_code$act_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_WUPTSK$
-$			// ã¿ã¹ã¯ã®èµ·åº
-			$TAB$$error_code$wup_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SIGSEM$
-$			// ã»ããã©ã®è¿å´
-			$TAB$$error_code$sig_sem((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SETFLG$
-$			// ã¤ãã³ããã©ã°ã®ã»ãã
-			$TAB$$error_code$set_flg(((ID) exinf), $par2$);$NL$
-		$ELIF nfymode1 == TNFY_SNDDTQ$
-$			// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-			$TAB$$error_code$psnd_dtq(((ID) exinf), $par2$);$NL$
-		$ELSE$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-									"nfymode", nfymode, objid, apiname)$
-			$END$
-		$END$
-
-		$IF nfymode2 != 0$
-$			// ã¨ã©ã¼éç¥å¦çã®å¦ç
-			$TAB$if (ercd != E_OK) {$NL$
-
-			$IF nfymode2 == TENFY_SETVAR$
-$				// å¤æ°ã®è¨­å®
-				$TAB$$TAB$*$funcname$_p_evar = (intptr_t) ercd;$NL$
-			$ELIF nfymode2 == TENFY_INCVAR$
-$				// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-				$TAB$$TAB$*$funcname$_p_evar += 1;$NL$
-			$ELIF nfymode2 == TENFY_ACTTSK$
-$				// ã¿ã¹ã¯ã®èµ·å
-				$TAB$$TAB$(void) act_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_WUPTSK$
-$				// ã¿ã¹ã¯ã®èµ·åº
-				$TAB$$TAB$(void) wup_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_SIGSEM$
-$				// ã»ããã©ã®è¿å´
-				$TAB$$TAB$(void) sig_sem($funcname$_esemid);$NL$
-			$ELIF nfymode2 == TENFY_SETFLG$
-$				// ã¤ãã³ããã©ã°ã®ã»ãã
-				$TAB$$TAB$(void) set_flg($funcname$_eflgid, $epar2$);$NL$
-			$ELIF nfymode2 == TENFY_SNDDTQ$
-$				// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-				$TAB$$TAB$(void) psnd_dtq
-								($funcname$_edtqid, (intptr_t) ercd);$NL$
-			$ELSE$
-				$ERROR text_line$E_PAR:$SPC$
-					$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-				$END$
-			$END$
-
-			$TAB$}$NL$
-		$END$
-
-$		// é¢æ°ã®æ«å°¾é¨åã®çæ
-		}$NL$
-		$NL$
-	$END$
-	$RESULT = funcname$
-$END$
-
-$
-$  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
-$
-$INCLUDE "kernel/task.tf"$
-$INCLUDE "kernel/semaphore.tf"$
-$INCLUDE "kernel/eventflag.tf"$
-$INCLUDE "kernel/dataqueue.tf"$
-$INCLUDE "kernel/pridataq.tf"$
-$INCLUDE "kernel/mutex.tf"$
-$INCLUDE "kernel/mempfix.tf"$
-$INCLUDE "kernel/cyclic.tf"$
-$INCLUDE "kernel/alarm.tf"$
-$INCLUDE "kernel/overrun.tf"$
-$INCLUDE "kernel/interrupt.tf"$
-$INCLUDE "kernel/exception.tf"$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-$ 
-/*$NL$
-$SPC$*  Stack Area for Non-task Context$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF !LENGTH(ICS.ORDER_LIST)$
-$	// DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
-	#ifdef DEFAULT_ISTK$NL$
-	$NL$
-	#define TOPPERS_ISTKSZ		DEFAULT_ISTKSZ$NL$
-	#define TOPPERS_ISTK		DEFAULT_ISTK$NL$
-	$NL$
-	#else /* DEAULT_ISTK */$NL$
-	$NL$
-	$istksz = ALLOC_STACK("_kernel_istack", "DEFAULT_ISTKSZ")$$NL$
-	#define TOPPERS_ISTKSZ		$istksz$$NL$
-	#define TOPPERS_ISTK		_kernel_istack$NL$
-	$NL$
-	#endif /* DEAULT_ISTK */$NL$
-$ELSE$
-
-$	// éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
-	$IF LENGTH(ICS.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_ICS")$$END$
-	$END$
-
-$	// istkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼ããã
-$	// å°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
-	$IF ICS.ISTKSZ[1] <= 0 || (TARGET_MIN_ISTKSZ
-									&& ICS.ISTKSZ[1] < TARGET_MIN_ISTKSZ)$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' in %3%"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-$ 	// istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
-	$IF !EQ(ICS.ISTK[1], "NULL") && CHECK_STKSZ_ALIGN
-							&& (ICS.ISTKSZ[1] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-	$IF EQ(ICS.ISTK[1], "NULL")$
-$		// ã¹ã¿ãã¯é åã®èªåå²ä»ã
-		$istksz = ALLOC_STACK("_kernel_istack", ICS.ISTKSZ[1])$$NL$
-		#define TOPPERS_ISTKSZ		$istksz$$NL$
-		#define TOPPERS_ISTK		_kernel_istack$NL$
-	$ELSE$
-		#define TOPPERS_ISTKSZ		($ICS.ISTKSZ[1]$)$NL$
-		#define TOPPERS_ISTK		(void *)($ICS.ISTK[1]$)$NL$
-	$END$
-$END$
-$NL$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-const size_t	_kernel_istksz = TOPPERS_ISTKSZ;$NL$
-STK_T *const	_kernel_istk = TOPPERS_ISTK;$NL$
-$NL$
-#ifdef TOPPERS_ISTKPT$NL$
-STK_T *const	_kernel_istkpt = TOPPERS_ISTKPT(TOPPERS_ISTK, TOPPERS_ISTKSZ);$NL$
-#endif /* TOPPERS_ISTKPT */$NL$
-$NL$
-
-$ 
-$  ã¿ã¤ã ã¤ãã³ãç®¡ç
-$ 
-/*$NL$
-$SPC$*  Time Event Management$NL$
-$SPC$*/$NL$
-$NL$
-TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];$NL$
-$NL$
-
-$ 
-$  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
-$ 
-/*$NL$
-$SPC$*  Module Initialization Function$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_initialize_object(void)$NL$
-{$NL$
-$FOREACH func (initfuncs)$
-	$TAB$$func$$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  åæåã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Initialization Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_inirtn(void)$NL$
-{$NL$
-$FOREACH order INI.ORDER_LIST$
-$ 	// iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF INI.INIATR[order] != 0$
-		$ERROR INI.TEXT_LINE[order]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"iniatr", INI.INIATR[order], "inirtn",
-						INI.INIRTN[order], "ATT_INI")$
-		$END$
-	$END$
-	$TAB$((INIRTN)($INI.INIRTN[order]$))((intptr_t)($INI.EXINF[order]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Termination Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_terrtn(void)$NL$
-{$NL$
-$FOREACH rorder TER.RORDER_LIST$
-$ 	// teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF TER.TERATR[rorder] != 0$
-		$ERROR TER.TEXT_LINE[rorder]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"teratr", TER.TERATR[rorder], "terrtn",
-						TER.TERRTN[rorder], "ATT_TER")$
-		$END$
-	$END$
-	$TAB$((TERRTN)($TER.TERRTN[rorder]$))((intptr_t)($TER.EXINF[rorder]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$
-$  kernel_cfg.hã®æ«å°¾é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#endif /* TOPPERS_KERNEL_CFG_H */$NL$
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.trb	(revision 306)
@@ -0,0 +1,491 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel.trb 670 2016-03-03 15:08:11Z ertl-hiro $
+# 
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+#
+$timeStampFileName = "kernel_cfg.timestamp"
+
+#
+#  kernel_cfg.hã®å
+é ­é¨åã®çæ
+#
+$kernelCfgH = GenFile.new("kernel_cfg.h")
+$kernelCfgH.add(<<EOS)
+/* kernel_cfg.h */
+#ifndef TOPPERS_KERNEL_CFG_H
+#define TOPPERS_KERNEL_CFG_H
+EOS
+
+#
+#  kernel_cfg.cã®å
+é ­é¨åã®çæ
+#
+$kernelCfgC = GenFile.new("kernel_cfg.c")
+$kernelCfgC.add(<<EOS)
+/* kernel_cfg.c */
+#include "kernel/kernel_int.h"
+#include "kernel_cfg.h"
+
+#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)
+#error The kernel does not match this configuration file.
+#endif
+EOS
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+#
+$kernelCfgC.comment_header("Include Directives")
+$includeFiles.each do |file|
+  $kernelCfgC.add("#include #{file}")
+end
+$kernelCfgC.add()
+
+#
+#  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+#
+#  ã¹ã¿ãã¯é åã®å®ç¾©åã¨ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºè¨è¿°ãé
+åã§è¿ãï¼
+#
+unless defined? AllocStack()
+  def AllocStack(stack, size)
+    # å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
+    $kernelCfgC.add("static STK_T #{stack}[COUNT_STK_T(#{size})];")
+    return("ROUND_STK_T(#{size})")
+  end
+end
+
+#
+#  ã«ã¼ãã«ãªãã¸ã§ã¯ãã«é¢ããæ
+å ±ã®çæï¼ä»®æ³ã¯ã©ã¹ï¼
+#
+class KernelObject
+  def initialize(obj, object, obj_s = obj)
+    @obj = obj
+    @OBJ = obj.tr("a-z", "A-Z")
+    @object = object
+    @obj_s = obj_s
+    @OBJ_S = obj_s.tr("a-z", "A-Z")
+    @objid = (obj + "id").to_sym
+    @api = "CRE_#{@OBJ}".to_sym
+  end
+
+  def generate()
+    # kernel_cfg.hã®çæ
+    $kernelCfgH.add("#define TNUM_#{@OBJ}ID\t#{$cfgData[@api].size}")
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+    $cfgData[@api].sort.each do |key, params|
+      $kernelCfgH.add("#define #{params[@objid]}\t#{params[@objid].val}")
+    end
+    $kernelCfgH.add()
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
+    if $USE_EXTERNAL_ID
+      $cfgData[@api].sort.each do |key, params|
+        $kernelCfgC.add("const ID #{params[@objid]}_id" \
+										" = #{params[@objid].val};")
+      end
+      $kernelCfgC.add()
+    end
+
+    # ãªãã¸ã§ã¯ãIDçªå·ã®æå¤§å¤
+    $kernelCfgC.add2("const ID _kernel_tmax_#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_#{@OBJ}ID - 1);")
+
+    # ãã¼ã¿æ§é 
+    if $cfgData[@api].size > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      $cfgData[@api].sort.each do |key, params|
+        prepare(key, params)
+      end
+
+      # ãªãã¸ã§ã¯ãå
+¨ä½ã«å¯¾ãã¦å¿
+è¦ãªã¡ã¢ãªé åã®çæï¼ãªãã·ã§ã³ï¼
+      if respond_to?(:generateData)
+        generateData()
+      end
+
+      # ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+      $kernelCfgC.add("const #{@OBJ_S}INIB _kernel_#{@obj_s}inib_table" \
+													"[TNUM_#{@OBJ}ID] = {")
+      $cfgData[@api].sort.each_with_index do |(key, params), index|
+        $kernelCfgC.add(",") if index > 0
+        $kernelCfgC.append("\t{ " + generateInib(key, params) + " }")
+      end
+      $kernelCfgC.add
+      $kernelCfgC.add2("};")
+
+      # ãªãã¸ã§ã¯ãç®¡çãã­ãã¯ã®çæ
+      $kernelCfgC.add2("#{@OBJ_S}CB _kernel_#{@obj_s}cb_table" \
+													"[TNUM_#{@OBJ}ID];")
+
+      # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+      $initializeFunctions.push("_kernel_initialize_#{@object}();")
+    else
+      # ãªãã¸ã§ã¯ãã1ã¤ããªãå ´å
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const #{@OBJ_S}INIB, " \
+										"_kernel_#{@obj_s}inib_table);")
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{@OBJ_S}CB, " \
+										"_kernel_#{@obj_s}cb_table);")
+    end
+  end
+end
+
+#
+#  éç¥ãã³ãã©ã®çæé¢æ°
+#
+def generateNotifyHandler(key, params, objid)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode == $TNFY_HANDLER || nfymode1 == $TNFY_SETVAR \
+								|| nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+	numpar = 2
+	epar1 = params[:par3]
+	epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    numpar = 1
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  # ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
+  if (numpar == 2 && par2.nil?) || (nfymode2 != 0 && epar1.nil?) \
+								|| (nfymode2 == $TENFY_SETFLG && epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
+    error_api(params, "too few parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif (nfymode2 == 0 && !epar1.nil?) \
+					|| (nfymode2 != $TENFY_SETFLG && !epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãå¤ãããå ´å
+    error_api(params, "too many parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif nfymode == $TNFY_HANDLER
+    # ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
+    funcname = "(NFYHDR)(#{par2})"
+  else
+    # éç¥ãã³ãã©ã®é¢æ°å
+    funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+    # ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
+    # å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
+è¦ï¼
+    if nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR
+      $kernelCfgC.add2("intptr_t *const #{funcname}_p_evar =" \
+											" (intptr_t *)(#{epar1});")
+    elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+      $kernelCfgC.add2("const ID #{funcname}_etskid = #{epar1};")
+    elsif nfymode2 == $TENFY_SIGSEM
+      $kernelCfgC.add2("const ID #{funcname}_esemid = #{epar1};")
+    elsif nfymode2 == $TENFY_SETFLG
+      $kernelCfgC.add2("const ID #{funcname}_eflgid = #{epar1};")
+    elsif nfymode2 == $TENFY_SNDDTQ
+      $kernelCfgC.add2("const ID #{funcname}_edtqid = #{epar1};")
+    end
+
+    # é¢æ°ã®å
+é ­é¨åã®çæ
+    $kernelCfgC.add("static void")
+    $kernelCfgC.add("#{funcname}(intptr_t exinf)")
+    $kernelCfgC.add("{")
+
+    if nfymode2 == 0
+      # ã¨ã©ã¼éç¥ããªãå ´å
+      errorCode = "(void) "
+    else
+      # ã¨ã©ã¼éç¥ãããå ´å
+      $kernelCfgC.add2("\tER\tercd;")
+      errorCode = "ercd = "
+    end
+
+    # ã¤ãã³ãéç¥å¦çã®å¦ç
+    if nfymode1 == $TNFY_SETVAR && nfymode2 == 0
+      # å¤æ°ã®è¨­å®
+      $kernelCfgC.add("\t*((intptr_t *) exinf) = (#{par2});")
+    elsif nfymode1 == $TNFY_INCVAR && nfymode2 == 0
+      # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+      $kernelCfgC.add("\t(void) loc_cpu();")
+      $kernelCfgC.add("\t*((intptr_t *) exinf) += 1;")
+      $kernelCfgC.add("\t(void) unl_cpu();")
+    elsif nfymode1 == $TNFY_ACTTSK
+      # ã¿ã¹ã¯ã®èµ·å
+      $kernelCfgC.add("\t#{errorCode}act_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_WUPTSK
+      # ã¿ã¹ã¯ã®èµ·åº
+      $kernelCfgC.add("\t#{errorCode}wup_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_SIGSEM
+      # ã»ããã©ã®è¿å´
+      $kernelCfgC.add("\t#{errorCode}sig_sem((ID) exinf);")
+    elsif nfymode1 == $TNFY_SETFLG
+      # ã¤ãã³ããã©ã°ã®ã»ãã
+      $kernelCfgC.add("\t#{errorCode}set_flg(((ID) exinf), #{par2});")
+    elsif nfymode1 == $TNFY_SNDDTQ
+      # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+      $kernelCfgC.add("\t#{errorCode}psnd_dtq(((ID) exinf), #{par2});")
+    else
+      error_illegal_id("E_PAR", params, :nfymode, objid)
+    end
+			
+    if nfymode2 != 0
+      # ã¨ã©ã¼éç¥å¦çã®å¦ç
+      $kernelCfgC.add("\tif (ercd != E_OK) {")
+
+
+      if nfymode2 == $TENFY_SETVAR
+        # å¤æ°ã®è¨­å®
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar = (intptr_t) ercd;")
+      elsif nfymode2 == $TENFY_INCVAR
+        # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+        $kernelCfgC.add("\t\t(void) loc_cpu();")
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar += 1;")
+        $kernelCfgC.add("\t\t(void) unl_cpu();")
+      elsif nfymode2 == $TENFY_ACTTSK
+        # ã¿ã¹ã¯ã®èµ·å
+        $kernelCfgC.add("\t\t(void) act_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_WUPTSK
+        # ã¿ã¹ã¯ã®èµ·åº
+        $kernelCfgC.add("\t\t(void) wup_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_SIGSEM
+        # ã»ããã©ã®è¿å´
+        $kernelCfgC.add("\t\t(void) sig_sem(#{funcname}_esemid);")
+      elsif nfymode2 == $TENFY_SETFLG
+        # ã¤ãã³ããã©ã°ã®ã»ãã
+        $kernelCfgC.add("\t\t(void) set_flg(#{funcname}_eflgid, #{epar2});")
+      elsif nfymode2 == $TENFY_SNDDTQ
+        # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+        $kernelCfgC.add("\t\t(void) psnd_dtq(#{funcname}_edtqid," \
+													" (intptr_t) ercd);")
+      else
+        error_illegal_id("E_PAR", params, :nfymode, objid)
+      end
+      $kernelCfgC.add("\t}")
+    end
+
+    # é¢æ°ã®æ«å°¾é¨åã®çæ
+    $kernelCfgC.add2("}")
+  end
+  return(funcname)
+end
+
+#
+#  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+#
+$initializeFunctions = []
+IncludeTrb("kernel/task.trb")
+IncludeTrb("kernel/semaphore.trb")
+IncludeTrb("kernel/eventflag.trb")
+IncludeTrb("kernel/dataqueue.trb")
+IncludeTrb("kernel/pridataq.trb")
+IncludeTrb("kernel/mutex.trb")
+IncludeTrb("kernel/mempfix.trb")
+IncludeTrb("kernel/cyclic.trb")
+IncludeTrb("kernel/alarm.trb")
+IncludeTrb("kernel/overrun.trb")
+IncludeTrb("kernel/interrupt.trb")
+IncludeTrb("kernel/exception.trb")
+
+#
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.comment_header("Stack Area for Non-task Context")
+
+if $cfgData[:DEF_ICS].size == 0
+  # DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  if $DEFAULT_ISTK.nil?
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", "DEFAULT_ISTKSZ")
+    istk = "_kernel_istack"
+  else
+    istksz = "DEFAULT_ISTKSZ"
+    istk = "DEFAULT_ISTK"
+  end
+else
+  # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
+  if $cfgData[:DEF_ICS].size > 1
+    error("E_OBJ: too many DEF_ICS")
+  end
+
+  # DEF_ICSãããå ´åã®å¦ç
+  params = $cfgData[:DEF_ICS][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:istk] ||= "NULL"
+
+  # istkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+  # ãããå°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
+  if params[:istksz] < $TARGET_MIN_ISTKSZ
+    error_wrong("E_PAR", params, :istksz, "too small")
+  end
+
+  if params[:istk] == "NULL"
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", params[:istksz])
+    istk = "_kernel_istack"
+  else
+    # istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
+    if (params[:istksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :istksz, "not aligned")
+    end
+
+    istksz = "(#{params[:istksz]})"
+    istk = "(void *)(#{params[:istk]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_istksz = #{istksz};
+STK_T *const _kernel_istk = #{istk};
+
+#ifdef TOPPERS_ISTKPT
+STK_T *const _kernel_istkpt = TOPPERS_ISTKPT(#{istk}, #{istksz});
+#endif /* TOPPERS_ISTKPT */
+EOS
+
+#
+#  ã¿ã¤ã ã¤ãã³ãç®¡ç
+#
+$kernelCfgC.comment_header("Time Event Management")
+$kernelCfgC.add(<<EOS)
+TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];
+EOS
+
+#
+#  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
+#
+$kernelCfgC.comment_header("Module Initialization Function")
+$kernelCfgC.append(<<EOS)
+void
+_kernel_initialize_object(void)
+{
+EOS
+$initializeFunctions.each do |func|
+  $kernelCfgC.add("\t#{func}")
+end
+$kernelCfgC.add2("}")
+
+#
+#  åæåã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Initialization Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_INI].each do |key, params|
+  # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:iniatr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
+  end
+end
+
+# åæåã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_inirtn(void)
+{
+EOS
+$cfgData[:ATT_INI].each do |key, params|
+  $kernelCfgC.add("\t((INIRTN)(#{params[:inirtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  çµäºå¦çã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Termination Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_TER].each do |key, params|
+  # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:teratr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
+  end
+end
+
+# çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_terrtn(void)
+{
+EOS
+$cfgData[:ATT_TER].reverse_each do |key, params|
+  $kernelCfgC.add("\t((TERRTN)(#{params[:terrtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  kernel_cfg.hã®æ«å°¾é¨åã®çæ
+#
+$kernelCfgH.append(<<EOS)
+#endif /* TOPPERS_KERNEL_CFG_H */
+EOS
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.csv	(revision 305)
+++ 	(revision )
@@ -1,17 +1,0 @@
-tsk,CRE_TSK,#tskid { .tskatr &exinf &task +itskpri .stksz &stk },,
-sem,CRE_SEM,#semid { .sematr .isemcnt .maxsem },,
-flg,CRE_FLG,#flgid { .flgatr .iflgptn },,
-dtq,CRE_DTQ,#dtqid { .dtqatr .dtqcnt &dtqmb },,
-pdq,CRE_PDQ,#pdqid { .pdqatr .pdqcnt +maxdpri &pdqmb },,
-mtx,CRE_MTX,#mtxid { .mtxatr +ceilpri? },,
-mpf,CRE_MPF,#mpfid { .mpfatr .blkcnt .blksz &mpf &mpfmb },,
-cyc,CRE_CYC,#cycid { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs },,
-alm,CRE_ALM,#almid { .almatr { .nfymode &par1 &par2? &par3? &par4? } },,
-ovr,DEF_OVR,{ .ovratr &ovrhdr },-1,
-int,CFG_INT,.intno { .intatr +intpri },,
-isr,CRE_ISR,#isrid { .isratr &exinf .intno &isr +isrpri },,
-inh,DEF_INH,.inhno { .inhatr &inthdr },,
-exc,DEF_EXC,.excno { .excatr &exchdr },,
-ics,DEF_ICS,{ .istksz &istk },-1,
-ini,ATT_INI,{ .iniatr &exinf &inirtn },-1,
-ter,ATT_TER,{ .teratr &exinf &terrtn },-1,
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.def	(revision 306)
@@ -0,0 +1,17 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+CRE_FLG #flgid* { .flgatr .iflgptn }
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+DEF_OVR { .ovratr &ovrhdr }
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.tf	(revision 305)
+++ 	(revision )
@@ -1,406 +1,0 @@
-$ 
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2008-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$  
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$  
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel_check.tf 463 2015-10-18 14:25:55Z ertl-hiro $
-$  
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
-$
-$FOREACH lma LMA.ORDER_LIST$
-	$start_data = SYMBOL(LMA.START_DATA[lma])$
-	$end_data = SYMBOL(LMA.END_DATA[lma])$
-	$start_idata = SYMBOL(LMA.START_IDATA[lma])$
-	$IF !LENGTH(start_data)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.START_DATA[lma])$$END$
-	$ELIF !LENGTH(end_data)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.END_DATA[lma])$$END$
-	$ELIF !LENGTH(start_idata)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.START_IDATA[lma])$$END$
-	$ELSE$
-		$BCOPY(start_idata, start_data, end_data - start_data)$
-	$END$
-$END$
-
-$
-$  éç¥æ
-å ±ã®ãã§ãã¯é¢æ°
-$
-$tmax_tskid = PEEK(SYMBOL("_kernel_tmax_tskid"), sizeof_ID)$
-$tmax_semid = PEEK(SYMBOL("_kernel_tmax_semid"), sizeof_ID)$
-$tmax_flgid = PEEK(SYMBOL("_kernel_tmax_flgid"), sizeof_ID)$
-$tmax_dtqid = PEEK(SYMBOL("_kernel_tmax_dtqid"), sizeof_ID)$
-
-$FUNCTION CHECK_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$exinf = ARGV[2]$
-	$nfyhdr = ARGV[3]$
-	$par1 = ARGV[4]$
-	$par2 = ARGV[5]$
-	$text_line = ARGV[8]$
-	$objid = ARGV[9]$
-	$apiname = ARGV[10]$
-	$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode1 == TNFY_SETVAR || nfymode1 == TNFY_SETFLG
-											|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$epar1 = ARGV[6]$
-		$epar2 = ARGV[7]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$epar1 = ARGV[5]$
-		$epar2 = ARGV[6]$
-	$END$
-
-$	// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
-	$IF nfymode == TNFY_HANDLER$
-		$tmehdr = nfyhdr$
-		$IF CHECK_FUNC_ALIGN && (tmehdr & (CHECK_FUNC_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"tmehdr", par2, objid, apiname)$
-				$END$
-		$END$
-		$IF CHECK_FUNC_NONNULL && tmehdr == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"tmehdr", par2, objid, apiname)$
-			$END$
-		$END$
-	$END$
-
-$	// ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
-	$IF nfymode1 == TNFY_SETVAR || nfymode1 == TNFY_INCVAR$
-$		// å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$p_var = exinf$
-
-$		// å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
-		$IF CHECK_INTPTR_ALIGN && (p_var & (CHECK_INTPTR_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"p_var", par1, objid, apiname)$
-			$END$
-		$END$
-		$IF CHECK_INTPTR_NONNULL && p_var == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"p_var", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_ACTTSK || nfymode1 == TNFY_WUPTSK$
-$		// ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$tskid = exinf$
-
-$		// ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
-		$IF !(TMIN_TSKID <= tskid && tskid <= tmax_tskid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"tskid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SIGSEM$
-$		// ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$semid = exinf$
-
-$		// ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
-		$IF !(TMIN_SEMID <= semid && semid <= tmax_semid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"semid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SETFLG$
-$		// ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$flgid = exinf$
-
-$		// ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
-		$IF !(TMIN_FLGID <= flgid && flgid <= tmax_flgid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"flgid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SNDDTQ$
-$		// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$dtqid = exinf$
-
-$		// ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
-		$IF !(TMIN_DTQID <= dtqid && dtqid <= tmax_dtqid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"dtqid", par1, objid, apiname)$
-			$END$
-		$END$
-	$END$
-
-$	// ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
-	$IF nfymode2 == TENFY_SETVAR || nfymode2 == TENFY_INCVAR$
-$		// å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
-		$p_var = PEEK(SYMBOL(CONCAT(funcname, "_p_evar")), sizeof_intptr_t)$
-
-$		// å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
-		$IF CHECK_INTPTR_ALIGN && (p_var & (CHECK_INTPTR_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"p_var", epar1, objid, apiname)$
-			$END$
-		$END$
-		$IF CHECK_INTPTR_NONNULL && p_var == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"p_var", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-$		// ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
-		$tskid = PEEK(SYMBOL(CONCAT(funcname, "_etskid")), sizeof_ID)$
-
-$		// ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
-		$IF !(TMIN_TSKID <= tskid && tskid <= tmax_tskid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"tskid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SIGSEM$
-$		// ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
-		$semid = PEEK(SYMBOL(CONCAT(funcname, "_esemid")), sizeof_ID)$
-
-$		// ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
-		$IF !(TMIN_SEMID <= semid && semid <= tmax_semid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"semid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SETFLG$
-$		// ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
-		$flgid = PEEK(SYMBOL(CONCAT(funcname, "_eflgid")), sizeof_ID)$
-
-$		// ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
-		$IF !(TMIN_FLGID <= flgid && flgid <= tmax_flgid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"flgid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SNDDTQ$
-$		// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
-		$dtqid = PEEK(SYMBOL(CONCAT(funcname, "_edtqid")), sizeof_ID)$
-
-$		// ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
-		$IF !(TMIN_DTQID <= dtqid && dtqid <= tmax_dtqid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"dtqid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$END$
-$END$
-
-$ 
-$  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
-$ 
-$tinib = SYMBOL("_kernel_tinib_table")$
-$FOREACH tskid TSK.ID_LIST$
-$	// ã¿ã¹ã¯ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
-	$task = PEEK(tinib + offsetof_TINIB_task, sizeof_FP)$
-	$IF CHECK_FUNC_ALIGN && (task & (CHECK_FUNC_ALIGN - 1)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"task", TSK.TASK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-	$IF CHECK_FUNC_NONNULL && task == 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"task", TSK.TASK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
-	$IF USE_TSKINICTXB$
-		$stk = GET_STK_TSKINICTXB(tinib)$
-	$ELSE$
-		$stk = PEEK(tinib + offsetof_TINIB_stk, sizeof_void_ptr)$
-	$END$
-	$IF CHECK_STACK_ALIGN && (stk & (CHECK_STACK_ALIGN - 1)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"stk", TSK.STK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-	$IF CHECK_STACK_NONNULL && stk == 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"stk", TSK.STK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-	$tinib = tinib + sizeof_TINIB$
-$END$
-
-$ 
-$  å¨æéç¥ã«é¢ãããã§ãã¯
-$ 
-$cycinib = SYMBOL("_kernel_cycinib_table")$
-$FOREACH cycid CYC.ID_LIST$
-	$exinf = PEEK(cycinib + offsetof_CYCINIB_exinf, sizeof_intptr_t)$
-	$nfyhdr = PEEK(cycinib + offsetof_CYCINIB_nfyhdr, sizeof_FP)$
-
-$	// éç¥æ
-å ±ã®ãã§ãã¯
-	$CHECK_NFYHDR(CYC.NFYMODE[cycid], exinf, nfyhdr,
-						CYC.PAR1[cycid], CYC.PAR2[cycid],
-						CYC.PAR3[cycid], CYC.PAR4[cycid],
-						CYC.TEXT_LINE[cycid], cycid, "CRE_CYC")$
-
-	$cycinib = cycinib + sizeof_CYCINIB$
-$END$
-
-$ 
-$  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
-$ 
-$alminib = SYMBOL("_kernel_alminib_table")$
-$FOREACH almid ALM.ID_LIST$
-	$exinf = PEEK(alminib + offsetof_ALMINIB_exinf, sizeof_intptr_t)$
-	$nfyhdr = PEEK(alminib + offsetof_ALMINIB_nfyhdr, sizeof_FP)$
-
-$	// éç¥æ
-å ±ã®ãã§ãã¯
-	$CHECK_NFYHDR(ALM.NFYMODE[almid], exinf, nfyhdr,
-						ALM.PAR1[almid], ALM.PAR2[almid],
-						ALM.PAR3[almid], ALM.PAR4[almid],
-						ALM.TEXT_LINE[almid], almid, "CRE_ALM")$
-
-	$alminib = alminib + sizeof_ALMINIB$
-$END$
-
-$
-$  ãªã¼ãã©ã³ãã³ãã©ã«é¢ãããã§ãã¯
-$
-$ovrinib = SYMBOL("_kernel_ovrinib")$
-$IF LENGTH(OVR.ORDER_LIST)$
-	$ovrhdr = PEEK(ovrinib + offsetof_OVRINIB_ovrhdr, sizeof_FP)$
-
-$	// ãªã¼ãã©ã³ãã³ãã©ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI2613ï¼½
-	$IF CHECK_FUNC_ALIGN && (ovrhdr & (CHECK_FUNC_ALIGN - 1)) != 0$
-		$ERROR OVR.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %4% is not aligned"),
-							"ovrhdr", OVR.OVRHDR[1], "DEF_OVR")$
-		$END$
-	$END$
-	$IF CHECK_FUNC_NONNULL && ovrhdr == 0$
-		$ERROR OVR.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is null"),
-							"ovrhdr", OVR.OVRHDR[1], "DEF_OVR")$
-		$END$
-	$END$
-$END$
-
-$ 
-$  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
-$ 
-$mpfinib = SYMBOL("_kernel_mpfinib_table")$
-$FOREACH mpfid MPF.ID_LIST$
-	$mpf = PEEK(mpfinib + offsetof_MPFINIB_mpf, sizeof_void_ptr)$
-
-$	// åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
-	$IF CHECK_MPF_ALIGN && (mpf & (CHECK_MPF_ALIGN - 1)) != 0$
-		$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"mpf", MPF.MPF[mpfid], mpfid, "CRE_MPF")$
-		$END$
-	$END$
-	$IF CHECK_MPF_NONNULL && mpf == 0$
-		$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"mpf", MPF.MPF[mpfid], mpfid, "CRE_MPF")$
-		$END$
-	$END$
-
-	$mpfinib = mpfinib + sizeof_MPFINIB$
-$END$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
-$ 
-$istk = PEEK(SYMBOL("_kernel_istk"), sizeof_void_ptr)$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
-$IF CHECK_STACK_ALIGN && (istk & (CHECK_STACK_ALIGN - 1)) != 0$
-	$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-							"istk", ICS.ISTK[1], "DEF_ICS")$
-	$END$
-$END$
-$IF CHECK_STACK_NONNULL && istk == 0$
-	$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is null"),
-							"istk", ICS.ISTK[1], "DEF_ICS")$
-	$END$
-$END$
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.trb	(revision 306)
@@ -0,0 +1,358 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel_check.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+#  
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯ãªãã
+#
+
+# 
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+# 
+$timeStampFileName = "check.timestamp"
+
+#
+#  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
+#
+if !$lmaList.nil?
+  $lmaList.each do |lma|
+    startData = SYMBOL(lma[:START_DATA])
+    endData = SYMBOL(lma[:END_DATA])
+    startIdata = SYMBOL(lma[:START_IDATA])
+    if startData.nil?
+      error_exit("symbol `lma[:START_DATA]' not found")
+    elsif endData.nil?
+      error_exit("symbol `lma[:END_DATA]' not found")
+    elsif startIdata.nil?
+      error_exit("symbol `lma[:START_IDATA]' not found")
+    else
+      BCOPY(startIdata, startData, endData - startData)
+    end
+  end
+end
+
+#
+#  éç¥æ
+å ±ã®ãã§ãã¯é¢æ°
+#
+$tmax_tskid = $TMIN_TSKID + $cfgData[:CRE_TSK].size - 1
+$tmax_semid = $TMIN_SEMID + $cfgData[:CRE_SEM].size - 1
+$tmax_flgid = $TMIN_FLGID + $cfgData[:CRE_FLG].size - 1
+$tmax_dtqid = $TMIN_DTQID + $cfgData[:CRE_DTQ].size - 1
+
+def checkNotifyHandler(key, params, objid, exinf, nfyhdr)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+  funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+    epar1 = params[:par3]
+    epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  #	ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
+  if nfymode == $TNFY_HANDLER
+    tmehdr = nfyhdr
+    params1 = params.dup
+    params1[:tmehdr] = par2
+    if (tmehdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "not aligned")
+    end
+    if $CHECK_FUNC_NONNULL && tmehdr == 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "null")
+    end
+  end
+
+  #	ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_INCVAR
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+	p_var = exinf
+    params1 = params.dup
+    params1[:p_var] = par1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif (nfymode1 == $TNFY_ACTTSK || nfymode1 == $TNFY_WUPTSK)
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    tskid = exinf
+    params1 = params.dup
+    params1[:tskid] = par1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode1 == $TNFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    semid = exinf
+    params1 = params.dup
+    params1[:semid] = par1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode1 == $TNFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    flgid = exinf
+    params1 = params.dup
+    params1[:flgid] = par1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode1 == $TNFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    dtqid = exinf
+    params1 = params.dup
+    params1[:dtqid] = par1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+
+  # ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if (nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR)
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
+    p_var = PEEK(SYMBOL(funcname + "_p_evar"), $sizeof_intptr_t)
+    params1 = params.dup
+    params1[:p_var] = epar1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
+    tskid = PEEK(SYMBOL(funcname + "_etskid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:tskid] = epar1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode2 == $TENFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
+	semid = PEEK(SYMBOL(funcname + "_esemid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:semid] = epar1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode2 == $TENFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
+    flgid = PEEK(SYMBOL(funcname + "_eflgid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:flgid] = epar1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode2 == $TENFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
+    dtqid = PEEK(SYMBOL(funcname + "_edtqid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:dtqid] = epar1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+end
+
+# 
+#  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
+# 
+tinib = SYMBOL("_kernel_tinib_table")
+$cfgData[:CRE_TSK].sort.each do |key, params|
+  task = PEEK(tinib + $offsetof_TINIB_task, $sizeof_TASK)
+
+  # ã¿ã¹ã¯ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
+  if (task & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && task == 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "null")
+  end
+
+  # ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
+  if $USE_TSKINICTXB
+    stk = GetStackTskinictxb(key, params, tinib)
+  else
+    stk = PEEK(tinib + $offsetof_TINIB_stk, $sizeof_void_ptr)
+  end
+  if (stk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && stk == 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "null")
+  end
+
+  tinib += $sizeof_TINIB
+end
+
+# 
+#  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
+# 
+mpfinib = SYMBOL("_kernel_mpfinib_table")
+$cfgData[:CRE_MPF].sort.each do |key, params|
+  mpf = PEEK(mpfinib + $offsetof_MPFINIB_mpf, $sizeof_void_ptr)
+
+  # åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
+  if (mpf & ($CHECK_MPF_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "not aligned")
+  end
+  if $CHECK_MPF_NONNULL && mpf == 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "null")
+  end
+
+  mpfinib += $sizeof_MPFINIB
+end
+
+# 
+#  å¨æéç¥ã«é¢ãããã§ãã¯
+# 
+cycinib = SYMBOL("_kernel_cycinib_table")
+$cfgData[:CRE_CYC].sort.each do |key, params|
+  exinf = PEEK(cycinib + $offsetof_CYCINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(cycinib + $offsetof_CYCINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :cycid, exinf, nfyhdr)
+
+  cycinib += $sizeof_CYCINIB
+end
+
+# 
+#  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
+# 
+alminib = SYMBOL("_kernel_alminib_table")
+$cfgData[:CRE_ALM].sort.each do |key, params|
+  exinf = PEEK(alminib + $offsetof_ALMINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(alminib + $offsetof_ALMINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :almid, exinf, nfyhdr)
+
+  alminib += $sizeof_ALMINIB
+end
+
+#
+#  ãªã¼ãã©ã³ãã³ãã©ã«é¢ãããã§ãã¯
+#
+ovrinib = SYMBOL("_kernel_ovrinib")
+if $cfgData[:DEF_OVR].size > 0
+  ovrhdr = PEEK(ovrinib + $offsetof_OVRINIB_ovrhdr, $sizeof_OVRHDR)
+
+  # ãªã¼ãã©ã³ãã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI2613ï¼½
+  if (ovrhdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_OVR][1], :ovrhdr, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && ovrhdr == 0
+    error_wrong("E_PAR", $cfgData[:DEF_OVR][1], :ovrhdr, "null")
+  end
+end
+
+# 
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
+# 
+istkAddr = SYMBOL("_kernel_istk")
+if !istkAddr.nil?
+  istk = PEEK(istkAddr, $sizeof_void_ptr)
+
+  # éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
+  if (istk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && istk == 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "null")
+  end
+end
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_def.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_def.csv	(revision 305)
+++ 	(revision )
@@ -1,137 +1,0 @@
-TOPPERS_SUPPORT_OVRHDR,#defined(TOPPERS_SUPPORT_OVRHDR)
-SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
-TA_NULL,TA_NULL
-TA_ACT,TA_ACT
-TA_NOACTQUE,TA_NOACTQUE
-TA_TPRI,TA_TPRI
-TA_WMUL,TA_WMUL
-TA_CLR,TA_CLR
-TA_CEILING,TA_CEILING
-TA_STA,TA_STA
-TA_NONKERNEL,TA_NONKERNEL
-TA_ENAINT,TA_ENAINT
-TA_EDGE,TA_EDGE
-TNFY_HANDLER,TNFY_HANDLER
-TNFY_SETVAR,TNFY_SETVAR
-TNFY_INCVAR,TNFY_INCVAR
-TNFY_ACTTSK,TNFY_ACTTSK
-TNFY_WUPTSK,TNFY_WUPTSK
-TNFY_SIGSEM,TNFY_SIGSEM
-TNFY_SETFLG,TNFY_SETFLG
-TNFY_SNDDTQ,TNFY_SNDDTQ
-TENFY_SETVAR,TENFY_SETVAR
-TENFY_INCVAR,TENFY_INCVAR
-TENFY_ACTTSK,TENFY_ACTTSK
-TENFY_WUPTSK,TENFY_WUPTSK
-TENFY_SIGSEM,TENFY_SIGSEM
-TENFY_SETFLG,TENFY_SETFLG
-TENFY_SNDDTQ,TENFY_SNDDTQ
-TMIN_TPRI,TMIN_TPRI,signed
-TMAX_TPRI,TMAX_TPRI,signed
-TMIN_DPRI,TMIN_DPRI,signed
-TMAX_DPRI,TMAX_DPRI,signed
-TMIN_ISRPRI,TMIN_ISRPRI,signed
-TMAX_ISRPRI,TMAX_ISRPRI,signed
-TBIT_FLGPTN,TBIT_FLGPTN
-TMAX_MAXSEM,TMAX_MAXSEM
-TMAX_RELTIM,TMAX_RELTIM
-TMIN_INTPRI,TMIN_INTPRI,signed
-TMAX_INTPRI,TMAX_INTPRI,signed
-TMIN_TSKID,TMIN_TSKID,signed
-TMIN_SEMID,TMIN_SEMID,signed
-TMIN_FLGID,TMIN_FLGID,signed
-TMIN_DTQID,TMIN_DTQID,signed
-TMIN_PDQID,TMIN_PDQID,signed
-TMIN_MTXID,TMIN_MTXID,signed
-TMIN_MPFID,TMIN_MPFID,signed
-TMIN_CYCID,TMIN_CYCID,signed
-TMIN_ALMID,TMIN_ALMID,signed
-OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,#defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,#defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,#defined(OMIT_INITIALIZE_EXCEPTION)
-USE_TSKINICTXB,#defined(USE_TSKINICTXB)
-TARGET_TSKATR,#defined(TARGET_TSKATR),,TARGET_TSKATR
-TARGET_INTATR,#defined(TARGET_INTATR),,TARGET_INTATR
-TARGET_INHATR,#defined(TARGET_INHATR),,TARGET_INHATR
-TARGET_ISRATR,#defined(TARGET_ISRATR),,TARGET_ISRATR
-TARGET_EXCATR,#defined(TARGET_EXCATR),,TARGET_EXCATR
-TARGET_MIN_STKSZ,#defined(TARGET_MIN_STKSZ),,TARGET_MIN_STKSZ
-TARGET_MIN_ISTKSZ,#defined(TARGET_MIN_ISTKSZ),,TARGET_MIN_ISTKSZ
-CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
-CHECK_INTPTR_ALIGN,#defined(CHECK_INTPTR_ALIGN),,CHECK_INTPTR_ALIGN
-CHECK_INTPTR_NONNULL,#defined(CHECK_INTPTR_NONNULL)
-CHECK_FUNC_ALIGN,#defined(CHECK_FUNC_ALIGN),,CHECK_FUNC_ALIGN
-CHECK_FUNC_NONNULL,#defined(CHECK_FUNC_NONNULL)
-CHECK_STACK_ALIGN,#defined(CHECK_STACK_ALIGN),,CHECK_STACK_ALIGN
-CHECK_STACK_NONNULL,#defined(CHECK_STACK_NONNULL)
-CHECK_MPF_ALIGN,#defined(CHECK_MPF_ALIGN),,CHECK_MPF_ALIGN
-CHECK_MPF_NONNULL,#defined(CHECK_MPF_NONNULL)
-sizeof_void_ptr,sizeof(void*)
-sizeof_uint_t,sizeof(uint_t)
-sizeof_size_t,sizeof(size_t)
-sizeof_intptr_t,sizeof(intptr_t)
-sizeof_ID,sizeof(ID)
-sizeof_FP,sizeof(FP)
-sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
-sizeof_EXCNO,sizeof(EXCNO)
-sizeof_TINIB,sizeof(TINIB)
-offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
-offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
-offsetof_TINIB_task,"offsetof(TINIB,task)"
-offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
-offsetof_TINIB_stksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stksz)"
-offsetof_TINIB_stk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stk)"
-sizeof_SEMINIB,sizeof(SEMINIB)
-offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
-offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
-offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
-sizeof_FLGPTN,sizeof(FLGPTN)
-sizeof_FLGINIB,sizeof(FLGINIB)
-offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
-offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
-sizeof_DTQINIB,sizeof(DTQINIB)
-offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
-offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
-offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
-sizeof_PDQINIB,sizeof(PDQINIB)
-offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
-offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
-offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
-offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
-sizeof_MTXINIB,sizeof(MTXINIB)
-offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
-offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
-sizeof_MPFINIB,sizeof(MPFINIB)
-offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
-offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
-offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
-offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
-offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
-sizeof_CYCINIB,sizeof(CYCINIB)
-offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
-offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
-offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
-offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
-offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
-sizeof_ALMINIB,sizeof(ALMINIB)
-offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
-offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
-offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
-sizeof_OVRINIB,#defined(TOPPERS_SUPPORT_OVRHDR),,sizeof(OVRINIB)
-offsetof_OVRINIB_ovratr,#defined(TOPPERS_SUPPORT_OVRHDR),,"offsetof(OVRINIB,ovratr)"
-offsetof_OVRINIB_ovrhdr,#defined(TOPPERS_SUPPORT_OVRHDR),,"offsetof(OVRINIB,ovrhdr)"
-sizeof_INHINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INHINIB)
-offset_INHINIB_inhno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhno)"
-offset_INHINIB_inhatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhatr)"
-offset_INHINIB_int_entry,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,int_entry)"
-sizeof_INTINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INTINIB)
-offset_INTINIB_intno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intno)"
-offset_INTINIB_intatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intatr)"
-offset_INTINIB_intpri,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intpri)"
-sizeof_EXCINIB,#!defined(OMIT_INITIALIZE_EXCEPTION),,sizeof(EXCINIB)
-offset_EXCINIB_excno,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excno)"
-offset_EXCINIB_excatr,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excatr)"
-offset_EXCINIB_exc_entry,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,exc_entry)"
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_rename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_rename.h	(revision 306)
@@ -194,198 +194,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  overrun.c
- */
-#define _ovrtimer_flag				__kernel_ovrtimer_flag
-#define _initialize_overrun			__kernel_initialize_overrun
-#define _ovrtimer_start				__kernel_ovrtimer_start
-#define _ovrtimer_stop				__kernel_ovrtimer_stop
-#define _call_ovrhdr				__kernel_call_ovrhdr
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _ovrinib					__kernel_ovrinib
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_sym.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_sym.def	(revision 306)
@@ -0,0 +1,148 @@
+TOPPERS_SUPPORT_OVRHDR,true,bool,defined(TOPPERS_SUPPORT_OVRHDR)
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_OVRHDR,sizeof(OVRHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_OVRINIB,sizeof(OVRINIB),,defined(TOPPERS_SUPPORT_OVRHDR)
+offsetof_OVRINIB_ovratr,"offsetof(OVRINIB,ovratr)",,defined(TOPPERS_SUPPORT_OVRHDR)
+offsetof_OVRINIB_ovrhdr,"offsetof(OVRINIB,ovrhdr)",,defined(TOPPERS_SUPPORT_OVRHDR)
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_unrename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_unrename.h	(revision 306)
@@ -195,198 +195,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  overrun.c
- */
-#undef _ovrtimer_flag
-#undef _initialize_overrun
-#undef _ovrtimer_start
-#undef _ovrtimer_stop
-#undef _call_ovrhdr
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _ovrinib
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.tf	(revision 305)
+++ 	(revision )
@@ -1,106 +1,0 @@
-$ 
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$  
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$  
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: overrun.tf 444 2015-08-13 04:39:19Z ertl-hiro $
-$  
-
-$
-$		ãªã¼ãã©ã³ãã³ãã©æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  ãªã¼ãã©ã³ãã³ãã©ããµãã¼ãããã¦ããªãå ´åã®ã¨ã©ã¼ãã§ãã¯
-$
-$IF !TOPPERS_SUPPORT_OVRHDR$
-	$IF LENGTH(OVR.ORDER_LIST)$
-		$ERROR$E_NOSPT:$SPC$
-			$FORMAT(_("%1% is not supported on this target"), "DEF_OVR")$
-		$END$
-	$END$
-$ELSE$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Overrun Handler Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF LENGTH(OVR.ORDER_LIST)$
-$	// éçAPIãDEF_OVRããè¤æ°ããï¼E_OBJï¼
-	$IF LENGTH(OVR.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_OVR")$$END$
-	$END$
-
-$	// ovratrãï¼TA_NULLï¼ã§ãªãå ´åï¼E_RSATRï¼
-	$IF OVR.OVRATR[1] != 0$
-		$ERROR OVR.TEXT_LINE[1]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"ovratr", OVR.OVRATR[1], "DEF_OVR")$
-		$END$
-	$END$
-
-$	// ãªã¼ãã©ã³ãã³ãã©åæåãã­ãã¯
-	const OVRINIB _kernel_ovrinib[1] = {$NL$
-		$TAB${ ($OVR.OVRATR[1]$), (OVRHDR)($OVR.OVRHDR[1]$) }$NL$
-	};$NL$
-
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_overrun();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const OVRINIB, _kernel_ovrinib);$NL$
-$END$$NL$
-
-$END$
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.trb	(revision 306)
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: overrun.trb 581 2016-02-04 06:23:23Z ertl-hiro $
+#  
+
+#
+#		ãªã¼ãã©ã³ãã³ãã©æ©è½ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ãªã¼ãã©ã³ãã³ãã©ããµãã¼ãããã¦ããªãå ´åã®ã¨ã©ã¼ãã§ãã¯
+#
+if !$TOPPERS_SUPPORT_OVRHDR
+  if $cfgData.has_key?(:DEF_OVR)
+    error("E_NOSPT: DEF_OVR is not supported on this target")
+  end
+end
+
+#
+#  ãªã¼ãã©ã³ãã³ãã©æ©è½ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Overrun Handler Functions")
+
+if $cfgData[:DEF_OVR].size() > 0
+  # éçAPIãDEF_OVRããè¤æ°ããï¼E_OBJï¼ï¼»NGKI2619ï¼½
+  if $cfgData[:DEF_OVR].size() > 1
+    error("E_OBJ: too many DEF_OVR")
+  end
+
+  params = $cfgData[:DEF_OVR][1]
+
+  # ovratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2612ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if params[:ovratr] != $TA_NULL
+    error_illegal("E_RSATR", params, :ovratr)
+  end
+
+  #	ãªã¼ãã©ã³ãã³ãã©åæåãã­ãã¯ã®çæ
+  $kernelCfgC.add("const OVRINIB _kernel_ovrinib[1] = {")
+  $kernelCfgC.add("\t{ (#{params[:ovratr]}), (OVRHDR)(#{params[:ovrhdr]}) }")
+  $kernelCfgC.add2("};")
+
+  # ãªã¼ãã©ã³ãã³ãã©æ©è½åæåé¢æ°ã®è¿½å 
+  $initializeFunctions.push("_kernel_initialize_overrun();")
+else
+  $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const OVRINIB, _kernel_ovrinib);")
+end
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/sys_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/sys_manage.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/sys_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sys_manage.c 470 2015-12-30 09:50:36Z ertl-hiro $
+ *  $Id: sys_manage.c 684 2016-03-11 15:24:12Z ertl-hiro $
  */
 
@@ -175,5 +175,5 @@
 /*
  *  ã¿ã¹ã¯ã®åªå
-é ä½ã®åè»¢
+é ä½ã®åè»¢ï¼»NGKI3548ï¼½
  */
 #ifdef TOPPERS_rot_rdq
@@ -186,10 +186,10 @@
 
 	LOG_ROT_RDQ_ENTER(tskpri);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2684ï¼½*/
 	if (tskpri == TPRI_SELF && !sense_context()) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI2689ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI2685ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -218,5 +218,5 @@
  *  å®è¡ç¶æ
 ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3550ï¼½
  */
 #ifdef TOPPERS_get_tid
@@ -228,5 +228,5 @@
 
 	LOG_GET_TID_ENTER(p_tskid);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2707ï¼½*/
 
 	lock_cpu();
@@ -244,5 +244,5 @@
 /*
  *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
-§
+§ï¼»NGKI3623ï¼½
  */
 #ifdef TOPPERS_get_lod
@@ -256,10 +256,10 @@
 
 	LOG_GET_LOD_ENTER(p_tskid, p_load);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3624ï¼½ï¼»NGKI3625ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3631ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3626ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -286,5 +286,5 @@
  *  æå®ããåªå
 é ä½ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3641ï¼½
  */
 #ifdef TOPPERS_get_nth
@@ -299,10 +299,10 @@
 
 	LOG_GET_NTH_ENTER(p_tskid, nth, p_tskid);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3642ï¼½ï¼»NGKI3643ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3650ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3644ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -332,5 +332,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã¸ã®é·ç§»
+ã¸ã®é·ç§»ï¼»NGKI3538ï¼½
  */
 #ifdef TOPPERS_loc_cpu
@@ -343,6 +343,6 @@
 	LOG_LOC_CPU_ENTER();
 
-	if (!sense_lock()) {
-		lock_cpu();
+	if (!sense_lock()) {						/*ï¼»NGKI2731ï¼½*/
+		lock_cpu();								/*ï¼»NGKI2730ï¼½*/
 	}
 	ercd = E_OK;
@@ -356,5 +356,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã®è§£é¤
+ã®è§£é¤ï¼»NGKI3539ï¼½
  *
  *  CPUã­ãã¯ä¸­ã¯ï¼ãã£ã¹ããããå¿
@@ -374,6 +374,6 @@
 	LOG_UNL_CPU_ENTER();
 
-	if (sense_lock()) {
-		unlock_cpu();
+	if (sense_lock()) {							/*ï¼»NGKI2738ï¼½*/
+		unlock_cpu();							/*ï¼»NGKI2737ï¼½*/
 	}
 	ercd = E_OK;
@@ -386,5 +386,5 @@
 
 /*
- *  ãã£ã¹ãããã®ç¦æ­¢
+ *  ãã£ã¹ãããã®ç¦æ­¢ï¼»NGKI2740ï¼½
  */
 #ifdef TOPPERS_dis_dsp
@@ -396,5 +396,5 @@
 
 	LOG_DIS_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2741ï¼½ï¼»NGKI2742ï¼½*/
 
 	lock_cpu();
@@ -412,5 +412,5 @@
 
 /*
- *  ãã£ã¹ãããã®è¨±å¯
+ *  ãã£ã¹ãããã®è¨±å¯ï¼»NGKI2746ï¼½
  */
 #ifdef TOPPERS_ena_dsp
@@ -422,5 +422,5 @@
 
 	LOG_ENA_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2747ï¼½ï¼»NGKI2748ï¼½*/
 
 	lock_cpu();
@@ -461,5 +461,5 @@
 /*
  *  ã³ã³ãã­ã¹ãã®åç
-§
+§ï¼»NGKI2752ï¼½
  */
 #ifdef TOPPERS_sns_ctx
@@ -481,5 +481,5 @@
  *  CPUã­ãã¯ç¶æ
 ã®åç
-§
+§ï¼»NGKI2754ï¼½
  */
 #ifdef TOPPERS_sns_loc
@@ -501,5 +501,5 @@
  *  ãã£ã¹ãããç¦æ­¢ç¶æ
 ã®åç
-§
+§ï¼»NGKI2756ï¼½
  */
 #ifdef TOPPERS_sns_dsp
@@ -521,5 +521,5 @@
  *  ãã£ã¹ãããä¿çç¶æ
 ã®åç
-§
+§ï¼»NGKI2758ï¼½
  */
 #ifdef TOPPERS_sns_dpn
@@ -541,5 +541,5 @@
  *  ã«ã¼ãã«éåä½ç¶æ
 ã®åç
-§
+§ï¼»NGKI2760ï¼½
  */
 #ifdef TOPPERS_sns_ker
Index: asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sample1.c 216 2014-09-23 12:13:52Z ertl-hiro $
+ *  $Id: sample1.c 725 2016-04-02 21:50:49Z ertl-hiro $
  */
 
@@ -254,4 +254,19 @@
 
 /*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+#ifdef INTNO1
+
+void intno1_isr(intptr_t exinf)
+{
+	intno1_clear();
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+#endif /* INTNO1 */
+
+/*
  *  CPUä¾å¤ãã³ãã©
  */
@@ -281,6 +296,13 @@
 	}
 
+#ifdef PREPARE_RETURN_CPUEXC
+	PREPARE_RETURN_CPUEXC;
 	SVC_PERROR(get_tid(&cpuexc_tskid));
 	SVC_PERROR(act_tsk(EXC_TASK));
+#else /* PREPARE_RETURN_CPUEXC */
+	syslog(LOG_NOTICE, "Sample program ends with exception.");
+	SVC_PERROR(ext_ker());
+	assert(0);
+#endif /* PREPARE_RETURN_CPUEXC */
 }
 
Index: asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.cfg	(revision 306)
@@ -1,14 +1,8 @@
 /*
- *  $Id: sample1.cfg 329 2015-06-21 06:55:08Z ertl-hiro $
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id: sample1.cfg 725 2016-04-02 21:50:49Z ertl-hiro $
  */
-
-/*
- *  ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
- */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
-INCLUDE("syssvc/logtask.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "sample1.h"
@@ -23,4 +17,8 @@
 DEF_OVR({ TA_NULL, overrun_handler });
 #endif /* TOPPERS_SUPPORT_OVRHDR */
+#ifdef INTNO1
+CFG_INT(INTNO1, { INTNO1_INTATR, INTNO1_INTPRI });
+CRE_ISR(INTNO1_ISR, { TA_NULL, 0, INTNO1, intno1_isr, 1 });
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 DEF_EXC(CPUEXC1, { TA_NULL, cpuexc_handler });
Index: asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  *
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  *
- *  $Id: sample1.h 410 2015-08-03 21:54:44Z ertl-hiro $
+ *  $Id: sample1.h 725 2016-04-02 21:50:49Z ertl-hiro $
  */
 
@@ -108,4 +108,7 @@
 extern void	main_task(intptr_t exinf);
 extern void exc_task(intptr_t exinf);
+#ifdef INTNO1
+extern void intno1_isr(intptr_t exinf);
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 extern void	cpuexc_handler(void *p_excinf);
Index: asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.c	(revision 306)
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_ovrhdr1.c 444 2015-08-13 04:39:19Z ertl-hiro $
+ *  $Id: test_ovrhdr1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -78,13 +78,13 @@
  *	1:	ref_ovr(TASK2, &rovr)
  *		assert(rovr.ovrstat == TOVR_STP)
- *		// TASK2, TASK3ã«å¯¾ãã¦ï¼æ®ããã­ã»ããµæé20000Î¼ç§ã§ï¼ãªã¼ãã©ã³
- *		// ãã³ãã©ãåä½éå§ãã
- *		sta_ovr(TASK2, 20000U)
+ *		// TASK2, TASK3ã«å¯¾ãã¦ï¼æ®ããã­ã»ããµæé(4 * TEST_TIME_CP)
+ *		// Î¼ç§ã§ï¼ãªã¼ãã©ã³ãã³ãã©ãåä½éå§ãã
+ *		sta_ovr(TASK2, 4 * TEST_TIME_CP)
  *		ref_ovr(TASK2, &rovr)
  *		assert(rovr.ovrstat == TOVR_STA)
- *		assert(rovr.leftotm == 20000U)
- *		sta_ovr(TASK3, 20000U)
- *		// 10000Î¼ç§å¾ã«ALM1ãåä½ããã
- *		sta_alm(ALM1, 10000U)
+ *		assert(rovr.leftotm == 4 * TEST_TIME_CP)
+ *		sta_ovr(TASK3, 4 * TEST_TIME_CP)
+ *		// (2 * TEST_TIME_CP)Î¼ç§å¾ã«ALM1ãåä½ããã
+ *		sta_alm(ALM1, 2 * TEST_TIME_CP) ... ALM1-1ãå®è¡éå§ããã¾ã§
  *		DO(hrtcnt1 = fch_hrt())
  *		act_tsk(TASK2)
@@ -107,5 +107,5 @@
  *	4:	ref_ovr(TASK2, &rovr)
  *		assert(rovr.ovrstat == TOVR_STA)
- *		assert(5000U <= rovr.leftotm && rovr.leftotm <= 15000U)
+ *		assert(TEST_TIME_CP <= rovr.leftotm && rovr.leftotm <= 3 * TEST_TIME_CP)
  *		DO(while(!task3_flag1))
  *	== OVR-1ï¼1åç®ï¼==
@@ -129,9 +129,10 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	10:	DO(hrtcnt2 = fch_hrt())
- *		assert(40000U <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 50000U)
+ *		assert(8 * TEST_TIME_CP <= hrtcnt2 - hrtcnt1 \
+ *							&& hrtcnt2 - hrtcnt1 <= 12 * TEST_TIME_CP)
  *		ref_ovr(TASK2, &rovr)
  *		assert(rovr.ovrstat == TOVR_STP)
- *		sta_ovr(TASK2, 20000U)
- *		sta_alm(ALM1, 10000U)
+ *		sta_ovr(TASK2, 4 * TEST_TIME_CP)
+ *		sta_alm(ALM1, 2 * TEST_TIME_CP) ... ALM1-2ãå®è¡éå§ããã¾ã§
  *		DO(hrtcnt1 = fch_hrt())
  *		wup_tsk(TASK2)
@@ -150,9 +151,9 @@
  *		// dispatch_rã§ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ãã
  *	== TASK3ï¼ç¶ãï¼==
- *	14:	sta_alm(ALM1, 10000U)
- *		sta_ovr(TSK_SELF, 20000U)
+ *	14:	sta_alm(ALM1, 2 * TEST_TIME_CP) ... ALM1-3ãå®è¡éå§ããã¾ã§
+ *		sta_ovr(TSK_SELF, 4 * TEST_TIME_CP)
  *		// sta_ovrã§ãªã¼ãã©ã³ã¿ã¤ããåä½éå§ãã
- *		// TASK2ã®æ®ããã­ã»ããµæéã20000Î¼ç§ã«è¨­å®ããªãã
- *		sta_ovr(TASK2, 20000U)
+ *		// TASK2ã®æ®ããã­ã»ããµæéã(4 * TEST_TIME_CP)Î¼ç§ã«è¨­å®ããªãã
+ *		sta_ovr(TASK2, 4 * TEST_TIME_CP)
  *	15:	DO(while(!task3_flag2))
  *	== ALM1-3ï¼3åç®ï¼==
@@ -163,6 +164,6 @@
  *		RETURN
  *	== TASK3ï¼ç¶ãï¼==
- *		// TASK3ã®æ®ããã­ã»ããµæéã20000Î¼ç§ã«è¨­å®ããªãã
- *	17:	sta_ovr(TSK_SELF, 20000U)
+ *		// TASK3ã®æ®ããã­ã»ããµæéã(4 * TEST_TIME_CP)Î¼ç§ã«è¨­å®ããªãã
+ *	17:	sta_ovr(TSK_SELF, 4 * TEST_TIME_CP)
  *		// sta_ovrã§ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ï¼åä½éå§ãã
  *		DO(while(!task3_flag3))
@@ -170,7 +171,7 @@
  *		// TASK3ã®æ®ããã­ã»ããµæéããªããªã
  *	18:	DO(task3_flag3 = true)
- *		sta_ovr(TSK_SELF, 20000U) -> E_ID
- *		// TASK3ã®æ®ããã­ã»ããµæéã20000Î¼ç§ã«è¨­å®ããªãã
- *		sta_ovr(TASK3, 10000U)
+ *		sta_ovr(TSK_SELF, 4 * TEST_TIME_CP) -> E_ID
+ *		// TASK3ã®æ®ããã­ã»ããµæéã(4 * TEST_TIME_CP)Î¼ç§ã«è¨­å®ããªãã
+ *		sta_ovr(TASK3, 2 * TEST_TIME_CP)
  *		RETURN
  *	== TASK3ï¼ç¶ãï¼==
@@ -194,5 +195,6 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	25:	DO(hrtcnt2 = fch_hrt())
- *		assert(70000U <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 80000U)
+ *		assert(14 * TEST_TIME_CP <= hrtcnt2 - hrtcnt1 \
+ *							&& hrtcnt2 - hrtcnt1 <= 19 * TEST_TIME_CP)
  *	26:	END
  */
@@ -288,8 +290,8 @@
 		task3_flag3 = true;
 
-		ercd = sta_ovr(TSK_SELF, 20000U);
+		ercd = sta_ovr(TSK_SELF, 4 * TEST_TIME_CP);
 		check_ercd(ercd, E_ID);
 
-		ercd = sta_ovr(TASK3, 10000U);
+		ercd = sta_ovr(TASK3, 2 * TEST_TIME_CP);
 		check_ercd(ercd, E_OK);
 
@@ -326,6 +328,6 @@
 task1(intptr_t exinf)
 {
+	ER_UINT	ercd;
 	T_ROVR	rovr;
-	ER_UINT	ercd;
 
 	test_start(__FILE__);
@@ -337,5 +339,5 @@
 	check_assert(rovr.ovrstat == TOVR_STP);
 
-	ercd = sta_ovr(TASK2, 20000U);
+	ercd = sta_ovr(TASK2, 4 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -345,10 +347,10 @@
 	check_assert(rovr.ovrstat == TOVR_STA);
 
-	check_assert(rovr.leftotm == 20000U);
-
-	ercd = sta_ovr(TASK3, 20000U);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_alm(ALM1, 10000U);
+	check_assert(rovr.leftotm == 4 * TEST_TIME_CP);
+
+	ercd = sta_ovr(TASK3, 4 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_alm(ALM1, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -361,5 +363,5 @@
 	hrtcnt2 = fch_hrt();
 
-	check_assert(40000U <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 50000U);
+	check_assert(8 * TEST_TIME_CP <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 12 * TEST_TIME_CP);
 
 	ercd = ref_ovr(TASK2, &rovr);
@@ -368,8 +370,8 @@
 	check_assert(rovr.ovrstat == TOVR_STP);
 
-	ercd = sta_ovr(TASK2, 20000U);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_ovr(TASK2, 4 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_alm(ALM1, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -382,5 +384,5 @@
 	hrtcnt2 = fch_hrt();
 
-	check_assert(70000U <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 80000U);
+	check_assert(14 * TEST_TIME_CP <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 19 * TEST_TIME_CP);
 
 	check_finish(26);
@@ -429,6 +431,6 @@
 task3(intptr_t exinf)
 {
+	ER_UINT	ercd;
 	T_ROVR	rovr;
-	ER_UINT	ercd;
 
 	check_point(4);
@@ -438,5 +440,5 @@
 	check_assert(rovr.ovrstat == TOVR_STA);
 
-	check_assert(5000U <= rovr.leftotm && rovr.leftotm <= 15000U);
+	check_assert(TEST_TIME_CP <= rovr.leftotm && rovr.leftotm <= 3 * TEST_TIME_CP);
 
 	while(!task3_flag1);
@@ -449,11 +451,11 @@
 
 	check_point(14);
-	ercd = sta_alm(ALM1, 10000U);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_ovr(TSK_SELF, 20000U);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_ovr(TASK2, 20000U);
+	ercd = sta_alm(ALM1, 2 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_ovr(TSK_SELF, 4 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_ovr(TASK2, 4 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -462,5 +464,5 @@
 
 	check_point(17);
-	ercd = sta_ovr(TSK_SELF, 20000U);
+	ercd = sta_ovr(TSK_SELF, 4 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.cfg	(revision 306)
@@ -3,10 +3,7 @@
  *		ã³ãã¡ã¤ã«
  *
- *  $Id: test_ovrhdr1.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: test_ovrhdr1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_ovrhdr1.h"
Index: asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_ovrhdr1.h 233 2014-09-28 09:38:43Z ertl-hiro $
+ *  $Id: test_ovrhdr1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/pri_level/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/pri_level/include/kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/pri_level/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -550,6 +550,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_rename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_rename.h	(revision 306)
@@ -186,190 +186,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _ready_primap1				__kernel_ready_primap1
-#define _ready_primap2				__kernel_ready_primap2
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_unrename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_unrename.h	(revision 306)
@@ -187,190 +187,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _ready_primap1
-#undef _ready_primap2
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/pri_level/test/test_task1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/pri_level/test/test_task1.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/pri_level/test/test_task1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_task1.h 338 2015-06-28 09:11:10Z ertl-hiro $
+ *  $Id: test_task1.h 750 2016-05-14 14:58:16Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/rstr_task/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/include/kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/rstr_task/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -550,6 +550,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_def.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_def.csv	(revision 305)
+++ 	(revision )
@@ -1,134 +1,0 @@
-SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
-TA_NULL,TA_NULL
-TA_ACT,TA_ACT
-TA_NOACTQUE,TA_NOACTQUE
-TA_RSTR,TA_RSTR
-TA_TPRI,TA_TPRI
-TA_WMUL,TA_WMUL
-TA_CLR,TA_CLR
-TA_CEILING,TA_CEILING
-TA_STA,TA_STA
-TA_NONKERNEL,TA_NONKERNEL
-TA_ENAINT,TA_ENAINT
-TA_EDGE,TA_EDGE
-TNFY_HANDLER,TNFY_HANDLER
-TNFY_SETVAR,TNFY_SETVAR
-TNFY_INCVAR,TNFY_INCVAR
-TNFY_ACTTSK,TNFY_ACTTSK
-TNFY_WUPTSK,TNFY_WUPTSK
-TNFY_SIGSEM,TNFY_SIGSEM
-TNFY_SETFLG,TNFY_SETFLG
-TNFY_SNDDTQ,TNFY_SNDDTQ
-TENFY_SETVAR,TENFY_SETVAR
-TENFY_INCVAR,TENFY_INCVAR
-TENFY_ACTTSK,TENFY_ACTTSK
-TENFY_WUPTSK,TENFY_WUPTSK
-TENFY_SIGSEM,TENFY_SIGSEM
-TENFY_SETFLG,TENFY_SETFLG
-TENFY_SNDDTQ,TENFY_SNDDTQ
-TMIN_TPRI,TMIN_TPRI,signed
-TMAX_TPRI,TMAX_TPRI,signed
-TMIN_DPRI,TMIN_DPRI,signed
-TMAX_DPRI,TMAX_DPRI,signed
-TMIN_ISRPRI,TMIN_ISRPRI,signed
-TMAX_ISRPRI,TMAX_ISRPRI,signed
-TBIT_FLGPTN,TBIT_FLGPTN
-TMAX_MAXSEM,TMAX_MAXSEM
-TMAX_RELTIM,TMAX_RELTIM
-TMIN_INTPRI,TMIN_INTPRI,signed
-TMAX_INTPRI,TMAX_INTPRI,signed
-TMIN_TSKID,TMIN_TSKID,signed
-TMIN_SEMID,TMIN_SEMID,signed
-TMIN_FLGID,TMIN_FLGID,signed
-TMIN_DTQID,TMIN_DTQID,signed
-TMIN_PDQID,TMIN_PDQID,signed
-TMIN_MTXID,TMIN_MTXID,signed
-TMIN_MPFID,TMIN_MPFID,signed
-TMIN_CYCID,TMIN_CYCID,signed
-TMIN_ALMID,TMIN_ALMID,signed
-OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,#defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,#defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,#defined(OMIT_INITIALIZE_EXCEPTION)
-USE_TSKINICTXB,#defined(USE_TSKINICTXB)
-TARGET_TSKATR,#defined(TARGET_TSKATR),,TARGET_TSKATR
-TARGET_INTATR,#defined(TARGET_INTATR),,TARGET_INTATR
-TARGET_INHATR,#defined(TARGET_INHATR),,TARGET_INHATR
-TARGET_ISRATR,#defined(TARGET_ISRATR),,TARGET_ISRATR
-TARGET_EXCATR,#defined(TARGET_EXCATR),,TARGET_EXCATR
-TARGET_MIN_STKSZ,#defined(TARGET_MIN_STKSZ),,TARGET_MIN_STKSZ
-TARGET_MIN_ISTKSZ,#defined(TARGET_MIN_ISTKSZ),,TARGET_MIN_ISTKSZ
-CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
-CHECK_INTPTR_ALIGN,#defined(CHECK_INTPTR_ALIGN),,CHECK_INTPTR_ALIGN
-CHECK_INTPTR_NONNULL,#defined(CHECK_INTPTR_NONNULL)
-CHECK_FUNC_ALIGN,#defined(CHECK_FUNC_ALIGN),,CHECK_FUNC_ALIGN
-CHECK_FUNC_NONNULL,#defined(CHECK_FUNC_NONNULL)
-CHECK_STACK_ALIGN,#defined(CHECK_STACK_ALIGN),,CHECK_STACK_ALIGN
-CHECK_STACK_NONNULL,#defined(CHECK_STACK_NONNULL)
-CHECK_MPF_ALIGN,#defined(CHECK_MPF_ALIGN),,CHECK_MPF_ALIGN
-CHECK_MPF_NONNULL,#defined(CHECK_MPF_NONNULL)
-sizeof_void_ptr,sizeof(void*)
-sizeof_uint_t,sizeof(uint_t)
-sizeof_size_t,sizeof(size_t)
-sizeof_intptr_t,sizeof(intptr_t)
-sizeof_ID,sizeof(ID)
-sizeof_FP,sizeof(FP)
-sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
-sizeof_EXCNO,sizeof(EXCNO)
-sizeof_TINIB,sizeof(TINIB)
-offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
-offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
-offsetof_TINIB_task,"offsetof(TINIB,task)"
-offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
-offsetof_TINIB_stksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stksz)"
-offsetof_TINIB_stk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stk)"
-sizeof_SEMINIB,sizeof(SEMINIB)
-offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
-offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
-offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
-sizeof_FLGPTN,sizeof(FLGPTN)
-sizeof_FLGINIB,sizeof(FLGINIB)
-offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
-offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
-sizeof_DTQINIB,sizeof(DTQINIB)
-offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
-offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
-offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
-sizeof_PDQINIB,sizeof(PDQINIB)
-offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
-offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
-offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
-offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
-sizeof_MTXINIB,sizeof(MTXINIB)
-offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
-offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
-sizeof_MPFINIB,sizeof(MPFINIB)
-offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
-offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
-offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
-offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
-offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
-sizeof_CYCINIB,sizeof(CYCINIB)
-offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
-offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
-offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
-offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
-offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
-sizeof_ALMINIB,sizeof(ALMINIB)
-offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
-offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
-offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
-sizeof_INHINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INHINIB)
-offset_INHINIB_inhno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhno)"
-offset_INHINIB_inhatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhatr)"
-offset_INHINIB_int_entry,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,int_entry)"
-sizeof_INTINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INTINIB)
-offset_INTINIB_intno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intno)"
-offset_INTINIB_intatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intatr)"
-offset_INTINIB_intpri,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intpri)"
-sizeof_EXCINIB,#!defined(OMIT_INITIALIZE_EXCEPTION),,sizeof(EXCINIB)
-offset_EXCINIB_excno,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excno)"
-offset_EXCINIB_excatr,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excatr)"
-offset_EXCINIB_exc_entry,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,exc_entry)"
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_sym.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_sym.def	(revision 306)
@@ -0,0 +1,144 @@
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_RSTR
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/sys_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/sys_manage.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/rstr_task/kernel/sys_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sys_manage.c 470 2015-12-30 09:50:36Z ertl-hiro $
+ *  $Id: sys_manage.c 684 2016-03-11 15:24:12Z ertl-hiro $
  */
 
@@ -174,5 +174,5 @@
 /*
  *  ã¿ã¹ã¯ã®åªå
-é ä½ã®åè»¢
+é ä½ã®åè»¢ï¼»NGKI3548ï¼½
  */
 #ifdef TOPPERS_rot_rdq
@@ -186,10 +186,10 @@
 
 	LOG_ROT_RDQ_ENTER(tskpri);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2684ï¼½*/
 	if (tskpri == TPRI_SELF && !sense_context()) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI2689ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI2685ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -227,5 +227,5 @@
  *  å®è¡ç¶æ
 ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3550ï¼½
  */
 #ifdef TOPPERS_get_tid
@@ -237,5 +237,5 @@
 
 	LOG_GET_TID_ENTER(p_tskid);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2707ï¼½*/
 
 	lock_cpu();
@@ -253,5 +253,5 @@
 /*
  *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
-§
+§ï¼»NGKI3623ï¼½
  */
 #ifdef TOPPERS_get_lod
@@ -265,10 +265,10 @@
 
 	LOG_GET_LOD_ENTER(p_tskid, p_load);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3624ï¼½ï¼»NGKI3625ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3631ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3626ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -295,5 +295,5 @@
  *  æå®ããåªå
 é ä½ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3641ï¼½
  */
 #ifdef TOPPERS_get_nth
@@ -308,10 +308,10 @@
 
 	LOG_GET_NTH_ENTER(p_tskid, nth, p_tskid);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3642ï¼½ï¼»NGKI3643ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3650ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3644ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -341,5 +341,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã¸ã®é·ç§»
+ã¸ã®é·ç§»ï¼»NGKI3538ï¼½
  */
 #ifdef TOPPERS_loc_cpu
@@ -352,6 +352,6 @@
 	LOG_LOC_CPU_ENTER();
 
-	if (!sense_lock()) {
-		lock_cpu();
+	if (!sense_lock()) {						/*ï¼»NGKI2731ï¼½*/
+		lock_cpu();								/*ï¼»NGKI2730ï¼½*/
 	}
 	ercd = E_OK;
@@ -365,5 +365,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã®è§£é¤
+ã®è§£é¤ï¼»NGKI3539ï¼½
  *
  *  CPUã­ãã¯ä¸­ã¯ï¼ãã£ã¹ããããå¿
@@ -383,6 +383,6 @@
 	LOG_UNL_CPU_ENTER();
 
-	if (sense_lock()) {
-		unlock_cpu();
+	if (sense_lock()) {							/*ï¼»NGKI2738ï¼½*/
+		unlock_cpu();							/*ï¼»NGKI2737ï¼½*/
 	}
 	ercd = E_OK;
@@ -395,5 +395,5 @@
 
 /*
- *  ãã£ã¹ãããã®ç¦æ­¢
+ *  ãã£ã¹ãããã®ç¦æ­¢ï¼»NGKI2740ï¼½
  */
 #ifdef TOPPERS_dis_dsp
@@ -405,5 +405,5 @@
 
 	LOG_DIS_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2741ï¼½ï¼»NGKI2742ï¼½*/
 
 	lock_cpu();
@@ -421,5 +421,5 @@
 
 /*
- *  ãã£ã¹ãããã®è¨±å¯
+ *  ãã£ã¹ãããã®è¨±å¯ï¼»NGKI2746ï¼½
  */
 #ifdef TOPPERS_ena_dsp
@@ -431,5 +431,5 @@
 
 	LOG_ENA_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2747ï¼½ï¼»NGKI2748ï¼½*/
 
 	lock_cpu();
@@ -464,5 +464,5 @@
 /*
  *  ã³ã³ãã­ã¹ãã®åç
-§
+§ï¼»NGKI2752ï¼½
  */
 #ifdef TOPPERS_sns_ctx
@@ -484,5 +484,5 @@
  *  CPUã­ãã¯ç¶æ
 ã®åç
-§
+§ï¼»NGKI2754ï¼½
  */
 #ifdef TOPPERS_sns_loc
@@ -504,5 +504,5 @@
  *  ãã£ã¹ãããç¦æ­¢ç¶æ
 ã®åç
-§
+§ï¼»NGKI2756ï¼½
  */
 #ifdef TOPPERS_sns_dsp
@@ -524,5 +524,5 @@
  *  ãã£ã¹ãããä¿çç¶æ
 ã®åç
-§
+§ï¼»NGKI2758ï¼½
  */
 #ifdef TOPPERS_sns_dpn
@@ -544,5 +544,5 @@
  *  ã«ã¼ãã«éåä½ç¶æ
 ã®åç
-§
+§ï¼»NGKI2760ï¼½
  */
 #ifdef TOPPERS_sns_ker
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.tf	(revision 305)
+++ 	(revision )
@@ -1,232 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: task.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_TSKID	$LENGTH(TSK.ID_LIST)$$NL$
-$FOREACH id TSK.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Task Management Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id TSK.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$$NL$
-$END$
-
-$
-$  ã¿ã¹ã¯ã1ã¤ãç»é²ããã¦ããªãå ´åï¼»NGKI0033ï¼½
-$
-$IF !LENGTH(TSK.ID_LIST)$
-	$ERROR$$FORMAT(_("no task is registered"))$$END$
-$END$
-
-$
-$  ã¿ã¹ã¯IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1);$NL$
-$NL$
-
-$
-$  ã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
-$	//ï¼TA_ACTï¼TA_NOACTQUEï¼TA_RSTRï¼TARGET_TSKATRä»¥å¤ã®ããããã»ãã
-$	// ããã¦ããå ´åï¼
-	$IF (TSK.TSKATR[tskid] & ~(TA_ACT|TA_NOACTQUE|TA_RSTR|TARGET_TSKATR)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"tskatr", TSK.TSKATR[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
-	$IF !(TMIN_TPRI <= TSK.ITSKPRI[tskid] && TSK.ITSKPRI[tskid] <= TMAX_TPRI)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"itskpri", TSK.ITSKPRI[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-$END$
-
-$
-$  ã¹ã¿ãã¯é åã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// stkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼ããã
-$	// å°ããå ´åï¼»NGKI1042ï¼½
-	$IF TSK.STKSZ[tskid] <= 0 || (TARGET_MIN_STKSZ
-									&& TSK.STKSZ[tskid] < TARGET_MIN_STKSZ)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' of `%3%\' in %4%"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$ 	// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
-	$IF !EQ(TSK.STK[tskid], "NULL") && CHECK_STKSZ_ALIGN
-							&& (TSK.STKSZ[tskid] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-$END$
-
-$
-$  ã¹ã¿ãã¯é åã®çæ
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
-	$IF EQ(TSK.STK[tskid],"NULL")$
-		$IF (TSK.TSKATR[tskid] & TA_RSTR) == 0$
-$			// ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
-$			// å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½
-			$TSK.TINIB_STKSZ[tskid] = ALLOC_STACK(CONCAT("_kernel_stack_",
-													tskid), TSK.STKSZ[tskid])$
-			$TSK.TINIB_STK[tskid] = CONCAT("_kernel_stack_", tskid)$
-		$ELSE$
-$			// å¶ç´ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1052ï¼½
-			$TSK.TINIB_STKSZ[tskid] = FORMAT("ROUND_STK_T(%1%)",
-														TSK.STKSZ[tskid])$
-			$TSK.TINIB_STK[tskid] = CONCAT("_kernel_shared_stack_",
-														+TSK.ITSKPRI[tskid])$
-$			// å¶ç´ã¿ã¹ã¯ç¨ã®å
-±æã¹ã¿ãã¯ã®ãµã¤ãºãæ±ããï¼»NGKI1053ï¼½
-			$IF !LENGTH(shared_stack_size[TSK.ITSKPRI[tskid]])
-					|| shared_stack_size[TSK.ITSKPRI[tskid]] < TSK.STKSZ[tskid]$
-				$shared_stack_size[TSK.ITSKPRI[tskid]] = TSK.STKSZ[tskid]$
-			$END$
-		$END$
-
-	$ELSE$
-		$TSK.TINIB_STKSZ[tskid] = FORMAT("(%1%)", TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = FORMAT("(void *)(%1%)", TSK.STK[tskid])$
-	$END$
-$END$
-$ å¶ç´ã¿ã¹ã¯ç¨ã®å
-±æã¹ã¿ãã¯é åã®çæï¼»NGKI1052ï¼½ï¼»NGKI1053ï¼½
-$FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
-	$IF LENGTH(shared_stack_size[tskpri])$
-		$RESULT = ALLOC_STACK(CONCAT("_kernel_shared_stack_", tskpri),
-											shared_stack_size[tskpri])$
-	$END$
-$END$
-$NL$
-
-$
-$  ã¿ã¹ã¯åæåãã­ãã¯ã®çæï¼ã¿ã¹ã¯ã¯1åä»¥ä¸å­å¨ããï¼
-$
-const TINIB _kernel_tinib_table[TNUM_TSKID] = {$NL$
-$JOINEACH tskid TSK.ID_LIST ",\n"$
-	$TAB${$SPC$
-$		// ã¿ã¹ã¯å±æ§ï¼æ¡å¼µæ
-å ±ï¼èµ·åçªå°ï¼èµ·åæåªå
-åº¦
-		($TSK.TSKATR[tskid]$),$SPC$
-		(intptr_t)($TSK.EXINF[tskid]$),$SPC$
-		(TASK)($TSK.TASK[tskid]$),$SPC$
-		INT_PRIORITY($TSK.ITSKPRI[tskid]$),$SPC$
-
-$		// ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ï¼ã¹ã¿ãã¯é å
-		$IF USE_TSKINICTXB$
-			$GENERATE_TSKINICTXB(tskid)$
-		$ELSE$
-			$TSK.TINIB_STKSZ[tskid]$, $TSK.TINIB_STK[tskid]$
-		$END$$SPC$
-	}$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
-$
-const ID _kernel_torder_table[TNUM_TSKID] = {$NL$
-$TAB$$JOINEACH tskid TSK.ORDER_LIST ", "$$tskid$$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çãã­ãã¯ã®çæ
-$
-TCB _kernel_tcb_table[TNUM_TSKID];$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«åæåé¢æ°
-$
-$initfuncs = "_kernel_initialize_task();"$
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.trb	(revision 306)
@@ -0,0 +1,163 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: task.trb 749 2016-05-14 14:47:45Z ertl-hiro $
+# 
+
+#
+#		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+#
+
+class TaskObject < KernelObject
+  def initialize()
+    @sharedStackSize = {}
+    super("tsk", "task", "t")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:stk] ||= "NULL"
+
+    # tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
+    #ï¼TA_ACTï¼TA_NOACTQUEï¼TA_RSTRï¼TARGET_TSKATRä»¥å¤ã®ããããã»ãã
+    # ããã¦ããå ´åï¼
+    if (params[:tskatr] & ~($TA_ACT|$TA_NOACTQUE|$TA_RSTR|$TARGET_TSKATR)) != 0
+      error_illegal_id("E_RSATR", params, :tskatr, :tskid)
+    end
+
+    # (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
+    if !($TMIN_TPRI <= params[:itskpri] && params[:itskpri] <= $TMAX_TPRI)
+      error_illegal_id("E_PAR", params, :itskpri, :tskid)
+    end
+
+    # stkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+    # ãããå°ããå ´åï¼»NGKI1042ï¼½
+    if params[:stksz] < $TARGET_MIN_STKSZ
+      error_wrong_id("E_PAR", params, :stksz, :tskid, "too small")
+    end
+
+    # ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
+    if params[:stk] == "NULL"
+      if (params[:tskatr] & $TA_RSTR) == 0
+        # ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
+        stkName = "_kernel_stack_#{params[:tskid]}"
+        params[:tinib_stksz] = AllocStack(stkName, params[:stksz])
+        params[:tinib_stk] = stkName
+      else
+        itskpriVal = params[:itskpri].val
+
+        # å¶ç´ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1052ï¼½
+        params[:tinib_stksz] = "ROUND_STK_T(#{params[:stksz]})"
+        params[:tinib_stk] = "_kernel_shared_stack_#{itskpriVal}"
+
+        # å¶ç´ã¿ã¹ã¯ç¨ã®å
+±æã¹ã¿ãã¯ã®ãµã¤ãºãæ±ããï¼»NGKI1053ï¼½
+        if !@sharedStackSize.has_key?(itskpriVal) \
+					|| @sharedStackSize[itskpriVal] < params[:stksz]
+          @sharedStackSize[itskpriVal] = params[:stksz]
+        end
+      end
+    else
+      # stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
+      if (params[:stksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+        error_wrong_id("E_PAR", params, :stksz, :tskid, "not aligned")
+      end
+
+      params[:tinib_stksz] = params[:stksz]
+      params[:tinib_stk] = "(void *)(#{params[:stk]})"
+    end
+  end
+
+  def generateData
+    # å¶ç´ã¿ã¹ã¯ç¨ã®å
+±æã¹ã¿ãã¯é åã®çæï¼»NGKI1052ï¼½
+    $TMIN_TPRI.upto($TMAX_TPRI).each do |itskpriVal|
+      if @sharedStackSize.has_key?(itskpriVal)
+        AllocStack("_kernel_shared_stack_#{itskpriVal}", \
+										@sharedStackSize[itskpriVal])
+      end
+    end
+  end
+
+  def generateInib(key, params)
+    if $USE_TSKINICTXB
+      tskinictxb = GenerateTskinictxb(key, params)
+    else
+      tskinictxb = "#{params[:tinib_stksz]}, #{params[:tinib_stk]}"
+    end
+    return("(#{params[:tskatr]}), (intptr_t)(#{params[:exinf]}), " \
+			"(TASK)(#{params[:task]}), INT_PRIORITY(#{params[:itskpri]}), " \
+			+ tskinictxb)
+  end
+end
+
+#
+#  ã¿ã¹ã¯ç®¡çã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Task Management Functions")
+if $cfgData[:CRE_TSK].size() == 0
+  error("no task is registered")
+end
+TaskObject.new.generate()
+
+# ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_torder_table[TNUM_TSKID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_TSK].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:tskid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
Index: asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2010-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2010-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_rstr1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_rstr1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -115,10 +115,10 @@
 åº¦ï¼é«ï¼==
  *	2:	slp_tsk() -> E_NOSPT						... (A-1)
- *		tslp_tsk(10000U) -> E_NOSPT					... (A-2)
- *		dly_tsk(10000U) -> E_NOSPT					... (A-3)
+ *		tslp_tsk(TEST_TIME_PROC) -> E_NOSPT			... (A-2)
+ *		dly_tsk(TEST_TIME_PROC) -> E_NOSPT			... (A-3)
  *		wai_sem(SEM1) -> E_NOSPT					... (A-4)
  *		pol_sem(SEM1)								... (A-5)
  *		pol_sem(SEM1) -> E_TMOUT
- *		twai_sem(SEM1, 10000U) -> E_NOSPT			... (A-6)
+ *		twai_sem(SEM1, TEST_TIME_PROC) -> E_NOSPT	... (A-6)
  *  	ext_tsk()
  *	== TASK1ï¼ç¶ãï¼==
@@ -129,5 +129,5 @@
  *		sus_tsk(TASK3) -> E_NOSPT					... (B-7)
  *		rsm_tsk(TASK3) -> E_NOSPT					... (B-8)
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, TEST_TIME_PROC) ... ALM1ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1 ==
@@ -240,5 +240,5 @@
 	check_ercd(ercd, E_NOSPT);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -273,8 +273,8 @@
 		check_ercd(ercd, E_NOSPT);
 
-		ercd = tslp_tsk(10000U);
-		check_ercd(ercd, E_NOSPT);
-
-		ercd = dly_tsk(10000U);
+		ercd = tslp_tsk(TEST_TIME_PROC);
+		check_ercd(ercd, E_NOSPT);
+
+		ercd = dly_tsk(TEST_TIME_PROC);
 		check_ercd(ercd, E_NOSPT);
 
@@ -288,5 +288,5 @@
 		check_ercd(ercd, E_TMOUT);
 
-		ercd = twai_sem(SEM1, 10000U);
+		ercd = twai_sem(SEM1, TEST_TIME_PROC);
 		check_ercd(ercd, E_NOSPT);
 
Index: asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		å¶ç´ã¿ã¹ã¯ã®ãã¹ã(1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_rstr1.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: test_rstr1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_rstr1.h"
Index: asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2010 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2010-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_rstr1.h 2 2014-01-11 03:50:35Z ertl-hiro $
+ *  $Id: test_rstr1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr2.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr2.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr2.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		å¶ç´ã¿ã¹ã¯ã®ãã¹ã(2)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_rstr2.cfg 242 2014-09-30 17:31:16Z ertl-hiro $
+ *  $Id: test_rstr2.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_rstr2.h"
Index: asp3_wo_tecs/trunk/extension/subprio/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/include/kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -553,6 +553,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/Makefile.kernel	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 271 2014-10-16 09:42:02Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -133,23 +133,23 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.csv	(revision 305)
+++ 	(revision )
@@ -1,17 +1,0 @@
-tsk,CRE_TSK,#tskid { .tskatr &exinf &task +itskpri .stksz &stk },,
-sem,CRE_SEM,#semid { .sematr .isemcnt .maxsem },,
-flg,CRE_FLG,#flgid { .flgatr .iflgptn },,
-dtq,CRE_DTQ,#dtqid { .dtqatr .dtqcnt &dtqmb },,
-pdq,CRE_PDQ,#pdqid { .pdqatr .pdqcnt +maxdpri &pdqmb },,
-mtx,CRE_MTX,#mtxid { .mtxatr +ceilpri? },,
-mpf,CRE_MPF,#mpfid { .mpfatr .blkcnt .blksz &mpf &mpfmb },,
-cyc,CRE_CYC,#cycid { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs },,
-alm,CRE_ALM,#almid { .almatr { .nfymode &par1 &par2? &par3? &par4? } },,
-spr,ENA_SPR,.tskpri,-1,
-int,CFG_INT,.intno { .intatr +intpri },,
-isr,CRE_ISR,#isrid { .isratr &exinf .intno &isr +isrpri },,
-inh,DEF_INH,.inhno { .inhatr &inthdr },,
-exc,DEF_EXC,.excno { .excatr &exchdr },,
-ics,DEF_ICS,{ .istksz &istk },-1,
-ini,ATT_INI,{ .iniatr &exinf &inirtn },-1,
-ter,ATT_TER,{ .teratr &exinf &terrtn },-1,
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.def	(revision 306)
@@ -0,0 +1,17 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+CRE_FLG #flgid* { .flgatr .iflgptn }
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+ENA_SPR .tskpri
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_rename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_rename.h	(revision 306)
@@ -186,190 +186,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _change_subprio				__kernel_change_subprio
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _subprio_primap				__kernel_subprio_primap
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_unrename.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_unrename.h	(revision 306)
@@ -187,190 +187,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _change_subprio
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _subprio_primap
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.tf	(revision 305)
+++ 	(revision )
@@ -1,160 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: mutex.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ãã¥ã¼ããã¯ã¹æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_MTXID	$LENGTH(MTX.ID_LIST)$$NL$
-$FOREACH id MTX.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Mutex Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id MTX.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  ãã¥ã¼ããã¯ã¹IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_mtxid = (TMIN_MTXID + TNUM_MTXID - 1);$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-$
-$IF LENGTH(MTX.ID_LIST)$
-	$FOREACH mtxid MTX.ID_LIST$
-$		// mtxatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2025ï¼½
-$		//ï¼TA_NULLï¼TA_TPRIï¼TA_CEILINGã®ãããã§ããªãå ´åï¼
-		$IF !(MTX.MTXATR[mtxid] == 0 || MTX.MTXATR[mtxid] == TA_TPRI
-										|| MTX.MTXATR[mtxid] == TA_CEILING)$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mtxatr", MTX.MTXATR[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-
-$		// ceilpriãæªæå®ã®å ´åã¯0ã¨è¦ãªã
-		$IF !LENGTH(MTX.CEILPRI[mtxid])$
-			$MTX.CEILPRI[mtxid] = 0$
-		$END$
-
-$		// åªå
-åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ï¼(TMIN_TPRI <= ceilpri && ceilpri <=
-$		// TMAX_TPRI)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2037ï¼½
-		$IF MTX.MTXATR[mtxid] == TA_CEILING && (MTX.CEILPRI[mtxid] < TMIN_TPRI
-											|| TMAX_TPRI < MTX.CEILPRI[mtxid])$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"ceilpri", MTX.CEILPRI[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-
-$		// åªå
-åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ï¼ceilpriããµãåªå
-åº¦ãä½¿ç¨ããã¨è¨­
-$		// å®ããã¦ããå ´åï¼E_ILUSEï¼ï¼»NGKI3682ï¼½
-		$IF MTX.MTXATR[mtxid] == TA_CEILING
-							&& LENGTH(FIND(spr_tskpri, MTX.CEILPRI[mtxid]))$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_ILUSE:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"ceilpri", MTX.CEILPRI[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-	$END$
-
-$	// ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-	const MTXINIB _kernel_mtxinib_table[TNUM_MTXID] = {$NL$
-	$JOINEACH mtxid MTX.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($MTX.MTXATR[mtxid]$),$SPC$
-			INT_PRIORITY($MTX.CEILPRI[mtxid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const MTXINIB, _kernel_mtxinib_table);$NL$
-$END$$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ã¨ãã¥ã¼ããã¯ã¹æ©è½åæåé¢æ°
-$
-$IF LENGTH(MTX.ID_LIST)$
-	MTXCB _kernel_mtxcb_table[TNUM_MTXID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_mutex();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MTXCB, _kernel_mtxcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.trb	(revision 306)
@@ -0,0 +1,115 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: mutex.trb 630 2016-02-14 11:30:17Z ertl-hiro $
+# 
+
+#
+#		ãã¥ã¼ããã¯ã¹æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class MutexObject < KernelObject
+  def initialize()
+    super("mtx", "mutex")
+  end
+
+  def prepare(key, params)
+    # mtxatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2025ï¼½
+    # ï¼TA_NULLï¼TA_TPRIï¼TA_CEILINGã®ãããã§ããªãå ´åï¼
+    if !(params[:mtxatr] == $TA_NULL || params[:mtxatr] == $TA_TPRI \
+										|| params[:mtxatr] == $TA_CEILING)
+      error_illegal_id("E_RSATR", params, :mtxatr, :mtxid)
+    end
+
+    if params[:mtxatr] == $TA_CEILING
+      # åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã®å ´å
+      # ceilpriãæªæå®ã®å ´åã¯ã¨ã©ã¼ã¨ãã
+      if params[:ceilpri].nil?
+        error_api(params, "ceilpri must be specified in %apiname of %mtxid")
+
+      # (TMIN_TPRI <= ceilpri && ceilpri <= TMAX_TPRI)ã§ãªãå ´åï¼E_PARï¼
+      # ï¼»NGKI2037ï¼½
+      elsif !($TMIN_TPRI <= params[:ceilpri] && params[:ceilpri] <= $TMAX_TPRI)
+        error_illegal_id("E_PAR", params, :ceilpri, :mtxid)
+      end
+
+      # ceilpriããµãåªå
+åº¦ãä½¿ç¨ããã¨è¨­å®ããã¦ããå ´åï¼E_ILUSEï¼
+      # ï¼»NGKI3682ï¼½
+      if $subprioTskpri.has_key?(params[:ceilpri].val)
+        error_illegal_id("E_ILUSE", params, :ceilpri, :mtxid)
+      end
+    else
+      # åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ãªãå ´å
+      # ceilpriãæå®ããã¦ããå ´åã¯è­¦åã¡ãã»ã¼ã¸ãåºã
+      if !params[:ceilpri].nil?
+        warning_api(params, "%%ceilpri is ignored in %apiname of %mtxid")
+      end
+      params[:ceilpri] = 0
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:mtxatr]}), INT_PRIORITY(#{params[:ceilpri]})")
+  end
+end
+
+#
+#  ãã¥ã¼ããã¯ã¹ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Mutex Functions")
+MutexObject.new.generate()
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/sys_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/sys_manage.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/sys_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sys_manage.c 470 2015-12-30 09:50:36Z ertl-hiro $
+ *  $Id: sys_manage.c 684 2016-03-11 15:24:12Z ertl-hiro $
  */
 
@@ -174,5 +174,5 @@
 /*
  *  ã¿ã¹ã¯ã®åªå
-é ä½ã®åè»¢
+é ä½ã®åè»¢ï¼»NGKI3548ï¼½
  */
 #ifdef TOPPERS_rot_rdq
@@ -185,10 +185,10 @@
 
 	LOG_ROT_RDQ_ENTER(tskpri);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2684ï¼½*/
 	if (tskpri == TPRI_SELF && !sense_context()) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI2689ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI2685ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -218,5 +218,5 @@
  *  å®è¡ç¶æ
 ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3550ï¼½
  */
 #ifdef TOPPERS_get_tid
@@ -228,5 +228,5 @@
 
 	LOG_GET_TID_ENTER(p_tskid);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2707ï¼½*/
 
 	lock_cpu();
@@ -244,5 +244,5 @@
 /*
  *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
-§
+§ï¼»NGKI3623ï¼½
  */
 #ifdef TOPPERS_get_lod
@@ -256,10 +256,10 @@
 
 	LOG_GET_LOD_ENTER(p_tskid, p_load);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3624ï¼½ï¼»NGKI3625ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3631ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3626ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -286,5 +286,5 @@
  *  æå®ããåªå
 é ä½ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3641ï¼½
  */
 #ifdef TOPPERS_get_nth
@@ -299,10 +299,10 @@
 
 	LOG_GET_NTH_ENTER(p_tskid, nth, p_tskid);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3642ï¼½ï¼»NGKI3643ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3650ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3644ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -332,5 +332,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã¸ã®é·ç§»
+ã¸ã®é·ç§»ï¼»NGKI3538ï¼½
  */
 #ifdef TOPPERS_loc_cpu
@@ -343,6 +343,6 @@
 	LOG_LOC_CPU_ENTER();
 
-	if (!sense_lock()) {
-		lock_cpu();
+	if (!sense_lock()) {						/*ï¼»NGKI2731ï¼½*/
+		lock_cpu();								/*ï¼»NGKI2730ï¼½*/
 	}
 	ercd = E_OK;
@@ -356,5 +356,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã®è§£é¤
+ã®è§£é¤ï¼»NGKI3539ï¼½
  *
  *  CPUã­ãã¯ä¸­ã¯ï¼ãã£ã¹ããããå¿
@@ -374,6 +374,6 @@
 	LOG_UNL_CPU_ENTER();
 
-	if (sense_lock()) {
-		unlock_cpu();
+	if (sense_lock()) {							/*ï¼»NGKI2738ï¼½*/
+		unlock_cpu();							/*ï¼»NGKI2737ï¼½*/
 	}
 	ercd = E_OK;
@@ -386,5 +386,5 @@
 
 /*
- *  ãã£ã¹ãããã®ç¦æ­¢
+ *  ãã£ã¹ãããã®ç¦æ­¢ï¼»NGKI2740ï¼½
  */
 #ifdef TOPPERS_dis_dsp
@@ -396,5 +396,5 @@
 
 	LOG_DIS_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2741ï¼½ï¼»NGKI2742ï¼½*/
 
 	lock_cpu();
@@ -412,5 +412,5 @@
 
 /*
- *  ãã£ã¹ãããã®è¨±å¯
+ *  ãã£ã¹ãããã®è¨±å¯ï¼»NGKI2746ï¼½
  */
 #ifdef TOPPERS_ena_dsp
@@ -422,5 +422,5 @@
 
 	LOG_ENA_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2747ï¼½ï¼»NGKI2748ï¼½*/
 
 	lock_cpu();
@@ -455,5 +455,5 @@
 /*
  *  ã³ã³ãã­ã¹ãã®åç
-§
+§ï¼»NGKI2752ï¼½
  */
 #ifdef TOPPERS_sns_ctx
@@ -475,5 +475,5 @@
  *  CPUã­ãã¯ç¶æ
 ã®åç
-§
+§ï¼»NGKI2754ï¼½
  */
 #ifdef TOPPERS_sns_loc
@@ -495,5 +495,5 @@
  *  ãã£ã¹ãããç¦æ­¢ç¶æ
 ã®åç
-§
+§ï¼»NGKI2756ï¼½
  */
 #ifdef TOPPERS_sns_dsp
@@ -515,5 +515,5 @@
  *  ãã£ã¹ãããä¿çç¶æ
 ã®åç
-§
+§ï¼»NGKI2758ï¼½
  */
 #ifdef TOPPERS_sns_dpn
@@ -535,5 +535,5 @@
  *  ã«ã¼ãã«éåä½ç¶æ
 ã®åç
-§
+§ï¼»NGKI2760ï¼½
  */
 #ifdef TOPPERS_sns_ker
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/task.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/task.tf	(revision 305)
+++ 	(revision )
@@ -1,244 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: task.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_TSKID	$LENGTH(TSK.ID_LIST)$$NL$
-$FOREACH id TSK.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Task Management Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ENA_SPRã®ã¨ã©ã¼ãã§ãã¯
-$
-$spr_tskpri = {}$
-$FOREACH i SPR.ORDER_LIST$
-$	// (TMIN_TPRI <= tskpri && tskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI3678ï¼½
-	$IF !(TMIN_TPRI <= SPR.TSKPRI[i] && SPR.TSKPRI[i] <= TMAX_TPRI)$
-		$ERROR SPR.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"tskpri", SPR.TSKPRI[i], "ENA_SPR")$
-		$END$
-	$END$
-
-	$IF !LENGTH(FIND(spr_tskpri, SPR.TSKPRI[i]))$
-		$spr_tskpri = APPEND(spr_tskpri, SPR.TSKPRI[i])$
-	$ELSE$
-$		// SPR.TSKPRI[i]ããµãåªå
-åº¦ãä½¿ç¨ããåªå
-åº¦ã«è¨­å®æ¸ã¿ã®å ´å
-		$WARNING SPR.TEXT_LINE[i]$
-			$FORMAT(_("%1% `%2%\' in %3% is same with %4%"),
-						"tskpri", SPR.TSKPRI[i], "ENA_SPR",
-						AT(spr_tskpri, FIND(spr_tskpri, SPR.TSKPRI[i])))$
-		$END$
-	$END$
-$END$
-
-$
-$  ãµãåªå
-åº¦ãç¨ãã¦ã¹ã±ã¸ã¥ã¼ã«ããåªå
-åº¦
-$
-const uint16_t _kernel_subprio_primap =$SPC$
-$IF LENGTH(spr_tskpri)$
-	($JOINEACH tskpri spr_tskpri " | "$
-		PRIMAP_BIT(INT_PRIORITY($tskpri$))
-	$END$)
-$ELSE$
-	0U
-$END$;$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id TSK.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$$NL$
-$END$
-
-$
-$  ã¿ã¹ã¯ã1ã¤ãç»é²ããã¦ããªãå ´åï¼»NGKI0033ï¼½
-$
-$IF !LENGTH(TSK.ID_LIST)$
-	$ERROR$$FORMAT(_("no task is registered"))$$END$
-$END$
-
-$
-$  ã¿ã¹ã¯IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1);$NL$
-$NL$
-
-$
-$  ã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
-$	//ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (TSK.TSKATR[tskid] & ~(TA_ACT|TA_NOACTQUE|TARGET_TSKATR)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"tskatr", TSK.TSKATR[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
-	$IF !(TMIN_TPRI <= TSK.ITSKPRI[tskid] && TSK.ITSKPRI[tskid] <= TMAX_TPRI)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"itskpri", TSK.ITSKPRI[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-$END$
-
-$
-$  ã¹ã¿ãã¯é åã®çæã¨ããã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// stkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼ããã
-$	// å°ããå ´åï¼»NGKI1042ï¼½
-	$IF TSK.STKSZ[tskid] <= 0 || (TARGET_MIN_STKSZ
-									&& TSK.STKSZ[tskid] < TARGET_MIN_STKSZ)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' of `%3%\' in %4%"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$ 	// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
-	$IF !EQ(TSK.STK[tskid], "NULL") && CHECK_STKSZ_ALIGN
-							&& (TSK.STKSZ[tskid] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
-	$IF EQ(TSK.STK[tskid],"NULL")$
-$		// ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
-		$TSK.TINIB_STKSZ[tskid] = ALLOC_STACK(CONCAT("_kernel_stack_",
-												tskid), TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = CONCAT("_kernel_stack_", tskid)$
-	$ELSE$
-		$TSK.TINIB_STKSZ[tskid] = FORMAT("(%1%)", TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = FORMAT("(void *)(%1%)", TSK.STK[tskid])$
-	$END$
-$END$
-$NL$
-
-$
-$  ã¿ã¹ã¯åæåãã­ãã¯ã®çæï¼ã¿ã¹ã¯ã¯1åä»¥ä¸å­å¨ããï¼
-$
-const TINIB _kernel_tinib_table[TNUM_TSKID] = {$NL$
-$JOINEACH tskid TSK.ID_LIST ",\n"$
-	$TAB${$SPC$
-$		// ã¿ã¹ã¯å±æ§ï¼æ¡å¼µæ
-å ±ï¼èµ·åçªå°ï¼èµ·åæåªå
-åº¦
-		($TSK.TSKATR[tskid]$),$SPC$
-		(intptr_t)($TSK.EXINF[tskid]$),$SPC$
-		(TASK)($TSK.TASK[tskid]$),$SPC$
-		INT_PRIORITY($TSK.ITSKPRI[tskid]$),$SPC$
-
-$		// ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ï¼ã¹ã¿ãã¯é å
-		$IF USE_TSKINICTXB$
-			$GENERATE_TSKINICTXB(tskid)$
-		$ELSE$
-			$TSK.TINIB_STKSZ[tskid]$, $TSK.TINIB_STK[tskid]$
-		$END$$SPC$
-	}$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
-$
-const ID _kernel_torder_table[TNUM_TSKID] = {$NL$
-$TAB$$JOINEACH tskid TSK.ORDER_LIST ", "$$tskid$$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çãã­ãã¯ã®çæ
-$
-TCB _kernel_tcb_table[TNUM_TSKID];$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«åæåé¢æ°
-$
-$initfuncs = "_kernel_initialize_task();"$
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/task.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/task.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/task.trb	(revision 306)
@@ -0,0 +1,174 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: task.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+#
+
+class TaskObject < KernelObject
+  def initialize()
+    super("tsk", "task", "t")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:stk] ||= "NULL"
+
+    # tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
+    #ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:tskatr] & ~($TA_ACT|$TA_NOACTQUE|$TARGET_TSKATR)) != 0
+      error_illegal_id("E_RSATR", params, :tskatr, :tskid)
+    end
+
+    # (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
+    if !($TMIN_TPRI <= params[:itskpri] && params[:itskpri] <= $TMAX_TPRI)
+      error_illegal_id("E_PAR", params, :itskpri, :tskid)
+    end
+
+    # stkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+    # ãããå°ããå ´åï¼»NGKI1042ï¼½
+    if params[:stksz] < $TARGET_MIN_STKSZ
+      error_wrong_id("E_PAR", params, :stksz, :tskid, "too small")
+    end
+
+    # ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
+    if params[:stk] == "NULL"
+      # ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
+      stkName = "_kernel_stack_#{params[:tskid]}"
+      params[:tinib_stksz] = AllocStack(stkName, params[:stksz])
+      params[:tinib_stk] = stkName
+    else
+      # stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
+      if (params[:stksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+        error_wrong_id("E_PAR", params, :stksz, :tskid, "not aligned")
+      end
+
+      params[:tinib_stksz] = params[:stksz]
+      params[:tinib_stk] = "(void *)(#{params[:stk]})"
+    end
+  end
+
+  def generateInib(key, params)
+    if $USE_TSKINICTXB
+      tskinictxb = GenerateTskinictxb(key, params)
+    else
+      tskinictxb = "#{params[:tinib_stksz]}, #{params[:tinib_stk]}"
+    end
+    return("(#{params[:tskatr]}), (intptr_t)(#{params[:exinf]}), " \
+			"(TASK)(#{params[:task]}), INT_PRIORITY(#{params[:itskpri]}), " \
+			+ tskinictxb)
+  end
+end
+
+#
+#  ã¿ã¹ã¯ç®¡çã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Task Management Functions")
+if $cfgData[:CRE_TSK].size() == 0
+  error("no task is registered")
+end
+TaskObject.new.generate()
+
+# ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_torder_table[TNUM_TSKID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_TSK].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:tskid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  ENA_SPRã®å¦ç
+#
+# ã¨ã©ã¼ãã§ãã¯
+$subprioTskpri = {}
+$cfgData[:ENA_SPR].each do |key, params|
+  tskpriVal = params[:tskpri].val
+
+  #	(TMIN_TPRI <= tskpri && tskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI3678ï¼½
+  if !($TMIN_TPRI <= tskpriVal && tskpriVal <= $TMAX_TPRI)
+    error_illegal("E_PAR", params, :tskpri)
+  end
+
+  if !$subprioTskpri.has_key?(tskpriVal)
+    $subprioTskpri[tskpriVal] = params[:tskpri]
+  else
+    # tskpriValããµãåªå
+åº¦ãä½¿ç¨ããåªå
+åº¦ã«è¨­å®æ¸ã¿ã®å ´å
+    warning_api(params, "tskpri `#{params[:tskpri]}' in ENA_SPR" \
+								" is same with #{$subprioTskpri[tskpriVal]}")
+  end
+end
+
+# ãµãåªå
+åº¦ãç¨ãã¦ã¹ã±ã¸ã¥ã¼ã«ããåªå
+åº¦ã®ãããããã
+$kernelCfgC.append("const uint16_t _kernel_subprio_primap = ")
+if $subprioTskpri.size > 0
+  $kernelCfgC.append("(")
+  $subprioTskpri.each_with_index do |(tskpriVal, tskpri), index|
+    $kernelCfgC.append(" | ") if index > 0
+    $kernelCfgC.append("PRIMAP_BIT(INT_PRIORITY(#{tskpri}))")
+  end
+  $kernelCfgC.add2(");")
+else
+  $kernelCfgC.add2("0U;")
+end
Index: asp3_wo_tecs/trunk/extension/subprio/test/test_subprio1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/test/test_subprio1.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/test/test_subprio1.cfg	(revision 306)
@@ -3,10 +3,7 @@
 åº¦æ©è½ã®ãã¹ã(1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_subprio1.cfg 260 2014-10-05 02:33:43Z ertl-hiro $
+ *  $Id: test_subprio1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_subprio1.h"
Index: asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.c
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.c	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_subprio2.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_subprio2.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -126,5 +126,5 @@
  *		chg_spr(TASK2, 10) -> E_CTX					... (B-2)
  *		unl_cpu()
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, TEST_TIME_CP) ... ALM1-1ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== TASK4ï¼ç¶ãï¼==
@@ -214,5 +214,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.cfg	(revision 306)
@@ -3,10 +3,7 @@
 åº¦æ©è½ã®ãã¹ã(2)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_subprio2.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: test_subprio2.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_subprio2.h"
Index: asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.h
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.h	(revision 305)
+++ asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_subprio2.h 258 2014-10-04 19:37:38Z ertl-hiro $
+ *  $Id: test_subprio2.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -81,4 +81,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/include/kernel.h	(revision 305)
+++ asp3_wo_tecs/trunk/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 520 2016-01-14 05:06:26Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -547,6 +547,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x3000)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/kernel/dataqueue.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/dataqueue.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/dataqueue.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: dataqueue.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+#   $Id: dataqueue.trb 668 2016-03-03 13:57:53Z ertl-hiro $
 # 
 
@@ -66,4 +66,7 @@
 
   def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:dtqmb] ||= "NULL"
+
     # dtqatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1669ï¼½
     #ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
@@ -74,21 +77,20 @@
     # dtqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0132ï¼½
     if params[:dtqmb] != "NULL"
-      error_illegal_id("E_PAR", params, :dtqmb, :dtqid)
+      error_illegal_id("E_NOSPT", params, :dtqmb, :dtqid)
     end
 
     # ãã¼ã¿ã­ã¥ã¼ç®¡çé å
     if params[:dtqcnt] > 0
-      $kernelCfgC.add("static DTQMB _kernel_dtqmb_#{params[:dtqid]}" \
-												"[#{params[:dtqcnt]}];")
+      dtqmbName = "_kernel_dtqmb_#{params[:dtqid]}"
+      $kernelCfgC.add("static DTQMB #{dtqmbName}[#{params[:dtqcnt]}];")
+      params[:dtqinib_dtqmb] = dtqmbName
+    else
+      params[:dtqinib_dtqmb] = "NULL"
     end
   end
 
   def generateInib(key, params)
-    if params[:dtqcnt] > 0
-      dtqmb = "_kernel_dtqmb_#{params[:dtqid]}"
-    else
-      dtqmb = "NULL"
-    end
-    return("(#{params[:dtqatr]}), (#{params[:dtqcnt]}), #{dtqmb}")
+    return("(#{params[:dtqatr]}), (#{params[:dtqcnt]}), " \
+										"#{params[:dtqinib_dtqmb]}")
   end
 end
Index: asp3_wo_tecs/trunk/kernel/exception.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/exception.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/exception.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: exception.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+#   $Id: exception.trb 663 2016-02-27 04:45:50Z ertl-hiro $
 # 
 
@@ -76,5 +76,5 @@
   # excatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3131ï¼½
   #ï¼TARGET_EXCATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-  if (params[:excatr] & ~$TARGET_EXCATR) != 0
+  if (params[:excatr] & ~($TARGET_EXCATR)) != 0
     error_illegal_sym("E_RSATR", params, :excatr, :excno)
   end
@@ -85,12 +85,11 @@
 å ±ã®çæ
 #
-if $OMIT_INITIALIZE_EXCEPTION.nil?
+if !$OMIT_INITIALIZE_EXCEPTION
   #
   #  å®ç¾©ããCPUä¾å¤ãã³ãã©ã®æ°
   #
-  $kernelCfgC.append(<<EOS)
+  $kernelCfgC.add(<<EOS)
 #define TNUM_DEF_EXCNO	#{$cfgData[:DEF_EXC].size}
 const uint_t _kernel_tnum_def_excno = TNUM_DEF_EXCNO;
-
 EOS
 
Index: asp3_wo_tecs/trunk/kernel/genoffset.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/genoffset.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/genoffset.trb	(revision 306)
@@ -52,5 +52,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: genoffset.trb 572 2016-02-01 14:40:09Z ertl-hiro $
+#   $Id: genoffset.trb 662 2016-02-27 02:33:51Z ertl-hiro $
 # 
 
@@ -75,5 +75,5 @@
 # 
 def GenerateDefine(symbol, value)
-  $offsetH.add("#define #{symbol}\t#{value.val}")
+  $offsetH.add("#define #{symbol}\t#{value}")
 end
 
Index: asp3_wo_tecs/trunk/kernel/interrupt.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/interrupt.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/interrupt.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: interrupt.trb 612 2016-02-08 04:27:57Z ertl-hiro $
+#   $Id: interrupt.trb 678 2016-03-06 02:36:09Z ertl-hiro $
 # 
 
@@ -78,5 +78,5 @@
 #  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
 #
-$kernelCfgC.append(<<EOS)
+$kernelCfgC.add(<<EOS)
 #ifndef LOG_ISR_ENTER
 #define LOG_ISR_ENTER(isrid)
@@ -86,5 +86,4 @@
 #define LOG_ISR_LEAVE(isrid)
 #endif /* LOG_ISR_LEAVE */
-
 EOS
 
@@ -105,5 +104,5 @@
 # 
 if $INTPRI_CFGINT_VALID.nil?
-  $INTPRI_CFGINT_VALID = $TMIN_INTPRI.val.upto($TMAX_INTPRI.val).to_a
+  $INTPRI_CFGINT_VALID = $TMIN_INTPRI.upto($TMAX_INTPRI).to_a
 end
 
@@ -151,6 +150,6 @@
     if !$INTNO_FIX_NONKERNEL.index(params[:intno]).nil?
       if params[:intpri] >= $TMIN_INTPRI
-        error_ercd("E_OBJ", params, "intno `#{params[:intno]}'" \
-							" must have higher priority than TMIN_INTPRI")
+        error_ercd("E_OBJ", params, "%%intno must have higher priority " \
+											"than TMIN_INTPRI in %apiname")
       end
     end
@@ -162,6 +161,6 @@
     if !$INTNO_FIX_KERNEL.index(params[:intno]).nil?
       if params[:intpri] < $TMIN_INTPRI
-        error_ercd("E_OBJ", params, "intno `#{params[:intno]}'" \
-					" must have lower or equal priority to TMIN_INTPRI")
+        error_ercd("E_OBJ", params, "%%intno must have lower or equal " \
+									"priority to TMIN_INTPRI in %apiname")
       end
     end
@@ -180,5 +179,5 @@
   # inhatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3052ï¼½
   #ï¼TARGET_INHATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-  if (params[:inhatr] & ~$TARGET_INHATR) != 0
+  if (params[:inhatr] & ~($TARGET_INHATR)) != 0
     error_illegal_sym("E_RSATR", params, :inhatr, :inhno)
   end
@@ -189,6 +188,6 @@
     if !$INHNO_FIX_NONKERNEL.index(params[:inhno]).nil?
       if (params[:inhatr] & $TA_NONKERNEL) == 0
-        error_ercd("E_RSATR", params, "inhno `#{params[:inhno]}'" \
-									" must be non-kernel interrupt")
+        error_ercd("E_RSATR", params, "%%inhno must be " \
+								"non-kernel interrupt in %apiname")
       end
     end
@@ -200,6 +199,6 @@
     if !$INHNO_FIX_KERNEL.index(params[:inhno]).nil?
       if (params[:inhatr] & $TA_NONKERNEL) != 0
-        error_ercd("E_RSATR", params, "inhno `#{params[:inhno]}'" \
-									" must not be non-kernel interrupt")
+        error_ercd("E_RSATR", params, "%%inhno must not be " \
+								"non-kernel interrupt in %apiname")
       end
     end
@@ -211,6 +210,6 @@
     # inhnoã«å¯¾å¿ããintnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3062ï¼½
     if !$cfgData[:CFG_INT].has_key?(intnoVal)
-      error_ercd("E_OBJ", params, "intno `#{intnoVal}' corresponding to" \
-				" inhno `#{params[:inhno]}' is not configured with CFG_INT")
+      error_ercd("E_OBJ", params, "intno `#{intnoVal}' corresponding to " \
+					"%%inhno in %apiname is not configured with CFG_INT")
     else
       intnoParams = $cfgData[:CFG_INT][intnoVal]
@@ -221,7 +220,6 @@
         # ããå ´åï¼E_OBJï¼ï¼»NGKI3065ï¼½
         if intnoParams[:intpri] < $TMIN_INTPRI
-          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}'" \
-						" configured for inhno `#{params[:inhno]}' must" \
-						" be lower or equal to TMIN_INTPRI")
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+				"configured for %%inhno must be lower or equal to TMIN_INTPRI")
         end
       else
@@ -231,7 +229,6 @@
         # å ´åï¼E_OBJï¼ï¼»NGKI3066ï¼½
         if intnoParams[:intpri] >= $TMIN_INTPRI
-          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}'" \
-						" configured for inhno `#{params[:inhno]}' must" \
-						" be higher than with TMIN_INTPRI")
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+					"configured for %%inhno must be higher than TMIN_INTPRI")
         end
       end
@@ -246,5 +243,5 @@
   #	isratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2998ï¼½
   #ï¼TARGET_ISRATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-  if (params[:isratr] & ~$TARGET_ISRATR) != 0
+  if (params[:isratr] & ~($TARGET_ISRATR)) != 0
     error_illegal("E_RSATR", params, "isratr")
   end
@@ -267,5 +264,5 @@
   isrParamsList = []
   $cfgData[:CRE_ISR].sort.each do |key, params|
-    if params[:intno].val == intnoVal
+    if params[:intno] == intnoVal
       isrParamsList.push(params)
     end
@@ -279,14 +276,12 @@
     if $cfgData[:DEF_INH].has_key?(inhnoVal)
       inhnoParams = $cfgData[:DEF_INH][inhnoVal]
-      error_ercd("E_OBJ", isrParamsList[0], \
-					"intno `#{isrParamsList[0][:intno]}' in CRE_ISR" \
-					" is duplicated with inhno #{inhnoParams[:inhno]}")
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+					"is duplicated with inhno #{inhnoParams[:inhno]}")
     end
 
     # intnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3012ï¼½
     if !$cfgData[:CFG_INT].has_key?(intnoVal)
-      error_ercd("E_OBJ", isrParamsList[0], \
-						"intno `#{isrParamsList[0][:intno]}'" \
-						" is not configured with CFG_INT")
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+									"is not configured with CFG_INT")
     else
       intnoParams = $cfgData[:CFG_INT][intnoVal]
@@ -297,7 +292,6 @@
       if intnoParams[:intpri] < $TMIN_INTPRI
         error_ercd("E_OBJ", isrParamsList[0],
-						"intpri `#{intnoParams[:intpri]}' configured for" \
-						" intno `#{isrParamsList[0][:intno]}}' in higher" \
-						" than TMIN_INTPRI")
+						"intpri `#{intnoParams[:intpri]}' configured for " \
+						"%%intno with CFG_INT in higher than TMIN_INTPRI")
       end
     end
@@ -305,10 +299,9 @@
     # æ¬¡ã®DEF_INHã«ç¸å½ãããã¼ã¿ãçæ
     # DEF_INH(inhno, { TA_NULL, _kernel_inthdr_<intno> } );
-    params = {
-      :inhno => StrVal.new(inhnoVal.to_s, inhnoVal),
-      :inhatr => $TA_NULL,
-      :inthdr => StrVal.new("_kernel_inthdr_#{intnoVal}")
+    $cfgData[:DEF_INH][inhnoVal] = {
+      inhno: NumStr.new(inhnoVal),
+      inhatr: NumStr.new($TA_NULL, "TA_NULL"),
+      inthdr: "_kernel_inthdr_#{intnoVal}"
     }
-    $cfgData[:DEF_INH][inhnoVal] = params
 
     # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç¨ã®å²è¾¼ã¿ãã³ãã©
@@ -340,12 +333,11 @@
 å ±ã®çæ
 #
-if $OMIT_INITIALIZE_INTERRUPT.nil? || !$USE_INHINIB_TABLE.nil?
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INHINIB_TABLE
   #
   #  å®ç¾©ããå²è¾¼ã¿ãã³ãã©ã®æ°
   #
-  $kernelCfgC.append(<<EOS)
+  $kernelCfgC.add(<<EOS)
 #define TNUM_DEF_INHNO	#{$cfgData[:DEF_INH].size}
 const uint_t _kernel_tnum_def_inhno = TNUM_DEF_INHNO;
-
 EOS
 
@@ -388,12 +380,11 @@
 å ±ã®çæ
 #
-if $OMIT_INITIALIZE_INTERRUPT.nil? || !$USE_INTINIB_TABLE.nil?
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INTINIB_TABLE
   #
   #  è¨­å®ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°
   #
-  $kernelCfgC.append(<<EOS)
+  $kernelCfgC.add(<<EOS)
 #define TNUM_CFG_INTNO	#{$cfgData[:CFG_INT].size}
 const uint_t _kernel_tnum_cfg_intno = TNUM_CFG_INTNO;
-
 EOS
 
Index: asp3_wo_tecs/trunk/kernel/kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/kernel.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/kernel.trb	(revision 306)
@@ -45,5 +45,5 @@
 #       å
 è²¬ãããã¨ï¼
-#
+# 
 #   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
 ã
@@ -52,7 +52,7 @@
 #   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
 #   ã®è²¬ä»»ãè² ããªãï¼
-#
-#   $Id: kernel.trb 588 2016-02-05 12:54:58Z ertl-hiro $
-#
+# 
+#   $Id: kernel.trb 670 2016-03-03 15:08:11Z ertl-hiro $
+# 
 
 #
@@ -60,7 +60,7 @@
 #
 
-# 
+#
 #  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
-# 
+#
 $timeStampFileName = "kernel_cfg.timestamp"
 
@@ -70,9 +70,8 @@
 #
 $kernelCfgH = GenFile.new("kernel_cfg.h")
-$kernelCfgH.append(<<EOS)
+$kernelCfgH.add(<<EOS)
 /* kernel_cfg.h */
 #ifndef TOPPERS_KERNEL_CFG_H
 #define TOPPERS_KERNEL_CFG_H
-
 EOS
 
@@ -82,5 +81,5 @@
 #
 $kernelCfgC = GenFile.new("kernel_cfg.c")
-$kernelCfgC.append(<<EOS)
+$kernelCfgC.add(<<EOS)
 /* kernel_cfg.c */
 #include "kernel/kernel_int.h"
@@ -90,10 +89,9 @@
 #error The kernel does not match this configuration file.
 #endif
-
-EOS
-
-# 
+EOS
+
+#
 #  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
-# 
+#
 $kernelCfgC.comment_header("Include Directives")
 $includeFiles.each do |file|
@@ -142,5 +140,5 @@
 
     # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
-    if !$USE_EXTERNAL_ID.nil?
+    if $USE_EXTERNAL_ID
       $cfgData[@api].sort.each do |key, params|
         $kernelCfgC.add("const ID #{params[@objid]}_id" \
@@ -224,11 +222,11 @@
 								|| (nfymode2 == $TENFY_SETFLG && epar2.nil?)
     # ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
-    error_api(params, "too few parameters for nfymode `#{nfymode}'" \
-							" in #{params[:apiname]} of #{params[objid]}")
+    error_api(params, "too few parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
   elsif (nfymode2 == 0 && !epar1.nil?) \
 					|| (nfymode2 != $TENFY_SETFLG && !epar2.nil?)
     # ãã©ã¡ã¼ã¿ãå¤ãããå ´å
-    error_api(params, "too many parameters for nfymode `#{nfymode}'" \
-							" in #{params[:apiname]} of #{params[objid]}")
+    error_api(params, "too many parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
   elsif nfymode == $TNFY_HANDLER
     # ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
@@ -354,10 +352,10 @@
 IncludeTrb("kernel/exception.trb")
 
-# 
+#
 #  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-# 
+#
 $kernelCfgC.comment_header("Stack Area for Non-task Context")
 
-if $cfgData[:DEF_ICS].size() == 0
+if $cfgData[:DEF_ICS].size == 0
   # DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
   if $DEFAULT_ISTK.nil?
@@ -371,5 +369,5 @@
 else
   # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
-  if $cfgData[:DEF_ICS].size() > 1
+  if $cfgData[:DEF_ICS].size > 1
     error("E_OBJ: too many DEF_ICS")
   end
@@ -378,13 +376,16 @@
   params = $cfgData[:DEF_ICS][1]
 
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:istk] ||= "NULL"
+
   # istkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
   # ãããå°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
-  if params[:istksz] <= $TARGET_MIN_ISTKSZ
+  if params[:istksz] < $TARGET_MIN_ISTKSZ
     error_wrong("E_PAR", params, :istksz, "too small")
   end
 
-  if (params[:istk] == "NULL")
+  if params[:istk] == "NULL"
     # ã¹ã¿ãã¯é åã®èªåå²ä»ã
-	istksz = AllocStack("_kernel_istack", params[:istksz])
+    istksz = AllocStack("_kernel_istack", params[:istksz])
     istk = "_kernel_istack"
   else
@@ -399,5 +400,5 @@
 end
 
-$kernelCfgC.append(<<EOS)
+$kernelCfgC.add(<<EOS)
 const size_t _kernel_istksz = #{istksz};
 STK_T *const _kernel_istk = #{istk};
@@ -406,19 +407,17 @@
 STK_T *const _kernel_istkpt = TOPPERS_ISTKPT(#{istk}, #{istksz});
 #endif /* TOPPERS_ISTKPT */
-
-EOS
-
-# 
+EOS
+
+#
 #  ã¿ã¤ã ã¤ãã³ãç®¡ç
-# 
+#
 $kernelCfgC.comment_header("Time Event Management")
-$kernelCfgC.append(<<EOS)
+$kernelCfgC.add(<<EOS)
 TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];
-
-EOS
-
-# 
+EOS
+
+#
 #  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
-# 
+#
 $kernelCfgC.comment_header("Module Initialization Function")
 $kernelCfgC.append(<<EOS)
@@ -428,12 +427,11 @@
 EOS
 $initializeFunctions.each do |func|
-	$kernelCfgC.add("\t#{func}")
+  $kernelCfgC.add("\t#{func}")
 end
 $kernelCfgC.add2("}")
 
-# 
+#
 #  åæåã«ã¼ãã³æ©è½
-# 
-# 
+#
 $kernelCfgC.comment_header("Initialization Routine")
 
@@ -442,5 +440,5 @@
   # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
   #ï¼TA_NULLã§ãªãå ´åï¼
-  if (params[:iniatr] != 0)
+  if (params[:iniatr] != $TA_NULL)
     error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
   end
@@ -459,7 +457,7 @@
 $kernelCfgC.add2("}")
 
-# 
+#
 #  çµäºå¦çã«ã¼ãã³æ©è½
-# 
+#
 $kernelCfgC.comment_header("Termination Routine")
 
@@ -468,5 +466,5 @@
   # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
   #ï¼TA_NULLã§ãªãå ´åï¼
-  if (params[:teratr] != 0)
+  if (params[:teratr] != $TA_NULL)
     error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
   end
Index: asp3_wo_tecs/trunk/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/kernel/kernel_api.def	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/kernel_api.def	(revision 306)
@@ -1,9 +1,9 @@
-CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk }
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
 CRE_SEM #semid* { .sematr .isemcnt .maxsem }
 CRE_FLG #flgid* { .flgatr .iflgptn }
-CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb }
-CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb }
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
 CRE_MTX #mtxid* { .mtxatr +ceilpri? }
-CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf &mpfmb }
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
 CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
 CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
@@ -12,5 +12,5 @@
 DEF_INH .inhno* { .inhatr &inthdr }
 DEF_EXC .excno* { .excatr &exchdr }
-DEF_ICS { .istksz &istk }
+DEF_ICS { .istksz &istk? }
 ATT_INI { .iniatr &exinf &inirtn }
 ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/kernel/kernel_check.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/kernel_check.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/kernel_check.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: kernel_check.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+#   $Id: kernel_check.trb 662 2016-02-27 02:33:51Z ertl-hiro $
 #  
 
@@ -79,4 +79,6 @@
     elsif startIdata.nil?
       error_exit("symbol `lma[:START_IDATA]' not found")
+    else
+      BCOPY(startIdata, startData, endData - startData)
     end
   end
@@ -87,8 +89,8 @@
 å ±ã®ãã§ãã¯é¢æ°
 #
-$tmax_tskid = PEEK(SYMBOL("_kernel_tmax_tskid"), $sizeof_ID)
-$tmax_semid = PEEK(SYMBOL("_kernel_tmax_semid"), $sizeof_ID)
-$tmax_flgid = PEEK(SYMBOL("_kernel_tmax_flgid"), $sizeof_ID)
-$tmax_dtqid = PEEK(SYMBOL("_kernel_tmax_dtqid"), $sizeof_ID)
+$tmax_tskid = $TMIN_TSKID + $cfgData[:CRE_TSK].size - 1
+$tmax_semid = $TMIN_SEMID + $cfgData[:CRE_SEM].size - 1
+$tmax_flgid = $TMIN_FLGID + $cfgData[:CRE_FLG].size - 1
+$tmax_dtqid = $TMIN_DTQID + $cfgData[:CRE_DTQ].size - 1
 
 def checkNotifyHandler(key, params, objid, exinf, nfyhdr)
@@ -122,5 +124,5 @@
       error_wrong_id("E_PAR", params1, :tmehdr, objid, "not aligned")
     end
-    if $CHECK_FUNC_NONNULL == 1 && tmehdr == 0
+    if $CHECK_FUNC_NONNULL && tmehdr == 0
       error_wrong_id("E_PAR", params1, :tmehdr, objid, "null")
     end
@@ -138,5 +140,5 @@
       error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
     end
-    if $CHECK_INTPTR_NONNULL == 1 && p_var == 0
+    if $CHECK_INTPTR_NONNULL && p_var == 0
       error_wrong_id("E_PAR", params1, :p_var, objid, "null")
     end
@@ -194,5 +196,5 @@
       error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
     end
-    if $CHECK_INTPTR_NONNULL == 1 && p_var == 0
+    if $CHECK_INTPTR_NONNULL && p_var == 0
       error_wrong_id("E_PAR", params1, :p_var, objid, "null")
     end
@@ -244,12 +246,13 @@
 # 
 tinib = SYMBOL("_kernel_tinib_table")
-$cfgData[:CRE_TSK].each do |key, params|
+$cfgData[:CRE_TSK].sort.each do |key, params|
+  task = PEEK(tinib + $offsetof_TINIB_task, $sizeof_TASK)
+
   # ã¿ã¹ã¯ã®å
 é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
-  task = PEEK(tinib + $offsetof_TINIB_task, $sizeof_FP)
   if (task & ($CHECK_FUNC_ALIGN - 1)) != 0
     error_wrong_id("E_PAR", params, :task, :tskid, "not aligned")
   end
-  if $CHECK_FUNC_NONNULL == 1 && task == 0
+  if $CHECK_FUNC_NONNULL && task == 0
     error_wrong_id("E_PAR", params, :task, :tskid, "null")
   end
@@ -257,6 +260,6 @@
   # ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
 é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
-  if $USE_TSKINICTXB == 1
-    stk = GetStackTskinictxb(key, params)
+  if $USE_TSKINICTXB
+    stk = GetStackTskinictxb(key, params, tinib)
   else
     stk = PEEK(tinib + $offsetof_TINIB_stk, $sizeof_void_ptr)
@@ -265,5 +268,5 @@
     error_wrong_id("E_PAR", params, :stk, :tskid, "not aligned")
   end
-  if $CHECK_STACK_NONNULL == 1 && stk == 0
+  if $CHECK_STACK_NONNULL && stk == 0
     error_wrong_id("E_PAR", params, :stk, :tskid, "null")
   end
@@ -276,5 +279,5 @@
 # 
 mpfinib = SYMBOL("_kernel_mpfinib_table")
-$cfgData[:CRE_MPF].each do |key, params|
+$cfgData[:CRE_MPF].sort.each do |key, params|
   mpf = PEEK(mpfinib + $offsetof_MPFINIB_mpf, $sizeof_void_ptr)
 
@@ -284,5 +287,5 @@
     error_wrong_id("E_PAR", params, :mpf, :mpfid, "not aligned")
   end
-  if $CHECK_MPF_NONNULL == 1 && mpf == 0
+  if $CHECK_MPF_NONNULL && mpf == 0
     error_wrong_id("E_PAR", params, :mpf, :mpfid, "null")
   end
@@ -295,7 +298,7 @@
 # 
 cycinib = SYMBOL("_kernel_cycinib_table")
-$cfgData[:CRE_CYC].each do |key, params|
+$cfgData[:CRE_CYC].sort.each do |key, params|
   exinf = PEEK(cycinib + $offsetof_CYCINIB_exinf, $sizeof_intptr_t)
-  nfyhdr = PEEK(cycinib + $offsetof_CYCINIB_nfyhdr, $sizeof_FP)
+  nfyhdr = PEEK(cycinib + $offsetof_CYCINIB_nfyhdr, $sizeof_NFYHDR)
 
   #	éç¥æ
@@ -310,7 +313,7 @@
 # 
 alminib = SYMBOL("_kernel_alminib_table")
-$cfgData[:CRE_ALM].each do |key, params|
+$cfgData[:CRE_ALM].sort.each do |key, params|
   exinf = PEEK(alminib + $offsetof_ALMINIB_exinf, $sizeof_intptr_t)
-  nfyhdr = PEEK(alminib + $offsetof_ALMINIB_nfyhdr, $sizeof_FP)
+  nfyhdr = PEEK(alminib + $offsetof_ALMINIB_nfyhdr, $sizeof_NFYHDR)
 
   #	éç¥æ
@@ -324,12 +327,15 @@
 #  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
 # 
-istk = PEEK(SYMBOL("_kernel_istk"), $sizeof_void_ptr)
-
-# éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
+istkAddr = SYMBOL("_kernel_istk")
+if !istkAddr.nil?
+  istk = PEEK(istkAddr, $sizeof_void_ptr)
+
+  # éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
 é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
-if (istk & ($CHECK_STACK_ALIGN - 1)) != 0
-  error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "not aligned")
-end
-if $CHECK_STACK_NONNULL == 1 && istk == 0
-  error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "null")
-end
+  if (istk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && istk == 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "null")
+  end
+end
Index: asp3_wo_tecs/trunk/kernel/kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/kernel/kernel_impl.h	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/kernel_impl.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel_impl.h 332 2015-06-21 13:20:37Z ertl-hiro $
+ *  $Id: kernel_impl.h 706 2016-03-29 14:19:40Z ertl-hiro $
  */
 
@@ -88,11 +88,4 @@
  */
 #include <t_syslog.h>
-
-/*
- *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
- */
-#ifndef CAST
-#define CAST(type, val)		((type)(val))
-#endif /* CAST */
 
 /*
Index: asp3_wo_tecs/trunk/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/kernel/kernel_sym.def	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/kernel_sym.def	(revision 306)
@@ -1,5 +1,5 @@
-USE_EXTERNAL_ID,1,,defined(USE_EXTERNAL_ID)
-SIL_ENDIAN_BIG,1,,defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,1,,defined(SIL_ENDIAN_LITTLE)
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
 TA_NULL
 TA_ACT
@@ -48,9 +48,9 @@
 TMIN_CYCID,,signed
 TMIN_ALMID,,signed
-USE_TSKINICTXB,1,,defined(USE_TSKINICTXB)
-OMIT_INITIALIZE_INTERRUPT,1,,defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,1,,defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,1,,defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,1,,defined(OMIT_INITIALIZE_EXCEPTION)
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
 DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
 TARGET_TSKATR,,,defined(TARGET_TSKATR),0
@@ -63,11 +63,11 @@
 CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
 CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
-CHECK_INTPTR_NONNULL,1,,defined(CHECK_INTPTR_NONNULL)
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
 CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
-CHECK_FUNC_NONNULL,1,,defined(CHECK_FUNC_NONNULL)
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
 CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
-CHECK_STACK_NONNULL,1,,defined(CHECK_STACK_NONNULL)
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
 CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
-CHECK_MPF_NONNULL,1,,defined(CHECK_MPF_NONNULL)
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
 sizeof_void_ptr,sizeof(void*)
 sizeof_uint_t,sizeof(uint_t)
@@ -76,7 +76,15 @@
 sizeof_ID,sizeof(ID)
 sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
 sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
 sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
 sizeof_TINIB,sizeof(TINIB)
 offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
Index: asp3_wo_tecs/trunk/kernel/mempfix.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/mempfix.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/mempfix.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: mempfix.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+#   $Id: mempfix.trb 672 2016-03-05 15:33:08Z ertl-hiro $
 # 
 
@@ -66,4 +66,8 @@
 
   def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:mpf] ||= "NULL"
+    params[:mpfmb] ||= "NULL"
+
     # mpfatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2225ï¼½
     #ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
@@ -72,11 +76,11 @@
     end
 
-    # blkcntã0ä»¥ä¸ã®å ´åï¼E_PARï¼ï¼»NGKI2229ï¼½
-    if params[:blkcnt] <= 0
+    # blkcntã0ã®å ´åï¼E_PARï¼ï¼»NGKI2229ï¼½
+    if params[:blkcnt] == 0
       error_illegal_id("E_PAR", params, :blkcnt, :mpfid)
     end
 
-    # blkszã0ä»¥ä¸ã®å ´åï¼E_PARï¼ï¼»NGKI2230ï¼½
-    if params[:blksz] <= 0
+    # blkszã0ã®å ´åï¼E_PARï¼ï¼»NGKI2230ï¼½
+    if params[:blksz] == 0
       error_illegal_id("E_PAR", params, :blksz, :mpfid)
     end
@@ -84,27 +88,27 @@
     # åºå®é·ã¡ã¢ãªãã¼ã«é å
     if params[:mpf] == "NULL"
-      $kernelCfgC.add("static MPF_T _kernel_mpf_#{params[:mpfid]}" \
+      mpfName = "_kernel_mpf_#{params[:mpfid]}"
+      $kernelCfgC.add("static MPF_T #{mpfName}" \
 				"[#{params[:blkcnt]} * COUNT_MPF_T(#{params[:blksz]})];")
+      params[:mpfinib_mpf] = mpfName
+    else
+      params[:mpfinib_mpf] = "(void *)(#{params[:mpf]})"
     end
 
     # mpfmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0166ï¼½
     if params[:mpfmb] != "NULL"
-      error_illegal_id("E_PAR", params, :mpfmb, :mpfid)
+      error_illegal_id("E_NOSPT", params, :mpfmb, :mpfid)
     end
 
     # åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çé å
-    $kernelCfgC.add("static MPFMB _kernel_mpfmb_#{params[:mpfid]}" \
-												"[#{params[:blkcnt]}];")
+    mpfmbName = "_kernel_mpfmb_#{params[:mpfid]}"
+    $kernelCfgC.add("static MPFMB #{mpfmbName}[#{params[:blkcnt]}];")
+    params[:mpfinib_mpfmb] = mpfmbName
   end
 
   def generateInib(key, params)
-    if params[:mpf] == "NULL"
-      mpf = "_kernel_mpf_#{params[:mpfid]}"
-    else
-      mpf = "(void *)(#{params[:mpf]})"
-    end
     return("(#{params[:mpfatr]}), (#{params[:blkcnt]}), " \
-					"ROUND_MPF_T(#{params[:blksz]}), #{mpf}, " \
-					"_kernel_mpfmb_#{params[:mpfid]}")
+			"ROUND_MPF_T(#{params[:blksz]}), #{params[:mpfinib_mpf]}, " \
+			"#{params[:mpfinib_mpfmb]}")
   end
 end
Index: asp3_wo_tecs/trunk/kernel/mutex.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/mutex.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/mutex.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: mutex.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+#   $Id: mutex.trb 630 2016-02-14 11:30:17Z ertl-hiro $
 # 
 
@@ -78,6 +78,5 @@
       # ceilpriãæªæå®ã®å ´åã¯ã¨ã©ã¼ã¨ãã
       if params[:ceilpri].nil?
-        error_api(params, "ceilpri must be specified" \
-							" in #{params[:apiname]} of #{param[:mtxid]}")
+        error_api(params, "ceilpri must be specified in %apiname of %mtxid")
 
       # (TMIN_TPRI <= ceilpri && ceilpri <= TMAX_TPRI)ã§ãªãå ´åï¼E_PARï¼
@@ -91,6 +90,5 @@
       # ceilpriãæå®ããã¦ããå ´åã¯è­¦åã¡ãã»ã¼ã¸ãåºã
       if !params[:ceilpri].nil?
-        warning_api(params, "ceilpri `#{params[:ceilpri]}' is ignored" \
-								" in #{params[:apiname]} of #{params[:mtxid]}")
+        warning_api(params, "%%ceilpri is ignored in %apiname of %mtxid")
       end
       params[:ceilpri] = 0
Index: asp3_wo_tecs/trunk/kernel/pridataq.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/pridataq.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/pridataq.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: pridataq.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+#   $Id: pridataq.trb 668 2016-03-03 13:57:53Z ertl-hiro $
 # 
 
@@ -67,4 +67,7 @@
 
   def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:pdqmb] ||= "NULL"
+
     # pdqatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1804ï¼½
     #ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
@@ -81,5 +84,5 @@
     # pdqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0142ï¼½
     if params[:pdqmb] != "NULL"
-      error_illegal_id("E_PAR", params, :pdqmb, :pdqid)
+      error_illegal_id("E_NOSPT", params, :pdqmb, :pdqid)
     end
 
@@ -87,17 +90,15 @@
 åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé å
     if params[:pdqcnt] > 0
-      $kernelCfgC.add("static PDQMB _kernel_pdqmb_#{params[:pdqid]}" \
-												"[#{params[:pdqcnt]}];")
+      pdqmbName = "_kernel_pdqmb_#{params[:pdqid]}"
+      $kernelCfgC.add("static PDQMB #{pdqmbName}[#{params[:pdqcnt]}];")
+      params[:pdqinib_pdqmb] = pdqmbName
+    else
+      params[:pdqinib_pdqmb] = "NULL"
     end
   end
 
   def generateInib(key, params)
-    if params[:pdqcnt] > 0
-      pdqmb = "_kernel_pdqmb_#{params[:pdqid]}"
-    else
-      pdqmb = "NULL"
-    end
     return("(#{params[:pdqatr]}), (#{params[:pdqcnt]}), " \
-									"(#{params[:maxdpri]}), #{pdqmb}")
+				"(#{params[:maxdpri]}), #{params[:pdqinib_pdqmb]}")
   end
 end
Index: asp3_wo_tecs/trunk/kernel/startup.c
===================================================================
--- asp3_wo_tecs/trunk/kernel/startup.c	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/startup.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: startup.c 181 2014-06-14 16:45:07Z ertl-hiro $
+ *  $Id: startup.c 509 2016-01-12 06:06:14Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/kernel/sys_manage.c
===================================================================
--- asp3_wo_tecs/trunk/kernel/sys_manage.c	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/sys_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sys_manage.c 469 2015-12-30 02:38:47Z ertl-hiro $
+ *  $Id: sys_manage.c 682 2016-03-11 13:52:39Z ertl-hiro $
  */
 
@@ -174,5 +174,5 @@
 /*
  *  ã¿ã¹ã¯ã®åªå
-é ä½ã®åè»¢
+é ä½ã®åè»¢ï¼»NGKI3548ï¼½
  */
 #ifdef TOPPERS_rot_rdq
@@ -185,10 +185,10 @@
 
 	LOG_ROT_RDQ_ENTER(tskpri);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2684ï¼½*/
 	if (tskpri == TPRI_SELF && !sense_context()) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI2689ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI2685ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -217,5 +217,5 @@
  *  å®è¡ç¶æ
 ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3550ï¼½
  */
 #ifdef TOPPERS_get_tid
@@ -227,5 +227,5 @@
 
 	LOG_GET_TID_ENTER(p_tskid);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2707ï¼½*/
 
 	lock_cpu();
@@ -243,5 +243,5 @@
 /*
  *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
-§
+§ï¼»NGKI3623ï¼½
  */
 #ifdef TOPPERS_get_lod
@@ -255,10 +255,10 @@
 
 	LOG_GET_LOD_ENTER(p_tskid, p_load);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3624ï¼½ï¼»NGKI3625ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3631ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3626ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -285,5 +285,5 @@
  *  æå®ããåªå
 é ä½ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3641ï¼½
  */
 #ifdef TOPPERS_get_nth
@@ -298,10 +298,10 @@
 
 	LOG_GET_NTH_ENTER(p_tskid, nth, p_tskid);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3642ï¼½ï¼»NGKI3643ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3650ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3644ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -331,5 +331,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã¸ã®é·ç§»
+ã¸ã®é·ç§»ï¼»NGKI3538ï¼½
  */
 #ifdef TOPPERS_loc_cpu
@@ -342,6 +342,6 @@
 	LOG_LOC_CPU_ENTER();
 
-	if (!sense_lock()) {
-		lock_cpu();
+	if (!sense_lock()) {						/*ï¼»NGKI2731ï¼½*/
+		lock_cpu();								/*ï¼»NGKI2730ï¼½*/
 	}
 	ercd = E_OK;
@@ -355,5 +355,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã®è§£é¤
+ã®è§£é¤ï¼»NGKI3539ï¼½
  *
  *  CPUã­ãã¯ä¸­ã¯ï¼ãã£ã¹ããããå¿
@@ -373,6 +373,6 @@
 	LOG_UNL_CPU_ENTER();
 
-	if (sense_lock()) {
-		unlock_cpu();
+	if (sense_lock()) {							/*ï¼»NGKI2738ï¼½*/
+		unlock_cpu();							/*ï¼»NGKI2737ï¼½*/
 	}
 	ercd = E_OK;
@@ -385,5 +385,5 @@
 
 /*
- *  ãã£ã¹ãããã®ç¦æ­¢
+ *  ãã£ã¹ãããã®ç¦æ­¢ï¼»NGKI2740ï¼½
  */
 #ifdef TOPPERS_dis_dsp
@@ -395,5 +395,5 @@
 
 	LOG_DIS_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2741ï¼½ï¼»NGKI2742ï¼½*/
 
 	lock_cpu();
@@ -411,5 +411,5 @@
 
 /*
- *  ãã£ã¹ãããã®è¨±å¯
+ *  ãã£ã¹ãããã®è¨±å¯ï¼»NGKI2746ï¼½
  */
 #ifdef TOPPERS_ena_dsp
@@ -421,5 +421,5 @@
 
 	LOG_ENA_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2747ï¼½ï¼»NGKI2748ï¼½*/
 
 	lock_cpu();
@@ -454,5 +454,5 @@
 /*
  *  ã³ã³ãã­ã¹ãã®åç
-§
+§ï¼»NGKI2752ï¼½
  */
 #ifdef TOPPERS_sns_ctx
@@ -474,5 +474,5 @@
  *  CPUã­ãã¯ç¶æ
 ã®åç
-§
+§ï¼»NGKI2754ï¼½
  */
 #ifdef TOPPERS_sns_loc
@@ -494,5 +494,5 @@
  *  ãã£ã¹ãããç¦æ­¢ç¶æ
 ã®åç
-§
+§ï¼»NGKI2756ï¼½
  */
 #ifdef TOPPERS_sns_dsp
@@ -514,5 +514,5 @@
  *  ãã£ã¹ãããä¿çç¶æ
 ã®åç
-§
+§ï¼»NGKI2758ï¼½
  */
 #ifdef TOPPERS_sns_dpn
@@ -534,5 +534,5 @@
  *  ã«ã¼ãã«éåä½ç¶æ
 ã®åç
-§
+§ï¼»NGKI2760ï¼½
  */
 #ifdef TOPPERS_sns_ker
Index: asp3_wo_tecs/trunk/kernel/task.trb
===================================================================
--- asp3_wo_tecs/trunk/kernel/task.trb	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/task.trb	(revision 306)
@@ -53,5 +53,5 @@
 #   ã®è²¬ä»»ãè² ããªãï¼
 # 
-#   $Id: task.trb 596 2016-02-06 17:08:56Z ertl-hiro $
+#   $Id: task.trb 668 2016-03-03 13:57:53Z ertl-hiro $
 # 
 
@@ -66,4 +66,7 @@
 
   def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:stk] ||= "NULL"
+
     # tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
     #ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
@@ -85,7 +88,8 @@
     # ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
     if params[:stk] == "NULL"
-      params[:tinib_stksz] = AllocStack("_kernel_stack_#{params[:tskid]}", \
-															params[:stksz])
-      params[:tinib_stk] = "_kernel_stack_#{params[:tskid]}"
+      # ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
+      stkName = "_kernel_stack_#{params[:tskid]}"
+      params[:tinib_stksz] = AllocStack(stkName, params[:stksz])
+      params[:tinib_stk] = stkName
     else
       # stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
@@ -100,5 +104,5 @@
 
   def generateInib(key, params)
-    if $USE_TSKINICTXB == 1
+    if $USE_TSKINICTXB
       tskinictxb = GenerateTskinictxb(key, params)
     else
Index: asp3_wo_tecs/trunk/kernel/time_event.c
===================================================================
--- asp3_wo_tecs/trunk/kernel/time_event.c	(revision 305)
+++ asp3_wo_tecs/trunk/kernel/time_event.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: time_event.c 451 2015-08-14 15:29:07Z ertl-hiro $
+ *  $Id: time_event.c 532 2016-01-15 14:48:04Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/sample/Makefile
===================================================================
--- asp3_wo_tecs/trunk/sample/Makefile	(revision 305)
+++ asp3_wo_tecs/trunk/sample/Makefile	(revision 306)
@@ -208,5 +208,5 @@
 CFG_OBJS := $(CFG_ASMOBJS) $(CFG_COBJS)
 CFG2_OUT_SRCS := kernel_cfg.h kernel_cfg.c $(CFG2_OUT_SRCS)
-CFG_CFLAGS := $(CFG_CFLAGS)
+CFG_CFLAGS := -DTOPPERS_CB_TYPE_ONLY $(CFG_CFLAGS)
 
 #
@@ -272,12 +272,12 @@
 ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
 											$(END_OBJS) $(HIDDEN_OBJS)
+ALL_LIBS = -lkernel $(LIBS)
 ifdef KERNEL_LIB
-	ALL_LIBS = -lkernel $(LIBS)
 	LIBS_DEP = $(KERNEL_LIB)/libkernel.a $(filter %.a,$(LIBS))
 	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L$(KERNEL_LIB)
 	REALCLEAN_FILES := libkernel.a $(REALCLEAN_FILES)
 else
-	ALL_LIBS = libkernel.a $(LIBS)
 	LIBS_DEP = libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L.
 endif
 
Index: asp3_wo_tecs/trunk/sample/sample1.c
===================================================================
--- asp3_wo_tecs/trunk/sample/sample1.c	(revision 305)
+++ asp3_wo_tecs/trunk/sample/sample1.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sample1.c 346 2015-07-18 02:12:08Z ertl-hiro $
+ *  $Id: sample1.c 711 2016-03-29 14:45:54Z ertl-hiro $
  */
 
@@ -237,4 +237,19 @@
 
 /*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+#ifdef INTNO1
+
+void intno1_isr(intptr_t exinf)
+{
+	intno1_clear();
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+#endif /* INTNO1 */
+
+/*
  *  CPUä¾å¤ãã³ãã©
  */
Index: asp3_wo_tecs/trunk/sample/sample1.cfg
===================================================================
--- asp3_wo_tecs/trunk/sample/sample1.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/sample/sample1.cfg	(revision 306)
@@ -17,4 +17,8 @@
 CRE_CYC(CYCHDR1, { TA_NULL, { TNFY_HANDLER, 0, cyclic_handler }, 2000000, 0 });
 CRE_ALM(ALMHDR1, { TA_NULL, { TNFY_HANDLER, 0, alarm_handler }});
+#ifdef INTNO1
+CFG_INT(INTNO1, { INTNO1_INTATR, INTNO1_INTPRI });
+CRE_ISR(INTNO1_ISR, { TA_NULL, 0, INTNO1, intno1_isr, 1 });
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 DEF_EXC(CPUEXC1, { TA_NULL, cpuexc_handler });
Index: asp3_wo_tecs/trunk/sample/sample1.h
===================================================================
--- asp3_wo_tecs/trunk/sample/sample1.h	(revision 305)
+++ asp3_wo_tecs/trunk/sample/sample1.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  *
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  *
- *  $Id: sample1.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: sample1.h 705 2016-03-29 14:16:41Z ertl-hiro $
  */
 
@@ -108,4 +108,7 @@
 extern void	main_task(intptr_t exinf);
 extern void exc_task(intptr_t exinf);
+#ifdef INTNO1
+extern void intno1_isr(intptr_t exinf);
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 extern void	cpuexc_handler(void *p_excinf);
Index: asp3_wo_tecs/trunk/syssvc/histogram.h
===================================================================
--- asp3_wo_tecs/trunk/syssvc/histogram.h	(revision 305)
+++ asp3_wo_tecs/trunk/syssvc/histogram.h	(revision 306)
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: histogram.h 506 2016-01-12 01:46:49Z ertl-hiro $
+ *  $Id: histogram.h 509 2016-01-12 06:06:14Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/syssvc/serial.h
===================================================================
--- asp3_wo_tecs/trunk/syssvc/serial.h	(revision 305)
+++ asp3_wo_tecs/trunk/syssvc/serial.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2011 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
Index: asp3_wo_tecs/trunk/syssvc/test_svc.h
===================================================================
--- asp3_wo_tecs/trunk/syssvc/test_svc.h	(revision 305)
+++ asp3_wo_tecs/trunk/syssvc/test_svc.h	(revision 306)
@@ -66,8 +66,4 @@
 
 #include <kernel.h>
-
-/*
- *  ã¿ã¼ã²ããä¾å­ã®å®ç¾©
- */
 #include "target_test.h"
 
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/Makefile.target
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/Makefile.target	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/Makefile.target	(revision 306)
@@ -2,5 +2,5 @@
 #		Makefileã®ã¿ã¼ã²ããä¾å­é¨ï¼CT11MPcoreç¨ï¼
 #
-#  $Id: Makefile.target 504 2016-01-12 01:19:55Z ertl-hiro $
+#  $Id: Makefile.target 572 2016-02-01 14:40:09Z ertl-hiro $
 # 
 
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/ct11mpcore.ld
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/ct11mpcore.ld	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/ct11mpcore.ld	(revision 306)
@@ -1,4 +1,4 @@
 /*
- *  $Id: ct11mpcore.ld 362 2015-07-26 11:29:15Z ertl-hiro $
+ *  $Id: ct11mpcore.ld 679 2016-03-07 07:14:20Z ertl-hiro $
  */
 
@@ -13,5 +13,5 @@
 	.text ALIGN(4) : {
 		__start_text = .;
-		*(vector)
+		*(.vector)
 		*(.text)
 		*(.glue_7t)
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_check.trb
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_check.trb	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_check.trb	(revision 306)
@@ -1,8 +1,11 @@
-# 
+# -*- coding: utf-8 -*-
+#
 #		ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ï¼CT11MPCoreç¨ï¼
-# 
+#
+#  $Id: target_check.trb 745 2016-04-10 17:00:12Z ertl-hiro $
+#
 
-# 
+#
 #  çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ã¯é£ã°ãï¼
-# 
+#
 IncludeTrb("core_check.trb")
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel.trb	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel.trb	(revision 306)
@@ -1,16 +1,17 @@
-# 
+# -*- coding: utf-8 -*-
+#
 #		ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨ï¼CT11MPCoreç¨ï¼
-# 
-#  $Id: target_kernel.trb 572 2016-02-01 14:40:09Z ertl-hiro $
+#
+#  $Id: target_kernel.trb 745 2016-04-10 17:00:12Z ertl-hiro $
 #
 
-# 
+#
 #  ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·
-# 
+#
 $INTNO_VALID = [ *(0..47) ]
 $INHNO_VALID = $INTNO_VALID
 
-# 
+#
 #  çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ãããä¾å­é¨ã¯é£ã°ãï¼
-# 
+#
 IncludeTrb("core_kernel.trb")
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel_impl.c
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel_impl.c	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel_impl.c	(revision 306)
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_kernel_impl.c 365 2015-07-26 13:18:44Z ertl-hiro $
+ *  $Id: target_kernel_impl.c 509 2016-01-12 06:06:14Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel_impl.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_kernel_impl.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2006-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_kernel_impl.h 397 2015-08-02 01:44:43Z ertl-hiro $
+ *  $Id: target_kernel_impl.h 704 2016-03-29 12:27:19Z ertl-hiro $
  */
 
@@ -66,4 +66,7 @@
 #define TOPPERS_TARGET_KERNEL_IMPL_H
 
+/*
+ *  ã¿ã¼ã²ããã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
 #include "ct11mpcore.h"
 
@@ -103,6 +106,6 @@
 ã¡ã®ããã®å®ç¾©ï¼æ¬æ¥ã¯SILã®ã¿ã¼ã²ããä¾å­é¨ï¼
  */
-#define SIL_DLY_TIM1	20
-#define SIL_DLY_TIM2	3
+#define SIL_DLY_TIM1	26
+#define SIL_DLY_TIM2	2
 
 /*
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_stddef.h
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_stddef.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_stddef.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_stddef.h 362 2015-07-26 11:29:15Z ertl-hiro $
+ *  $Id: target_stddef.h 509 2016-01-12 06:06:14Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_syssvc.h
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_syssvc.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_syssvc.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_syssvc.h 362 2015-07-26 11:29:15Z ertl-hiro $
+ *  $Id: target_syssvc.h 698 2016-03-26 08:48:12Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_test.h
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_test.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_test.h	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_test.h 362 2015-07-26 11:29:15Z ertl-hiro $
+ *  $Id: target_test.h 736 2016-04-04 23:50:03Z ertl-hiro $
  */
 
@@ -62,4 +62,11 @@
 
 /*
+ *  ãã¹ããã­ã°ã©ã ã§ä½¿ç¨ããæéãã©ã¡ã¼ã¿ã«é¢ããå®ç¾©
+ */
+#ifdef TOPPERS_USE_QEMU
+#define TEST_TIME_CP	1000U
+#endif /* TOPPERS_USE_QEMU */
+
+/*
  *  ã³ã¢ã§å
 ±éãªå®ç¾©ï¼ãããä¾å­é¨ã¯é£ã°ãï¼
@@ -67,10 +74,3 @@
 #include "core_test.h"
 
-/*
- *  ãã¹ããã­ã°ã©ã ã®åä½ãã©ã¡ã¼ã¿ã®å®ç¾©
- */
-#ifdef TOPPERS_USE_QEMU
-#define ALM1_RELTIM		2000U		/* ã¢ã©ã¼ã ãã³ãã©1ã«ä»æããç¸å¯¾æé */
-#endif /* TOPPERS_USE_QEMU */
-
 #endif /* TOPPERS_TARGET_TEST_H */
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_timer.h
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_timer.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_timer.h	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_timer.h 458 2015-08-21 14:59:09Z ertl-hiro $
+ *  $Id: target_timer.h 742 2016-04-07 13:11:22Z ertl-hiro $
  */
 
@@ -95,5 +95,5 @@
 #define INHNO_OVRTIMER		OVRTIMER_TIMER_IRQNO	/* å²è¾¼ã¿ãã³ãã©çªå· */
 #define INTNO_OVRTIMER		OVRTIMER_TIMER_IRQNO	/* å²è¾¼ã¿çªå· */
-#define INTPRI_OVRTIMER		(TMAX_INTPRI - 1)		/* å²è¾¼ã¿åªå
+#define INTPRI_OVRTIMER		TMAX_INTPRI				/* å²è¾¼ã¿åªå
 åº¦ */
 #define INTATR_OVRTIMER		TA_NULL					/* å²è¾¼ã¿å±æ§ */
Index: asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_user.txt
===================================================================
--- asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_user.txt	(revision 305)
+++ asp3_wo_tecs/trunk/target/ct11mpcore_gcc/target_user.txt	(revision 306)
@@ -1,11 +1,11 @@
 
-		TOPPERS/ASPã«ã¼ãã«
-		CT11MPcoreä¾å­é¨ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
-
-		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.0.0
-		æçµæ´æ°: 2015å¹´8æ9æ¥
-
-ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASPã«ã¼ãã«ã®CT11MPcoreã¿ã¼ã²ããä¾å­é¨ãä½¿
-ç¨ããããã«å¿
+		TOPPERS/ASP3ã«ã¼ãã«
+		CT11MPCoreä¾å­é¨ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 3.1
+		æçµæ´æ°: 2016å¹´1æ30æ¥
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ã®CT11MPCoreã¿ã¼ã²ããä¾å­é¨ã
+ä½¿ç¨ããããã«å¿
 è¦ãªäºé 
 ãèª¬æãããã®ã§ããï¼
@@ -16,5 +16,5 @@
      Advanced Standard Profile Kernel
 
- Copyright (C) 2008-2015 by Embedded and Real-Time Systems Laboratory
+ Copyright (C) 2008-2016 by Embedded and Real-Time Systems Laboratory
              Graduate School of Information Science, Nagoya Univ., JAPAN
  
@@ -63,10 +63,10 @@
  ã®è²¬ä»»ãè² ããªãï¼
  
- $Id: target_user.txt 437 2015-08-09 00:36:08Z ertl-hiro $
+ $Id: target_user.txt 752 2016-05-14 15:06:22Z ertl-hiro $
 ----------------------------------------------------------------------
 
 âç®æ¬¡
 
-ï¼ï¼CT11MPcoreã¿ã¼ã²ããä¾å­é¨ã®æ¦è¦
+ï¼ï¼CT11MPCoreã¿ã¼ã²ããä¾å­é¨ã®æ¦è¦
 	1.1 å¯¾å¿ããã¿ã¼ã²ããã·ã¹ãã ã¨ã¿ã¼ã²ããç¥ç§°
 	1.2 ã¿ã¼ã²ããä¾å­é¨ã®æ§æ
@@ -92,8 +92,8 @@
 
 
-ï¼ï¼CT11MPcoreã¿ã¼ã²ããä¾å­é¨ã®æ¦è¦
-
-CT11MPcoreã¿ã¼ã²ããä¾å­é¨ã¯ï¼TOPPERS/ASPã«ã¼ãã«ãï¼ARM11 MPCoreã®ãã¹
-ãããããæ­è¼ããCoreTileï¼CT11MPCoreï¼ãï¼RealView Emulation
+ï¼ï¼CT11MPCoreã¿ã¼ã²ããä¾å­é¨ã®æ¦è¦
+
+CT11MPCoreã¿ã¼ã²ããä¾å­é¨ã¯ï¼TOPPERS/ASP3ã«ã¼ãã«ãï¼ARM11 MPCoreã®ã
+ã¹ãããããæ­è¼ããCoreTileï¼CT11MPCoreï¼ãï¼RealView Emulation
 Baseboardä¸ã«å®è£
 ããã¿ã¼ã²ããã·ã¹ãã ã§åä½ãããç°å¢ãæ§ç¯ããããã®
@@ -107,10 +107,10 @@
 1.1 å¯¾å¿ããã¿ã¼ã²ããã·ã¹ãã ã¨ã¿ã¼ã²ããç¥ç§°
 
-CT11MPcoreã¿ã¼ã²ããä¾å­é¨ã®åä½ç¢ºèªã¯ï¼Qemuãç¨ãã¦è¡ã£ã¦ããï¼åä½ç¢º
+CT11MPCoreã¿ã¼ã²ããä¾å­é¨ã®åä½ç¢ºèªã¯ï¼Qemuãç¨ãã¦è¡ã£ã¦ããï¼åä½ç¢º
 èªãè¡ã£ãQemuã®ãã¼ã¸ã§ã³ã¯æ¬¡ã®éãï¼
 
 	qemu-system-arm		version 2.1.0
 
-Qemuä¸ã§ASPã«ã¼ãã«ãå®è¡ããããã®ã³ãã³ãã¯æ¬¡ã®éãï¼
+Qemuä¸ã§ASP3ã«ã¼ãã«ãå®è¡ããããã®ã³ãã³ãã¯æ¬¡ã®éãï¼
 
 	qemu-system-arm -M realview-eb-mpcore -semihosting -m 128M -smp 1 \
@@ -125,5 +125,5 @@
 1.2 ã¿ã¼ã²ããä¾å­é¨ã®æ§æ
 
-CT11MPcoreã¿ã¼ã²ããä¾å­é¨ã®ä½¿ç¨ããã¿ã¼ã²ããä¾å­é¨ï¼targetãã£ã¬ã¯ã
+CT11MPCoreã¿ã¼ã²ããä¾å­é¨ã®ä½¿ç¨ããã¿ã¼ã²ããä¾å­é¨ï¼targetãã£ã¬ã¯ã
 ãªï¼ããã³ã¿ã¼ã²ããä¾å­é¨ã®å
 ±éé¨ï¼archãã£ã¬ã¯ããªï¼ã®ãã£ã¬ã¯ããªã¯
@@ -131,16 +131,17 @@
 
 	target/
-		ct11mpcore_gcc/		CT11MPcoreã¿ã¼ã²ããä¾å­é¨
+		ct11mpcore_gcc/		CT11MPCoreã¿ã¼ã²ããä¾å­é¨
 
 	arch/
 		arm_gcc/common/		ARMã³ã¢ä¾å­é¨
 		arm_gcc/mpcore/		MPCoreãããä¾å­é¨
+		arm_gcc/doc/		ARMä¾å­é¨ã«é¢ãããã­ã¥ã¡ã³ã
 		gcc/				GCCéçºç°å¢ä¾å­é¨
-		logtrace/			ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ã
+		tracelog/			ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ã
 
 1.3 ä¾å­ãã¦ããåå¥ããã±ã¼ã¸ã®ãã¼ã¸ã§ã³çªå·
 
-Mac OS Xã¿ã¼ã²ããä¾å­é¨ï¼ãã¼ã¸ã§ã³ 3.B.0ï¼ã®åå¥ããã±ã¼ã¸ãä¾å­ãã¦
-ããåå¥ããã±ã¼ã¸ã¨ï¼åä½ç¢ºèªãè¡ã£ããã¼ã¸ã§ã³ã¯æ¬¡ã®éãï¼
+CT11MPCoreã¿ã¼ã²ããä¾å­é¨ï¼ãã¼ã¸ã§ã³ 3.0.0ï¼ã®åå¥ããã±ã¼ã¸ãä¾å­ã
+ã¦ããåå¥ããã±ã¼ã¸ã¨ï¼åä½ç¢ºèªãè¡ã£ããã¼ã¸ã§ã³ã¯æ¬¡ã®éãï¼
 
 	åå¥ããã±ã¼ã¸ã®åç§°	ãã¼ã¸ã§ã³	åå¥ããã±ã¼ã¸ãã¡ã¤ã«å
@@ -186,8 +187,14 @@
 ã®è¦å®
 
-CT11MPcoreã¿ã¼ã²ããä¾å­é¨ã¯ï¼ARMã³ã¢ä¾å­é¨ã¨MPCoreãããä¾å­é¨ãç¨ãã¦
+CT11MPCoreã¿ã¼ã²ããä¾å­é¨ã¯ï¼ARMã³ã¢ä¾å­é¨ã¨MPCoreãããä¾å­é¨ãç¨ãã¦
 å®è£
-ããã¦ããï¼ããã§ã¯ï¼ARMã³ã¢ä¾å­é¨ããã³MPCoreãããä¾å­é¨ã¨ç°ãªãï¼
-ãªããã¯ï¼ãããã§è¦å®ããã¦ããªãäºé 
+ããã¦ããï¼ARMã³ã¢ä¾å­é¨ããã³MPCoreãããä¾å­é¨ã«ãããã¿ã¼ã²ãã
+å®ç¾©äºé 
+ã®è¦å®ã«ã¤ãã¦ã¯ï¼ãARMä¾å­é¨ ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ããåç
+§ãã
+ãã¨ï¼
+
+ä»¥ä¸ã§ã¯ï¼ARMã³ã¢ä¾å­é¨ããã³MPCoreãããä¾å­é¨ã¨ç°ãªãï¼ãªããã¯ï¼ãã
+ãã§è¦å®ããã¦ããªãäºé 
 ã«ã¤ãã¦èª¬æããï¼
 
@@ -195,5 +202,5 @@
 åº¦ã¨å²è¾¼ã¿çªå·
 
-CT11MPCoreã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ï¼Distributed Interrupt COntrollerï¼ã¯ï¼
+CT11MPCoreã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©ï¼Distributed Interrupt Controllerï¼ã¯ï¼
 16ã¬ãã«ã®å²è¾¼ã¿åªå
 åº¦ããµãã¼ããã¦ããï¼ãã®ããï¼å²è¾¼ã¿åªå
@@ -238,9 +245,9 @@
 3.1 ã¿ã¤ããã©ã¤ã
 
-é«åè§£è½ã¿ã¤ãã¯ï¼MPCoreãã³ã¢æ¯ã«æã¤ã¿ã¤ãã¨ã¦ã©ããããã°ãä½¿ç¨ãã¦
-å®ç¾ãã¦ããï¼å
-·ä½çã«ã¯ï¼ã¦ã©ããããã°ãç¾å¨æå»ã®ç®¡çã®ããã«ç¨ãï¼
-ã¿ã¤ããç¸å¯¾æéå²è¾¼ã¿ã®çºçã®ããã«ç¨ãã¦ããï¼ãã®ããï¼ãããã®ã¿ã¤
-ããå¥ã®ç®çã§ä½¿ç¨ãããã¨ã¯ã§ããªãï¼
+é«åè§£è½ã¿ã¤ãã¯ï¼MPCoreãã³ã¢æ¯ã«æã¤ãã©ã¤ãã¼ãã¿ã¤ãã¨ãã©ã¤ãã¼ã
+ã¦ã©ããããã°ãä½¿ç¨ãã¦å®ç¾ãã¦ããï¼å
+·ä½çã«ã¯ï¼ã¦ã©ããããã°ãç¾å¨
+æå»ã®ç®¡çã®ããã«ç¨ãï¼ã¿ã¤ããç¸å¯¾æéå²è¾¼ã¿ã®çºçã®ããã«ç¨ãã¦ããï¼
+ãã®ããï¼ãããã®ã¿ã¤ããå¥ã®ç®çã§ä½¿ç¨ãããã¨ã¯ã§ããªãï¼
 
 ã¾ãï¼ãªã¼ãã©ã³ãã³ãã©æ©è½ããµãã¼ãããå ´åã«ã¯ï¼RealView Emulation
@@ -256,8 +263,9 @@
 ããã¦ãã4ãã£ã³ãã«ã®UARTã®å
 ã®1ã¤ï¼ã©ã®1ã¤ãç¨ãããã¯ï¼ã³
-ã¢æ¯ã«ç°ãªãï¼ãç¨ãã¦ï¼ã·ãªã¢ã«I/Oãã¼ãã1ã¤ã®ã¿ãµãã¼ããã¦ããï¼
-
-ç¨ããUARTãå¤æ´ããå ´åã«ã¯ï¼target_syssvc.hãä¿®æ­£ããå¿
-è¦ãããï¼
+ã¢æ¯ã«ç°ãªãï¼ãç¨ãã¦ï¼SIOãã¼ãã1ã¤ã®ã¿ãµãã¼ããã¦ããï¼
+
+ç¨ããSIOãã¼ããå¤æ´ããå ´åã«ã¯ï¼tSIOPortCT11MPCore.cdlãä¿®æ­£ããå¿
+è¦
+ãããï¼
 
 3.3 ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºå
@@ -266,5 +274,5 @@
 ãã®ã¨åãUARTãç¨ãï¼ãã¼ãªã³ã°ã«ããæå­ãåºåããæ¹æ³ã§å®ç¾ãã¦ããï¼
 
-ç¨ããUARTãå¤æ´ããå ´åã«ã¯ï¼target_kernel_impl.hãä¿®æ­£ããå¿
+ç¨ããSIOãã¼ããå¤æ´ããå ´åã«ã¯ï¼target.cdlãä¿®æ­£ããå¿
 è¦ãããï¼
 
@@ -274,8 +282,8 @@
 4.1 ã·ã¹ãã æ§ç¯
 
-CT11MPcoreåãã®æ§ç¯ããæé ã¯ï¼ãTOPPERS/ASPã«ã¼ãã« ã¦ã¼ã¶ã¼ãºããã¥
-ã¢ã«ãã®ãï¼ï¼ã¯ã¤ãã¯ã¹ã¿ã¼ãã¬ã¤ããã®ç« ã«è¨è¿°ããã¦ããéãã§ããï¼
-Qemuã§å®è¡ããå ´åã«ã¯ï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ã«ã-DTOPPERS_USE_QEMUãã
-è¿½å ãããã¨ï¼
+CT11MPCoreç¨ã®ASP3ã«ã¼ãã«ãæ§ç¯ããæé ã¯ï¼ãTOPPERS/ASP3ã«ã¼ãã« ã¦ã¼
+ã¶ã¼ãºããã¥ã¢ã«ãã®ãï¼ï¼ã¯ã¤ãã¯ã¹ã¿ã¼ãã¬ã¤ããã®ç« ã«è¨è¿°ããã¦ãã
+éãã§ããï¼Qemuã§å®è¡ããå ´åã«ã¯ï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ã«
+ã-DTOPPERS_USE_QEMUããè¿½å ãããã¨ï¼
 
 4.2 Qemuã§å®è¡ããå ´åã®ãããã¬ã®ä½¿ç¨æ¹æ³
@@ -311,5 +319,5 @@
 5.1 ãã£ã¬ã¯ããªæ§æã»ãã¡ã¤ã«æ§æ
 
-	target/macosx_xcode/
+	target/ct11mpcore_gcc/
 		E_PACKAGE				ç°¡æããã±ã¼ã¸ã®ãã¡ã¤ã«ãªã¹ã
 		MANIFEST				åå¥ããã±ã¼ã¸ã®ãã¡ã¤ã«ãªã¹ã
@@ -317,24 +325,31 @@
 		ct11mpcore.h			ã¿ã¼ã²ããã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
 		ct11mpcore.ld			æ¨æºã®ãªã³ã«ã¹ã¯ãªãã
-		target.tf				kernel.tfã®ã¿ã¼ã²ããä¾å­é¨
+		tPutLogCT11MPCore.c		ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºå
+		tPutLogCT11MPCore.cdl	ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ã³ã³ãã¼ãã³ãè¨è¿°
+		tSIOPortCT11MPCore.cdl	ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ãã
+								ä¾å­é¨ï¼CT11MPCoreç¨ï¼ã®ã³ã³ãã¼ãã³ãè¨è¿°
+		tSIOPortCT11MPCoreMain_inline.h		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+								ã®ã¿ã¼ã²ããä¾å­é¨ï¼CT11MPCoreç¨ï¼
+		target.cdl				ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
 		target_cfg1_out.h		cfg1_out.cã®ãªã³ã¯ã«å¿
 è¦ãªã¹ã¿ãã®å®ç¾©
-		target_check.tf			kernel_check.tfã®ã¿ã¼ã²ããä¾å­é¨
+		target_kernel.cfg		ã«ã¼ãã«å®è£
+ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
 		target_kernel.h			kernel.hã®ã¿ã¼ã²ããä¾å­é¨
+		target_kernel.trb		kernel.trbã®ã¿ã¼ã²ããä¾å­é¨
+		target_check.trb		kernel_check.trbã®ã¿ã¼ã²ããä¾å­é¨
 		target_kernel_impl.c	ã«ã¼ãã«å®è£
-ã®ã¿ã¼ã²ããä¾å­é¨é¢é£ã®å®ç¾©
+ã®ã¿ã¼ã²ããä¾å­é¨
 		target_kernel_impl.h	ã«ã¼ãã«å®è£
-ã®ã¿ã¼ã²ããä¾å­é¨
+ã®ã¿ã¼ã²ããä¾å­é¨ã«é¢ããå®ç¾©
 		target_rename.def		ã¿ã¼ã²ããä¾å­é¨ã®å
 é¨è­å¥åã®ãªãã¼ã å®ç¾©
 		target_rename.h			ã¿ã¼ã²ããä¾å­é¨ã®å
 é¨è­å¥åã®ãªãã¼ã 
-		target_serial.c			serial.cã®ã¿ã¼ã²ããä¾å­é¨
-		target_serial.cfg		serial.cfgã®ã¿ã¼ã²ããä¾å­é¨
-		target_serial.h			serial.hã®ã¿ã¼ã²ããä¾å­é¨
 		target_sil.h			sil.hã®ã¿ã¼ã²ããä¾å­é¨
 		target_stddef.h			t_stddef.hã®ã¿ã¼ã²ããä¾å­é¨
 		target_syssvc.h			ã·ã¹ãã ãµã¼ãã¹ã®ã¿ã¼ã²ããä¾å­å®ç¾©
 		target_test.h			ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+		target_timer.c			ã¿ã¤ããã©ã¤ã
 		target_timer.cfg		ã¿ã¤ããã©ã¤ãã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
 		target_timer.h			ã¿ã¤ããã©ã¤ããä½¿ç¨ããããã®å®ç¾©
@@ -343,9 +358,10 @@
 		target_user.txt			ã¿ã¼ã²ããä¾å­é¨ã®ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
 
-6.2 ãã¼ã¸ã§ã³å±¥æ­´
+5.2 ãã¼ã¸ã§ã³å±¥æ­´
 
 	2015å¹´8æ5æ¥	Release	3.B.0		æåã®ãªãªã¼ã¹
-	2015å¹´ æ æ¥	Release	3.0.0		æåã®ä¸è¬å
+	2016å¹´2æ8æ¥	Release	3.0.0		æåã®ä¸è¬å
 ¬é
+	2016å¹´5æ15æ¥	Release	3.1.0
 
 ä»¥ä¸
Index: asp3_wo_tecs/trunk/target/dummy_gcc/Makefile.target
===================================================================
--- asp3_wo_tecs/trunk/target/dummy_gcc/Makefile.target	(revision 305)
+++ asp3_wo_tecs/trunk/target/dummy_gcc/Makefile.target	(revision 306)
@@ -2,5 +2,5 @@
 #		Makefile ã®ã¿ã¼ã²ããä¾å­é¨ï¼ããã¼ã¿ã¼ã²ããç¨ï¼
 #
-#  $Id: Makefile.target 504 2016-01-12 01:19:55Z ertl-hiro $
+#  $Id: Makefile.target 572 2016-02-01 14:40:09Z ertl-hiro $
 # 
 
Index: asp3_wo_tecs/trunk/target/dummy_gcc/dummy.h
===================================================================
--- asp3_wo_tecs/trunk/target/dummy_gcc/dummy.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/dummy_gcc/dummy.h	(revision 306)
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: dummy.h 238 2014-09-28 19:19:25Z ertl-hiro $
+ *  $Id: dummy.h 526 2016-01-14 11:43:26Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/target/dummy_gcc/target_kernel_impl.c
===================================================================
--- asp3_wo_tecs/trunk/target/dummy_gcc/target_kernel_impl.c	(revision 305)
+++ asp3_wo_tecs/trunk/target/dummy_gcc/target_kernel_impl.c	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2013-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2013-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_kernel_impl.c 374 2015-07-30 22:01:54Z ertl-hiro $
+ *  $Id: target_kernel_impl.c 515 2016-01-13 02:21:39Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/target/dummy_gcc/target_kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/target/dummy_gcc/target_kernel_impl.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/dummy_gcc/target_kernel_impl.h	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2013-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2013-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_kernel_impl.h 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: target_kernel_impl.h 515 2016-01-13 02:21:39Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/target/dummy_gcc/target_stddef.h
===================================================================
--- asp3_wo_tecs/trunk/target/dummy_gcc/target_stddef.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/dummy_gcc/target_stddef.h	(revision 306)
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_stddef.h 293 2014-11-30 09:27:54Z ertl-hiro $
+ *  $Id: target_stddef.h 509 2016-01-12 06:06:14Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/target/dummy_gcc/target_syssvc.h
===================================================================
--- asp3_wo_tecs/trunk/target/dummy_gcc/target_syssvc.h	(revision 305)
+++ asp3_wo_tecs/trunk/target/dummy_gcc/target_syssvc.h	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2013-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2013-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: target_syssvc.h 293 2014-11-30 09:27:54Z ertl-hiro $
+ *  $Id: target_syssvc.h 524 2016-01-14 11:01:56Z ertl-hiro $
  */
 
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/target_check.tf
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/target_check.tf	(revision 305)
+++ 	(revision )
@@ -1,8 +1,0 @@
-$ 
-$     ãã¹3ã®ã¿ã¼ã²ããä¾å­ãã³ãã¬ã¼ãï¼NUCLEO_F401REç¨ï¼
-$ 
-
-$ 
-$  ãã¹3ã®ãããä¾å­ã®ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ã
-$ 
-$INCLUDE "core_check.tf"$
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/target_kernel_impl.c
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/target_kernel_impl.c	(revision 305)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/target_kernel_impl.c	(revision 306)
@@ -97,5 +97,5 @@
 
 /*
- *  cfgã®pass3ã§ã¨ã©ã¼ã«ãªããªãããã«
+ *  cfgã®pass3ã§ã¨ã©ã¼ã«ãªããªãããã«
  */
 extern const ID _kernel_tmax_tskid;
Index: asp3_wo_tecs/trunk/test/MANIFEST
===================================================================
--- asp3_wo_tecs/trunk/test/MANIFEST	(revision 305)
+++ asp3_wo_tecs/trunk/test/MANIFEST	(revision 306)
@@ -51,4 +51,7 @@
 test_dlynse.cfg
 test_dlynse.h
+test_dtq1.c
+test_dtq1.cfg
+test_dtq1.h
 test_flg1.c
 test_flg1.cfg
@@ -107,2 +110,3 @@
 test_tmevt1.cfg
 test_tmevt1.h
+testexec.rb
Index: asp3_wo_tecs/trunk/test/bit_kernel.c
===================================================================
--- asp3_wo_tecs/trunk/test/bit_kernel.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/bit_kernel.c	(revision 306)
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: bit_kernel.c 554 2016-01-17 13:21:59Z ertl-hiro $
+ *  $Id: bit_kernel.c 739 2016-04-05 15:09:40Z ertl-hiro $
  */
 
@@ -195,7 +195,7 @@
 
 	/*
-	 *  enadspã¨p_schedtskã®æ´åæ§ã®æ¤æ»
-	 */
-	if (enadsp) {
+	 *  dspflgã¨p_schedtskã®æ´åæ§ã®æ¤æ»
+	 */
+	if (dspflg) {
 		if (primap_empty()) {
 			if (p_schedtsk != NULL) {
Index: asp3_wo_tecs/trunk/test/test_cpuexc.cfg
===================================================================
--- asp3_wo_tecs/trunk/test/test_cpuexc.cfg	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_cpuexc.cfg	(revision 306)
@@ -2,9 +2,7 @@
  *		CPUä¾å¤å¦çã®ãã¹ã(1)ã(10)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_cpuexc.cfg 404 2015-08-02 21:56:21Z ertl-hiro $
+ *  $Id: test_cpuexc.cfg 571 2016-02-01 14:29:07Z ertl-hiro $
  */
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_cpuexc.h"
Index: asp3_wo_tecs/trunk/test/test_cpuexc.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_cpuexc.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_cpuexc.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_cpuexc.h 404 2015-08-02 21:56:21Z ertl-hiro $
+ *  $Id: test_cpuexc.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_cpuexc1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_cpuexc1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_cpuexc1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_cpuexc1.c 346 2015-07-18 02:12:08Z ertl-hiro $
+ *  $Id: test_cpuexc1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -117,5 +117,5 @@
  *	2:	state(false, false, true, true, false)
  *		ipm(TIPM_ENAALL)
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, TEST_TIME_PROC) ... ALM1ãå®è¡éå§ããã¾ã§
  *		DO(while(!alm1_flag))
  *	== ALM1 ==
@@ -223,5 +223,5 @@
 	check_ipm(TIPM_ENAALL);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_cpuexc2.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_cpuexc2.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_cpuexc2.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_cpuexc2.c 346 2015-07-18 02:12:08Z ertl-hiro $
+ *  $Id: test_cpuexc2.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -111,5 +111,5 @@
  *	2:	state(false, false, true, true, false)
  *		ipm(TIPM_ENAALL)
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, TEST_TIME_PROC) ... ALM1ãå®è¡éå§ããã¾ã§
  *		DO(while(!alm1_flag))
  *	== ALM1 ==
@@ -217,5 +217,5 @@
 	check_ipm(TIPM_ENAALL);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_cpuexc3.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_cpuexc3.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_cpuexc3.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_cpuexc3.c 346 2015-07-18 02:12:08Z ertl-hiro $
+ *  $Id: test_cpuexc3.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -110,5 +110,5 @@
  *	2:	state(false, false, true, true, false)
  *		ipm(TIPM_ENAALL)
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, TEST_TIME_PROC) ... ALM1ãå®è¡éå§ããã¾ã§
  *		DO(while(!alm1_flag))
  *	== ALM1 ==
@@ -211,5 +211,5 @@
 	check_ipm(TIPM_ENAALL);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_dlynse.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_dlynse.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_dlynse.c	(revision 306)
@@ -5,5 +5,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -52,5 +52,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_dlynse.c 482 2016-01-03 13:12:51Z ertl-hiro $
+ *  $Id: test_dlynse.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -75,7 +75,7 @@
 #include "target_kernel_impl.h"
 
-#define	NO_LOOP		ULONG_C(1000000)
+#define	NO_LOOP		1000000UL
 
-SYSTIM	empty_time;
+HRTCNT	empty_time;
 
 static void
@@ -90,4 +90,9 @@
 	etime = fch_hrt();
 	empty_time = etime - stime;
+#ifdef TCYC_HRTCNT
+	if (etime < stime) {
+		empty_time += TCYC_HRTCNT;
+	}
+#endif /* TCYC_HRTCNT */
 	syslog(LOG_NOTICE, "empty loop: %u", empty_time);
 	(void) syslog_fls_log();
@@ -97,5 +102,5 @@
 test_dly_nse(ulong_t dlytim)
 {
-	HRTCNT	stime, etime;
+	HRTCNT	stime, etime, diff;
 	ulong_t	delay_time;
 	volatile ulong_t	i;
@@ -106,5 +111,11 @@
 	}
 	etime = fch_hrt();
-	delay_time = ((etime - stime) - empty_time) / 1000U;
+	diff = etime - stime;
+#ifdef TCYC_HRTCNT
+	if (etime < stime) {
+		diff += TCYC_HRTCNT;
+	}
+#endif /* TCYC_HRTCNT */
+	delay_time = (diff - empty_time) / 1000U;
 	syslog(LOG_NOTICE, "sil_dly_nse(%lu): %lu %s", dlytim, delay_time,
 									delay_time >= dlytim ? "OK" : "NG");
@@ -127,4 +138,8 @@
 	test_dly_nse(SIL_DLY_TIM1 + SIL_DLY_TIM2 * 4);
 	test_dly_nse(SIL_DLY_TIM1 + SIL_DLY_TIM2 * 5);
+	test_dly_nse(SIL_DLY_TIM1 + SIL_DLY_TIM2 * 6);
+	test_dly_nse(SIL_DLY_TIM1 + SIL_DLY_TIM2 * 7);
+	test_dly_nse(SIL_DLY_TIM1 + SIL_DLY_TIM2 * 8);
+	test_dly_nse(SIL_DLY_TIM1 + SIL_DLY_TIM2 * 9);
 	test_dly_nse(SIL_DLY_TIM1 + SIL_DLY_TIM2 * 10);
 	test_dly_nse(SIL_DLY_TIM1 + SIL_DLY_TIM2 * 20);
Index: asp3_wo_tecs/trunk/test/test_dtq1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_dtq1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_dtq1.c	(revision 306)
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_dtq1.c 602 2016-02-07 12:22:32Z ertl-hiro $
+ *  $Id: test_dtq1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -302,5 +302,5 @@
  *	== TASK3ï¼ç¶ãï¼==
  *	19:	assert(data == DATA1)
- *	20:	sta_alm(ALM1, 10000U)
+ *	20:	sta_alm(ALM1, TEST_TIME_CP) ... ALM1ãå®è¡éå§ããã¾ã§
  *	21:	rcv_dtq(DTQ2, &data)
  *	== ALM1 ==
@@ -626,5 +626,5 @@
 
 	check_point(20);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_dtq1.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_dtq1.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_dtq1.h	(revision 306)
@@ -2,5 +2,5 @@
  *		ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã¹ã(1)ã®ããããã¡ã¤ã«
  *
- *  $Id: test_dtq1.h 602 2016-02-07 12:22:32Z ertl-hiro $
+ *  $Id: test_dtq1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -30,4 +30,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  éåä¿¡ãããã¼ã¿ã®å®ç¾©
Index: asp3_wo_tecs/trunk/test/test_flg1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_flg1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_flg1.c	(revision 306)
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_flg1.c 599 2016-02-07 03:33:35Z ertl-hiro $
+ *  $Id: test_flg1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -319,5 +319,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	37:	clr_flg(FLG3, 0)
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, 2 * TEST_TIME_CP) ... ALM1ãå®è¡éå§ããã¾ã§
  *	38:	wai_flg(FLG3, 0x01, TWF_ORW, &flgptn)
  *	== TASK3ï¼ç¶ãï¼==
@@ -578,5 +578,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_flg1.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_flg1.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_flg1.h	(revision 306)
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_flg1.h 599 2016-02-07 03:33:35Z ertl-hiro $
+ *  $Id: test_flg1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_hrt1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_hrt1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_hrt1.c	(revision 306)
@@ -52,5 +52,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_hrt1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_hrt1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -82,5 +82,5 @@
 #include "test_hrt1.h"
 
-#define	NO_LOOP		ULONG_C(100000)
+#define	NO_LOOP		100000UL
 
 HRTCNT	recent_hrtcnt;
Index: asp3_wo_tecs/trunk/test/test_mutex.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_mutex.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_mutex1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_mutex1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -147,5 +147,6 @@
  *		assert(rmtx.htskid == TASK2)
  *		assert(rmtx.wtskid == TSK_NONE)
- *		tloc_mtx(MTX1, 10000U) -> E_TMOUT	... (D-1)
+ *		tloc_mtx(MTX1, 3 * TEST_TIME_CP) -> E_TMOUT	... (D-1)
+ *									... TASK1ãå®è¡åéããã¾ã§
  *	15:	wup_tsk(TASK2)
  *	== TASK2ï¼ç¶ãï¼==
@@ -246,5 +247,5 @@
 	check_assert(rmtx.wtskid == TSK_NONE);
 
-	ercd = tloc_mtx(MTX1, 10000U);
+	ercd = tloc_mtx(MTX1, 3 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/test/test_mutex2.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex2.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex2.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex2.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_mutex2.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -148,5 +148,6 @@
  *		assert(rmtx.htskid == TASK2)
  *		assert(rmtx.wtskid == TSK_NONE)
- *		tloc_mtx(MTX1, 10000U) -> E_TMOUT	... (D-1)
+ *		tloc_mtx(MTX1, 3 * TEST_TIME_CP) -> E_TMOUT	... (D-1)
+ *									... TASK1ãå®è¡åéããã¾ã§
  *	15:	wup_tsk(TASK2)
  *	== TASK2ï¼ç¶ãï¼==
@@ -247,5 +248,5 @@
 	check_assert(rmtx.wtskid == TSK_NONE);
 
-	ercd = tloc_mtx(MTX1, 10000U);
+	ercd = tloc_mtx(MTX1, 3 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/test/test_mutex3.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex3.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex3.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex3.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_mutex3.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -124,5 +124,5 @@
  *		assert(rmtx.wtskid == TSK_NONE)
  *		act_tsk(TASK2)
- *	4:	tslp_tsk(10000U) -> E_TMOUT
+ *	4:	tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2ï¼åªå
 åº¦ï¼ä¸­ï¼==
@@ -134,5 +134,5 @@
  *		assert(rmtx.wtskid == TASK2)
  *		act_tsk(TASK3)
- *	7:	tslp_tsk(10000U) -> E_TMOUT
+ *	7:	tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK3ï¼åªå
 åº¦ï¼é«ï¼==
@@ -165,5 +165,6 @@
  *		assert(rmtx.htskid == TASK2)
  *		assert(rmtx.wtskid == TSK_NONE)
- *		tloc_mtx(MTX1, 10000U) -> E_TMOUT	... (D-1)
+ *		tloc_mtx(MTX1, 3 * TEST_TIME_CP) -> E_TMOUT	... (D-1)
+ *									... TASK1ãå®è¡åéããã¾ã§
  *	17:	wup_tsk(TASK2)
  *	== TASK2ï¼ç¶ãï¼==
@@ -229,5 +230,5 @@
 
 	check_point(4);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -244,5 +245,5 @@
 
 	check_point(7);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -287,5 +288,5 @@
 	check_assert(rmtx.wtskid == TSK_NONE);
 
-	ercd = tloc_mtx(MTX1, 10000U);
+	ercd = tloc_mtx(MTX1, 3 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/test/test_mutex5.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex5.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex5.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex5.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_mutex5.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -431,5 +431,5 @@
  *	== TASK5ï¼ç¶ãï¼==
  *	38:	loc_mtx(MTX4)
- *	39:	tslp_tsk(10000U) -> E_TMOUT
+ *	39:	tslp_tsk(3 * TEST_TIME_CP) -> E_TMOUT ... TASK5ãå®è¡åéããã¾ã§
  *	//		ä½ï¼TASK1âTASK2ï¼MTX4ï¼TASK5
  *	== TASK1ï¼ç¶ãï¼==
@@ -1058,5 +1058,5 @@
 
 	check_point(39);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(3 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/test/test_mutex5.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex5.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex5.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex5.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_mutex5.h 740 2016-04-05 15:44:39Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_mutex7.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex7.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex7.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2008-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2008-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex7.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_mutex7.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -207,5 +207,5 @@
  *	9:	loc_mtx(MTX1)
  *	//		ä¸­ï¼TASK2ï¼ä½ï¼TASK3ï¼MTX1ï¼TASK2
- *	10:	tslp_tsk(10000U) -> E_TMOUT
+ *	10:	tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK2-2ãå®è¡åéããã¾ã§
  *	//		ä½ï¼TASK3ï¼MTX1ï¼TASK2
  *	== TASK3-1ï¼åªå
@@ -288,5 +288,5 @@
  *		loc_mtx(MTX2)
  *	//		ä¸­ï¼TASK2ï¼ä½ï¼TASK3âTASK4ï¼MTX1ï¼TASK2ï¼MTX2ï¼TASK2
- *	34:	tslp_tsk(10000U) -> E_TMOUT
+ *	34:	tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK2-5ãå®è¡åéããã¾ã§
  *	//		ä½ï¼TASK3âTASK4ï¼MTX1ï¼TASK2ï¼MTX2ï¼TASK2
  *	== TASK3-3ï¼åªå
@@ -582,5 +582,5 @@
 
 		check_point(10);
-		ercd = tslp_tsk(10000U);
+		ercd = tslp_tsk(TEST_TIME_CP);
 		check_ercd(ercd, E_TMOUT);
 
@@ -625,5 +625,5 @@
 
 		check_point(34);
-		ercd = tslp_tsk(10000U);
+		ercd = tslp_tsk(2 * TEST_TIME_CP);
 		check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/test/test_mutex7.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex7.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex7.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2008-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2008-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex7.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_mutex7.h 740 2016-04-05 15:44:39Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_mutex8.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex8.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex8.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2009-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2009-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex8.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_mutex8.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -350,5 +350,5 @@
  *	== TASK5ï¼ç¶ãï¼==
  *	28:	loc_mtx(MTX2)
- *	29:	tslp_tsk(10000U) -> E_TMOUT
+ *	29:	tslp_tsk(3 * TEST_TIME_CP) -> E_TMOUT ... TASK5ãå®è¡åéããã¾ã§
  *	== TASK1ï¼ç¶ãï¼==
  *	30:	wup_tsk(TASK4)
@@ -380,5 +380,5 @@
  *	== TASK5ï¼ç¶ãï¼==
  *	41:	loc_mtx(MTX2)
- *	42:	tslp_tsk(10000U) -> E_TMOUT
+ *	42:	tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK5ãå®è¡åéããã¾ã§
  *	== TASK1ï¼ç¶ãï¼==
  *	43:	loc_mtx(MTX2)
@@ -412,5 +412,5 @@
  *	== TASK5ï¼ç¶ãï¼==
  *	55:	loc_mtx(MTX2)
- *	56:	tslp_tsk(10000U) -> E_TMOUT
+ *	56:	tslp_tsk(6 * TEST_TIME_CP) -> E_TMOUT ... TASK5ãå®è¡åéããã¾ã§
  *	//		ä¸­ï¼TASK1ï¼MTX1ï¼TASK1ï¼MTX2ï¼TASK5
  *	== TASK1ï¼ç¶ãï¼==
@@ -784,5 +784,5 @@
 
 	check_point(29);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(3 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -804,5 +804,5 @@
 
 	check_point(42);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -824,5 +824,5 @@
 
 	check_point(56);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(6 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/test/test_mutex8.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_mutex8.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_mutex8.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2009-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2009-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_mutex8.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_mutex8.h 740 2016-04-05 15:44:39Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_notify1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_notify1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_notify1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2015-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_notify1.c 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: test_notify1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -119,5 +119,5 @@
  *
  *	== TASK1 ==
- *	1:	sta_alm(ALM1, ALM_RELTIM)
+ *	1:	sta_alm(ALM1, TEST_TIME_PROC) ... ref_almã§åä½ç¢ºèªããã¾ã§
  *		assert(event_variable == false)
  *		ref_alm(ALM1, &ralm)
@@ -126,5 +126,5 @@
  *	2:	ref_alm(ALM1, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	3:	sta_alm(ALM2, ALM_RELTIM)
+ *	3:	sta_alm(ALM2, TEST_TIME_CP) ... TASK2-1ãå®è¡éå§ããã¾ã§
  *		ref_tsk(TASK2, &rtsk)
  *		assert((rtsk.tskstat & TTS_DMT) != 0U)
@@ -137,5 +137,5 @@
  *	6:	wup_tsk(TASK1)
  *	== TASK1ï¼ç¶ãï¼==
- *	7:	sta_alm(ALM3, ALM_RELTIM)
+ *	7:	sta_alm(ALM3, TEST_TIME_CP) ... TASK2-1ãå®è¡åéããã¾ã§
  *		ref_tsk(TASK2, &rtsk)
  *		assert((rtsk.tskstat & TTS_RDY) != 0U)
@@ -149,22 +149,22 @@
  *	11:	wup_tsk(TASK1)
  *	== TASK1ï¼ç¶ãï¼==
- *	12:	dly_tsk(1000U)
+ *	12:	dly_tsk(TEST_TIME_CP) ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-1ï¼ç¶ãï¼==
  *	13:	ext_tsk()
  *	== TASK1ï¼ç¶ãï¼==
- *	14:	sta_alm(ALM3, ALM_RELTIM)
+ *	14:	sta_alm(ALM3, TEST_TIME_PROC) ... ããã«çºçãã¦ãè¯ã
  *		DO(wait_error())								... (B-1)
  *		assert(error_variable == E_OBJ)
- *	15:	sta_alm(ALM4, ALM_RELTIM)
+ *	15:	sta_alm(ALM4, TEST_TIME_PROC) ... ref_almã§åä½ç¢ºèªããã¾ã§
  *		ref_sem(SEM1, &rsem)
  *		assert(rsem.semcnt == 0U)
  *		ref_alm(ALM4, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
- *	16:	dly_tsk(ALM_RELTIM * 2)
+ *	16:	dly_tsk(2 * TEST_TIME_PROC) ... ALM4ãå®è¡ãããã¾ã§
  *	17:	ref_sem(SEM1, &rsem)							... (A-5)
  *		assert(rsem.semcnt == 1U)
  *		ref_alm(ALM4, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	18:	sta_alm(ALM4, ALM_RELTIM)
+ *	18:	sta_alm(ALM4, TEST_TIME_CP) ... TASK2-2ãå®è¡éå§ããã¾ã§
  *	19:	slp_tsk()
  *	== TASK2-2ï¼2åç®ï¼==
@@ -172,5 +172,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	21:	pol_sem(SEM1)
- *	22:	sta_alm(ALM5, ALM_RELTIM)
+ *	22:	sta_alm(ALM5, 2 * TEST_TIME_CP) ... TASK1ãå®è¡éå§ããã¾ã§
  *		ref_flg(FLG1, &rflg)
  *		assert(rflg.flgptn == 0x00U)
@@ -184,15 +184,15 @@
  *		ref_alm(ALM5, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	26:	sta_alm(ALM6, ALM_RELTIM)
+ *	26:	sta_alm(ALM6, TEST_TIME_CP) ... ref_almã§åä½ç¢ºèªããã¾ã§
  *		ref_dtq(DTQ1, &rdtq)
  *		assert(rdtq.sdtqcnt == 0U)
  *		ref_alm(ALM6, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
- *	27:	dly_tsk(ALM_RELTIM * 2)
+ *	27:	dly_tsk(2 * TEST_TIME_CP) ... ALM6ãå®è¡ãããã¾ã§
  *	28:	ref_dtq(DTQ1, &rdtq)							... (A-7)
  *		assert(rdtq.sdtqcnt == 1U)
  *		ref_alm(ALM6, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	29:	sta_alm(ALM6, ALM_RELTIM)
+ *	29:	sta_alm(ALM6, TEST_TIME_CP) ... TASK2-2ãå®è¡éå§ããã¾ã§
  *	30:	slp_tsk()
  *	== TASK2-2ï¼ç¶ãï¼==
@@ -202,5 +202,5 @@
  *		assert(data == 0x01)
  *	33:	act_tsk(TASK2)
- *		sta_alm(ALM7, ALM_RELTIM)
+ *		sta_alm(ALM7, 2 * TEST_TIME_CP) ... TASK1ãå®è¡éå§ããã¾ã§
  *		ref_sem(SEM1, &rsem)
  *		assert(rsem.semcnt == 0U)
@@ -213,5 +213,7 @@
  *	36:	ref_alm(ALM7, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	37:	sta_alm(ALM8, ALM_RELTIM)
+ *	37:	sta_alm(ALM8, TEST_TIME_CP) ... wai_flgã§å¾
+ã¡ã«å
+¥ãã¾ã§
  *		ref_flg(FLG1, &rflg)
  *		assert(rflg.flgptn == 0x01U)
@@ -222,28 +224,30 @@
  *		ref_alm(ALM8, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	40:	sta_alm(ALM9, ALM_RELTIM)
- *	41:	ref_dtq(DTQ1, &rdtq)
+ *	40:	sta_alm(ALM9,  TEST_TIME_CP) ... rcv_dtqã§å¾
+ã¡ã«å
+¥ãã¾ã§
+ *		ref_dtq(DTQ1, &rdtq)
  *		assert(rdtq.sdtqcnt == 0U)
  *		ref_alm(ALM9, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
- *	42:	rcv_dtq(DTQ1, &data)							... (B-7)
- *	43:	assert(data == E_QOVR)
+ *	41:	rcv_dtq(DTQ1, &data)							... (B-7)
+ *	42:	assert(data == E_QOVR)
  *		ref_alm(ALM9, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	44:	sta_alm(ALM10, ALM_RELTIM)
- *	45:	assert(count_variable == 1)
+ *	43:	sta_alm(ALM10, TEST_TIME_CP) ... ref_almã§åä½ç¢ºèªããã¾ã§
+ *	44:	assert(count_variable == 1)
  *		ref_alm(ALM10, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
  *		DO(wait_count(1))								... (A-2)
- *	46:	ref_alm(ALM10, &ralm)
- *		assert((ralm.almstat & TALM_STP) != 0U)
- *	47:	sta_alm(ALM11, ALM_RELTIM)
- *	48:	assert(count_variable == 2)
+ *	45:	ref_alm(ALM10, &ralm)
+ *		assert((ralm.almstat & TALM_STP) != 0U)
+ *	46:	sta_alm(ALM11, TEST_TIME_CP) ... ref_almã§åä½ç¢ºèªããã¾ã§
+ *	47:	assert(count_variable == 2)
  *		ref_alm(ALM11, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
  *		DO(wait_count(2))								... (B-2)
- *	49:	ref_alm(ALM9, &ralm)
- *		assert((ralm.almstat & TALM_STP) != 0U)
- *	50:	END
+ *	48:	ref_alm(ALM9, &ralm)
+ *		assert((ralm.almstat & TALM_STP) != 0U)
+ *	49:	END
  */
 
@@ -281,17 +285,17 @@
 task1(intptr_t exinf)
 {
-	T_RTSK	rtsk;
-	T_RDTQ	rdtq;
-	T_RFLG	rflg;
-	intptr_t	data;
-	FLGPTN	flgptn;
 	ER_UINT	ercd;
 	T_RALM	ralm;
+	T_RTSK	rtsk;
 	T_RSEM	rsem;
+	T_RFLG	rflg;
+	FLGPTN	flgptn;
+	T_RDTQ	rdtq;
+	intptr_t	data;
 
 	test_start(__FILE__);
 
 	check_point(1);
-	ercd = sta_alm(ALM1, ALM_RELTIM);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -312,5 +316,5 @@
 
 	check_point(3);
-	ercd = sta_alm(ALM2, ALM_RELTIM);
+	ercd = sta_alm(ALM2, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -330,5 +334,5 @@
 
 	check_point(7);
-	ercd = sta_alm(ALM3, ALM_RELTIM);
+	ercd = sta_alm(ALM3, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -348,9 +352,9 @@
 
 	check_point(12);
-	ercd = dly_tsk(1000U);
+	ercd = dly_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
 	check_point(14);
-	ercd = sta_alm(ALM3, ALM_RELTIM);
+	ercd = sta_alm(ALM3, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -360,5 +364,5 @@
 
 	check_point(15);
-	ercd = sta_alm(ALM4, ALM_RELTIM);
+	ercd = sta_alm(ALM4, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -374,5 +378,5 @@
 
 	check_point(16);
-	ercd = dly_tsk(ALM_RELTIM * 2);
+	ercd = dly_tsk(2 * TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -389,5 +393,5 @@
 
 	check_point(18);
-	ercd = sta_alm(ALM4, ALM_RELTIM);
+	ercd = sta_alm(ALM4, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -401,5 +405,5 @@
 
 	check_point(22);
-	ercd = sta_alm(ALM5, ALM_RELTIM);
+	ercd = sta_alm(ALM5, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -427,5 +431,5 @@
 
 	check_point(26);
-	ercd = sta_alm(ALM6, ALM_RELTIM);
+	ercd = sta_alm(ALM6, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -441,5 +445,5 @@
 
 	check_point(27);
-	ercd = dly_tsk(ALM_RELTIM * 2);
+	ercd = dly_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -456,5 +460,5 @@
 
 	check_point(29);
-	ercd = sta_alm(ALM6, ALM_RELTIM);
+	ercd = sta_alm(ALM6, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -473,5 +477,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = sta_alm(ALM7, ALM_RELTIM);
+	ercd = sta_alm(ALM7, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -497,5 +501,5 @@
 
 	check_point(37);
-	ercd = sta_alm(ALM8, ALM_RELTIM);
+	ercd = sta_alm(ALM8, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -523,25 +527,64 @@
 
 	check_point(40);
-	ercd = sta_alm(ALM9, ALM_RELTIM);
-	check_ercd(ercd, E_OK);
+	ercd = sta_alm(ALM9,  TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = ref_dtq(DTQ1, &rdtq);
+	check_ercd(ercd, E_OK);
+
+	check_assert(rdtq.sdtqcnt == 0U);
+
+	ercd = ref_alm(ALM9, &ralm);
+	check_ercd(ercd, E_OK);
+
+	check_assert((ralm.almstat & TALM_STA) != 0U);
 
 	check_point(41);
-	ercd = ref_dtq(DTQ1, &rdtq);
-	check_ercd(ercd, E_OK);
-
-	check_assert(rdtq.sdtqcnt == 0U);
+	ercd = rcv_dtq(DTQ1, &data);
+	check_ercd(ercd, E_OK);
+
+	check_point(42);
+	check_assert(data == E_QOVR);
 
 	ercd = ref_alm(ALM9, &ralm);
 	check_ercd(ercd, E_OK);
 
-	check_assert((ralm.almstat & TALM_STA) != 0U);
-
-	check_point(42);
-	ercd = rcv_dtq(DTQ1, &data);
-	check_ercd(ercd, E_OK);
+	check_assert((ralm.almstat & TALM_STP) != 0U);
 
 	check_point(43);
-	check_assert(data == E_QOVR);
-
+	ercd = sta_alm(ALM10, TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	check_point(44);
+	check_assert(count_variable == 1);
+
+	ercd = ref_alm(ALM10, &ralm);
+	check_ercd(ercd, E_OK);
+
+	check_assert((ralm.almstat & TALM_STA) != 0U);
+
+	wait_count(1);
+
+	check_point(45);
+	ercd = ref_alm(ALM10, &ralm);
+	check_ercd(ercd, E_OK);
+
+	check_assert((ralm.almstat & TALM_STP) != 0U);
+
+	check_point(46);
+	ercd = sta_alm(ALM11, TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	check_point(47);
+	check_assert(count_variable == 2);
+
+	ercd = ref_alm(ALM11, &ralm);
+	check_ercd(ercd, E_OK);
+
+	check_assert((ralm.almstat & TALM_STA) != 0U);
+
+	wait_count(2);
+
+	check_point(48);
 	ercd = ref_alm(ALM9, &ralm);
 	check_ercd(ercd, E_OK);
@@ -549,45 +592,5 @@
 	check_assert((ralm.almstat & TALM_STP) != 0U);
 
-	check_point(44);
-	ercd = sta_alm(ALM10, ALM_RELTIM);
-	check_ercd(ercd, E_OK);
-
-	check_point(45);
-	check_assert(count_variable == 1);
-
-	ercd = ref_alm(ALM10, &ralm);
-	check_ercd(ercd, E_OK);
-
-	check_assert((ralm.almstat & TALM_STA) != 0U);
-
-	wait_count(1);
-
-	check_point(46);
-	ercd = ref_alm(ALM10, &ralm);
-	check_ercd(ercd, E_OK);
-
-	check_assert((ralm.almstat & TALM_STP) != 0U);
-
-	check_point(47);
-	ercd = sta_alm(ALM11, ALM_RELTIM);
-	check_ercd(ercd, E_OK);
-
-	check_point(48);
-	check_assert(count_variable == 2);
-
-	ercd = ref_alm(ALM11, &ralm);
-	check_ercd(ercd, E_OK);
-
-	check_assert((ralm.almstat & TALM_STA) != 0U);
-
-	wait_count(2);
-
-	check_point(49);
-	ercd = ref_alm(ALM9, &ralm);
-	check_ercd(ercd, E_OK);
-
-	check_assert((ralm.almstat & TALM_STP) != 0U);
-
-	check_finish(50);
+	check_finish(49);
 	check_point(0);
 }
Index: asp3_wo_tecs/trunk/test/test_notify1.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_notify1.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_notify1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2015-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_notify1.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: test_notify1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -82,7 +82,12 @@
 #endif /* STACK_SIZE */
 
-#ifndef ALM_RELTIM
-#define ALM_RELTIM		5000U		/* ã¢ã©ã¼ã ãã³ãã©ã«ä»æããç¸å¯¾æé */
-#endif /* ALM_RELTIM */
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
 
 #define E_INVALID		(-1)		/* ã¨ã©ã¼ã³ã¼ãã¨ãã¦ç¡å¹ãªå¤ */
Index: asp3_wo_tecs/trunk/test/test_raster1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_raster1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_raster1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_raster1.c 453 2015-08-15 23:05:31Z ertl-hiro $
+ *  $Id: test_raster1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -158,5 +158,5 @@
  *		call(set_bit_func(bit_kernel))
  *	1:	act_tsk(TASK2)
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, TEST_TIME_CP) ... ALM1ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== TASK2-1ï¼1åç®ï¼==
@@ -181,5 +181,5 @@
  *	9:	act_tsk(TASK3)
  *	== TASK3-1ï¼1åç®ï¼==
- *	10:	tloc_mtx(MTX1, 10000U)
+ *	10:	tloc_mtx(MTX1, 3 * TEST_TIME_CP) ... ras_terãããã¾ã§
  *	11:	slp_tsk()
  *	== TASK1ï¼ç¶ãï¼==
@@ -263,5 +263,5 @@
  *		assert(rtsk.raster == false)				... (E-1)
  *		assert(rtsk.dister == false)				... (E-2)(G-4)
- *		tslp_tsk(10000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-3ï¼3åç®ï¼==
  *	41:	dis_ter()
@@ -364,5 +364,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -563,5 +563,5 @@
 	check_assert(rtsk.dister == false);
 
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -696,5 +696,5 @@
 	case 1:
 		check_point(10);
-		ercd = tloc_mtx(MTX1, 10000U);
+		ercd = tloc_mtx(MTX1, 3 * TEST_TIME_CP);
 		check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_raster1.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_raster1.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_raster1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_raster1.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_raster1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -84,4 +84,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_raster2.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_raster2.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_raster2.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_raster2.c 603 2016-02-07 12:42:10Z ertl-hiro $
+ *  $Id: test_raster2.c 740 2016-04-05 15:44:39Z ertl-hiro $
  */
 
@@ -123,5 +123,5 @@
 ããä¼æ­¢ç¶æ
 ã«ï¼»NGKI1178ï¼½
- *	ASPã«ã¼ãã«ã«é©ç¨ãããªãè¦æ±ï¼
+ *	ASP3ã«ã¼ãã«ã«é©ç¨ãããªãè¦æ±ï¼
  *		ï¼»NGKI3764ï¼½ï¼»NGKI3765ï¼½ï¼»NGKI3497ï¼½
  *
@@ -140,5 +140,5 @@
  *
  *	== TASK1 ==
- *	1:	sta_alm(ALM1, 10000U)
+ *	1:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-1ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-1ï¼1åç®ï¼==
@@ -173,5 +173,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	8:	ras_ter(TASK2)
- *		tslp_tsk(10000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-1ï¼ç¶ãï¼==
  *	9:	ena_ter()									... (E-1)
@@ -223,5 +223,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	24:	ras_ter(TASK2)
- *		tslp_tsk(10000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	25:	ena_ter()									... (F-3)
@@ -230,5 +230,5 @@
  *		DO(while(true))
  *	== TASK1ï¼ç¶ãï¼==
- *	27:	sta_alm(ALM1, 10000U)
+ *	27:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-2ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-2ï¼2åç®ï¼==
@@ -239,10 +239,10 @@
  *	29:	ter_tsk(TASK2)
  *		act_tsk(TASK2)
- *		tslp_tsk(10000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-6ï¼6åç®ï¼==
  *	30:	ena_ter()
  *		DO(while(true))
  *	== TASK1ï¼ç¶ãï¼==
- *	31:	sta_alm(ALM1, 10000U)
+ *	31:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-3ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-3ï¼3åç®ï¼==
@@ -259,5 +259,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	35:	ras_ter(TASK2)
- *		tslp_tsk(10000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-7ï¼ç¶ãï¼==
  *	36:	dis_dsp()
@@ -274,5 +274,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	40:	ras_ter(TASK2)
- *		tslp_tsk(10000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-8ï¼ç¶ãï¼==
  *	41:	chg_ipm(TMAX_INTPRI)
@@ -355,5 +355,5 @@
 
 	check_point(1);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -417,5 +417,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -486,9 +486,9 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
 	check_point(27);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -503,9 +503,9 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
 	check_point(31);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -527,5 +527,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -547,5 +547,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/test/test_raster2.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_raster2.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_raster2.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_raster2.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_raster2.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_sem1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_sem1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_sem1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2008-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2008-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_sem1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_sem1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -187,5 +187,5 @@
  *		assert(rsem.wtskid == TSK_NONE)
  *		assert(rsem.semcnt == 0)
- *	7:	sta_alm(ALM1, 10000U)
+ *	7:	sta_alm(ALM1, TEST_TIME_CP) ... ALM1ãå®è¡éå§ããã¾ã§
  *	8:	wai_sem(SEM1)						... (G-1)
  *	== ALM1 ==
@@ -242,5 +242,5 @@
  *		assert(rsem.wtskid == TSK_NONE)
  *		assert(rsem.semcnt == 2)
- *	39:	tslp_tsk(10000U) -> E_TMOUT
+ *	39:	tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK3ï¼ç¶ãï¼==
  *	40:	wai_sem(SEM3)						... (G-4)
@@ -262,15 +262,15 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	48:	sig_sem(SEM3)						... (B-4)
- *	49:	tslp_tsk(10000U) -> E_TMOUT
+ *	49:	tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK4ï¼ç¶ãï¼==
  *	50:	ext_tsk() -> noreturn
  *	== TASK1ï¼ç¶ãï¼==
  *	51:	sig_sem(SEM3)						... (B-4)
- *	52:	tslp_tsk(10000U) -> E_TMOUT
+ *	52:	tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK5ï¼ç¶ãï¼==
  *	53:	ext_tsk() -> noreturn
  *	== TASK1ï¼ç¶ãï¼==
  *	54:	sig_sem(SEM3)						... (B-4)
- *	55:	tslp_tsk(10000U) -> E_TMOUT
+ *	55:	tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK3ï¼ç¶ãï¼==
  *	56:	ext_tsk() -> noreturn
@@ -488,5 +488,5 @@
 
 	check_point(39);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -512,5 +512,5 @@
 
 	check_point(49);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -520,5 +520,5 @@
 
 	check_point(52);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -528,5 +528,5 @@
 
 	check_point(55);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -621,5 +621,5 @@
 
 	check_point(7);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_sem1.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_sem1.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_sem1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2008-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2008-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_sem1.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_sem1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_sem2.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_sem2.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_sem2.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2008-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2008-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_sem2.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_sem2.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -153,5 +153,5 @@
  *	4:	twai_sem(SEM1, TMO_NBLK) -> E_PAR	... (E-5)
  *		twai_sem(SEM1, TMO_POL) -> E_TMOUT	... (F)
- *	5:	sta_alm(ALM1, 10000U)
+ *	5:	sta_alm(ALM1, TEST_TIME_CP) ... ALM1-1ãå®è¡éå§ããã¾ã§
  *	6:	twai_sem(SEM1, TMO_FEVR)			... (G)
  *	== ALM1-1 ==
@@ -168,5 +168,5 @@
  *	== TASK3ï¼åªå
 åº¦ï¼ä½ï¼==
- *	12:	sta_alm(ALM1, 10000U)
+ *	12:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-2ãå®è¡éå§ããã¾ã§
  *		call(wait_var())
  *	== ALM1-2 ==
@@ -177,5 +177,5 @@
  *	14:	wai_sem(SEM1)
  *	== TASK3ï¼ç¶ãï¼==
- *	15:	sta_alm(ALM1, 10000U)
+ *	15:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-3ãå®è¡éå§ããã¾ã§
  *		dis_dsp()
  *		call(wait_var())
@@ -189,5 +189,5 @@
  *	18:	wai_sem(SEM1)
  *	== TASK3ï¼ç¶ãï¼==
- *	19:	sta_alm(ALM1, 10000U)
+ *	19:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-4ãå®è¡éå§ããã¾ã§
  *		sus_tsk(TASK1)
  *		call(wait_var())
@@ -202,5 +202,5 @@
  *	== TASK2ï¼åªå
 åº¦ï¼é«ï¼==
- *	23:	tslp_tsk(10000U) -> E_TMOUT
+ *	23:	tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK2ãå®è¡åéããã¾ã§
  *	== TASK1ï¼ç¶ãï¼==
  *	24:	wai_sem(SEM1)
@@ -208,5 +208,5 @@
  *	25:	ext_tsk() -> noreturn
  *	== TASK2ï¼ç¶ãï¼==
- *	26:	sta_alm(ALM1, 10000U)
+ *	26:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-5ãå®è¡éå§ããã¾ã§
  *		call(wait_var())
  *	== ALM1-5 ==
@@ -217,12 +217,12 @@
  *	28:	ext_tsk() -> noreturn
  *	== TASK1ï¼ç¶ãï¼==
- *	29:	sta_alm(ALM1, 10000U)
- *	30:	twai_sem(SEM1, 100000U) -> E_RLWAI
+ *	29:	sta_alm(ALM1, TEST_TIME_CP) ... ALM1-6ãå®è¡éå§ããã¾ã§
+ *	30:	twai_sem(SEM1, 2 * TEST_TIME_CP) -> E_RLWAI ... rel_waiãããã¾ã§
  *	== ALM1-6 ==
  *	31:	rel_wai(TASK1)
  *		RETURN
  *	== TASK1ï¼ç¶ãï¼==
- *	32:	sta_alm(ALM1, 100000U)
- *	33:	twai_sem(SEM1, 10000U) -> E_TMOUT		... (H)
+ *	32:	sta_alm(ALM1, 3 * TEST_TIME_CP) ... stp_almãããã¾ã§
+ *	33:	twai_sem(SEM1, TEST_TIME_CP) -> E_TMOUT		... (H)
  *	34:	stp_alm(ALM1)
  *	35:	END
@@ -399,5 +399,5 @@
 
 	check_point(5);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -431,17 +431,17 @@
 
 	check_point(29);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
 	check_point(30);
-	ercd = twai_sem(SEM1, 100000U);
+	ercd = twai_sem(SEM1, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_RLWAI);
 
 	check_point(32);
-	ercd = sta_alm(ALM1, 100000U);
+	ercd = sta_alm(ALM1, 3 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
 	check_point(33);
-	ercd = twai_sem(SEM1, 10000U);
+	ercd = twai_sem(SEM1, TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -460,9 +460,9 @@
 
 	check_point(23);
-	ercd = tslp_tsk(10000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
 	check_point(26);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -481,5 +481,5 @@
 
 	check_point(12);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -487,5 +487,5 @@
 
 	check_point(15);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -500,5 +500,5 @@
 
 	check_point(19);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_sem2.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_sem2.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_sem2.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2008-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2008-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_sem2.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_sem2.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_task1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_task1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_task1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_task1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_task1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -221,5 +221,5 @@
  *	32:	slp_tsk()						... (H-3)
  *	== TASK5ï¼ç¶ãï¼==
- *	33:	sta_alm(ALM1, 10000U)
+ *	33:	sta_alm(ALM1, TEST_TIME_CP) ... ALM1ãå®è¡éå§ããã¾ã§
  *	34:	slp_tsk()						... (H-1)
  *	== ALM1 ==
@@ -245,6 +245,6 @@
 alarm1_handler(intptr_t exinf)
 {
+	ER_UINT	ercd;
 	ID		tskid;
-	ER_UINT	ercd;
 
 	check_point(35);
@@ -383,5 +383,5 @@
 
 	check_point(33);
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_task1.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_task1.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_task1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_task1.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_task1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/test/test_tmevt1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_tmevt1.c	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_tmevt1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_tmevt1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_tmevt1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -81,5 +81,5 @@
  *	== TASK1ï¼åªå
 åº¦ï¼ä¸­ï¼==
- *	1:	sta_alm(ALM1, ALM1_RELTIM)
+ *	1:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-1ãå®è¡éå§ããã¾ã§
  *		DO(prev_lefttim = UINT32_MAX)
  *		DO(wait_alarm1(&alarm1_flag1))
@@ -88,10 +88,10 @@
  *		RETURN
  *	== TASK1ï¼ç¶ãï¼==
- *	3:	sta_alm(ALM1, ALM1_RELTIM)
+ *	3:	sta_alm(ALM1, TEST_TIME_PROC) ... ALM1-2ãå®è¡éå§ããã¾ã§
  *		DO(prev_lefttim = UINT32_MAX)
  *		DO(wait_alarm1(&alarm1_flag2))
  *	== ALM1-2ï¼2åç®ï¼==
  *	4:	DO(alarm1_flag2 = true)
- *	5:	sta_alm(ALM1, ALM1_RELTIM)
+ *	5:	sta_alm(ALM1, TEST_TIME_CP) ... ALM1-3ãå®è¡éå§ããã¾ã§
  *		DO(prev_lefttim = UINT32_MAX)
  *		DO(skip_check = true)
@@ -103,11 +103,11 @@
  *		RETURN
  *	== TASK1ï¼ç¶ãï¼==
- *	8:	sta_alm(ALM1, ALM1_RELTIM * 4)
- *		DO(prev_lefttim = UINT32_MAX)
- *		DO(refer_alarm1())
- *  9:	dly_tsk(ALM1_RELTIM)
- *		DO(prev_lefttim -= ALM1_RELTIM)
- *		DO(refer_alarm1())
- *  10:	adj_tim(ALM1_RELTIM)
+ *	8:	sta_alm(ALM1, 3 * TEST_TIME_CP) ... ALM1-4ãå®è¡éå§ããã¾ã§
+ *		DO(prev_lefttim = UINT32_MAX)
+ *		DO(refer_alarm1())
+ *  9:	dly_tsk(TEST_TIME_CP) ... ã©ã®ãããªæéã§ãè¯ã
+ *		DO(prev_lefttim -= TEST_TIME_CP)
+ *		DO(refer_alarm1())
+ *  10:	adj_tim(TEST_TIME_CP)
  *		DO(wait_alarm1(&alarm1_flag4))
  *	== ALM1-4ï¼4åç®ï¼==
@@ -115,12 +115,12 @@
  *		RETURN
  *	== TASK1ï¼ç¶ãï¼==
- *	12:	sta_alm(ALM1, ALM1_RELTIM * 4)
- *		DO(prev_lefttim = UINT32_MAX)
- *		DO(refer_alarm1())
- *  13:	dly_tsk(ALM1_RELTIM)
- *		DO(prev_lefttim -= ALM1_RELTIM)
- *		DO(refer_alarm1())
- *  14:	adj_tim(-ALM1_RELTIM)
- *		DO(prev_lefttim += ALM1_RELTIM)
+ *	12:	sta_alm(ALM1, 4 * TEST_TIME_CP) ... ALM1-5ãå®è¡éå§ããã¾ã§
+ *		DO(prev_lefttim = UINT32_MAX)
+ *		DO(refer_alarm1())
+ *  13:	dly_tsk(TEST_TIME_CP) ... ã©ã®ãããªæéã§ãè¯ã
+ *		DO(prev_lefttim -= TEST_TIME_CP)
+ *		DO(refer_alarm1())
+ *  14:	adj_tim(-TEST_TIME_CP)
+ *		DO(prev_lefttim += TEST_TIME_CP)
  *	15:	DO(wait_alarm1(&alarm1_flag5))
  *	== ALM1-5ï¼5åç®ï¼==
@@ -128,10 +128,10 @@
  *		RETURN
  *	== TASK1ï¼ç¶ãï¼==
- *	17:	sta_alm(ALM1, ALM1_RELTIM * 6)
- *		sta_alm(ALM2, ALM1_RELTIM * 4)
- *		DO(prev_lefttim = UINT32_MAX)
- *		DO(refer_alarm1())
- *  18:	dly_tsk(ALM1_RELTIM)
- *		DO(prev_lefttim -= ALM1_RELTIM)
+ *	17:	sta_alm(ALM1, 4 * TEST_TIME_CP) ... ALM1-6ãå®è¡éå§ããã¾ã§
+ *		sta_alm(ALM2, 3 * TEST_TIME_CP) ... stp_almã§åæ­¢ããã¾ã§
+ *		DO(prev_lefttim = UINT32_MAX)
+ *		DO(refer_alarm1())
+ *  18:	dly_tsk(TEST_TIME_CP) ... ã©ã®ãããªæéã§ãè¯ã
+ *		DO(prev_lefttim -= TEST_TIME_CP)
  *		DO(refer_alarm1())
  *	19:	stp_alm(ALM2)
@@ -144,7 +144,7 @@
  *		RETURN
  *	== TASK1ï¼ç¶ãï¼==
- *	22:	sta_alm(ALM1, ALM1_RELTIM * 6)
- *		sta_alm(ALM2, ALM1_RELTIM * 4)
- *		sta_alm(ALM3, ALM1_RELTIM)
+ *	22:	sta_alm(ALM1, 3 * TEST_TIME_CP) ... ALM1-7ãå®è¡éå§ããã¾ã§
+ *		sta_alm(ALM2, 2 * TEST_TIME_CP) ... stp_almã§åæ­¢ããã¾ã§
+ *		sta_alm(ALM3, TEST_TIME_CP) ... ALM3-1ãå®è¡éå§ããã¾ã§
  *		DO(prev_lefttim = UINT32_MAX)
  *	23:	DO(wait_alarm1(&alarm1_flag7))
@@ -261,5 +261,5 @@
 
 		check_point(5);
-		ercd = sta_alm(ALM1, ALM1_RELTIM);
+		ercd = sta_alm(ALM1, TEST_TIME_CP);
 		check_ercd(ercd, E_OK);
 
@@ -350,5 +350,5 @@
 
 	check_point(1);
-	ercd = sta_alm(ALM1, ALM1_RELTIM);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -358,5 +358,5 @@
 
 	check_point(3);
-	ercd = sta_alm(ALM1, ALM1_RELTIM);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -369,5 +369,5 @@
 
 	check_point(8);
-	ercd = sta_alm(ALM1, ALM1_RELTIM * 4);
+	ercd = sta_alm(ALM1, 3 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -377,13 +377,13 @@
 
 	check_point(9);
-	ercd = dly_tsk(ALM1_RELTIM);
-	check_ercd(ercd, E_OK);
-
-	prev_lefttim -= ALM1_RELTIM;
+	ercd = dly_tsk(TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	prev_lefttim -= TEST_TIME_CP;
 
 	refer_alarm1();
 
 	check_point(10);
-	ercd = adj_tim(ALM1_RELTIM);
+	ercd = adj_tim(TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -391,5 +391,5 @@
 
 	check_point(12);
-	ercd = sta_alm(ALM1, ALM1_RELTIM * 4);
+	ercd = sta_alm(ALM1, 4 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -399,16 +399,16 @@
 
 	check_point(13);
-	ercd = dly_tsk(ALM1_RELTIM);
-	check_ercd(ercd, E_OK);
-
-	prev_lefttim -= ALM1_RELTIM;
+	ercd = dly_tsk(TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	prev_lefttim -= TEST_TIME_CP;
 
 	refer_alarm1();
 
 	check_point(14);
-	ercd = adj_tim(-ALM1_RELTIM);
-	check_ercd(ercd, E_OK);
-
-	prev_lefttim += ALM1_RELTIM;
+	ercd = adj_tim(-TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	prev_lefttim += TEST_TIME_CP;
 
 	check_point(15);
@@ -416,8 +416,8 @@
 
 	check_point(17);
-	ercd = sta_alm(ALM1, ALM1_RELTIM * 6);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_alm(ALM2, ALM1_RELTIM * 4);
+	ercd = sta_alm(ALM1, 4 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_alm(ALM2, 3 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -427,8 +427,8 @@
 
 	check_point(18);
-	ercd = dly_tsk(ALM1_RELTIM);
-	check_ercd(ercd, E_OK);
-
-	prev_lefttim -= ALM1_RELTIM;
+	ercd = dly_tsk(TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	prev_lefttim -= TEST_TIME_CP;
 
 	refer_alarm1();
@@ -449,11 +449,11 @@
 
 	check_point(22);
-	ercd = sta_alm(ALM1, ALM1_RELTIM * 6);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_alm(ALM2, ALM1_RELTIM * 4);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_alm(ALM3, ALM1_RELTIM);
+	ercd = sta_alm(ALM1, 3 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_alm(ALM2, 2 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_alm(ALM3, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/test/test_tmevt1.h
===================================================================
--- asp3_wo_tecs/trunk/test/test_tmevt1.h	(revision 305)
+++ asp3_wo_tecs/trunk/test/test_tmevt1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_tmevt1.h 286 2014-11-29 07:51:11Z ertl-hiro $
+ *  $Id: test_tmevt1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -82,7 +82,12 @@
 #endif /* STACK_SIZE */
 
-#ifndef ALM1_RELTIM
-#define ALM1_RELTIM		200U		/* ã¢ã©ã¼ã ãã³ãã©1ã«ä»æããç¸å¯¾æé */
-#endif /* ALM1_RELTIM */
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
 
 /*
Index: asp3_wo_tecs/trunk/test/testexec.rb
===================================================================
--- asp3_wo_tecs/trunk/test/testexec.rb	(revision 305)
+++ asp3_wo_tecs/trunk/test/testexec.rb	(revision 306)
@@ -52,5 +52,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: testexec.rb 600 2016-02-07 11:46:22Z ertl-hiro $
+#  $Id: testexec.rb 675 2016-03-06 01:30:21Z ertl-hiro $
 # 
 
@@ -63,72 +63,72 @@
 TEST_SPEC = {
   # æ©è½ãã¹ããã­ã°ã©ã 
-  "cpuexc1"  => { :SRC=>"test_cpuexc1", :CFG=>"test_cpuexc" },
-  "cpuexc2"  => { :SRC=>"test_cpuexc2", :CFG=>"test_cpuexc" },
-  "cpuexc3"  => { :SRC=>"test_cpuexc3", :CFG=>"test_cpuexc" },
-  "cpuexc4"  => { :SRC=>"test_cpuexc4", :CFG=>"test_cpuexc" },
-  "cpuexc5"  => { :SRC=>"test_cpuexc5", :CFG=>"test_cpuexc" },
-  "cpuexc6"  => { :SRC=>"test_cpuexc6", :CFG=>"test_cpuexc" },
-  "cpuexc7"  => { :SRC=>"test_cpuexc7", :CFG=>"test_cpuexc" },
-  "cpuexc8"  => { :SRC=>"test_cpuexc8", :CFG=>"test_cpuexc" },
-  "cpuexc9"  => { :SRC=>"test_cpuexc9", :CFG=>"test_cpuexc" },
-  "cpuexc10" => { :SRC=>"test_cpuexc10", :CFG=>"test_cpuexc" },
-  "dlynse"   => { :SRC=>"test_dlynse" },
-  "dtq1"     => { :SRC=>"test_dtq1" },
-  "flg1"     => { :SRC=>"test_flg1" },
-  "hrt1"     => { :SRC=>"test_hrt1" },
-  "mutex1"   => { :SRC=>"test_mutex1", :BIT=>"mutex" },
-  "mutex2"   => { :SRC=>"test_mutex2", :BIT=>"mutex" },
-  "mutex3"   => { :SRC=>"test_mutex3", :BIT=>"mutex" },
-  "mutex4"   => { :SRC=>"test_mutex4", :BIT=>"mutex" },
-  "mutex5"   => { :SRC=>"test_mutex5", :BIT=>"mutex" },
-  "mutex6"   => { :SRC=>"test_mutex6", :BIT=>"mutex" },
-  "mutex7"   => { :SRC=>"test_mutex7", :BIT=>"mutex" },
-  "mutex8"   => { :SRC=>"test_mutex8", :BIT=>"mutex" },
-  "notify1"  => { :SRC=>"test_notify1" },
-  "raster1"  => { :SRC=>"test_raster1", :BIT=>"kernel" },
-  "raster2"  => { :SRC=>"test_raster2" },
-  "sem1"     => { :SRC=>"test_sem1" },
-  "sem2"     => { :SRC=>"test_sem2" },
-  "sysman1"  => { :SRC=>"test_sysman1" },
-  "sysstat1" => { :SRC=>"test_sysstat1" },
-  "task1"    => { :SRC=>"test_task1", :BIT=>"kernel" },
-  "tmevt1"   => { :SRC=>"test_hrt1" },
+  "cpuexc1"  => { SRC: "test_cpuexc1", CFG: "test_cpuexc" },
+  "cpuexc2"  => { SRC: "test_cpuexc2", CFG: "test_cpuexc" },
+  "cpuexc3"  => { SRC: "test_cpuexc3", CFG: "test_cpuexc" },
+  "cpuexc4"  => { SRC: "test_cpuexc4", CFG: "test_cpuexc" },
+  "cpuexc5"  => { SRC: "test_cpuexc5", CFG: "test_cpuexc" },
+  "cpuexc6"  => { SRC: "test_cpuexc6", CFG: "test_cpuexc" },
+  "cpuexc7"  => { SRC: "test_cpuexc7", CFG: "test_cpuexc" },
+  "cpuexc8"  => { SRC: "test_cpuexc8", CFG: "test_cpuexc" },
+  "cpuexc9"  => { SRC: "test_cpuexc9", CFG: "test_cpuexc" },
+  "cpuexc10" => { SRC: "test_cpuexc10", CFG: "test_cpuexc" },
+  "dlynse"   => { SRC: "test_dlynse" },
+  "dtq1"     => { SRC: "test_dtq1" },
+  "flg1"     => { SRC: "test_flg1" },
+  "hrt1"     => { SRC: "test_hrt1" },
+  "mutex1"   => { SRC: "test_mutex1", BIT: "mutex" },
+  "mutex2"   => { SRC: "test_mutex2", BIT: "mutex" },
+  "mutex3"   => { SRC: "test_mutex3", BIT: "mutex" },
+  "mutex4"   => { SRC: "test_mutex4", BIT: "mutex" },
+  "mutex5"   => { SRC: "test_mutex5", BIT: "mutex" },
+  "mutex6"   => { SRC: "test_mutex6", BIT: "mutex" },
+  "mutex7"   => { SRC: "test_mutex7", BIT: "mutex" },
+  "mutex8"   => { SRC: "test_mutex8", BIT: "mutex" },
+  "notify1"  => { SRC: "test_notify1" },
+  "raster1"  => { SRC: "test_raster1", BIT: "kernel" },
+  "raster2"  => { SRC: "test_raster2" },
+  "sem1"     => { SRC: "test_sem1" },
+  "sem2"     => { SRC: "test_sem2" },
+  "sysman1"  => { SRC: "test_sysman1" },
+  "sysstat1" => { SRC: "test_sysstat1" },
+  "task1"    => { SRC: "test_task1", BIT: "kernel" },
+  "tmevt1"   => { SRC: "test_tmevt1" },
 
   # ã¡ãã»ã¼ã¸ãããã¡æ©è½æ¡å¼µããã±ã¼ã¸ã®æ©è½ãã¹ããã­ã°ã©ã 
-  "messagebuf1" => { :SRC=>"test_messagebuf1", :BIT=>"kernel" },
-  "messagebuf2" => { :SRC=>"test_messagebuf2", :BIT=>"kernel" },
+  "messagebuf1" => { SRC: "test_messagebuf1", BIT: "kernel" },
+  "messagebuf2" => { SRC: "test_messagebuf2", BIT: "kernel" },
 
   # ãªã¼ãã©ã³ãã³ãã©æ©è½æ¡å¼µããã±ã¼ã¸ã®æ©è½ãã¹ããã­ã°ã©ã 
-  "ovrhdr1"  => { :SRC=>"test_ovrhdr1" },
+  "ovrhdr1"  => { SRC: "test_ovrhdr1" },
 
   # å¶ç´ã¿ã¹ã¯æ¡å¼µããã±ã¼ã¸ã®æ©è½ãã¹ããã­ã°ã©ã 
-  "rstr1"    => { :SRC=>"test_rstr1" },
-  "rstr2"    => { :SRC=>"test_rstr2" },
+  "rstr1"    => { SRC: "test_rstr1" },
+  "rstr2"    => { SRC: "test_rstr2" },
 
   # ãµãåªå
 åº¦æ©è½æ¡å¼µããã±ã¼ã¸ã®æ©è½ãã¹ããã­ã°ã©ã 
-  "subprio1" => { :SRC=>"test_subprio1" },
-  "subprio2" => { :SRC=>"test_subprio2" },
+  "subprio1" => { SRC: "test_subprio1" },
+  "subprio2" => { SRC: "test_subprio2" },
 
   # ã·ã¹ãã æå»ç®¡çæ©è½ãã¹ããã­ã°ã©ã 
-  "systim1" => { :TARGET=>1, :SRC=>"hrt_systim1", :DEFS=>"-DHRT_CONFIG1" },
-  "systim2" => { :TARGET=>1, :SRC=>"hrt_systim2", :DEFS=>"-DHRT_CONFIG1" },
-  "systim3" => { :TARGET=>1, :SRC=>"hrt_systim3", :DEFS=>"-DHRT_CONFIG1" },
-  "systim4" => { :TARGET=>1, :SRC=>"hrt_systim4", :DEFS=>"-DHRT_CONFIG2" },
+  "systim1" => { TARGET: 1, SRC: "hrt_systim1", DEFS: "-DHRT_CONFIG1" },
+  "systim2" => { TARGET: 1, SRC: "hrt_systim2", DEFS: "-DHRT_CONFIG1" },
+  "systim3" => { TARGET: 1, SRC: "hrt_systim3", DEFS: "-DHRT_CONFIG1" },
+  "systim4" => { TARGET: 1, SRC: "hrt_systim4", DEFS: "-DHRT_CONFIG2" },
 
   # ããªããèª¿æ´æ©è½æ¡å¼µããã±ã¼ã¸ã®ã·ã¹ãã æå»ç®¡çæ©è½ãã¹ããã­ã°ã©ã 
-  "drift1"   => { :TARGET=>1, :SRC=>"hrt_drift1", :DEFS=>"-DHRT_CONFIG1" },
-  "drift1-64ops"  => { :TARGET=>1, :SRC=>"hrt_drift1",
-								:DEFS=>"-DHRT_CONFIG1 -DUSE_64BIT_OPS" },
-  "systim1-64ops" => { :TARGET=>1, :SRC=>"hrt_systim1",
-								:DEFS=>"-DHRT_CONFIG1 -DUSE_64BIT_OPS" },
+  "drift1"   => { TARGET: 1, SRC: "hrt_drift1", DEFS: "-DHRT_CONFIG1" },
+  "drift1-64ops"  => { TARGET: 1, SRC: "hrt_drift1",
+								DEFS: "-DHRT_CONFIG1 -DUSE_64BIT_OPS" },
+  "systim1-64ops" => { TARGET: 1, SRC: "hrt_systim1",
+								DEFS: "-DHRT_CONFIG1 -DUSE_64BIT_OPS" },
 
   # æ§è½è©ä¾¡ãã­ã°ã©ã 
-  "perf0" => { :CDL=>"perf_pf" },
-  "perf1" => { :CDL=>"perf_pf" },
-  "perf2" => { :CDL=>"perf_pf" },
-  "perf3" => { :CDL=>"perf_pf" },
-  "perf4" => { :CDL=>"perf_pf" },
-  "perf5" => { :CDL=>"perf_pf" },
+  "perf0" => { CDL: "perf_pf" },
+  "perf1" => { CDL: "perf_pf" },
+  "perf2" => { CDL: "perf_pf" },
+  "perf3" => { CDL: "perf_pf" },
+  "perf4" => { CDL: "perf_pf" },
+  "perf5" => { CDL: "perf_pf" },
 }
 
Index: asp3_wo_tecs/trunk/utils/gentest.rb
===================================================================
--- asp3_wo_tecs/trunk/utils/gentest.rb	(revision 305)
+++ asp3_wo_tecs/trunk/utils/gentest.rb	(revision 306)
@@ -52,5 +52,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: gentest.rb 578 2016-02-03 07:23:53Z ertl-hiro $
+#  $Id: gentest.rb 743 2016-04-10 16:00:40Z ertl-hiro $
 # 
 
@@ -62,76 +62,56 @@
 #  çæåä½ãæ±ºããããã®è¨­å®
 #
-$parameterPosition = {
-  "get_tst" => 2,
-  "get_pri" => 2,
-  "get_inf" => 1,
-  "ref_tsk" => 2,
-  "ref_sem" => 2,
-  "ref_flg" => 2,
-  "ref_dtq" => 2,
-  "ref_pdq" => 2,
-  "ref_mtx" => 2,
-  "ref_mbf" => 2,
-  "ref_mpf" => 2,
-  "get_tim" => 1,
-  "ref_cyc" => 2,
-  "ref_alm" => 2,
-  "ref_ovr" => 2,
-  "get_tid" => 1,
-  "iget_tid" => 1,
-  "get_lod" => 2,
-  "get_nth" => 3,
-  "get_ipm" => 1,
-  "wai_flg" => 4,
-  "pol_flg" => 4,
-  "twai_flg" => 4,
-  "rcv_dtq" => 2,
-  "prcv_dtq" => 2,
-  "trcv_dtq" => 2,
+$parameterDefinition = {
+  "get_tst" => { 2 => "STAT" },
+  "get_pri" => { 2 => "PRI" },
+  "get_inf" => { 1 => "intptr_t" },
+  "ref_tsk" => { 2 => "T_RTSK" },
+  "ref_sem" => { 2 => "T_RSEM" },
+  "wai_flg" => { 4 => "FLGPTN" },
+  "pol_flg" => { 4 => "FLGPTN" },
+  "twai_flg" => { 4 => "FLGPTN" },
+  "ref_flg" => { 2 => "T_RFLG" },
+  "rcv_dtq" => { 2 => "intptr_t" },
+  "prcv_dtq" => { 2 => "intptr_t" },
+  "trcv_dtq" => { 2 => "intptr_t" },
+  "ref_dtq" => { 2 => "T_RDTQ" },
+  "rcv_pdq" => { 2 => "intptr_t" , 3 => "PRI" },
+  "prcv_pdq" => { 2 => "intptr_t" , 3 => "PRI" },
+  "trcv_pdq" => { 2 => "intptr_t" , 3 => "PRI" },
+  "ref_pdq" => { 2 => "T_RPDQ" },
+  "ref_mtx" => { 2 => "T_RMTX" },
+  "ref_mbf" => { 2 => "T_RMBF" },
+  "get_mpf" => { 2 => "void *" },
+  "pget_mpf" => { 2 => "void *" },
+  "tget_mpf" => { 2 => "void *" },
+  "ref_mpf" => { 2 => "T_RMPF" },
+  "get_tim" => { 1 => "SYSTIM" },
+  "ref_cyc" => { 2 => "T_RCYC" },
+  "ref_alm" => { 2 => "T_RALM" },
+  "ref_ovr" => { 2 => "T_ROVR" },
+  "get_tid" => { 1 => "ID" },
+  "get_did" => { 1 => "ID" },
+  "get_lod" => { 2 => "uint_t" },
+  "mget_lod" => { 3 => "uint_t" },
+  "get_nth" => { 3 => "ID" },
+  "mget_nth" => { 4 => "ID" },
+  "get_ipm" => { 1 => "PRI" },
+  "get_som" => { 1 => "ID" }
 }
 
-$parameterType = {
-  "get_tst" => "STAT",
-  "get_pri" => "PRI",
-  "get_inf" => "intptr_t",
-  "ref_tsk" => "T_RTSK",
-  "ref_sem" => "T_RSEM",
-  "ref_flg" => "T_RFLG",
-  "ref_dtq" => "T_RDTQ",
-  "ref_pdq" => "T_RPDQ",
-  "ref_mtx" => "T_RMTX",
-  "ref_mbf" => "T_RMBF",
-  "ref_mpf" => "T_RMPF",
-  "get_tim" => "SYSTIM",
-  "ref_cyc" => "T_RCYC",
-  "ref_alm" => "T_RALM",
-  "ref_ovr" => "T_ROVR",
-  "get_tid" => "ID",
-  "iget_tid" => "ID",
-  "get_lod" => "uint_t",
-  "get_nth" => "ID",
-  "get_ipm" => "PRI",
-  "wai_flg" => "FLGPTN",
-  "pol_flg" => "FLGPTN",
-  "twai_flg" => "FLGPTN",
-  "rcv_dtq" => "intptr_t",
-  "prcv_dtq" => "intptr_t",
-  "trcv_dtq" => "intptr_t",
-}
-  
 $functionParameters = {
-  "target_hrt_set_event" => "HRTCNT hrtcnt",
+  "target_hrt_set_event" => "HRTCNT hrtcnt"
 }
   
 $functionValue = {
-  "target_hrt_get_current" => "HRTCNT",
+  "target_hrt_get_current" => "HRTCNT"
 }
   
 $functionReturn = {
-  "target_hrt_get_current" => "0U",
+  "target_hrt_get_current" => "0U"
 }
   
 $functionCheckParameter = {
-  "target_hrt_set_event" => "hrtcnt",
+  "target_hrt_set_event" => "hrtcnt"
 }
 
@@ -246,7 +226,13 @@
     print("{\n")
 
-    @variableList.keys.each do |varName|
-      print("\t#{@variableList[varName]}")
-      print(@variableList[varName].length < 4 ? "\t\t" : "\t")
+    @variableList.each do |varName, varType|
+      if /^(.+)\w*\*$/ =~ varType
+        varBaseType = $1
+        print("\t#{varBaseType}")
+        print(varBaseType.length < 4 ? "\t\t*" : "\t*")
+      else
+        print("\t#{varType}")
+        print(varType.length < 4 ? "\t\t" : "\t")
+      end
       print("#{varName};\n")
     end
@@ -296,9 +282,11 @@
     params = $2.split(/\s*,\s*/)
 
-    if !$parameterPosition[svcName].nil? \
-					&& params.size >= $parameterPosition[svcName]
-      varName = params[$parameterPosition[svcName] - 1].sub(/^\&/, "")
-      typeName = $parameterType[svcName]
-      pu.addVariable(varName, typeName)
+    if $parameterDefinition.has_key?(svcName)
+      $parameterDefinition[svcName].each do |pos, type|
+        if params.size >= pos
+          varName = params[pos - 1].sub(/^\&/, "")
+          pu.addVariable(varName, type)
+        end
+      end
     end
   end
